global $SYSTEM,$groupid,$admincheck,$attach_url,$attachper,$winduid,$tablecolor,$tpc_author,$tpc_buy,$count,$timestamp,$db_onlinetime,$attachpath,$gp_allowloadrvrc,$readcolorone,$readcolortwo,$lpic,$ltitle,$imgpath,$db_ipfrom,$db_showonline,$stylepath,$db_windpost,$db_windpic,$db_signwindcode,$fid,$tid,$pid,$pic_a;
复制代码
在;号之前,加入
$ifhide,$canview,$hidesign,$hideshow,$hide_name
复制代码
即,修改为
function viewread($read,$start_limit){
global $SYSTEM,$groupid,$admincheck,$attach_url,$attachper,$winduid,$tablecolor,$tpc_author,$tpc_buy,$count,$timestamp,$db_onlinetime,$attachpath,$gp_allowloadrvrc,$readcolorone,$readcolortwo,$lpic,$ltitle,$imgpath,$db_ipfrom,$db_showonline,$stylepath,$db_windpost,$db_windpic,$db_signwindcode,$fid,$tid,$pid,$pic_a,$ifhide,$canview,$hidesign,$hideshow,$hide_name; //此处增加
$query = $db->query("SELECT author,subject,postdate,content FROM pw_posts WHERE tid='$tid' ORDER BY postdate DESC LIMIT 0 ,$db_showreplynum");
复制代码
同样的修改方法,我们增加ifhide,canview,authorid,pid这四个字段
替换为
$query = $db->query("SELECT author,subject,postdate,content,ifhide,canview,authorid,pid FROM pw_posts WHERE tid='$tid' ORDER BY postdate DESC LIMIT 0 ,$db_showreplynum");
$db->update("UPDATE pw_threads SET lastpost='$timestamp',lastposter ='".addslashes($windid)."',replies=replies+1 $ifupload ,hits=hits+1 WHERE tid='$tid'");
}
bbspostguide();
复制代码
修改为
if($ifcheck==1){
if($ifhide==1)
{
$db->update("UPDATE pw_threads SET lastpost='$timestamp',lastposter ='匿名人士',replies=replies+1 $ifupload ,hits=hits+1 WHERE tid='$tid'");
}
else
{
$db->update("UPDATE pw_threads SET lastpost='$timestamp',lastposter ='".addslashes($windid)."',replies=replies+1 $ifupload ,hits=hits+1 WHERE tid='$tid'");
}
}
bbspostguide();
if($ifhide!=0)
{
$usermoney=$usermoney-$moneyused;
$db->update("UPDATE pw_memberdata SET money=money-$moneyused-1 WHERE uid='$winduid'");
global $SYSTEM,$groupid,$admincheck,$attach_url,$attachper,$winduid,$tablecolor,$tpc_author,$tpc_buy,$count,$timestamp,$db_onlinetime,$attachpath,$gp_allowloadrvrc,$readcolorone,$readcolortwo,$lpic,$ltitle,$imgpath,$db_ipfrom,$db_showonline,$stylepath,$db_windpost,$db_windpic,$db_signwindcode,$fid,$tid,$pid,$pic_a;
复制代码
同样的道理,我们增加两个字段
将其修改为
function viewread($read,$start_limit){
global $SYSTEM,$groupid,$admincheck,$attach_url,$attachper,$winduid,$tablecolor,$tpc_author,$tpc_buy,$count,$timestamp,$db_onlinetime,$attachpath,$gp_allowloadrvrc,$readcolorone,$readcolortwo,$lpic,$ltitle,$imgpath,$db_ipfrom,$db_showonline,$stylepath,$db_windpost,$db_windpic,$db_signwindcode,$fid,$tid,$pid,$pic_a,$canview,$ifhide;