屏蔽签名"; }else{ $hidesign = "显示签名"; } //判断用户是否选择了屏蔽头像 if(!$hide1[1]){ $hideface = "屏蔽头像"; }else{ $hideface = "显示头像"; } $a=$winddb[lastpost]; $b=$timestamp-$a; $hide_days = ceil($b/86400); $last_vist = get_date($winddb['lastpost'],"Y-m-d A:H:i:s"); $fieldadd = $tablaadd = $sqladd = $fastpost = $special = $ifmagic = $urladd = ''; if (is_array($customfield)) { foreach ($customfield as $key => $value) { $fieldadd .= ',mb.field_'.(int)$value['id']; } } if ($db_union) { $db_union = explode("\t",stripslashes($db_union)); $db_union[0] && $db_hackdb = array_merge((array)$db_hackdb,(array)unserialize($db_union[0])); } $showfield = array(); $custominfo = $db_union[7] ? (array)unserialize($db_union[7]) : array(); foreach ($custominfo as $key=>$val) { if (substr($val[3],2,1)=='1') { $showfield[] = $key; } } if (!empty($showfield)) { $fieldadd .= ",mb.customdata"; } $fieldadd && $tablaadd = "LEFT JOIN pw_memberinfo mb ON mb.uid=t.authorid"; InitGP(array('fpage','page','uid','toread','pw')); $toread=htmlspecialchars($toread); if ($page>1) { $S_sql = $J_sql = ''; } else { $page<1 && $page!='e' && $page=1; $start_limit = 0; $pw_tmsgs = GetTtable($tid); $S_sql = ',tm.*,m.uid,m.username,m.gender,m.oicq,m.groupid,m.memberid,m.icon AS micon ,m.hack,m.honor,m.honor2,m.signature,m.showsign,m.regdate,m.signchange,m.medals,m.payemail,m.fans,mystyle,md.postnum,md.digests,md.rvrc,md.money,md.thank,md.credit,md.currency,md.thisvisit,md.lastvisit,md.onlinetime,md.starttime,md.bank'; $J_sql = "LEFT JOIN $pw_tmsgs tm ON t.tid=tm.tid LEFT JOIN pw_members m ON m.uid=t.authorid LEFT JOIN pw_memberdata md ON md.uid=t.authorid"; //宠物资料开始 //$S_sql.=', pd.petname, pd.mypetpic, pd.pettype, pd.mypetjob,pd.mypetlevel, pd.mypetexp, pd.mypethp, pd.mypetmaxhp, pd.mypetsp,pd.mypetmp, pd.mypetmaxmp, pd.mypetgood, pd.mypetdead, pd.openpk, pr.nums,pr.fromuser'; //$J_sql.=" LEFT JOIN pw_wxpetdata pd ON pd.username=m.username LEFT JOIN pw_wxrose pr ON pr.username=m.username"; //宠物资料结束 //树苗开始 $S_sql.=',su.shu,su.water'; $J_sql.=" LEFT JOIN pw_shu su ON su.uid=m.uid"; //树苗结束 } $read = $db->get_one("SELECT t.* $S_sql $fieldadd FROM pw_threads t $J_sql $tablaadd WHERE t.tid='$tid'"); !$read && Showmsg('illegal_tid'); /* require_once(R_P.'require/credit.php'); if($fid==116) { $cur = UserCredit($winduid,3)<50 && Showmsg("XYZ小于50者无法进入本版"); } */ if ($read['ifmagic'] && $db_windmagic) { $ifmagic = 1; list($magicid,$magicname) = explode("\t",$read['magic']); } $fpage = (int)$fpage; $fid = $read['fid']; $ptable = $read['ptable']; $ifcheck = $read['ifcheck']; $pw_posts = GetPtable($ptable); $advertdb = AdvertInit(SCR,$fid); if (is_array($advertdb['header'])) { $header_ad = $advertdb['header'][array_rand($advertdb['header'])]['code']; } if (is_array($advertdb['footer'])) { $footer_ad = $advertdb['footer'][array_rand($advertdb['footer'])]['code'].'
'; } list($db_moneyname,$db_moneyunit,$db_rvrcname,$db_rvrcunit,$db_creditname,$db_creditunit)=explode("\t",$db_credits); $foruminfo = $db->get_one("SELECT * FROM pw_forums f LEFT JOIN pw_forumsextra fe USING(fid) WHERE f.fid='$fid'"); !$foruminfo && Showmsg('data_error'); $forumset = unserialize($foruminfo['forumset']); wind_forumcheck($foruminfo); //游客和潜水 if($read['digest'] && ($groupid==6 || $groupid=='guest' || ($timestamp-$winddb[lastpost]>12960000 && $timestamp-$winddb[regdate]>86400))){ Showmsg('您无权浏览精华帖!'); } $subject = $read['subject']; $type = $read['type']; $authorid = $read['authorid']; //增加好友隐士可见 $block = $db->get_one("SELECT friendid FROM pw_friends WHERE uid='$authorid'"); $friendid = $block[friendid]; list(,,$downloadmoney,$downloadimg) = explode("\t",$forumset['uploadset']); if (!$foruminfo['allowvisit'] && $gp_allowread==0 && $_COOKIE) { Showmsg('read_group_right'); } unset($advertdb['header'],$advertdb['footer'],$db_advertdb,$S_sql,$J_sql,$foruminfo['forumset']); $rewardtype = null; /*** 悬赏 ***/ //密碼帖 if($pw){ if(md5($pw) != $read['password']) { Showmsg('密码错误,请重新输入。'); } else { Cookie("tidpas_$tid",StrCode($tid."\t".$read[password]."\t".$timestamp)); //Showmsg("密码验证成功,现在将转入帖子。"); ObHeader("read.php?tid=$tid"); } } if($read['password']/*&&$groupid!=='3'*/ ){ list($id,$pwd,$ptime) = explode("\t",StrCode(GetCookie("tidpas_$tid"),'DECODE')); if($ptime+60 < $timestamp || $read['password'] != $pwd){ require_once(R_P.'require/header.php'); $guidename=forumindex($foruminfo['fup']); $guidename[$fid]=array($subject,"read.php?tid=$tid"); list($msg_guide,$forumlist) = headguide($guidename); require_once(PrintEot('readpasswd'));footer(); } } //密碼帖 $read['black']==$winduid && Showmsg("帖子出错"); if($read['quanxian']){ require_once(R_P.'require/credit.php'); if($fid==23&&$read['authorid']!=$winduid&&$groupid!=3&&$groupid!=4) { $cur = UserCredit($winduid,rvrc)<$read['quanxian'] && Showmsg("RP小于{$read['quanxian']}者无法进入本帖子,请 点此 进入积分转换升级RP"); } } if (CkInArray($windid,$manager) || admincheck($foruminfo['forumadmin'],$foruminfo['fupadmin'],$windid)) { $admincheck = 1; } else { $admincheck = 0; } !$windid && $admincheck=0; if ($foruminfo['allowread'] && !$admincheck && !allowcheck($foruminfo['allowread'],$groupid,$winddb['groups'])) { Showmsg('forum_read_right'); } if ($groupid != 3 && !$admincheck && !$foruminfo['allowvisit']) { forum_creditcheck(); } /* require_once(R_P.'require/credit.php'); if($fid==116) { $cur = UserCredit($winduid,3)<50 && Showmsg("XYZ小于50者无法进入本版"); } */ if ($groupid != 3 && !$admincheck && $forumset['forumsell']) { forum_sell($fid); } if ($read['ifcheck']==0 && !$admincheck && !$SYSTEM['viewcheck'] && $windid!=$read['author']) { Showmsg('read_check'); } if ($read['locked']%3==2 && !$admincheck && !$SYSTEM['viewclose']) { Showmsg('read_locked'); } if ($winddb['p_num']) { $db_readperpage = $winddb['p_num']; } elseif ($forumset['readnum']) { $db_readperpage = $forumset['readnum']; } if (is_numeric($uid) && $read['replies']>0) { $rt = $db->get_one("SELECT COUNT(*) AS n FROM $pw_posts WHERE tid='$tid' AND authorid='$uid' AND anonymous='0' AND ifcheck='1'"); $read['replies'] = $rt['n']; $sqladd = "AND authorid='$uid' AND anonymous='0'"; $urladd = "&uid=$uid"; } $count = $read['replies']+1; $numofpage = ceil($count/$db_readperpage); if ($page=='e' || $page>$numofpage) { $numofpage==1 && $page>1 && ObHeader("read.php?tid=$tid&page=1&toread=$toread"); $page=$numofpage; } list($guidename,$forumtitle) = getforumtitle(forumindex($foruminfo['fup'])); $guidename .= " » $subject"; $forumtitle = "|$forumtitle"; $db_metakeyword = "$subject".str_replace(array('|',' - '),',',$forumtitle).'phpwind'; $read['content'] && $db_metadescrip = substrs(strip_tags(str_replace('"','"',$read['content'])),50);//提取内容描述 require_once(R_P.'require/header.php'); require_once(R_P.'require/showimg.php'); Update_ol(); $readdb = array(); $authorids = $tpc_ifview = ''; /*** 控制隐藏帖次数 ***/ if ($read['special']==1 && ($foruminfo['allowtype'] & 2) && ($page==1 || $numofpage==1)) { require_once(R_P.'require/readvote.php'); } elseif ($read['special']==2 && ($foruminfo['allowtype'] & 4) && ($page==1 || $numofpage==1)) { require_once(R_P.'require/readact.php'); } elseif ($read['special']==3 && ($foruminfo['allowtype'] & 8)) { require_once(R_P.'require/readrew.php'); } if ($db_replysitemail && $read['authorid']==$winduid && $read['ifmail']==4) { $rt = $db->get_one("SELECT replyinfo FROM pw_memberinfo WHERE uid='$winduid'"); $rt['replyinfo'] = str_replace(",$tid,",',',$rt['replyinfo']); if ($rt['replyinfo'] == ',') { $winddb['newrp'] && $db->update("UPDATE pw_members SET newrp=0 WHERE uid='$winduid'"); $rt['replyinfo'] = ''; } $db->update("UPDATE pw_memberinfo SET replyinfo='$rt[replyinfo]' WHERE uid='$winduid'"); $db->update("UPDATE pw_threads SET ifmail='2' WHERE tid='$tid'"); } if ($page == 1) { if ($foruminfo['allowhtm'] == 1) { $htmurl = $db_htmdir.'/'.$fid.'/'.date('ym',$read['postdate']).'/'.$read['tid'].'.html'; } if ($foruminfo['allowhtm']==1 && !$foruminfo['cms'] && !$toread && file_exists(R_P.$htmurl)) { ObHeader("$R_url/$htmurl"); } $read['pid'] = 'tpc'; $readdb[] = viewread($read,0); $authorids = $read['authorid']; } $pages = numofpage($count,$page,$numofpage,"read.php?tid=$tid&fpage=$fpage&toread=$toread{$urladd}&"); //$pages = numofpage($count,$page,$numofpage,"read.php?tid=$tid&fpage=$fpage&toread=$toread&"); $tpc_locked = $read['locked']%3<>0 ? 1 : 0; if (!$db_hithour) { $db->update("UPDATE pw_threads SET hits=hits+1 WHERE tid='$tid'"); } else { writeover(D_P."data/bbscache/hits.txt",$tid."\t",'ab'); } /*** 帖子浏览记录 ***/ $readlog = str_replace(",$tid,",',',GetCookie('readlog')); $readlog.= ($readlog ? '' : ',').$tid.','; substr_count($readlog,',')>11 && $readlog = preg_replace("/[\d]+\,/i",'',$readlog,3); Cookie('readlog',$readlog); $favortitle= str_replace(array("'","'","\"","\\"),array("『","\\'","\\\"","\\\\"),$subject); list($msg_guide,$forumlist) = headguide($guidename); unset($fourm,$guidename); $db_bbsname_a = addslashes($db_bbsname);//模版内用到 if($page==1){ $queryt = $db->query("SELECT * FROM pw_thanks WHERE tid='$tid' ORDER BY thinktim DESC LIMIT 0,10"); $queryrt = $db->get_one("SELECT SUM(thanksun) AS thanksun FROM pw_thanks where tid='$tid'"); while($tread=$db->fetch_array($queryt)){ $thanks[] = $tread; } $db->free_result($queryt); } if ($read['replies']>0) { $readnum = $db_readperpage; $pageinverse = $page>20 && $page>ceil($numofpage/2) ? true : false; if ($pageinverse) { $start_limit = $count-$page*$db_readperpage; $order = $rewardtype != null ? "ifreward ASC,postdate DESC" : "postdate DESC"; } else { $start_limit = ($page-1)*$db_readperpage-1; $order = $rewardtype != null ? "ifreward DESC,postdate" : "postdate"; } if ($start_limit < 0) { $readnum += $start_limit; $start_limit = 0; } //$query = $db->query("SELECT t.*,m.uid,m.username,m.gender,m.oicq,m.groupid,m.memberid,m.icon AS micon,m.hack,m.honor,m.honor2,m.signature,m.regdate,m.signchange,m.medals,m.showsign,m.payemail,m.fans,m.mystyle,md.postnum,md.digests,md.rvrc,md.money,md.thank,md.credit,md.currency,md.thisvisit,md.lastvisit,md.onlinetime,md.starttime,md.bank $fieldadd FROM $pw_posts t LEFT JOIN pw_members m ON m.uid=t.authorid LEFT JOIN pw_memberdata md ON md.uid=t.authorid $tablaadd WHERE t.tid='$tid' AND t.ifcheck='1' $sqladd ORDER BY $order LIMIT $start_limit, $readnum"); //导致重复回复的语句 $query = $db->query("SELECT t.*,m.uid,m.username,m.gender,m.oicq,m.groupid,m.memberid,m.icon AS micon,m.hack,m.honor,m.honor2,m.signature,m.regdate,m.signchange,m.medals,m.showsign,m.payemail,m.fans,m.mystyle,md.postnum,md.digests,md.rvrc,md.money,md.thank,md.credit,md.currency,md.thisvisit,md.lastvisit,md.onlinetime,md.starttime,md.bank,su.shu,su.water $fieldadd FROM $pw_posts t LEFT JOIN pw_members m ON m.uid=t.authorid LEFT JOIN pw_shu su ON su.uid=m.uid LEFT JOIN pw_memberdata md ON md.uid=t.authorid $tablaadd WHERE t.tid='$tid' AND t.ifcheck='1' $sqladd ORDER BY $order LIMIT $start_limit, $readnum"); //宠物资料开始2 //$query = $db->query("SELECT t.*,m.uid,m.username,m.gender,m.oicq,m.groupid,m.memberid,m.icon AS micon,m.hack,m.honor,m.signature,m.regdate,m.signchange,m.medals,m.showsign,m.payemail,md.postnum,md.digests,md.rvrc,md.money,md.credit,md.currency,md.thisvisit,md.lastvisit,md.onlinetime,md.starttime, pd.petname, pd.mypetpic,pd.pettype, pd.mypetjob, pd.mypetlevel, pd.mypetexp, pd.mypethp,pd.mypetmaxhp, pd.mypetsp, pd.mypetmp, pd.mypetmaxmp, pd.mypetgood,pd.mypetdead, pd.openpk, pr.nums, pr.fromuser $fieldadd FROM $pw_posts t LEFT JOIN pw_members m ON m.uid=t.authorid LEFT JOIN pw_memberdata md ON md.uid=t.authorid LEFT JOIN pw_wxpetdata pd ON pd.username=m.username LEFT JOIN pw_wxrose pr ON pr.username=m.username $tablaadd WHERE t.tid='$tid' AND t.ifcheck='1' $sqladd ORDER BY $order LIMIT $start_limit, $readnum"); //宠物资料结束2 $pageinverse && $start_limit = $count-$start_limit; $fbpid = array(); while ($read = $db->fetch_array($query)) { $pageinverse ? $start_limit-- : $start_limit++; $readdb[] = viewread($read,$start_limit); $authorids .= $authorids ? ','.$read['authorid'] : $read['authorid']; //$msg1=explode('|', $read['missionid']); //神秘精灵 //include_once(D_P.'hack/mission/require/readcode.php'); } $db->free_result($query); $pageinverse && $readdb = array_reverse($readdb); foreach ($fbpid as $key=>$val) { $sqladd = strpos($val,',')!==false ? "IN($val)" : "='$val'"; $db->update("UPDATE $pw_posts SET ifwordsfb='$key' WHERE pid $sqladd"); } } unset($sign,$ltitle,$lpic,$lneed,$gp_right,$_MEDALDB,$fieldadd,$tablaadd,$read,$order,$readnum,$pageinverse); if ($db_showcolony && $authorids) { $colonydb = array(); $query = $db->query("SELECT c.uid,cy.id,cy.cname FROM pw_cmembers c LEFT JOIN pw_colonys cy ON cy.id=c.colonyid WHERE c.uid IN($authorids) AND c.ifadmin!='-1'"); while ($rt = $db->fetch_array($query)) { if (!$colonydb[$rt['uid']]) { $colonydb[$rt['uid']] = $rt; } } $db->free_result($query); } if ($db_showcustom && $authorids) { $customdb = array(); $cids = $add = ''; foreach ($_CREDITDB as $key=>$value) { if (strpos($db_showcustom,",$key,")!==false) { $cids .= $add.$key; !$add && $add = ','; } } if ($cids) { $query = $db->query("SELECT uid,cid,value FROM pw_membercredit WHERE uid IN($authorids) AND cid IN($cids)"); while ($rt = $db->fetch_array($query)) { $customdb[$rt['uid']][$rt['cid']] = $rt['value']; } $db->free_result($query); } } //好友印象 if ($authorids) { $query = $db->query("SELECT touid, word, color FROM pw_hack_impression WHERE touid IN ($authorids) ORDER BY postdate DESC"); while ($rt = $db->fetch_array($query)) { if(strlen($titlewords[$rt['touid']]) >= 50) continue; if(strpos($titlewords[$rt['touid']], $rt['word']) !== false) continue; $titlewords[$rt['touid']] .= ($titlewords[$rt['touid']] ? "、" : "").$rt['word']; $color[$rt['touid']][] = $rt['color']; $impressiondb[$rt['touid']][] = $rt; } $db->free_result($query); } //END if ($groupid!='guest' && !$tpc_locked) { $psot_sta = 'reply';//control the faster reply $titletop1= substrs('Re: '.str_replace(' ',' ',$subject),$db_titlemax-2); $fastpost = 'fastpost'; $db_forcetype = 0; } $db_menuinit .= ",'td_post' : 'menu_post','td_post1' : 'menu_post'"; //allowtype onoff if ($foruminfo['allowtype'] && (($foruminfo['allowtype'] & 1) || ($foruminfo['allowtype'] & 2 && $gp_allownewvote) || ($foruminfo['allowtype'] & 4 && $gp_allowactive) || ($foruminfo['allowtype'] & 8 && $_G['allowreward'])|| ($foruminfo['allowtype'] & 16))) { $N_allowtypeopen = true; } else { $N_allowtypeopen = false; } if(isMobile()){ require_once(PrintEot('mread'));footer(); }else{ require_once(PrintEot('read'));footer(); } function viewread($read,$start_limit) { global $SYSTEM,$_G,$groupid,$admincheck,$attach_url,$winduid,$tablecolor,$tpc_author,$tpc_buy,$tpc_pid,$tpc_tag,$tpc_att,$count,$timestamp,$db_onlinetime,$attachdir,$attachpath,$gp_allowloadrvrc,$readcolorone,$readcolortwo,$lpic,$ltitle,$imgpath,$db_ipfrom,$db_showonline,$stylepath,$db_windpost,$db_windpic,$db_signwindcode,$fid,$tid,$pid,$attachments,$aids,$md_ifopen,$_MEDALDB,$rewardtype,$db_shield,$gp_allowdownload,$db_wordsfb,$db_iftag,$authorid,$plus_guest_read,$plus_baninfo,$plus_readzw,$gpaccess,$plus_mquote,$regurl,$plus_mdopen,$plus_mdfid,$plus_mdheight,$plus_mdwidth,$plus_mdauto,$db_bbsurl,$regurl,$loginurl; $read['lou'] = $start_limit; $read['jupend'] = $start_limit==$count-1 ? "" : ""; $tpc_buy = $read['buy']; $tpc_pid = $read['pid']; $tpc_tag = NULL; $tpc_att = 1; //多彩ID开始 if($read['mystyle']) { $read['mystyle'] = explode(',',$read['mystyle']); } else { $read['mystyle'] = ''; } $read['ifsign']<2 && $read['content'] = str_replace("\n","
",$read['content']); $anonymous=($read['anonymous']&&!$SYSTEM['viewhide']) ? 1 : 0; $ifzz=$read['ifzz']; if($ifzz=="1"&&$winduid!=$authorid&&!$admincheck&&$winduid!=$read['authorid']&&$read['lou']!=0) { $read['content'] = '该帖子只有管理人员以及帖子作者和楼主才能查看!'; } if($ifzz=="1"){ $read['content'].= '[本回复为作者可见!]'; } $ifat=$read['ifat']; //二维码开始 /* $value="http://www.majiamen.com/read.php?tid=$tid"; $errorCorrectionLevel = 'Q'; $matrixPointSize = 4; $erweima=substr(md5("$tid"),8,12); $filename = "attachment/2w/$erweima.png"; if (file_exists($filename)) { $erw="attachment/2w/$erweima.png"; } else{ QRcode::png($value, "attachment/2w/$erweima.png",$errorCorrectionLevel,$matrixPointSize); $logo = "logo.png"; $QR = "attachment/2w/$erweima.png"; if($logo) { $QR = imagecreatefromstring(file_get_contents($QR)); $logo = imagecreatefromstring(file_get_contents($logo)); $QR_width = imagesx($QR); $QR_height = imagesy($QR); $logo_width = imagesx($logo); $logo_height = imagesy($logo); $logo_qr_width = $QR_width / 5; $scale = $logo_width / $logo_qr_width; $logo_qr_height = $logo_height / $scale; $from_width = ($QR_width - $logo_qr_width) / 2; imagecopyresampled($QR, $logo, $from_width, $from_width, 0, 0,$logo_qr_width,$logo_qr_height, $logo_width, $logo_height); } imagepng($QR,"attachment/2w/$erweima.png"); } */ //隐士可见范围权限 if ($read['groupid'] && !$anonymous) { $read['groupid']=='-1' && $read['groupid']=$read['memberid']; !array_key_exists($read['groupid'],(array)$lpic) && $read['groupid'] = 8; $read['lpic'] = $lpic[$read['groupid']]; $read['level'] = $ltitle[$read['groupid']]; $read['jibie'] = $ltitle[$read['memberid']]; $read['regdate'] = get_date($read['regdate'],"Y-m-d"); $read['lastlogin'] = get_date($read['lastvisit'],"Y-m-d"); $read['aurvrc'] = floor($read['rvrc']/10); $read['author'] = $read['username']; $tpc_author = $read['author']; /* $read['checksell']=$read['sellcheck']=""; if(strpos($read['content'],"[sell")!==false && strpos($read['content'],"[/sell]")!==false){ $read['checksell'] =1;} $userarray = explode(',',$tpc_buy); if ($groupid!='guest' && ($SYSTEM['viewhide'] || $admincheck || $tpc_author==$windid || ($userarray && @in_array($windid,$userarray)))) { $read['sellcheck']=1; } */ if (!empty($GLOBALS['showfield'])) { $customdata = $read['customdata'] ? (array)unserialize($read['customdata']) : array(); $read['customdata'] = array(); foreach ($customdata as $key=>$val) { if ($val && in_array($key,$GLOBALS['showfield'])) { $read['customdata'][$key] = $val; } } } //$read['ipfrom'] = $db_ipfrom == 1 && $_G['viewipfrom'] ? ' From:'.$read['ipfrom'] : ''; if ($SYSTEM['viewip']==1 || ($admincheck && $SYSTEM['viewip']==2)) { $read['ip'] = "IP:$read[userip]"; } $read['ontime'] = (int)($read['onlinetime']/3600); $read['groupid']==6 && $read['honor'] = ''; if ($read['groupid']<>6 && ($read['ifsign']==1 || $read['ifsign']==3)) { global $sign; if (!$sign[$read['author']]) { global $db_signmoney,$db_signgroup,$tdtime,$db_signcurtype; $curvalue = $db_signcurtype=='rvrc' ? $read['aurvrc'] : $read[$db_signcurtype]; if (strpos($db_signgroup,",$read[groupid],") !== false && $db_signmoney && (!$read['showsign'] || (!$read['starttime'] || $curvalue < (($tdtime-$read['starttime'])/86400)*$db_signmoney))) { $read['signature'] = ''; } else { if ($db_signwindcode && $read['signchange']==2) { if ($gp_right[$read['groupid']]['imgwidth'] && $gp_right[$read['groupid']]['imgheight']) { $db_windpic['picwidth'] = $gp_right[$read['groupid']]['imgwidth']; $db_windpic['picheight'] = $gp_right[$read['groupid']]['imgheight']; } if ($gp_right[$read['groupid']]['fontsize']) { $db_windpic['size'] = $gp_right[$read['groupid']]['fontsize']; } $read['signature'] = convert($read['signature'],$db_windpic,2); } $read['signature'] = str_replace("\n","
",$read['signature']); } $sign[$read['author']] = $read['signature']; } else { //签名改为显示一次 //$read['signature'] = $sign[$read['author']]; $read['signature'] = ''; } } else { $read['signature'] = ''; } } else { $read['lpic'] = '8'; $read['level'] = $read['digests'] = $read['postnum'] = $read['money'] = $read['currency'] = '保密'; $read['uid'] = $read['aurvrc'] = $read['lastlogin'] = $read['credit'] = $read['regdate'] = '保密'; $read['honor'] = $read['signature'] = $read['micon'] = $read['honor2'] = '保密'; if ($anonymous) { $read['payemail'] = $read['oicq'] = $read['ip'] = $read['medals'] = $read['ipfrom'] = $read['fans'] = $read['water']= ''; $read['author'] = $GLOBALS['db_anonymousname']; $read['authorid'] = 0; foreach ($GLOBALS['customfield'] as $key=>$val) { $field="field_".(int)$val['id']; $read[$field] = '保密'; } } } $read['face'] = showfacedesign($read['micon']); $read['postdate'] = get_date($read['postdate'],'Y-m-d H:i:s'); $read['mark'] = $read['reward'] = $read['tag'] = NULL; if ($read['ifmark']) { $markdb = explode("\t",$read['ifmark']); foreach ($markdb as $key=>$value) { $read['mark'] .= "
  • $value
  • "; } } if ($rewardtype != null) { if ($read['lou']==0 || $read['ifreward']>0 || ($rewardtype=='0' && $winduid==$GLOBALS['authorid'] && $winduid!=$read['authorid'])) { $read['reward'] = Getrewhtml($read['lou'],$read['ifreward'],$read['pid']); } } if ($read['icon']) { $read['icon'] = ""; } else{ $read['icon'] = ''; } if ($md_ifopen && $read['medals']) { $medals = ''; $md_a = explode(',',$read['medals']); foreach ($md_a as $key=>$value) { if ($value) $medals .= " "; } $read['medals'] = $medals.'
    '; //if($key%4==0){$read['medals']=$medals .'
    '; } } else { $read['medals'] = ''; } $read['leaveword'] && $read['content'] .= leaveword($read['leaveword'],$read['pid']); if ($db_iftag && $read['tags']) { list($tagdb,$tpc_tag) = explode("\t",$read['tags']); $tagdb = explode(' ',$tagdb); foreach ($tagdb as $key=>$tag){ $tag && $read['tag'] .= "$tag "; $read[favtag] .= ""; } } if($groupid!='guest'){ $read['quotecontent'] = preg_replace("/\[img\](.*)\[\/img\]/is","",$read['content']);//过滤贴图 $read['quotecontent'] = preg_replace("/\[to=(.+?)\](.+?)\[\/to\]/is","",$read['quotecontent']);//过滤to $read['quotecontent'] = preg_replace("/\[thanks\](.*)\[\/thanks\]/is","",$read['quotecontent']); $read['quotecontent'] = preg_replace("/\[emule\](.*)\[\/emule\]/is","",$read['quotecontent']);//过滤电驴 $read['quotecontent'] = preg_replace("/\[flv=(.+?)\](.*)\[\/flv\]/is","",$read['quotecontent']); $read['quotecontent'] = preg_replace("/\[attachment=([0-9]+)\]/is","",$read['quotecontent']);//过滤附件 $read['quotecontent'] = preg_replace("/\[sell=(.+?)\[\/sell\]/is","",$read['quotecontent']);//过滤出售帖 $read['quotecontent'] = preg_replace("/\[hide=(.+?)\[\/hide\]/is","",$read['quotecontent']);//过滤加密帖 $read['quotecontent'] = preg_replace("/\[post\](.+?)\[\/post\]/is","",$read['quotecontent']);//过滤隐藏帖 $read['quotecontent'] = preg_replace("/\[payto\](.+?)\[\/payto\]/is","",$read['quotecontent']);//过滤买卖 $read['quotecontent'] = preg_replace("/\[rm=(.+?)\](.+?)\[\/rm\]/is","",$read['quotecontent']);//过滤媒体 $read['quotecontent'] = preg_replace("/\[wmv=(.+?)\](.+?)\[\/wmv\]/is","",$read['quotecontent']);//过滤媒体 $read['quotecontent'] = preg_replace("/\[mp3=(.+?)\](.+?)\[\/mp3\]/is","",$read['quotecontent']);//过滤媒体 $read['quotecontent'] = preg_replace("/\[flash=(.+?)\](.+?)\[\/flash\]/is","",$read['quotecontent']);//过滤媒体 $read['quotecontent'] = preg_replace("/\[table=(.+?)\](.+?)\[\/table\]/is","",$read['quotecontent']); $read['quotecontent'] = preg_replace("/\[quote\](.*)\[\/quote\]/is","",$read['quotecontent']); $read['quotecontent'] = preg_replace("/\[code\](.*)\[\/code\]/is","",$read['quotecontent']); $read['quotecontent'] = str_replace(array('[url]','[/url]','
    ','
    ','//','='),array('','','','','',''),$read['quotecontent']); $read['quotecontent'] = substrs($read['quotecontent'],100); $read['quotecontent'] = strip_tags($read['quotecontent']); } if ($read['ifshield'] || $read['groupid'] == 6 && $db_shield) { if ($read['ifshield'] == 2) { $read['content'] = shield('shield_del_article'); $read['subject'] = ''; $tpc_att = 0; } else { if ($groupid == '3') { $read['subject'] = shield('shield_title'); } else { $read['content'] = shield($read['ifshield'] ? 'shield_article' : 'ban_article'); $read['subject'] = ''; $tpc_att = 0; } } $read['icon'] = ''; } else { $read['ifwordsfb']!=$db_wordsfb && $read['content'] = wordsfb($read['content'],$read['ifwordsfb']); if ($read['ifconvert']==2){ if($groupid=='guest'){ $attachper = 0; $read['remindinfo'] = ''; $read['content'] = preg_replace("/\[thanks\](.*)\[\/thanks\]/is","",$read['content']);//过滤感谢 $read['content'] = preg_replace("/\[to=(.+?)\](.+?)\[\/to\]/is","",$read['content']);//过滤to $read['content'] = preg_replace("/\[emule\](.*)\[\/emule\]/is","",$read['content']);//过滤电驴 $read['content'] = preg_replace("/\[flv=(.+?)\](.*)\[\/flv\]/is","",$read['content']); $read['content'] = preg_replace("/\[attachment=([0-9]+)\]/is","",$read['content']);//过滤附件 $read['content'] = preg_replace("/\[sell=(.+?)\[\/sell\]/is","",$read['content']);//过滤出售帖 $read['content'] = preg_replace("/\[hide=(.+?)\[\/hide\]/is","",$read['content']);//过滤加密帖 $read['content'] = preg_replace("/\[post\](.+?)\[\/post\]/is","",$read['content']);//过滤隐藏帖 $read['content'] = preg_replace("/\[payto\](.+?)\[\/payto\]/is","",$read['content']);//过滤买卖 $read['content'] = preg_replace("/\[rm=(.+?)\](.+?)\[\/rm\]/is","",$read['content']);//过滤媒体 $read['content'] = preg_replace("/\[wmv=(.+?)\](.+?)\[\/wmv\]/is","",$read['content']);//过滤媒体 $read['content'] = preg_replace("/\[mp3=(.+?)\](.+?)\[\/mp3\]/is","",$read['content']);//过滤媒体 $read['content'] = preg_replace("/\[flash=(.+?)\](.+?)\[\/flash\]/is","",$read['content']);//过滤媒体 $read['content'] = preg_replace("/\[table=(.+?)\](.+?)\[\/table\]/is","",$read['content']);//过滤表格 /* $read['content'] = preg_replace("/\[quote\](.*)\[\/quote\]/is","",$read['content']);//过滤引用 */ preg_match_all('/\[img\](.+?)\[\/img\]/eis',$read['content'],$res); $oldpics = $res[1]; foreach ($oldpics as $key=>$t){ $oldpics=Char_cv($t); $keys++; if($keys >= 2){ $read['content'] = str_replace("[img]{$oldpics}[/img]","",$read['content']);//过滤贴图 } } } $read['content'] = convert($read['content'],$db_windpost); } else { $tpc_tag && $read['content'] = relatetag($read['content'],$tpc_tag); strpos($read['content'],'[s:')!==false && $read['content'] = showface($read['content']); } /* if($groupid=='guest'){ $read['content'] = substrs($read['content'],200);//截取字符数 $read['content'] .= "

    游客仅能浏览部分文字内容及图片,查看全部内容及附件请先 登录注册

    "; } */ if($b>1296000 && $timestamp-$winddb[regdate]>86400){ $read['content'] = substrs($read['content'],200);//截取字符数 $read['content'] .= "

    您潜水时间过长,已达{$hide_days}天未发帖
    (上次发帖:{$last_vist})
    本站限制150

    暂时只能浏览部分帖子内容

    "; } } if($groupid!='guest'){ if(in_array($groupid,array(3,4,5)) || $read[groupid]!= '6'){ $read[background] && include_once(D_P."require/background/bbsback_$read[background].php"); } } $GLOBALS['foruminfo']['copyctrl'] && $read['content'] = preg_replace("/
    /eis","copyctrl()",$read['content']); $plus_mdcheck = strpos($plus_mdfid,",$fid,")!==false ? 1 : 0; if ($read['aid'] && $tpc_att) { $attachments = array(); $attachs = unserialize(stripslashes($read['aid'])); $read['ifhide']>0 && ifpost($tid)==1 && $read['ifhide'] = 0; if (is_array($attachs) && $read['ifhide']==0) { if ($winduid==$read['authorid'] || $admincheck || ($groupid!=5 && $SYSTEM['delattach'])) { $dfadmin=1; } else { $dfadmin=0; } foreach ($attachs as $at) { if ($at['type']=='img' && $at['needrvrc']==0 && (!$GLOBALS['downloadimg'] || !$GLOBALS['downloadmoney'] || $gp_allowdownload==2)) { $a_url = geturl($at['attachurl'],'show'); $att++; if($plus_guest_read && $groupid=='guest' && $att>=2){ continue; } if (is_array($a_url)) { $dfurl='
    '.cvpic($a_url[0],1,$db_windpost['picwidth'],$db_windpost['picheight'],$at['ifthumb']); $read['pic'][$at['aid']]=array($at['aid'],$dfurl,$dfadmin,$at['desc']); $attachments[$at['aid']]="$at[desc]$dfurl"; } elseif ($a_url=='imgurl') { $read['picurl'][$at['aid']]['0']=$attachments[$at['aid']]="$at[name]"; $read['picurl'][$at['aid']]['1']=$dfadmin; } } elseif ($plus_mdopen && $plus_mdcheck && eregi("\.(rm|rmvb)$",$at['name']) && $at['needrvrc']==0){ $dfurl='
    '.str_replace("
    ",'',wplayer("$db_bbsurl/$attachpath/$at[attachurl]",$plus_mdheight,$plus_mdwidth,$plus_mdauto,'rm')); $read['media'][$at['aid']]=array($at['aid'],$dfurl,$dfadmin,$at['desc'],$at['type'],$at['name'],$at['size'], $at['hits']); $attachments[$at['aid']]="$at[desc]$dfurl"; }elseif ($plus_mdopen && $plus_mdcheck && eregi("\.(mpg|wmv|mpeg|avi)$",$at['name']) && $at['needrvrc']==0){ $dfurl='
    '.str_replace("
    ",'',wplayer("$db_bbsurl/$attachpath/$at[attachurl]",$plus_mdheight,$plus_mdwidth,$plus_mdauto,'wmv')); $read['media'][$at['aid']]=array($at['aid'],$dfurl,$dfadmin,$at['desc'],$at['type'],$at['name'],$at['size'], $at['hits']); $attachments[$at['aid']]="$at[desc]$dfurl"; }elseif ($plus_mdopen && $plus_mdcheck && eregi("\.(mp3|wma|mid)$",$at['name']) && $at['needrvrc']==0){ $dfurl='
    '.str_replace("
    ",'',wplayer("$db_bbsurl/$attachpath/$at[attachurl]",'0','0',$plus_mdauto,'wmv')); $read['media'][$at['aid']]=array($at['aid'],$dfurl,$dfadmin,$at['desc'],$at['type'],$at['name'],$at['size'], $at['hits']); $attachments[$at['aid']]="$at[desc]$dfurl"; }elseif ($plus_mdopen && $plus_mdcheck && eregi("\.(flv)$",$at['name']) && $at['needrvrc']==0){ $at[attachurl] = rawurlencode($at[attachurl]); $dfurl='
    '.str_replace("
    ",'',flvplayer("$db_bbsurl/$attachpath/$at[attachurl]",$plus_mdheight,$plus_mdwidth,$plus_mdauto,'flv')); $read['media'][$at['aid']]=array($at['aid'],$dfurl,$dfadmin,$at['desc'],$at['type'],$at['name'],$at['size'], $at['hits']); $attachments[$at['aid']]="$at[desc]$dfurl"; }elseif ($plus_mdopen && $plus_mdcheck && eregi("\.(swf)$",$at['name']) && $at['needrvrc']==0){ $dfurl='
    '.""; $read['media'][$at['aid']]=array($at['aid'],$dfurl,$dfadmin,$at['desc'],$at['type'],$at['name'],$at['size'], $at['hits']); $attachments[$at['aid']]="$at[desc]$dfurl"; } else { $read['downattach'][$at['aid']]=array($at['aid'],$at['name'],$at['size'],$at['hits'],$at['needrvrc'],$at['type'],$dfadmin,$at['desc'],$at['fmd5'], $at['bthash']); //$read['downattach'][$at['aid']] = array($at['aid'], $at['name'], $at['size'], $at['hits'], $at['needrvrc'], $at['type'], $dfadmin, $at['desc'], $at['bthash']); $attachments[$at['aid']] = "$at[name]"; $at['desc'] && $attachments[$at['aid']] = "$at[desc]
    ".$attachments[$at['aid']]; } } $aids = array(); $read['content'] = attachment($read['content']); foreach ($aids as $key => $value) { if ($read['pic'][$value]) { unset($read['pic'][$value]); } if ($read['downattach'][$value]) { unset($read['downattach'][$value]); } if ($read['picurl'][$value]) { unset($read['picurl'][$value]); } } } } /** * convert the post content */ $read['alterinfo'] && $read['content'].="
    [ $read[alterinfo] ]
    "; if ($read['remindinfo']) { $remind = explode("\t",$read['remindinfo']); $remind[0] = str_replace("\n","
    ",$remind[0]); $remind[2] && $remind[2] = get_date($remind[2]); $read['remindinfo'] = $remind; } if ($_GET['keyword']) { $keywords = explode("|",$_GET['keyword']); foreach ($keywords as $key => $value) { if ($value) $read['content'] = preg_replace("/(?<=[\s\"\]>()]|[\x7f-\xff]|^)(".preg_quote($value,'/').")([.,:;-?!()\s\"<\[]|[\x7f-\xff]|$)/siU","\\1\\2",$read['content']); } } //6周年签名 /* $vstr = "|"; $vstr = explode("|", $vstr); $Ecstr = $vstr[mt_rand(0, (count($vstr)-1) ) ]; if(!$read['signature']) $read['signature']="$Ecstr"; */ return $read; } ?>