⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 thread.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?
require("userdata/style.php");
require("global.php");
if (empty($forumid) || !file_exists("{$idpath}forum$forumid")) exit;
if (empty($page)) $page=1;
get_forum_info();
if (file_exists("bbsdata/admin.php")) {
	$adminlist=file("bbsdata/admin.php");
	$count=count($adminlist);
	for ($i=0; $i<$count; $i++) {
		$detail=explode("|", trim($adminlist[$i]));
		$admin_list[]=$detail[1];
		if ($detail[0]==$forumid) $forum_admin[]=$detail[1];
	}
}
if($forum_father && ($admin_list && in_array($username,$admin_list))){
    $writefatherlink="<a href=thread.php?forumid=$forum_father>点击进入一级版块</a>";
	$adminlistfather=file("bbsdata/admin.php");
	$countfather=count($adminlistfather);
	for ($i=0; $i<$countfather; $i++) {
		$detailfather=explode("|", trim($adminlistfather[$i]));
		$admin_listfather[]=$detailfather[1];
		if ($detailfather[0]==$forum_father) $father_admin[]=$detailfather[1];
	}
}
if (file_exists("{$idpath}forum".$forumid."/last_mo.php")) {
	$last_modify=explode("|",readfromfile("{$idpath}forum$forumid/last_mo.php"));
	$amount=$last_modify[1];
}
else $amount=0;
$add_title=" &gt; $forum_name";
require("header.php");echo"$headertp";
if($jinhua=="jinhua"){ 
$des="$forum_name 精华区 "; 
headguide($des,"<a href='thread.php?forumid=$forumid&jinhua=$jinhua'>$forum_name</a>","精华区"); 
}else{ 
$des="目前本版共有 <b>$amount</b> 篇文章"; 
headguide($des,"<a href='thread.php?forumid=$forumid&jinhua=$jinhua'>$forum_name</a>");}

