迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
栏目设置会员访问权限以后,
想在会员中心 调处该等级会员权限内能访问的所以文档。
改如何写啊
$catids = implode(', ', array_keys(\Phpcmf\Service::C()->_module_member_category(\Phpcmf\Service::L('cache')->get('module-1-news', 'category'), 'news', 'show')));
$dir = 'news'; $category = \Phpcmf\Service::L('cache')->get('module-'.SITE_ID.'-'.$dir, 'category'); foreach ($category as $id => $t) { // 筛选可访问的栏目权限 if (!dr_member_auth(\Phpcmf\Service::V()->member_authid, \Phpcmf\Service::V()->member_cache['auth_module'][SITE_ID][$dir]['category'][$t['id']]['show'])) { // 用户的的权限判断 unset($category[$id]); } } $catids = implode(', ', array_keys($category)); var_dump($catids);
$dir = 'news'; $category = \Phpcmf\Service::L('cache')->get('module-'.SITE_ID.'-'.$dir, 'category'); foreach ($category as $id => $t) { // 筛选可访问的栏目权限 if (!dr_member_auth(\Phpcmf\Service::C()->member_authid, \Phpcmf\Service::C()->member_cache['auth_module'][SITE_ID][$dir]['category'][$t['id']]['show'])) { // 用户的的权限判断 unset($category[$id]); } } $catids = implode(', ', array_keys($category)); var_dump($catids);
<?php $dir = 'news'; $category = \Phpcmf\Service::L('cache')->get('module-'.SITE_ID.'-'.$dir, 'category'); foreach ($category as $id => $t) { // 筛选可访问的栏目权限 if (!dr_member_auth(\Phpcmf\Service::C()->member_authid, \Phpcmf\Service::C()->member_cache['auth_module'][SITE_ID][$dir]['category'][$t['id']]['show'])) { // 用户的的权限判断 unset($category[$id]); } } $catids = implode(', ', array_keys($category)); $where = urlencode("catid IN (".$catids.")"); ?> {module module=news where=$where order=updatetime num=9}