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

📄 read.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?
require("userdata/style.php");
require("global.php");
require("ofstarcode.php");
include("bbsdata/level.php");
if( $login_status!=1 && $ftbread_status!=1 ){
require("header.php");echo"$headertp";
headguide($des,$bars);
echo "<table width=$tablewidth border=0 cellspacing=0 cellpadding=0 align=center bgcolor=$bordercolor>
 <tr>
 <td>
  <table width=100% border=0 cellspacing=1 cellpadding=3>
   <tr bgcolor=$titlecolor> 
    <td colspan=2 class=title bgcolor=$titlecolor>查看信息程式发生错误</td>
   </tr>
   <tr bgcolor=FFFFFF>
    <td ><br>
<center><p><p><br><br>错误原因:只有注册用户才能查看帖子!<p><p>请您选择 <a href=login.php>登陆论坛</a> 或 <a href=register.php>注册{$bbs_title}会员</a> 或 <a href=index.php>返回首页</a><p><p><center>
   <tr align=left>
    <td colspan=2  bgcolor=$titlecolor>&nbsp;</td>
   </tr>
  </table>
 </td>
 </tr>
</table>";
require("footer.php");echo"$footertp";
exit;			
		}
if (!$forumid || !file_exists("{$idpath}forum$forumid")) exit;
$list_temp=explode("\n",readfromfile("{$idpath}forum$forumid/list.php"));
if($postid)
{
$list_info=explode("|",$list_temp[$postid]);
if($filename==$list_info[5])
	{
	$iffilename=1;
	}
	else
		unset($postid);
}
if (!$filename || !file_exists("{$idpath}forum$forumid/$filename") || !ereg("^f_[0-9]+$",$filename) || !file_exists("{$idpath}forum$forumid/list.php")) {
require("header.php");echo"$headertp";
$bars="";
get_father_info();
if ($exists_forum_father==1) $bars.="<a href='thread.php?forumid=$father_id'>$father_name</a> >> ";
$bars.="<a href='thread.php?forumid=$forumid&jinhua=$jinhua'>$forum_name</a>";
$des="本主题已阅读<b class=cau>$topic_hit</b>次,回复<b class=cau>$topic_reply</b> 篇";
headguide($des,$bars,$topic_name);
msg_box('读取帖子错误','<br>原因:你要访问的贴子可能已经被删除或者被转移 :(<br><ul><li><a href="javascript:history.back(1)">返回前页</a></li><br><li><a href="login.php">现在登录</li></ul>');
require("footer.php");echo"$footertp";
exit();
}
get_forum_info();
//----read.php-----
$onlinefile="bbsdata/online.php";
$online_user=file($onlinefile);
   $count=count($online_user);
    for ($i=0; $i<$count; $i++) {
$online_user_info=explode("|",$online_user[$i]);
    if($online_user_info[0]!="游客" && $online_user_info[0]!="隐身会员") {
if ($timestamp-$online_user_info[1]<=$online_limit ) $onlineww[$i]=$online_user_info[0];
}
}
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))){
	$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];
	}
}
$articlelist=file("{$idpath}forum$forumid/$filename");
list($topic_name,$topic_author,$topic_content,$topic_date,$topic_area)=explode("|",$articlelist[0]);
$topic_name=str_replace('%a%','',$topic_name);
$topic_date=getfulldate($topic_date);
$add_title=" &gt; $forum_name &gt; $topic_name";
if($iffilename==1)
{
		$topic_hit = $list_info[7];
		$topic_reply = $list_info[6];
		$topic_islock= $list_info[9];
		$topic_type = trim($list_info[10]);
		$list_info[7]++;
		$list_temp[$postid]=implode("|",$list_info);
		$current_record = implode("|", $list_info);
		if ($postid>0) { $pre  = explode("|",$list_temp[$postid-1]); $pretitle=$pre[0]; $prepostid=$postid-1;$prefile=$pre[5]; }
		if ($list_temp[$postid+1]) { $next = explode("|",$list_temp[$postid+1]); $nexttitle=$next[0]; $nextpostid=$postid+1;$nextfile=$next[5];}
	    writetofile("{$idpath}forum$forumid/list.php",implode("\n",$list_temp));
}
else
{
	$count=count($list_temp);
	for ($i=0; $i<$count; $i++)
	{
	$list_info=explode("|",$list_temp[$i]);
	if ($list_info[5]==$filename) 
		{
		$postid=$i;
		$topic_hit = $list_info[7];
		$topic_reply = $list_info[6];
		$topic_islock= $list_info[9];
		$topic_type = trim($list_info[10]);
		$list_info[7]++;
		$list_temp[$postid]=implode("|",$list_info);
		$current_record = implode("|", $list_info);
		if ($postid>0) { $pre  = explode("|",$list_temp[$postid-1]); $pretitle=$pre[0]; $prepostid=$postid-1; }
		if ($list_temp[$postid+1]) { $next = explode("|",$list_temp[$postid+1]); $nexttitle=$next[0]; $nextpostid=$postid+1;}
	    writetofile("{$idpath}forum$forumid/list.php",implode("\n",$list_temp));
		}
	}
}
require("header.php");echo"$headertp";
$des="该主题已被阅读 <b class=cau>$topic_hit</b> 次,并有回复 <b class=cau>$topic_reply</b> 篇";
headguide($des,"<a onfocus=this.blur()  href='thread.php?forumid=$forumid'>$forum_name</a>",$topic_name);
if (!$page) $page=1;
if ($page==1) 
switch($topic_type) {
	case "1": get_sta(); break;
	case "4": get_sta(); break;
}
$count=count($articlelist);
if ($count%$read_perpage==0) $maxpageno=$count/$read_perpage;
	else $maxpageno=floor($count/$read_perpage)+1;
