phpwind的wap中帖子访问权限问题

1970-01-01    来源:

容器云强势上线!快速搭建集群,上万Linux镜像随意使用
关键字描述:权限 问题 访问 帖子 fm &amp fid &quot groupid allowvisit

1.打开:wap/global.php
查找函数:
Copy code
function forumcheck($fid,$type) {
global $db,$groupid,$gp_allowrp;
$fm = $db->get_one("SELECT password,allowvisit,allowread,f_type,f_check,allowpost,allowrp FROM pw_forums WHERE fid='$fid'");
if (!$fm || $fm['f_type']=='former' && $groupid=='guest' || $fm['password']!='' || $fm['f_type']=='hidden' || $fm['allowvisit'] && @strpos($fm['allowvisit'],",$groupid,")===false || $fm['f_check']>'0') {
wap_msg('forum_right');
}
}


替换为:

Copy code
function forumcheck($fid,$type) {
global $db,$groupid,$gp_allowrp;
$fm = $db->get_one("SELECT password,allowvisit,allowread,f_type,f_check,allowpost,allowrp FROM pw_forums WHERE fid='$fid'");
if (!$fm || $fm['f_type']=='former' && $groupid=='guest' || $fm['password']!='' || $fm['f_type']=='hidden' || $type == 'list' &&$fm['allowvisit'] && @strpos($fm['allowvisit'],",$groupid,")===false || $type == 'read' && $fm['allowread'] && @strpos($fm['allowread'],",$groupid,")===false || $fm['f_check']>'0') {
wap_msg('forum_right');
}
}




2.打开:wap/read.php
查找:
Copy code
forumcheck($fid);

修改为:
Copy code
forumcheck($fid,'read');




3.打开:wap/list.php
查找:
Copy code
forumcheck($fid);

修改为:
Copy code
forumcheck($fid,'list');

标签: 权限 问题

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点!
本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。

上一篇:无心宠物帖子内显示(玫瑰花 版)for pw6.0

下一篇:PHPWind7.3特色功能推荐