<?php
include_once("inc/config.php");
include_once("inc/publicfun.php");
include_once("inc/ftbbsdbclass.php");
include_once("inc/pageclass.php");
include_once("conn.php");
include_once("touxianfun.php");
include_once("inc/ftcode.php");
include_once("checkuser.php");

$pid=intval($_GET["id"]);
$TitleID=intval($_GET["id"]);
$mypage=intval($_GET["page"]);
$username=get_cookie('username');
$bz=get_cookie('bz');
$bbsadmin=get_cookie('bbsadmin');

$query = "SELECT * FROM {$tablepre}ftbbsmb";
$ftbbsmb=makecache('ftbbsmb.html',$query,$expire);
include_once("sound.php");
$getcodeoff=$ftbbsmb[30];
$url=$ftbbsmb[10];
$upfiletype=$ftbbsmb[12];
$upfilesize=$ftbbsmb[13];
$pagesize=$ftbbsmb[6];
$htmlsign=$ftbbsmb[37];
mysql_query("update {$tablepre}bbstitle set hit=hit+1 where id=".$pid);

$sql="select id from {$tablepre}bbstitle where id<".$pid." order by id desc limit 0,1";
$rs=mysql_query($sql);
$myrow = mysql_fetch_array($rs);
$numrows = mysql_num_rows($rs);
if ($numrows!=0){
$preid=$myrow["id"];
}else{
$preid=$pid;
}
$sql="select id from {$tablepre}bbstitle where id>".$pid." order by id asc limit 0,1";
$rs=mysql_query($sql);
$myrow = mysql_fetch_array($rs);
$numrows = mysql_num_rows($rs);
if ($numrows!=0){
$nextid=$myrow["id"];
}else{
$nextid=$pid;
}
if ($htmlsign==1){
	   $preurl="ftbbs-".$preid.".html";
	   $nexturl="ftbbs-".$nextid.".html";
    }
else{
	   $preurl="ftbbs.php?id=".$preid;
	   $nexturl="ftbbs.php?id=".$nextid;
}
$sql="select * from {$tablepre}bbstitle where id=".$pid;
$rs=mysql_query($sql);
$row = mysql_fetch_array($rs);
$BoardID_1=$row["BoardID_1"];
$BoardID_2=$row["BoardID_2"];
$bbs_img=$row["bbs_img"];
$bbs_img_display=$row["bbs_img_display"];
$img_url=$row["img_url"];
$img_url_display=$row["img_url_display"];
$title=$row["title"];
$zhiye=$row["zhiye"];
$name=$row["name"];
$menu=$row["menu"];
$htmfilename=$row["htmfilename"];
$dateh=$row["dateh"];
$flag=$row["flag"];
mysql_free_result($rs);

$postnum=$row["postnum"];
    $strsql="select * from {$tablepre}bbs_poll where pid=".$TitleID;
    $rs1=mysql_query($strsql);
    $row1 = mysql_fetch_array($rs1);
    $rsnum1= mysql_num_rows($rs1);
	mysql_free_result($rs1);
	if ($rsnum1>0){
	   $pollh="Y";
	   }
	else{
	   $pollh="N";
    }