if ($page=="last" || $page>$maxpageno) $page=$maxpageno;
$pagemin=min( ($page-1)*$read_perpage , $count-1);
$pagemax=min( $pagemin+$read_perpage-1, $count-1);
if ($maxpageno==1) $fengye= "<b>本版只有一页</b>";
else {$nextpage=$page+1;
      $previouspage=$page-1;
	if ($page>=2) $fengye.="<a href=\"read.php?forumid=$forumid&filename=$filename&page=1\" title=第一页><font face=webdings >9</font></a> ";
      else $fengye.= "<font face=webdings >9</font>";
    if ($page>=2) $fengye.= "<a href=\"read.php?forumid=$forumid&filename=$filename&page=$previouspage\" title=上一页><font face=webdings >7</font></a> ";
      else $fengye.= "<font face=webdings >7</font>";
	  $fengye.="[";
		$flag=0;
		if($page==2)
		$fengye.="<a href=read.php?forumid=$forumid&filename=$filename&page=1>&nbsp;第". 1 . "页</a>";
		if($page==3)
		$fengye.="<a href=read.php?forumid=$forumid&filename=$filename&page=1>&nbsp;第". 1 . "页</a><a href=read.php?forumid=$forumid&filename=$filename&page=2>&nbsp;第". 2 . "页</a>";
		if($page>3){
			for($i=$page-3;$i<=$page-1;$i++){ 
 	        $fengye.="<a href=read.php?forumid=$forumid&filename=$filename&page=$i>&nbsp;第". $i . "页</a>";
           }}
        if($page<$maxpageno){
			for($i=$page+1;$i<=$maxpageno;$i++){ 
 	        $fengye.="<a href=read.php?forumid=$forumid&filename=$filename&page=$i>&nbsp;第". $i . "页</a>";
           $flag++;
		   if($flag==3) break; }}
	  $fengye.="] ";
	  	if ($page<$maxpageno) $fengye.= "<a href=\"read.php?forumid=$forumid&filename=$filename&page=$nextpage\" title=下一页><font face=webdings >8</font></a> ";
      else $fengye.= "<font face=webdings >8</font>";
	if ($page<$maxpageno) $fengye.= "<a href=\"read.php?forumid=$forumid&filename=$filename&page=$maxpageno\" title=最后一页><font face=webdings >:</font></a> ";
      else $fengye.= "<font face=webdings >:</font>";
	  $fengye.="<b>您正处在第:".$page."页浏览</b>";
}
print <<<EOT
<table width=$tablewidth border=0 cellspacing=0 cellpadding=1 align=center>
  <tr align=left> 
      <td align=left>
    $fengye
    </td>
    <td align=right><a onfocus=this.blur()  href=post.php?forumid=$forumid><img src="$npost" alt=发表一个新主题 border=0></a>&nbsp; <a onfocus=this.blur()  href=vote.php?forumid=$forumid><img src="$npollicon" alt=发表一个新投票 border=0></a>&nbsp; <a onfocus=this.blur()  href=post.php?action=reply&forumid=$forumid&filename=$filename><img src='$replyicon' alt=回复本主题 border=0></a>&nbsp;
