<!--#include file="../Include/Conn.jsp" -->
<!--#include file="../Include/Char.inc" -->
<!--#include file="../Include/const.jsp" -->
<!--#include file="../Include/md5.jsp" -->
<%
  dim rs,mSql
  Dim mTitle
  mTitle = Request.QueryString("Title")

  If Request.ServerVariables("REQUEST_METHOD")="POST" then
    m_UserName = checkStr(Trim(Request.Form("txtUserName")))
    m_Password = checkStr(Trim(Request.Form("txtPassword")))
    mSql = "Select * From T_Member Where F_UserName='"&m_UserName&"' and F_Password='"&md5(m_Password)&"'"
	Set rs = conn.Execute(mSql)
	if rs.Eof then 
	  Call Msgbox("对不起,用户名或密码输入有误！",1)
	  Response.end
	else
	  session("UserName") = m_UserName
	  session("Password") = m_Password
	  Set rs = Server.CreateObject("Adodb.RecordSet")
	  mSql = "Select * From T_ArticleReview"
	  rs.open mSql,conn,1,3
  	  rs.Addnew
	  'rs("F_UserID") =  Request.Form("hidUserID")
	  If Request.Form("chkAnonymity")="1" then
	    session("Anonymity")="1"
	    rs("F_UserName")="匿名"
	  else
	    rs("F_UserName") =  Request.Form("txtUserName")
      end if
	  rs("F_ArticleID") = Request.Form("hidArticleID")
	  rs("F_Content") = NoCSSHackInput(Request.Form("txtContent"))
	  rs("F_IPInfo") = Request.ServerVariables("REMOTE_ADDR")
	  rs("F_Addtime") = now
	  rs.Update
	  Call Msgbox("主题："&Request("hidTitle")&"\n您已成功的发布了该主题的评论!","ArticleReview.jsp?ArticleID="&Request("hidArticleID")&"&Title="&Request("hidTitle"))
    End if
  End if
  
'Delect Records
if Request("action")="Delete" and Session("master") <> "" then
  mSql = "DELETE FROM T_ArticleReview WHERE F_ID=" &Request.QueryString("DeleteID")
  conn.execute mSql
  Response.write "<script>location.replace('ArticleReview.jsp?ArticleID="&Request("ArticleID")&"&Title="&Request("Title")&"')</script>"
end if
%>
<HTML><HEAD><TITLE>评论主题：<%= mTitle %> - <%=site_info(0)%></TITLE>
<META http-equiv=content-type content="text/html; charset=gb2312">
<SCRIPT language="JavaScript">
function jDelete(url)
{
  if((confirm(" 警告:请确定是否删除,删除后不能恢复! "))==true) 
	self.location=url+'&action=Delete';
}
</SCRIPT>
<link href="../Include/Style.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY bgColor=#ffffff topmargin="0" leftmargin="0">
<!--#include file="../Include/Top.jsp" -->


<table  width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td align="center"><TABLE width=750 border=0 align="center" cellPadding=2 cellSpacing=2>
        <TBODY>
          <TR> 
            <TD height="40" align="center" class="title"><%= mTitle %></TD>
          </TR>
          <TR> 
            <TD height="50" align=middle>以下网友评论只代表本站网友个人观点，不代表本站的观点 <A class=a01 
      href="#rightnow"><FONT 
      color=#ff0000>立即发表评论</FONT></A></TD>
          </TR>
        </TBODY>
      </TABLE>
      <%	
	mArticleID = Request.QueryString("ArticleID")
	Set rs = Server.Createobject("Adodb.RecordSet")
    pageno = request.querystring("pageno")
    pmcount = 15
    mSql = "Select * From T_ArticleReview Where F_ArticleID=" & Request.QueryString("ArticleID")&" order by F_ID DESC"
    rs.open mSql,conn,1,1
	if rs.eof then
	   response.write "<br><p align=center><font color=blue><B>很抱歉，该新闻还没有相关评论!</B></font></p>"
	Else
      rs.pagesize=pmcount
      mpage=rs.pagecount
      if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
         pageno=1
      end if
      rs.absolutepage=pageno
	        Dim rc,re
      rc=rs.pagesize
      re=1