if ($view_forum_online) listwhosonline();
get_children_info();
if ($forum_children==1) {
print ("
<table cellpadding=0 cellspacing=0 border=0 width=$tablewidth bgcolor=$bordercolor align=center>
<tr><td>
<table cellpadding=5 cellspacing=1 border=0 width=100%>
<tr align=center height=22 bgcolor=$titlecolor>
<td width=26 bgcolor=$titlecolor><b class=title>状态</b></td>
<td width=* bgcolor=$titlecolor class=title><b>二级版块</b>(一级版块版主可以管理二级版块)</td>
<td width=76 bgcolor=$titlecolor><b class=title>版主</b></td>
<td width=52 bgcolor=$titlecolor><b class=title>贴子数</b></td>
<td width=185 bgcolor=$titlecolor><b class=title>最后发表</b></td>
</tr>
");
for($i=0;$i<$childrennum;$i++) {if ($children_type[$i]!="hidden") forumchildren($i);}
print ("
</table>
</td></tr>
</table>
");
}
if($forum_children==1 && $ifchildren==1)
{
if ($login_status==1 && (($forum_admin && in_array($username,$forum_admin)) ||($father_admin && in_array($username,$father_admin)) ||($superadmin && in_array($username,$superadmin))|| $username==$manager)) {
echo"<tr><td align><center><input type=\"button\" name=\"chkall\" value=\"版主管理\"style=\"color: #000000;height:18px; background-color: #f3f3f3; border-style: solid; border-width: 1\" onMouseOver =\"this.style.backgroundColor='#FFC864'\" onMouseOut =\"this.style.backgroundColor='#f3f3f3'\"onclick=\"location.href='forumset.php?forumid=$forumid'\"></center></td></tr>";}
require("footer.php");echo"$footertp";
exit;
}
if(file_exists("{$idpath}forum$forumid/list.php"))
{
//$article_list=@file("{$idpath}forum$forumid/list.php");
//$count=count($article_list);
	$total=(max($page,10) * $perpage);
	$fp=fopen("{$idpath}forum$forumid/list.php","r");
	flock($fp,LOCK_SH);
	$count=0;
	while (!feof($fp) && $count<$total) {
		$article_list[]=fgets($fp,800);
		$count++;
	}
	fclose($fp);
	if (!$article_list[$count-1]) {
		unset ($article_list[$count-1]);
		$count--;
	}
if(!$jinhua){         
if ($count%$perpage==0) $maxpageno=$count/$perpage;  
else $maxpageno=floor($count/$perpage)+1; 
if ($page>$maxpageno) $page=$maxpageno;  
$pagemin=min( ($page-1)*$perpage , $count-1);  
$pagemax=min( $pagemin+$perpage-1, $count-1);
}
}
if(!$jinhua)
{
if ($maxpageno==1) $fenye= "<b>本版只有一页</b>";
else {$nextpage=$page+1;
      $previouspage=$page-1;
	if ($page>=2) $fenye.="<a href=\"thread.php?forumid=$forumid&jinhua=$jinhua&page=1\" title=第一页><font face=webdings >9</font></a> ";
      else $fenye.= "<font face=webdings >9</font>";
    if ($page>=2) $fenye.= "<a href=\"thread.php?forumid=$forumid&jinhua=$jinhua&page=$previouspage\" title=上一页><font face=webdings >7</font></a> ";
      else $fenye.= "<font face=webdings >7</font>";
	  $fenye.="[";
		$flag=0;
		if($page==2)
		$fenye.="<a href=thread.php?forumid=$forumid&jinhua=$jinhua&page=1>&nbsp;第". 1 . "页</a>";
		if($page==3)
		$fenye.="<a href=thread.php?forumid=$forumid&jinhua=$jinhua&page=1>&nbsp;第". 1 . "页</a><a href=thread.php?forumid=$forumid&jinhua=$jinhua&page=2>&nbsp;第". 2 . "页</a>";
		if($page>3){
			for($i=$page-3;$i<=$page-1;$i++){ 
 	        $fenye.="<a href=thread.php?forumid=$forumid&jinhua=$jinhua&page=$i>&nbsp;第". $i . "页</a>";
           }}
        if($page<$maxpageno){
			for($i=$page+1;$i<=$maxpageno;$i++){ 
 	        $fenye.="<a href=thread.php?forumid=$forumid&jinhua=$jinhua&page=$i>&nbsp;第". $i . "页</a>";
           $flag++;
		   if($flag==3) break; }}
	  $fenye.="] ";
	  	if ($page<$maxpageno) $fenye.= "<a href=\"thread.php?forumid=$forumid&jinhua=$jinhua&page=$nextpage\" title=下一页><font face=webdings >8</font></a> ";
      else $fenye.= "<font face=webdings >8</font>";
	if ($page<$maxpageno) $fenye.= "<a href=\"thread.php?forumid=$forumid&jinhua=$jinhua&page=$maxpageno\" title=最后一页><font face=webdings >:</font></a> ";
      else $fenye.= "<font face=webdings >:</font>";
}
}
if ($login_status==1 && (($forum_admin && in_array($username,$forum_admin)) ||($father_admin && in_array($username,$father_admin)) || $username==$manager))
$admin_fix="<a href=forumevent.php?forumid=$forumid>管理日记</a>";
print <<<EOT
<br>
<table width=$tablewidth border=0 cellspacing=0 cellpadding=0 align=center>
  <tr align=left> 
    <td align=left valign=middle width=24% >$fenye&nbsp;$admin_fix&nbsp;&nbsp;$writefatherlink </td>
    <td align=right width=32%><a onfocus=this.blur()  href="post.php?forumid=$forumid"><img src="$npost" border=0></a><a onfocus=this.blur()  href="vote.php?forumid=$forumid"><img src="$npollicon" border=0></a>
	</td>
</tr>
</table>
EOT;
if ($login_status==1 && (($forum_admin && in_array($username,$forum_admin)) ||($father_admin && in_array($username,$father_admin)) ||($superadmin && in_array($username,$superadmin))|| $username==$manager)) {
?>
<form action="mawhole.php" method=post>
<input type=hidden name="forumid" value=<?=$forumid?>>
<input type=hidden name="action" value="del">
<?
}
echo <<<EOT
<table cellspacing=0 cellpadding=0 width=$tablewidth align=center bgcolor=$bordercolor border=0><tr><td height=1></td></tr></table>
<table cellspacing=0 cellpadding=0 width=$tablewidth align=center border=1 bgcolor=$titlecolor bordercolor=$bordercolor>
  <tr align=center height=26>
    <td width=32><b class=title>状态</b></td>
EOT;
if ($login_status==1 && (($forum_admin && in_array($username,$forum_admin)) ||($father_admin && in_array($username,$father_admin)) || $username==$manager)) {
echo" <td width=22><b class=title>删</b></td>";}
echo <<<EOT
    <td width=* class=title><b>标&nbsp;&nbsp;题</b></td>
    <td width=85><b class=title>作 者</b></td>
    <td width=32><b class=title>回复</b></td>
    <td width=32><b class=title>人气</b></td>
    <td width=195><b class=title>最后发表</b></td>
  </tr>
</table>
EOT;
if (file_exists("bbsdata/announcesys.php")) {
$announcelist=file("bbsdata/announcesys.php");
list($aauthor,$atitle,$atime,$acontent,$amember)=explode("|",$announcelist[0]);
$almdtime=get_date($atime).' '.get_time($atime);
$ag=$timestamp-$atime;
echo <<<EOT
<TABLE borderColor={$bordercolor} cellSpacing=0 cellPadding=0 width="{$tablewidth}" align=center border=1>
  <TBODY>
  <TR align=middle bgColor={$list_color1} height=25>
    <TD width=32><IMG src="images/announce.gif"></TD>
    <TD align=left  bgColor={$list_color2}><FONT color=red>&nbsp[公告]</FONT><A href="javascript:openScript('announcesys.php?job=read&msg=0',500,300)" title="请查看公告详情">$atitle</A></TD>
    <TD width=85><A href="profile.php?job=show&target=$aauthor">$aauthor</A></TD>
    <TD width=65 bgColor={$list_color2}><A 
      href="announcesys.php">坛主公告</A></TD>
    <TD align=right width=195 bgColor={$list_color1}>{$almdtime}------     &nbsp;&nbsp;<IMG src="images/lastpost2.gif" border=0>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TBODY></TABLE>
EOT;
}
if(!empty($forum_announce) && !empty($announce_title)){
echo <<<EOT
<TABLE borderColor={$bordercolor} cellSpacing=0 cellPadding=0 width="{$tablewidth}" align=center border=1>
  <TBODY>
  <TR align=middle bgColor={$list_color1} height=25>
    <TD width=32><IMG src="images/announce.gif"></TD>
    <TD align=left  bgColor={$list_color2}><FONT color=red>&nbsp[版务公告]</FONT><A href="javascript:openScript('forumannounce.php?forumid=$forumid',500,300)" title="请查看公告详情">$announce_title</A></TD>
    <TD width=85> 本版管理员 </TD>
    <TD width=65 bgColor={$list_color2}><A href="javascript:openScript('forumannounce.php?forumid=$forumid',500,300)" title="请查看公告详情">版主公告</A></TD>
    <TD align=right width=195 bgColor={$list_color1}>{$almdtime} ------      &nbsp;&nbsp;<IMG src="images/lastpost2.gif" border=0>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TBODY></TABLE>
EOT;
}
if (file_exists("bbsdata/topsys.php")) {
$announcelist=file("bbsdata/topsys.php");
$countop=count($announcelist);
for ($i=0; $i<$countop; $i++) {
if ($i>=3) break;
list($aauthor,$atitle,$atime,$acontent,$amember)=explode("|",$announcelist[$i]);
$almdtime=get_date($atime).' '.get_time($atime);
$ag=$timestamp-$atime;
echo <<<EOT
<TABLE borderColor={$bordercolor} cellSpacing=0 cellPadding=0 width="{$tablewidth}" align=center 
border=1>
  <TBODY>
  <TR align=middle bgColor={$list_color1} height=25>
    <TD width=32><IMG src="images/locktop.gif"></TD>
    <TD align=left  bgColor={$list_color2}><FONT color=red>&nbsp[总置顶]</FONT><A href=$atitle title=查看总置顶贴子内容>$acontent</A> </TD>
    <TD width=85><A href="profile.php?job=show&target=$aauthor">$aauthor</A></TD>
    <TD width=65 bgColor={$list_color2}><A 
      href="topsys.php">总置顶</A></TD>
    <TD align=right width=195 bgColor={$list_color1}>&nbsp; $almdtime <IMG 
      src="images/lastpost2.gif" border=0>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TBODY></TABLE>
EOT;
}
}
if (file_exists("{$idpath}forum$forumid/list.php") && $count!=0) 
{	
if($jinhua){//4
for($i=0;$i<=$count;$i++){//3
$jihua=explode("|",$article_list[$i]);
$lmdt=explode(",",$jihua[8]);
if($jinhua=="jinhua"){//2
if ($jihua[9]==2 || $jihua[9]==3)
$article_list2[]=$article_list[$i];}//2
else{
if ($timestamp-$lmdt[2]<=$jinhua*84600) 
$article_list2[]=$article_list[$i];
}
} //3
if ($article_list2) {//1 
$count=count($article_list2);          
if ($count%$perpage==0) $maxpageno=$count/$perpage;  
else $maxpageno=floor($count/$perpage)+1; 
if ($page>$maxpageno) $page=$maxpageno;  
$pagemin=min(($page-1)*$perpage , $count-1);  
$pagemax=min($pagemin+$perpage-1, $count-1);
for ($i=$pagemin; $i<=$pagemax; $i++) {  
$a_info=$article_list2[$i];  
article_line();  
}   
}//1
else {$maxpageno=1;}    
}//4
else {
for ($i=$pagemin; $i<=$pagemax; $i++) {
$a_info=$article_list[$i];  
article_line();  
} 
}    
}
else {$maxpageno=1;}
if ($login_status==1 && (($forum_admin && in_array($username,$forum_admin)) ||($father_admin && in_array($username,$father_admin)) ||($superadmin && in_array($username,$superadmin))|| $username==$manager)) {
?>
<table cellpadding=1 cellspacing=1 border=0 width=<?=$tablewidth?> align=center bgcolor=<?=$list_color2?>>
	 <tr align=center> <td><?if(!$managemode)echo"<input type=button value=贴子管理 style=\"color: #000000; background-color: #f3f3f3;height:18px; border-style: solid; border-width: 1\" onMouseOver =\"this.style.backgroundColor='#FFC864'\" onMouseOut =\"this.style.backgroundColor='#f3f3f3'\" onclick=\"location.href='thread.php?forumid=$forumid&managemode=1&page=$page'\">";else echo"<input type=button value=退出管理 style=\"color: #000000;height:18px; background-color: #f3f3f3; border-style: solid; border-width: 1\" onMouseOver =\"this.style.backgroundColor='#FFC864'\" onMouseOut =\"this.style.backgroundColor='#f3f3f3'\" onclick=\"location.href='thread.php?forumid=$forumid&managemode=0&page=$page'\">";?>&nbsp;<input type="button" name="chkall" value="版主管理"style="color: #000000;height:18px; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'"onclick="location.href='forumset.php?forumid=<?=$forumid?>'"> 批量删除选项(一次最多删10篇贴子):
	<input type="button" name="chkall" value="全选"style="color: #000000;height:18px; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'"onclick="CheckAll(this.form)"><input type="button" name="clear2" value="反选" style="color: #000000;height:18px; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" onclick="FanAll(this.form)"><input type="reset" name="Reset" value="重置" style="color: #000000;height:18px; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'"><input type="submit" name="delete" value="删除" style="color: #000000;height:18px; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" >
	<a href='badman.php?forumid=<?=$forumid?>'>入狱操作(可以用来屏蔽不守规用户在本版的发言)</a>
		</td>
	</tr></form>
  </table>
<? }?>
<!---Pages list & forum jump begin-->
<table cellspacing=0 cellpadding=0 width=<?=$tablewidth?> align=center border=0 >
<form name=jump action=thread.php method=post>
<tr>
<td align=left>&nbsp;
<?
echo "$fenye&nbsp;<b>您正处在第:".$page."页浏览&nbsp;&nbsp;".$perpage."篇文章/页 </b> ";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -