phpwind的wap中帖子访问权限详解

时间:6年前   阅读:5299

关键字描述:权限 问题 访问 帖子 fm &amp fid &quot groupid allowvisit

1、打开:wap/global.php 

查找函数: 

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'); 

}

替换为: 

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

查找: 

forumcheck($fid);

修改为: 

forumcheck($fid,'read');

3、打开:wap/list.php

查找: 

forumcheck($fid);

修改为: 

forumcheck($fid,'list');

本站声明:网站内容来源于网络,如有侵权,请联系我们https://www.qiquanji.com,我们将及时处理。

微信扫码关注

更新实时通知

上一篇:这些50ETF期权控制风险口诀你知道吗?

下一篇:期权价格长假前料上涨

网友评论

请先 登录 再评论,若不是会员请先 注册