%>
      <TABLE width=750 border=0 align="center" cellPadding=0 cellSpacing=0>
        <TBODY>
          <TR> 
            <TD bgColor=#d4d3d1 colSpan=3 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
          </TR>
          <TR> 
            <TD width=1 bgColor=#d4d3d1 height=25><BR></TD>
            <TD class=f14 width=748 bgColor=#999999>　 <FONT color=#ffffff>本专题所有评论共</FONT><font color=ffffff><strong> 
              <% = rs.recordcount%>
              </strong></font><FONT color=#ffffff> 条 ⊙ 这是<font color=#ffffff><strong> 
              <% = Trim(pageno)%>
              </strong></font>/<font color=#ffffff><strong> 
              <% = Trim(mpage)%>
              </strong></font>页 </FONT><font class=ffffff><font 
            color=ffffff> 
              <%
   if pageno>1 then
      response.write "<a href='ArticleReview.jsp?pageno="&pageno-1&"&ArticleID="&Request("ArticleID")&"&Title="&Request("Title")&"'><font color=ffffff>[上一页]</font></a>"
   else
      response.write "[上一页]"
   end if
   Response.write "&nbsp;"
   if int(pageno) < int(rs.pagecount) then
     response.write "<a href='ArticleReview.jsp?pageno="&pageno+1&"&ArticleID="&Request("ArticleID")&"&Title="&Request("Title")&"'><font color=ffffff>[下一页]</font></a>"
   else 
     response.write "[下一页]"
   end if
  %>
              </font></font></TD>
            <TD width=1 bgColor=#d4d3d1><BR></TD>
          </TR>
          <TR> 
            <TD bgColor=#d4d3d1 colSpan=3 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
          </TR>
          <TR> 
            <TD width=1 bgColor=#d4d3d1 height=3><IMG height=1 
      src="Images/c.gif" width=1></TD>
            <TD width=748 bgColor=#ffffff height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
            <TD width=1 bgColor=#d4d3d1 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
          </TR>
        </TBODY>
      </TABLE>
      <%do while not rs.eof and rc>0%>
      <TABLE width=750 border=0 align="center" cellPadding=0 cellSpacing=0>
        <TBODY>
          <TR> 
            <TD bgColor=#d4d3d1 colSpan=5 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
          </TR>
          <TR> 
            <TD width=1 bgColor=#d4d3d1><BR></TD>
            <TD align=middle width=28 bgColor=#eeeded><IMG height=20 
      src="Images/lyb04.gif" width=20></TD>
            <TD  width=636 bgColor=#eeeded>
              <% = rs("F_Addtime")%>
              网友:<B><%=rs("F_UserName")%></B> 发表评论　IP: 
              <% = rs("F_IPInfo")%>
            </TD>
            <TD width=84 align="right" bgColor=#eeeded class=a05> 
              <% if session("master") <> "" then%>
              [修改][<a title="请确定是否删除,删除后不能恢复!" href="javascript:jDelete('ArticleReview.jsp?ArticleID=<%=Request("ArticleID")%>&Title=<%=Request("Title")%>&DeleteID=<%=rs("F_ID")%>&pageno=<%=cstr(pageno)%>')">删除</a>] 
              <% end if %>
            </TD>
            <TD width=1 bgColor=#d4d3d1><BR></TD>
          </TR>
          <TR> 
            <TD bgColor=#d4d3d1 colSpan=5 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
          </TR>
          <TR> 
            <TD width=1 bgColor=#d4d3d1 height=8><IMG height=1 
      src="Images/c.gif" width=1></TD>
            <TD bgColor=#ffffff colSpan=3 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
            <TD width=1 bgColor=#d4d3d1 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
          </TR>
          <TR> 
            <TD width=1 bgColor=#d4d3d1><BR></TD>
            <TD width=28><BR></TD>
            <TD colspan="2" class=l17><%=HTMLEncode(rs("F_Content"))%></TD>
            <TD width=1 bgColor=#d4d3d1><BR></TD>
          </TR>
          <TR> 
            <TD width=1 bgColor=#d4d3d1 height=8><IMG height=1 
      src="Images/c.gif" width=1></TD>
            <TD bgColor=#ffffff colSpan=3 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
            <TD width=1 bgColor=#d4d3d1 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
          </TR>
        </TBODY>
      </TABLE>
      <%
   rs.movenext
   re=re+1
   rc=rc-1
   loop
%>
      <TABLE width=750 border=0 align="center" cellPadding=0 cellSpacing=0>
        <TBODY>
          <TR> 
            <TD bgColor=#d4d3d1 colSpan=3 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
          </TR>
          <TR> 
            <TD width=1 bgColor=#d4d3d1 height=25><BR></TD>
            <TD width=748 bgcolor="#999999" class=f14 >　 <FONT color=#ffffff>本专题所有评论共 
              </FONT><font color=ffffff><strong> 
              <% = rs.recordcount%>
              </strong></font><FONT color=#ffffff>条 ⊙ 当前第<font color=ffffff><strong> 
              <% = Trim(pageno)%>
              </strong></font>页/共<font color=ffffff><strong> 
              <% = Trim(mpage)%>
              </strong></font>页　　　 
              <%
   if pageno>1 then
      response.write "<a href='ArticleReview.jsp?ArticleID="&Request("ArticleID")&"&Title="&Request("Title")&"'><font color=ffffff>[首页]</font></a>"
   else
      response.write "[首页]"
   end if
   if pageno>1 then
      response.write " <a href='ArticleReview.jsp?pageno="&pageno-1&"&ArticleID="&Request("ArticleID")&"&Title="&Request("Title")&"'><font color=ffffff>[上一页]</font></a>"
   else
      response.write "[上一页]"
   end if
   add=5'数字分页个数+1
   if pageno-int(add/2)<=1 then m=1 else m=pageno-int(add/2)
   if m+add>mpage then 
      n=mpage
      if mpage-add<=1 then m=1 else m=mpage-add
   else
      n=m+add
   end if

   for pno=m to n
     if pno=cint(pageno) then
        response.write "&nbsp;<font color=ffffff>"&pno&"</font>"
     else
        response.write "<b>&nbsp;<a href='ArticleReview.jsp?pageno="&pno&"&ArticleID="&Request("ArticleID")&"&Title="&Request("Title")&"'><font color=ffffff>"&pno&"</font></a></b>"
     end if
   next
   response.write "&nbsp"

   if int(pageno) < int(rs.pagecount) then
     response.write "<a href='ArticleReview.jsp?pageno="&pageno+1&"&ArticleID="&Request("ArticleID")&"&Title="&Request("Title")&"'><font color=ffffff>[下一页]</font></a>"
   else 
     response.write "[下一页]"
   end if

   if int(pageno) < int(rs.pagecount) then
      response.write " <a href='ArticleReview.jsp?pageno="&mpage&"&ArticleID="&Request("ArticleID")&"&Title="&Request("Title")&"'><font color=ffffff>[末页]</font></a>"
   else
      response.write "[末页]"
   end if
   Response.write "&nbsp;&nbsp;"
   rs.close
%>
              </FONT></TD>
            <TD width=1 bgColor=#d4d3d1><BR></TD>
          </TR>
          <TR> 
            <TD bgColor=#d4d3d1 colSpan=3 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
          </TR>
          <TR> 
            <TD width=1 bgColor=#d4d3d1 height=3><IMG height=1 
      src="Images/c.gif" width=1></TD>
            <TD width=748 bgColor=#ffffff height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
            <TD width=1 bgColor=#d4d3d1 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
          </TR>
        </TBODY>
      </TABLE>
      <%end if%>
      <a name=rightnow></a> <TABLE width=750 border=0 align="center" cellPadding=0 cellSpacing=0>
        <TBODY>
          <TR> 
            <TD width=1 bgColor=#d4d3d1 height=10><BR></TD>
            <TD vAlign=bottom width=39 height=20><IMG height=28 
      src="Images/lyb05.gif" width=39></TD>
            <TD vAlign=top width=340> <TABLE cellSpacing=0 cellPadding=0 width=340 border=0>
                <TBODY>
                  <TR> 
                    <TD vAlign=bottom width=100 height=30><B>您的评论</B></TD>
                    <TD width=29><BR></TD>
                    <TD align=right></TD>
                  </TR>
                  <TR> 
                    <TD bgColor=#d4d3d1 colSpan=3 height=1><IMG height=1 
            src="Images/c.gif" width=1></TD>
                  </TR>
                  <TR> 
                    <TD bgColor=#eeeded colSpan=3 height=9><IMG height=1 
            src="Images/c.gif" width=1></TD>
                  </TR>
                </TBODY>
              </TABLE></TD>
            <TD vAlign=bottom width=39 height=20><IMG height=28 
      src="Images/lyb06.gif" width=39></TD>
            <TD vAlign=top width=330> <TABLE cellSpacing=0 cellPadding=0 width=330 border=0>
                <TBODY>
                  <TR> 
                    <TD vAlign=bottom width=120 height=30><B>热门新闻评论</B></TD>
                    <TD width=29><BR></TD>
                    <TD align=right></TD>
                  </TR>
                  <TR> 
                    <TD bgColor=#d4d3d1 colSpan=3 height=1><IMG height=1 
            src="Images/c.gif" width=1></TD>
                  </TR>
                  <TR> 
                    <TD bgColor=#eeeded colSpan=3 height=9><IMG height=1 
            src="Images/c.gif" width=1></TD>
                  </TR>
                </TBODY>
              </TABLE></TD>
            <TD width=1 bgColor=#d4d3d1><BR></TD>
          </TR>
        </TBODY>
      </TABLE>
      <TABLE width=750 border=0 align="center" cellPadding=0 cellSpacing=0>
        <TBODY>
          <TR> 
            <TD width=1 bgColor=#d4d3d1><BR></TD>
            <TD width=19><BR></TD>
            <TD vAlign=top width=370><form name="form1" method="post" action="ArticleReview.jsp">
                <TABLE cellSpacing=0 cellPadding=0 width=370 border=0>
                  <TBODY>
                    <TR> 
                      <TD height=30> <input name="chkAnonymity" type="checkbox" value="1" <%if session("Anonymity") = 1 then Response.Write "checked" %> > 
                        <font color="#FF9900">匿名发表</font> 　用户名: 
                        <input name=txtUserName class="text" value="<%=session("UserName")%>" size=11>
                        密码: 
                        <INPUT   name=txtPassword type=password class="text" value="<%=session("Password")%>" size=10> 
                        <input name="hidArticleID" type="hidden" value="<%=Request("ArticleID")%>"> 
                      </TD>
                    </TR>
                    <TR> 
                      <TD class=l15>说明：如果您还不是的会员，<a href="http://www.yclife.cn/bbs/user/UserJoin.jsp" target="_blank"><font color="#000099">欢迎注册</font></a>。 
                      <input name="hidTitle" type="hidden" value="<%=Request("Title")%>"></TD>
                    </TR>
                    <TR> 
                      <TD 
height=80><TEXTAREA name=txtContent rows=8 cols=50></TEXTAREA></TD>
                    </TR>
                    <TR> 
                      <TD align=middle 
          height=40><INPUT type=submit value=" 发 送 " name=s1> <INPUT type=reset value=" 取 消 " name=s12></TD>
                    </TR>
                  </TBODY>
                </TABLE>
              </form></TD>
            <TD width=18><BR></TD>
            <TD vAlign=top width=300> <TABLE cellSpacing=1 cellPadding=1 width=340 border=0>
                <TBODY>
                  <TR> 
                    <TD width=10 height=5></TD>
                    <TD width=330></TD>
                  </TR>
                  <%
		   mSql = "Select * From V_ArticleReviewTop10"
		   Set rs = conn.Execute(mSql)
		   Do While Not rs.Eof 
			 Response.write "<TR><TD class=f14 vAlign=top>·</TD><TD class=f14>"
			 Response.write "<A class=a05 href='ArticleReview.jsp?ArticleID="&rs("F_ID")&"&Title="&rs("F_Title")&"'>"&rs("F_Title")&"</A>"
			 Response.write "</TD></TR>"
			 rs.MoveNext
		   loop
		   rs.Close
			%>
                </TBODY>
              </TABLE></TD>
            <TD width=1 bgColor=#d4d3d1><BR></TD>
          </TR>
        </TBODY>
      </TABLE>
      <TABLE width=750 border=0 align="center" cellPadding=0 cellSpacing=0>
        <TBODY>
          <TR> 
            <TD width=1 bgColor=#d4d3d1 height=25><BR></TD>
            <TD vAlign=bottom width=39 height=35><IMG height=28 
      src="Images/lyb06.gif" width=39></TD>
            <TD vAlign=top width=709> <TABLE cellSpacing=0 cellPadding=0 width=709 border=0>
                <TBODY>
                  <TR> 
                    <TD vAlign=bottom width=100 height=25><B>请您注意：</B></TD>
                    <TD width=580><BR></TD>
                    <TD width=29><BR></TD>
                  </TR>
                  <TR> 
                    <TD bgColor=#d4d3d1 colSpan=3 height=1><IMG height=1 
            src="Images/c.gif" width=1></TD>
                  </TR>
                  <TR> 
                    <TD bgColor=#eeeded colSpan=3 height=9><IMG height=1 
            src="Images/c.gif" width=1></TD>
                  </TR>
                </TBODY>
              </TABLE></TD>
            <TD width=1 bgColor=#d4d3d1><BR></TD>
          </TR>
        </TBODY>
      </TABLE>
      <TABLE width=750 border=0 align="center" cellPadding=0 cellSpacing=0 bgColor=#eeeded>
        <TBODY>
          <TR> 
            <TD width=1 bgColor=#d4d3d1 height=25><BR></TD>
            <TD width=40><BR></TD>
            <TD style="color:7b7b7b; line-height:150%;">

· 尊重网上道德，遵守《全国人大常委会关于维护互联网安全的决定》及中华人民共和国其他各项有关法律法规；<BR>
· 承担一切因您的行为而直接或间接导致的民事或刑事法律责任；
<BR>
· 参与本评论即表明您已经阅读并接受上述条款。   <BR><BR>

	    </TD>
            <TD width=20><BR></TD>
            <TD width=1 bgColor=#d4d3d1><BR></TD>
          </TR>
          <TR> 
            <TD bgColor=#d4d3d1 colSpan=6 height=1><IMG height=1 
      src="Images/c.gif" width=1></TD>
          </TR>
        </TBODY>
      </TABLE></td>
  </tr>
</table>
<!--#include file="../Include/Bottom.jsp" -->
</BODY></HTML>
<% CloseDatabase %>
