网站地图    收藏   

主页 > 后端 > phpwind >

phpwind的wap中帖子访问权限问题_phpwind_CMS教程

来源:自学PHP网    时间:2015-04-10 14:10 作者: 阅读:

[导读] 关键字描述:权限 问题 访问 帖子 fm quot groupid allowvisit1.打开:wap/global.php 查找函数: Copy codefunction forumcheck($fid,$type) { global $db,$groupid,$gp_allowrp; $fm = $db-get_one(SELECT password,allowvisit,allo...

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

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论