phpwind的wap中帖子访问权限问题
phpwind的wap中帖子访问权限问题
发布时间:2016-12-23 来源:查字典编辑
摘要:关键字描述:权限问题访问帖子fm&fid"groupidallowvisit1.打开:wap/global.php查找函数:C...

关键字描述:权限 问题 访问 帖子 fm & fid " 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');

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新phpwind学习
热门phpwind学习
CMS教程子分类