|
|
|
@ -8,6 +8,8 @@ require_once __DIR__ . '/../../../plugins/Common.php';
@@ -8,6 +8,8 @@ require_once __DIR__ . '/../../../plugins/Common.php';
|
|
|
|
|
require_once __DIR__ . '/../../../plugins/Html.php'; |
|
|
|
|
|
|
|
|
|
Class SiteController extends Controller { |
|
|
|
|
protected $dateIndexCacheKey = 'MainBotDateIndex'; |
|
|
|
|
protected $noOriginalCtimeFilesCacheKey = 'MainBotNoOriginalCtimeFiles'; |
|
|
|
|
|
|
|
|
|
public function actionIndex() { |
|
|
|
|
//获取数据 |
|
|
|
@ -257,11 +259,16 @@ Class SiteController extends Controller {
@@ -257,11 +259,16 @@ Class SiteController extends Controller {
|
|
|
|
|
|
|
|
|
|
$isAdminIp = Common::isAdminIp($this->getUserIp()); //判断是否拥有管理权限 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//从缓存文件获取按年份、月份归类的索引数据 |
|
|
|
|
$cacheDataByDate = Common::getCache($this->dateIndexCacheKey); |
|
|
|
|
|
|
|
|
|
$viewName = 'index'; |
|
|
|
|
$params = compact( |
|
|
|
|
'page', 'pageSize', 'cacheDataId', 'showType', |
|
|
|
|
'dirTree', 'scanResults', 'menus', 'htmlReadme', 'htmlCateReadme', 'mp3File', 'copyright', |
|
|
|
|
'alertWarning', 'isAdminIp', 'allFiles' |
|
|
|
|
'alertWarning', 'isAdminIp', 'allFiles', |
|
|
|
|
'cacheDataByDate' |
|
|
|
|
); |
|
|
|
|
return $this->render($viewName, $params, $pageTitle); |
|
|
|
|
} |
|
|
|
|