//一级类别名称
$str_BBS_Cate="select BBS_Cate_Name,BBS_Cate_Manager_Name,BBS_Cate_Qs from {$tablepre}bbs_cate where BBS_Cate_ID='".$BoardID_1."'";
$rscate=mysql_query($str_BBS_Cate);
$bbscaterow = mysql_fetch_array($rscate);
$BBS_Cate_Name1=$bbscaterow[0];
$BBS_Cate_Manager_Name=$bbscaterow[1];
$BBS_Cate_QS1=$bbscaterow[2];
mysql_free_result($rscate);
if ($BoardID_2!=""){
//二级类别名称
$str_BBS_Cate="select BBS_Cate_Name,BBS_Cate_Manager_Name,BBS_Cate_Qs from {$tablepre}bbs_cate where BBS_Cate_ID='".$BoardID_2."'";
$rscate=mysql_query($str_BBS_Cate);
$bbscaterow = mysql_fetch_array($rscate);
$BBS_Cate_Name2=$bbscaterow[0];
$BBS_Cate_Manager_Name=$bbscaterow[1];
$BBS_Cate_QS2=$bbscaterow[2];
mysql_free_result($rscate);
}	
if ((get_cookie('bz')!=1 && get_cookie('bbsadmin')!=1) && ($BBS_Cate_QS1==4 || $BBS_Cate_QS1==5 || $BBS_Cate_QS2==4 || $BBS_Cate_QS2==5)){
   $postqs="disabled";
}
//加入用户资料
$str="select * from {$tablepre}clubuser where clubuser_name='".$name."'";
$rs2=mysql_query($str);
$row2 = mysql_fetch_array($rs2);
$rsnum2= mysql_num_rows($rs2);
if ($rsnum2>0){
   $clubuser_id=$row2["clubuser_id"];
   $postnum=$row2["postnum"];
   $jingyuan=$row2["jingyuan"];
   $tili=$row2["tili"];
   $img=$row2["userimg"];
   $zip=$row2["clubuser_zip"];
   $xzimg="";
   if ($zip!=""){
      if (false!==strrpos($zip,",")){
       $ziparr = explode(",",$zip);
	   for($k=0; $k<count($ziparr); $k++){
	   $xzimg=$xzimg."<img src=images/".$ziparr[$k]." width=20 height=35> ";
	   }
      }else{
       $xzimg=$xzimg."<img src=images/".$zip." width=20 height=35> ";
      }
   }else{
   $xzimg="";
   }
   $clubuser_province=$row2["clubuser_province"];
   $clubuser_city=$row2["clubuser_city"];
   $pro_city=$clubuser_province.$clubuser_city;
   $clubuser_reg_date=dateFormat($row2["clubuser_reg_date"],'Y-m-d');
   if ($row2["signname"]!=""){
   $signname=ubb($row2["signname"]);
   }
   else{
   $signname="";
   }
 } 
else{
   $jingyuan=0;
   $tili=100;
   $img="cache5.gif";
   $signname="";			     
   }
   $touxian=touxianvalue($jingyuan);
   $jibie=jibievalue($jingyuan);
   mysql_free_result($rs2);
   
   if ($htmlsign==1){
   $syurl=$clubuser_id.".html";
   $xcurl="photo-".$clubuser_id.".html";
   }
   else{
   $syurl="home.php?userid=".$clubuser_id;
   $xcurl="myphoto.php?userid=".$clubuser_id;
   }
if ($pro_city==""){
$pro_city="其他";
}
//回贴内容部份代码
if ($htmlsign==1){
$p = new ft_htmlpage;
}
else{
$p = new ft_page;
}
$strsql="select * from {$tablepre}bbsmenu where pid=".$pid." and deleted=0 order by id asc";
$rs=mysql_query($strsql);
$myrow = mysql_fetch_array($rs);
$numrows = mysql_num_rows($rs);

