|
|
@ -214,12 +214,13 @@ Class SiteController extends Controller { |
|
|
|
return $this->renderJson(compact('page', 'pageSize', 'videos')); |
|
|
|
return $this->renderJson(compact('page', 'pageSize', 'videos')); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$isAdminIp = Common::isAdminIp($this->getUserIp()); //判断是否拥有管理权限 |
|
|
|
|
|
|
|
|
|
|
|
$viewName = 'index'; |
|
|
|
$viewName = 'index'; |
|
|
|
$params = compact( |
|
|
|
$params = compact( |
|
|
|
'page', 'pageSize', 'cacheDataId', 'showType', |
|
|
|
'page', 'pageSize', 'cacheDataId', 'showType', |
|
|
|
'dirTree', 'scanResults', 'menus', 'htmlReadme', 'htmlCateReadme', 'mp3File', 'copyright', |
|
|
|
'dirTree', 'scanResults', 'menus', 'htmlReadme', 'htmlCateReadme', 'mp3File', 'copyright', |
|
|
|
'alertWarning' |
|
|
|
'alertWarning', 'isAdminIp' |
|
|
|
); |
|
|
|
); |
|
|
|
return $this->render($viewName, $params, $pageTitle); |
|
|
|
return $this->render($viewName, $params, $pageTitle); |
|
|
|
} |
|
|
|
} |
|
|
@ -373,6 +374,9 @@ Class SiteController extends Controller { |
|
|
|
if (empty($cateId) || empty($url)) { |
|
|
|
if (empty($cateId) || empty($url)) { |
|
|
|
$code = 0; |
|
|
|
$code = 0; |
|
|
|
$msg = '参数不能为空'; |
|
|
|
$msg = '参数不能为空'; |
|
|
|
|
|
|
|
}else if (Common::isAdminIp($this->getUserIp()) == false) { |
|
|
|
|
|
|
|
$code = 0; |
|
|
|
|
|
|
|
$msg = '403 Forbidden,禁止访问'; |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
$cacheKey = $this->getCacheKey($cateId, 'snap'); |
|
|
|
$cacheKey = $this->getCacheKey($cateId, 'snap'); |
|
|
|
$img_id = ''; //为保持数据格式一致,图片id传空 |
|
|
|
$img_id = ''; //为保持数据格式一致,图片id传空 |
|
|
@ -579,13 +583,15 @@ Class SiteController extends Controller { |
|
|
|
$copyright = $readmeFile['copyright']; |
|
|
|
$copyright = $readmeFile['copyright']; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$isAdminIp = Common::isAdminIp($this->getUserIp()); //判断是否拥有管理权限 |
|
|
|
|
|
|
|
|
|
|
|
$pageTitle = "正在播放:{$videoFilename}"; |
|
|
|
$pageTitle = "正在播放:{$videoFilename}"; |
|
|
|
$this->layout = 'player'; |
|
|
|
$this->layout = 'player'; |
|
|
|
$viewName = 'player'; |
|
|
|
$viewName = 'player'; |
|
|
|
$params = compact( |
|
|
|
$params = compact( |
|
|
|
'videoUrl', 'videoId', 'videoFilename', |
|
|
|
'videoUrl', 'videoId', 'videoFilename', |
|
|
|
'cateId', 'cacheParentDataId', 'page', 'pageSize', |
|
|
|
'cateId', 'cacheParentDataId', 'page', 'pageSize', |
|
|
|
'copyright' |
|
|
|
'copyright', 'isAdminIp' |
|
|
|
); |
|
|
|
); |
|
|
|
return $this->render($viewName, $params, $pageTitle); |
|
|
|
return $this->render($viewName, $params, $pageTitle); |
|
|
|
} |
|
|
|
} |
|
|
@ -628,6 +634,9 @@ Class SiteController extends Controller { |
|
|
|
if (empty($videoId) || empty($metaData)) { |
|
|
|
if (empty($videoId) || empty($metaData)) { |
|
|
|
$code = 0; |
|
|
|
$code = 0; |
|
|
|
$msg = '参数不能为空'; |
|
|
|
$msg = '参数不能为空'; |
|
|
|
|
|
|
|
}else if (Common::isAdminIp($this->getUserIp()) == false) { |
|
|
|
|
|
|
|
$code = 0; |
|
|
|
|
|
|
|
$msg = '403 Forbidden,禁止访问'; |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
$cacheKey = $this->getCacheKey($videoId, 'vmeta'); |
|
|
|
$cacheKey = $this->getCacheKey($videoId, 'vmeta'); |
|
|
|
$cacheSubDir = 'video'; |
|
|
|
$cacheSubDir = 'video'; |
|
|
|