</td>
  </tr>
</table>
EOT;
sline();
print <<<EOT
<table cellspacing=0 cellpadding=0 width=$tablewidth align=center border=0>
 <tr>
 <td valign=center width=1 bgcolor=$bordercolor height=22></td>
 <td valign=center align=left width=* bgcolor=$titlecolor>
 	<table cellspacing=1 cellpadding=0 width=100% border=0>
 	<tr>
 	<td bgcolor=$titlecolor valign=center align=left class=title height=24>&nbsp;
EOT;
if ($topic_type%3==0) echo "<b>* 本页主题</b>: $topic_name</td> <td  align=right>  <a onfocus=this.blur()  href=faq.php?faqjob=codehelp> <img src=images/qestion.gif alt=有疑问请先看帮助 border=0></a>&nbsp; <a onfocus=this.blur()  href=#><span onClick=\"window.external.AddFavorite('$script_pos/read.php?&forumid=$forumid&filename=$filename', '$bbs_title--$topic_name')\"><IMG SRC=images/adie.gif BORDER=0 width=15 height=15 alt=把本贴加入IE收藏夹></span></a>&nbsp; <a onfocus=this.blur()  href=viewfav.php?ofstarjob=add&forumid=$forumid&filename=$filename&topic_author=$topic_author&topic_name=$topic_name><img alt=把本贴加入论坛收藏夹 src=images/fav_add.gif border=0></a>";
	else echo "<b>* 跟随意见贴</b><td  align=right>  <a onfocus=this.blur()  href=faq.php?faqjob=codehelp> <img src=images/qestion.gif alt=有疑问请先看帮助 border=0></a>&nbsp; <a onfocus=this.blur()  href=#><span onClick=\"window.external.AddFavorite('$script_pos/read.php?&forumid=$forumid&filename=$filename', '$bbs_title--$topic_name')\"><IMG SRC=images/adie.gif BORDER=0 width=15 height=15 alt=把本贴加入IE收藏夹></span></a>&nbsp; <a onfocus=this.blur()  href=favorites.php?action=add&forumid=$forumid&filename=$filename&topic_author=$topic_author&topic_name=$topic_name><img alt=把本贴加入论坛收藏夹 src=images/fav_add.gif border=0></a>";
echo "<td width=130 align=right>";
if (isset($prepostid)) echo "<a onfocus=this.blur()  href=\"read.php?forumid=$forumid&postid=$prepostid&filename=$prefile\"><img src=\"images/prethread.gif\" alt=\"上一个主题:$pretitle\" border=0></a> ";
if (isset($nextpostid)) echo "<a onfocus=this.blur()  href=\"read.php?forumid=$forumid&postid=$nextpostid&filename=$nextfile\"><img src=\"images/nextthread.gif\" alt=\"下一个主题:$nexttitle\" border=0></a>";

echo "&nbsp;</td>
</tr>
</table>
</td>
<td valign=center width=1 bgcolor=$bordercolor height=22></td>
</tr>
</table>";
sline();
for ($i=$pagemin; $i<=$pagemax; $i++) {
	$postxuni=$i;
	if ($topic_type % 3!=0 && $i==0) continue;
	if ($i%2==0) $bgcolor=$article_color1;
		else $bgcolor=$article_color2;
	list($title,$author,$content,$time,$area,$icon,$usesign,$rvrc,$rvrcuser)=explode("|",$articlelist[$i]);

⌨️ 快捷键说明

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