//栏目ID
$cat = $this->request->param('catid/d', 0);
if (empty($cat)) {
$cat = $this->request->param('catdir/s', '');
}
$page = $this->request->param('page/d', 1);
//获取栏目数据
$category = getCategory($cat);
if (empty($category)) {
throw new \think\exception\HttpException(404, patch('PageNot'));
}
$catid = $category['id'];
// 20211226 判断栏目的访问权限
$readListAuth = isset(cache("Cms_Config")['read_list_auth']) ? cache("Cms_Config")['read_list_auth'] : 1;
$reads = Db::name('category_read')->where(array("catid" => $catid, "is_admin" => 0, "action" => "add"))->field('roleid as id')->select();
$roles = array_column($reads,'id');
if($readListAuth){
if ($roles) {
if (in_array($this->auth->groupid,$roles)===false) {
think_var | zh-cn |
think_site_id | 1 |
USER | www |
HOME | /home/www |
HTTP_REFERER | http://www.yjdsj.com/index.php/sglc.html |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_HOST | www.yjdsj.com |
PATH_INFO | /sglc.html |
REDIRECT_STATUS | 200 |
SERVER_NAME | yjdsj.com |
SERVER_PORT | 443 |
SERVER_ADDR | 10.0.8.6 |
REMOTE_PORT | 50666 |
REMOTE_ADDR | 44.200.39.110 |
SERVER_SOFTWARE | nginx/1.20.2 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/2.0 |
DOCUMENT_ROOT | /www/wwwroot/yjdsj_home/public |
DOCUMENT_URI | /index.php/sglc.html |
REQUEST_URI | /index.php/sglc.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | |
SCRIPT_FILENAME | /www/wwwroot/yjdsj_home/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php/sglc.html |
REQUEST_TIME_FLOAT | 1711669351.4345 |
REQUEST_TIME | 1711669351 |
IF_PUBLIC | true |
ROOT_PATH | /www/wwwroot/yjdsj_home/public/../ |
APP_PATH | /www/wwwroot/yjdsj_home/public/../application/ |
DS | / |
ADDON_PATH | /www/wwwroot/yjdsj_home/public/../addons/ |
ROOT_URL | / |
TEMPLATE_PATH | /www/wwwroot/yjdsj_home/public/../templates/ |
FILTER_VALIDATE_BOOL | 258 |
PINYIN_DEFAULT | 4096 |
PINYIN_TONE | 2 |
PINYIN_NO_TONE | 4 |
PINYIN_ASCII_TONE | 8 |
PINYIN_NAME | 16 |
PINYIN_KEEP_NUMBER | 32 |
PINYIN_KEEP_ENGLISH | 64 |
PINYIN_UMLAUT_V | 128 |
PINYIN_KEEP_PUNCTUATION | 256 |