<!--#include file="conn.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<!--#include file="inc/publicfun.asp"-->
<%
userid=request("userid")
id=request("id")
blogtypeid=request("blogtypeid")
%>
<!--#include file="memberinfo.asp"-->
<%
call FTBBS_HTML_MB
url=Application("FTBBSMB")(10,0)
upfiletype=Application("FTBBSMB")(12,0)
upfilesize=Application("FTBBSMB")(13,0)
getcodeoff=Application("FTBBSMB")(30,0)
htm_ext=Application("FTBBSMB")(32,0)
if request("act")="y" then
   userip=request.servervariables("remote_addr")
   netname=Checkstr(request("netname"))
   userid=request("userid")
   blogid=request("id")
   plnl=Checkstr(request("remenu"))
   plnl=RegExReplace(plnl,"\b(script)\b"," $1 ")
   plnl=RegExReplace(plnl,"\b(iframe)\b"," $1 ")
   If getcodeoff=1 Then
      codestr = Trim(request.form("codestr"))
      codename = Trim(request.form("codename"))
      If CStr(Session("GetCode"&codename)) <> CStr(codestr) Then
      response.write "<script language='javascript'>alert('验证码错误，请刷新后重新输入！');history.go(-1);</script>"
      response.end 
      end if
   End If
   str="insert into ftblog_pl(netname,plcontent,blogid,userid,userip,pltype) values('"&netname&"','"&plnl&"','"&blogid&"','"&userid&"','"&userip&"',0)"
   conn.execute(str)
   str="update ftblog set blogplnum=blogplnum+1 where id="&blogid
   conn.execute(str)
   response.redirect request.serverVariables("Http_REFERER")
end if
%>
<html><head><meta http-equiv=content-type content="text/html; charset=gb2312">
<title><%=username%>的好友</title>
<link rel="stylesheet" type="text/css" href="<%=cssfile%>">
</head>
<body>
<center>
<!--#include file="usernav.asp" -->
<!--#include file="bokerhead.asp" -->
    <div class="stage"> 
      <div class="stagepad"> 
        <div style="width:100%"> 
          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="modth">
            <tr> 
              <td class="modtl" width="7">&nbsp;</td>
              <td class="modtc" nowrap><div class="modhead"><span class="modtit">查看文章</span></div></td>
              <td class="modtc" nowrap align="right"></td>
              <td class="modtr" width="7">&nbsp;</td>
            </tr>
          </table>
          <div id="m_blog" class="modbox"> 
            <%
sql="select ftblog.id,ftblog.blogtitle,ftblog.blogtypeid,ftblog.xinqin,ftblog_type.blogtype,ftblog.blogcontent,ftblog.writedate,ftblog.blogplnum,ftblog.plqs,ftblog.hits from ftblog,ftblog_type where ftblog.blogtypeid=ftblog_type.id and ftblog.sign=0 and ftblog.blogqs=0 and ftblog.id="&id&" order by ftblog.id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
plqs=rs("plqs")
%>
            <div class="tit"><%=rs("blogtitle")%></div>
            <div class="date"><%=rs("writedate")%> &nbsp;&nbsp;<%if rs("xinqin")<>"" then%>心情:&nbsp;<%=rs("xinqin")%><%end if%></div>
            <%=rs("blogcontent")%> 
            <div class="opt"> <a href="boker.asp?userid=<%=userid%>&blogtypeid=<%=rs("blogtypeid")%>" title="查看该分类中所有文章">类别：<%=rs("blogtype")%></a> 
              | 浏览(<%=rs("hits")%>) </div>
            <div class="line">&nbsp;</div>
<%
rs.close
set rs=nothing
if plqs=0 then
%>
            <div id="in_comment"> <a name="comment"></a> 
              <%
sql="select * from ftblog_pl where blogid="&id&" and plqs=0 and pltype=0 order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
if not rs.eof then
wzrep =20
wzpage = clng(request.querystring("page"))
if len(wzpage) = 0 or wzpage = 0 then wzpage = 1
rs.PageSize=wzrep
rs.AbsolutePage=wzpage
wzpagecount=rs.PageCount
wzcount=rs.RecordCount
%>
              <div class="tit">网友评论：</div>
              <%
for i = 0 to wzrep-1
  if rs.eof then exit for
%>
              <div class="user"> <strong><%=i+1%></strong>&nbsp;&nbsp;&nbsp;&nbsp;<%=rs("netname")%>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;<%=rs("pldate")%> 
              </div>
              <div class="desc"><%=rs("plcontent")%></div>
              <div class="line">&nbsp;</div>
              <%
 rs.movenext
 next
rs.close
set rs=nothing
%>
              <div id="page"><%= pagination(wzpagecount,userid)%></div>
              <%
else
 response.write "<div class=""desc""></div>"
end if
%>
            </div>
            <div id="in_send"> 
                <div class="tit">发表评论：</div>
                <table width="620" border="0" cellspacing="5" cellpadding="0">
              <form name="form1" action="" method="post" onsubmit="return CheckForm(this)">
                <input name="id" type="hidden" id="id" value="<%=id%>">
                <input name="userid" type="hidden" id="userid" value="<%=userid%>">
                  <tr> 
                    <td class="f14">姓　名：</td>
                    <td><input type="text" name="netname" id="netname" style="width:220px"  maxlength="29"> 
                      <div style="display:none" id="nmerror">*姓名最长为30字节</div></td>
                  </tr>
                  <tr> 
                    <td height=300 class="f14">内　容：</td>
                    <td>
					<TEXTAREA type="hidden" rows=1 cols=1 name="remenu" style="position:absolute;left:0;visibility:hidden;"></textarea> 
                    <SCRIPT src="htmledit/bloghtml.js"></SCRIPT>
				</td>
                  </tr>
                  <tr id="vercode"> 
                    <td valign="top" class="f14">验证码：</td>
                    <td valign="top"><input name=codestr id=codestr type=text size=10 maxlength=4> 
                      <%response.write getcode%>
                    </td>
                  </tr>
                  <tr> 
                    <td valign="top"class="f14">&nbsp;</td>
                    <td valign="top" class="f14"><input name="submit1" type="submit" value="发表评论" class="button"> 
                      <input name="act" type="hidden" id="act" value="y"></td>
                  </tr>
				  </form>
                </table>
            </div>
            <br>
          </div>
<%end if%>
          <table width="100%" border="0" cellspacing="0" cellpadding="0" height="8">
            <tr> 
              <td class="modbl" width="7">&nbsp;</td>
              <td class="modbc">&nbsp;</td>
              <td class="modbr" width="7">&nbsp;</td>
            </tr>
          </table>
        </div>
      </div>
    </div>
  </div>

<br><center>
    <!--#include file="tail.asp" -->
  </center>
</center>
<script src="homehits.asp?id=<%=id%>&ty=myblog"></script>
</body></html>
<%closedb%>