$p->pvar="page"; //设置页面传递的参数，默认为page
$p->setvar(array("id" => $pid)); //设置要传递的参数,要注意的是此函数必须要在 set 前使用，否则变量传不过去,注释后就不传递参数
$p->set($pagesize,$numrows,$psize); //设置相关参数，共三个，分别为'页面大小'、'总记录数'、'当前页(如果为空则自动读取GET变量)'
$rsx=mysql_query($strsql." limit ".$p->limit());
$pg=$p->getpage();
$a=($pg-1)*$pagesize+1;
?>
<HTML>
<HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<title><?=$title?></title>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<meta http-equiv="expires" content="wed, 20 Feb 2000 08:00:00 GMT">
<meta name="keywords" content="<?=$title?>">
<script language=javascript src="js/resetcode.js"></script>
<script language=javascript src="inc/cookies.js"></script>
<script>
var stylecook = getCookie("STYLESHOW");
var style;
var strstyle;
if(stylecook=="")
{
 stylecook=1;
}
else
{
 stylecook++;
}
style="ftbbs0"+stylecook+".css";
strstyle="<link href=\"css/"+style+"\"  rel=\"stylesheet\" type=\"text/css\"> ";
document.write(strstyle);
</script>
<script>
var qs=<?=$BBS_Cate_QS2?>;
var ckname = getCookie("username");
var ckpayuser = getCookie("payuser");
var ckbz = getCookie("bz");
var ckbbsadmin = getCookie("bbsadmin");
if(qs==1&&ckname=="")
{
 alert('你还没有登录请先登录');
 window.location.href='userlogin.php';
}
if(qs==2&&ckpayuser==0)
{
 alert('认证用户才能访问');
 window.location.href='default.php';
}
if(qs==3&&ckbz==0&&ckbbsadmin==0)
{
 alert('版主才能访问');
 window.location.href='default.php';
}
</script>
<script language="javascript" src="js/resizeimages.js"></script>
<script language="javascript" src="js/numjs.js"></script>
<script language = "JavaScript" src ="inc/Main.js"></script>
<META content="MSHTML 5.00.3700.6699" name=GENERATOR></HEAD><BODY topMargin=1>
<div class=menuskin id=popmenu onMouseOver="clearhidemenu()" onMouseOut="dynamichide(event)" style="Z-index:100"></div>
<?if (get_cookie('username')!="") {
include_once("headed.php");
}
else{
include_once("heading.php");
}?>
<table cellspacing=0 cellpadding=0 width="980" align=center border=0>
  <tbody>
    <tr> 
      <td width="13%" height=70> 
        <div align="left"><img src="images/tmlogo.gif" width="112" height="50"></div></td>
      <td width="87%"><div align="right">
          <script language="JavaScript" src="sitead.js"></script>
        </div></td>
    </tr>
  </tbody>
</table>
<table cellspacing=0 cellpadding=0 width="980" align=center border=0>
<tbody>
    <tr> 
      <td class="table001" height=2></td>
    </tr>
    <tr>
      <td height=1></td>
    </tr>
</tbody>
</table>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr class="td004"> 
    <td width="87%" height="28"><IMG src="images/bbs_t1.gif" align="absmiddle"> 
      主题位置：<A class="a03" href="default.php">论坛首页</a>&gt;&gt;<A class="a03" href="default.php?a=<?=$BoardID_1?>"> <?=$BBS_Cate_Name1?></a>&gt;&gt;
	  <a class=a03 href="default.php?a=<?=$BoardID_1?>&b=<?=$BoardID_2?>"> <?=$BBS_Cate_Name2?></a>>> <?=$title?>
	  </td>
    <td width="13%" align="right"><a name="#top"></a><a href="xmlrss.php?id=<?=$TitleID?>" target="_blank"><img src="images/postxml.gif" border="0" align="absmiddle" title="Rss订阅本贴最新内容"></a> 
      <a href="javascript:window.external.AddFavorite(location.href,document.title)"><img src="images/fav.gif" border="0" align="absmiddle" title="加入到IE收藏夹"></a> 
      <script>var url=document.location.href.toLowerCase();thisurl(url,'ftbbs.php?id=<?=$TitleID?>');</script>&nbsp;</td>
  </tr>
</table>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><script src="listad.js"></script></td>
  </tr>
</table>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="25" width="112" align="left"><span class="nextpre"><a class="a05" href="<?=$preurl?>">上一主题</a>|<a class="a05" href="<?=$nexturl?>">下一主题</a></span></td>
    <td><? $p->output(0);?>
    </td>
    <td width="23%"> <div align="right"><a href="default.php?n=fbht&a=<?=$BoardID_1?>&b=<?=$BoardID_2?>"><img src="images/btn_post.gif" width="61" height="21" border="0" align="absmiddle"></a>&nbsp;<a href="default.php?n=poll&a=<?=$BoardID_1?>&b=<?=$BoardID_2?>"><img src="images/btn_poll.gif" width="61" height="21" border="0" align="absmiddle"></a>&nbsp;<a href="#re"><img src="images/btn_repost.gif" width="61" height="21" border="0" align="absmiddle"></a>&nbsp;</div></td>
  </tr>
</table>
<table cellspacing=0 cellpadding=0 width="980" align=center border=0>
<tbody>
    <tr>
      <td height=5></td>
    </tr>
</tbody>
</table>
<TABLE align=center class="table001" border=0 cellPadding=0 cellSpacing=0 width="980">
  <TR> 
    <TD width="67%" height=28><B>&nbsp;&nbsp;<?=$title?></B></TD>
    <TD width="33%"><div align="right"><a class="a05" href="topbbs.php?id=<?=$TitleID?>&postnum=0&postuser=<?=$name?>">置顶</a>&nbsp; 
        <a class="a05" href="tjbbs.php?id=<?=$TitleID?>&postnum=0&postuser=<?=$name?>">推荐</a>&nbsp; 
        <a class="a05" href="jpbbs.php?id=<?=$TitleID?>&postnum=0&postuser=<?=$name?>">精华</a>&nbsp; 
        <a class="a05" href="lockbbs.php?id=<?=$TitleID?>&postnum=0&postuser=<?=$name?>">加锁</a>&nbsp; 
        <a class="a05" href="favorites.php?id=<?=$TitleID?>&postnum=0&postuser=<?=$name?>">收藏</a>&nbsp; 
        &nbsp;&nbsp;<a class="a05" onMouseOver="showmenu(event,'','Menu_MemberTools')" href="#">取消</a>&nbsp;&nbsp;</div></TD>
  </TR>
</TABLE>
<?
if ($mypage=="" || $mypage==1){
?>
<TABLE align="center" border=0 cellPadding=0 cellSpacing=0 width="980" style="table-layout:fixed; word-break:break-all" class="mainbox">
  <TBODY>
    <TR> 
      <TD class=td002 rowSpan=5 vAlign=top width="20%"><DIV align=center> 
          <TABLE border=0 cellPadding=0 cellSpacing=0 width="92%" align="right">
            <TBODY>
              <TR> 
                <TD height=30 align="left"><strong><a class=a03 href="default.php?n=grzl&userid=<?=$clubuser_id?>"><?=$name?></a></strong></TD>
              </TR>
              <tr> 
                <td background="images/bg_text1.gif" height="1" colspan="2"></td>
              </tr>
              <TR> 
                <TD height=10></TD>
              </TR>
              <TR> 
                <TD align=center><IMG src="userheadimg/<?=$img?>" onload="javascript:if(this.width>120) this.width=120"></TD>
              </TR>
              <TR> 
                <TD height=10></TD>
              </TR>
              <TR> 
                <TD height=20>发贴：<?=$postnum?></TD>
              </TR>
              <TR> 
                <TD height=20>头衔：<?=$touxian?></TD>
              </TR>
              <TR> 
                <TD height=20>级别：<?=$jibie?></TD>
              </TR>
              <TR> 
                <TD height=20>体力：<?=$tili?></TD>
              </TR>
              <TR> 
                <TD height=20>积分：<?=$jingyuan?></TD>
              </TR>
              <TR> 
                <TD height=20>来自：<?=$pro_city?></TD>
              </TR>
              <TR> 
                <TD height=20>注册时间：<?=$clubuser_reg_date?></TD>
              </TR>
              <TR> 
                <TD height=40><?=$xzimg?></TD>
              </TR>
              <TR> 
                <TD height=60></TD>
              </TR>
              <TR> 
            </TBODY>
          </TABLE>
        </DIV></TD>
    </TR>
    <TR> 
      <TD class="td004" vAlign=top> 
         <table width="100%" border="0" cellspacing="3" cellpadding="0" style="TABLE-LAYOUT:fixed; word-break:break-all">
          <tr> 
            <td width="79%" valign="middle" height="23" class="new12"> 发表于 <?=$dateh?>
              &nbsp;&nbsp;&nbsp;&nbsp;<a class="a03" href="default.php?n=grzl&userid=<?=$clubuser_id?>">个人资料</a> 
              <a class=a03 href="<?=$syurl?>" target="_blank">个人空间</a> <a class=a03 href="<?=$xcurl?>" target="_blank">个人相册</a> 
              <a class=a03 href="default.php?n=postsms&userid=<?=$clubuser_id?>">发送短信</a> 
              <a class=a03 href="friendbbs.php?id=<?=$TitleID?>&userid=<?=$clubuser_id?>">加为好友</a></td>
            <td width="21%" valign="middle" class="td004"><div align="right">
             <a class="a03" href="" onclick="switchStyle('small','tofont');return false;">小</a>
             <a class="a03" href="" onclick="switchStyle('medium','tofont');return false;">中</a>
             <a class="a03" href="" onclick="switchStyle('large','tofont');return false;">大</a>
			 <a class="a03" name="#" onClick="bodytojt('tofont')" title="转为简体中文模式" style="cursor:hand;">简</a> 
             <a class="a03" name="#" title="转为繁体中文模式" onClick="bodytoft('tofont')" style="cursor:hand;">繁</a>
			 <strong><font color="#006633">楼主</font></strong></div>
			</td>
          </tr>
          <tr> 
             <td background="images/bg_text1.gif" height="1" colspan="2"></td>
          </tr>
          <tr> 
            <td colspan="2" valign="top" class="td004"><script src="postad.js"></script><font id="tofont">
			<? if ($flag==3 && $username==""){
			   echo "<font color=#568AC2>&nbsp;此贴为特殊贴: </font>";
               echo "<table width=98% height=35 border=0 align=center cellpadding=4 cellspacing=1 bgcolor=#999999><tr><td bgcolor=#ffffee>此贴内容要注册用户才可查看</td></tr></table>";
			   }
			   elseif ($flag==4 && $_SESSION["id"]!=$pid && $username!=$name){
			   echo "<font color=#568AC2>&nbsp;此贴为特殊贴: </font>";
               echo "<table width=98% height=35 border=0 align=center cellpadding=4 cellspacing=1 bgcolor=#999999><tr><td bgcolor=#ffffee>此贴内容要回贴后才可查看</td></tr></table>";
			   }else{
			    echo $menu;
			    if ($flag==1){
			    include_once("dirpoll.php");
			    }elseif ($flag==2){
			    include_once("bmform.php");
			    }
			   }
			?>
			</font>
			</td>
          </tr>
        </table>
      </TD>
    </TR>
    <TR> 
      <TD class="td004" vAlign=bottom><TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
          <TBODY>
            <?if ($img_url_display==1){?>
            <TR> 
              <TD height="19" colspan="2"> <div align="right">
                  <?=$img_url?>
                </div></TD>
            </TR>
            <?}?>
            <? if ($signname!=""){ ?>
            <TR> 
              <TD colspan="2"> <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
                  <TBODY>
                    <TR> 
                      <TD height=36 vAlign=top width=60> <DIV align=center><IMG height=32 src="userheadimg/icon3.gif" width=45></DIV></TD>
                      <TD class=C03><FONT color=#568ac2>
                        <?=htmltocode($signname)?>
                        </FONT></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
            <? }?>
            <TR> 
              <TD width="73%" height="28" class="ad">
<script language="JavaScript" src='ad.js'></script>
              </TD>
              <TD width="27%" align="right" class="ad"> 
                <? if ($name==$username || $bz==1 || $bbsadmin==1){
		            echo "<img src=images/yinyong.gif width=14 height=16 align=absmiddle>" ;
		            echo " <a class=a03 href=javascript:; onClick=ftyy('$TitleID')>引用</a> ";
			        echo "<img src=images/edit.gif width=15 height=15 align=absmiddle>";
					echo " <a class=a03 href=editpost.php?id=".$TitleID."&postnum=0&postuser=".$name.">编辑</a> ";
					echo "<img src=images/del.gif width=12 height=13 align=absmiddle>";
					echo " <a class=a03 href=signbbs.php?id=".$TitleID."&postnum=0&postuser=".$name."&page=1>删除</a> ";
					}
					else{echo "&nbsp;";}
			    ?>
              </TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
  </TBODY>
</TABLE>
<?
}
if ($numrows!=0){
while ($myrow = mysql_fetch_array($rsx)){
   $reid=$myrow["id"];
   $reuser=$myrow["user_id"];
   $reuser_id=$myrow["user_id"];
   $rebbs_img=$myrow["bbs_img"];
   $remenu=$myrow["remenu"];
   $datetime=$myrow["dateh"];
   $img_url=$myrow["img_url"];
   $img_url_display=$myrow["img_url_display"];
   $str="select clubuser_id,clubuser_name,clubuser_reg_date,clubuser_zip,jingyuan,tili,postnum,userimg,signname,bbsmanager,clubuser_province,clubuser_city from {$tablepre}clubuser where clubuser_name='".$reuser_id."'";
   $rs2=mysql_query($str);
   $row2 = mysql_fetch_array($rs2);
   $rsnum2= mysql_num_rows($rs2);
   mysql_free_result($rs2);
   if ($rsnum2!=0){
   $clubuser_id=$row2["clubuser_id"];
   $jingyuan=$row2["jingyuan"];
   $tili=$row2["tili"];
   $img=$row2["userimg"];
   $zip=$row2["clubuser_zip"];
   $xzimg="";
   if ($zip!=""){
      if (false!==strrpos($zip,",")){
       $ziparr = explode(",",$zip);
	   for($k=0; $k<count($ziparr); $k++){
	   $xzimg=$xzimg."<img src=images/".$ziparr[$k]." width=20 height=35> ";
	   }
      }else{
       $xzimg=$xzimg."<img src=images/".$zip." width=20 height=35> ";
      }
   }else{
   $xzimg="";
   }
   $clubuser_province=$row2["clubuser_province"];
   $clubuser_city=$row2["clubuser_city"];
   $pro_city=$clubuser_province.$clubuser_city;
   $postnum=$row2["postnum"];
   $reg_date=dateFormat($row2["clubuser_reg_date"],'Y-m-d');
   if ($row2["signname"]!=""){
      $signname=ubb($row2["signname"]);
     }
	 else{
	 $signname="";
	 } 
   }
   else{
   $jingyuan=0;
   $tili=100;
   $img="cache5.gif";
   $signname="";			     
   }
   $touxian=touxianvalue($jingyuan);
   $jibie=jibievalue($jingyuan);
   
   if ($htmlsign==1){
   $syurl=$clubuser_id.".html";
   $xcurl="photo-".$clubuser_id.".html";
   }
   else{
   $syurl="home.php?userid=".$clubuser_id;
   $xcurl="myphoto.php?userid=".$clubuser_id;
   }
   if ($pro_city==""){
   $pro_city="其他";
   }			  
?>
<table border="0" width="980" cellspacing="0" cellpadding="0" align="center" style="table-layout:fixed; word-break:break-all" class="mainbox">
  <tr> 
    <td width="20%" rowspan="2" valign="top" class=td002> <div align="center"> 
        <table border="0" cellspacing="0" cellpadding="0" width="92%" align="right">
          <tr> 
            <td height="28" align="left"><strong><a class=a03 href="default.php?n=grzl&userid=<?=$clubuser_id?>"><?=$reuser?></a></strong></td>
          </tr>
		  <tr>
            <td height="1" colspan="2" background="userheadimg/bg_text1.gif"> </td>
          </tr>
          <tr> 
            <td height="8"></td>
          </tr>
		  <tr> 
            <td align="center"><img src="userheadimg/<?=$img?>" onload="javascript:if(this.width>120) this.width=120"></td>
          </tr>
          <tr> 
            <td height="8"></td>
          </tr>
          <tr> 
            <td height=20>发贴：<?=$postnum?></td>
          </tr>
          <tr> 
            <td height="19">头衔：<?=$touxian?></td>
          </tr>
          <tr> 
            <td height="20">级别：<?=$jibie?></td>
          </tr>
          <tr> 
            <td height="20">体力：<?=$tili?></td>
          </tr>
          <tr> 
            <td height="20">积分：<?=$jingyuan?></td>
          </tr>
          <tr> 
            <td height="20">来自：<?=$pro_city?></td>
          </tr>
          <tr> 
            <td height="20">注册时间：<?=$reg_date?></td>
          </tr>
          <tr> 
            <td height="40"><?=$xzimg?></td>
          </tr>
          <tr> 
            <td height="60"></td>
          </tr>
        </table>
      </div></td>
    <td valign="top" class="td004"> 
      <table width="100%" border="0" cellspacing="3" cellpadding="0" style="TABLE-LAYOUT:fixed; word-break:break-all">
        <tr> 
          <td width="82%" height="23" valign="top" class="new12"> 发表于 
            <?=$datetime?>
            &nbsp;&nbsp;&nbsp;<a class=a03 href="default.php?n=grzl&userid=<?=$clubuser_id?>">个人资料</a> 
            <a class=a03 href="<?=$syurl?>" target="_blank">个人空间</a> 
            <a class=a03 href="<?=$xcurl?>" target="_blank">个人相册</a>
            <a class=a03 href="default.php?n=postsms&userid=<?=$clubuser_id?>">发送短信</a> 
            <a class=a03 href="friendbbs.php?id=<?=$TitleID?>&userid=<?=$clubuser_id?>">加为好友</a></td>
          <td width="18%" valign="middle" class="td004"><div align="right">
		    <a class="a03" href="" onclick="switchStyle('small','<?=$reid?>');return false;">小</a>
            <a class="a03" href="" onclick="switchStyle('medium','<?=$reid?>');return false;">中</a>
            <a class="a03" href="" onclick="switchStyle('large','<?=$reid?>');return false;">大</a>
		    <a class="a03" name="#$reid$" style="cursor:hand;" onClick="bodytojt('<?=$reid?>')" title="转为简体中文模式">简</a> 
            <a class="a03" name="#$reid$" style="cursor:hand;" title="转为繁体中文模式" onClick="bodytoft('<?=$reid?>')">繁</a>
			<font color="#006633"><?=$a?></font><font color="#999999"><sup>#</sup></font></div></td>
        </tr>
		<tr>
          <td height="1" colspan="2" background="userheadimg/bg_text1.gif"> </td>
        </tr>
        <tr> 
          <td colspan="2" valign="top" class="td004"><font id="<?=$reid?>"><?=$remenu?></font></td>
        </tr>
      </table>
	  </td>
  </tr>
  <tr> 
    <td valign="bottom" class="td004"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <?if ($img_url_display==1){?>
        <tr> 
          <td colspan="2"><div align="right">
              <?=$img_url?>
            </div></td>
        </tr>
        <?
		}
        if ($signname!=""){
		?>
        <tr> 
          <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="60" height="36" valign="top"> <div align="center"><img src="userheadimg/icon3.gif" width="45" height="32"></div></td>
                <td class="C03"> <font color=#568AC2>
                  <?=htmltocode($signname)?>
                  </font></td>
              </tr>
            </table></td>
        </tr>
        <? }?>
        <tr> 
          <TD width="73%" height="22" class="ad">
<script language="JavaScript" src='ad.js'></script>
          </TD>
          <TD width="27%" align="right" class="ad"> 
            <? if ($reuser==$username || $bz==1 || $bbsadmin==1){
		         echo "<img src=images/yinyong.gif width=14 height=16 align=absmiddle>" ;
		         echo " <a class=a03 href=javascript:; onClick=yinyong('$reid')>引用</a> ";
			     echo "<img src=images/edit.gif width=15 height=15 align=absmiddle>";
				 echo " <a class=a03 href=editpost.php?id=".$TitleID."&postuser=".$reuser_id."&reid=".$reid.">编辑</a> ";
				 echo "<img src=images/del.gif width=12 height=13 align=absmiddle>";
				 echo " <a class=a03 href=delbbs.php?id=".$TitleID."&postuser=".$reuser_id."&reid=".$reid.">删除</a> ";
				  }
			 else{echo "&nbsp;";}
		 ?>
          </TD>
        </tr>
      </table></td>
  </tr>
</table>
<?
   $a++;
  }
}?>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="25" width="112" align="left"><span class="nextpre"><a class="a05" href="<?=$preurl?>">上一主题</a>|<a class="a05" href="<?=$nexturl?>">下一主题</a></span></td>
    <td>
<?
$p->output(0);
mysql_free_result($rs);
mysql_free_result($rsx);
$db->close(); 
?>
    </td>
    <td width="23%"> <div align="right"><a href="default.php?n=fbht&a=<?=$BoardID_1?>&b=<?=$BoardID_2?>"><img src="images/btn_post.gif" width="61" height="21" border="0" align="absmiddle"></a>&nbsp;<a href="default.php?n=poll&a=<?=$BoardID_1?>&b=<?=$BoardID_2?>"><img src="images/btn_poll.gif" width="61" height="21" border="0" align="absmiddle"></a>&nbsp;<a href="#re"><img src="images/btn_repost.gif" width="61" height="21" border="0" align="absmiddle"></a>&nbsp;</div></td>
  </tr>
</table>
<table cellspacing=0 cellpadding=0 width="980" align=center border=0>
<tbody>
    <tr>
      <td height=5></td>
    </tr>
</tbody>
</table>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="980" class="mainbox">
<TBODY>
<TR>
<TD vAlign=top>
<DIV align=center>
          <TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="100%">
            <FORM action="recheck.php" method="post" name="myform" onsubmit="return CheckReForm(this)">
              <TR> 
                <TD class=td001 colSpan=2 height=28 align=center> <B>回 复：<?=$title?><a name="re"></a></B></TD>
              </TR>
              <TR>
                <TD align=right vAlign=middle class=td005><div align="center">
                    <table width="100%" cellspacing="0">
                      <tr> 
                        <td width="189" class=td005><div align="right">回复内容：</div></td>
                        <td height="250" class="td005">
<TEXTAREA type="hidden" rows=1 cols=1 name="remenu" style="position:absolute;left:0;visibility:hidden;"></textarea>
<script type="text/javascript" src="fteditor/editor.js"></script>
<script type="text/javascript" src="fteditor/ftsetup.js"></script>
						</td>
                      </tr>
                      <TR class=td005> 
                        <TD width="20%"> <div align="right">上传附件：</div></TD>
                        <TD width="80%" height="30"> <IFRAME name=mqs marginWidth=0 marginHeight=0 src="FtbbsUpFile.php?filename=<?=$htmfilename?>" frameBorder=0 width=580 scrolling=no height=25></IFRAME> 
                        </TD>
                      </TR>
                      <?if ($getcodeoff==1){?>
                      <TR class=td005> 
                        <TD width="20%"> <div align="right">验 证 码：</div></TD>
                        <TD width="80%" height="30"> <input name="codestr" id="codestr" type="text" size="10" maxlength="4"> 
                          <img src="getyzm.php" alt="看不清楚请点击刷新验证码" class="simg" style="cursor : pointer;" onclick="this.src='getyzm.php';" align="absmiddle"> 
                          看不清楚请点击刷新验证码 </TD>
                      </TR>
                      <?}?>
                      <tr valign="middle"> 
                        <td height="45" align=center class=td005>&nbsp; </td>
                        <td height="45" align=center class=td005><div align="left">
                            <input name="bbs_img_display" type="hidden" id="bbs_img_display" value="<?=$bbs_img_display?>">
                            <input name="bbs_img" type="hidden" id="bbs_img" value="<?=$bbs_img?>">
							<input name="CurrentMode" type="hidden" id="CurrentMode">
                            <input name="id" type=hidden value="<?=$TitleID?>">
                            <input name="BoardID_1" type=hidden value="<?=$BoardID_1?>">
                            <input name="BoardID_2" type=hidden value="<?=$BoardID_2?>">
                            <input class="button" type="Submit" value="提交回复" name="submit1" style="height:25px;" <?=$postqs?>>
							<input type="button" name="Submit" value="恢复数据" onClick="FtSimpleExecute('paste');" style="height:25px;">
                          </div></td>
                      </tr>
                    </table>
</div></TD>
</TR>
</FORM>
</TABLE>
</DIV></TD></TR></TABLE>
<div class="Menu_popup" id="Menu_MemberTools">
<div class=menuitems>
<a class=a03 href=canneltopbbs.php?id=<?=$TitleID?>&postnum=0&postuser=<?=$name?>>取消置顶</a>
<br><a class=a03 href=canneltjbbs.php?id=<?=$TitleID?>&postnum=0&postuser=<?=$name?>>取消推荐</a>
<br><a class=a03 href=canneljhbbs.php?id=<?=$TitleID?>&postnum=0&postuser=<?=$name?>>取消精华</a>
<br><a class=a03 href=unlockbbs.php?id=<?=$TitleID?>&postnum=0&postuser=<?=$name?>>取消加锁</a>
</div>
</div>
<?
include_once("inc/tail.php");
?>
</BODY>
</HTML>