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

2016-12-26 16:47:46 2153

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


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


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: