<% if request("action")="addComments" then Comments=request("Comments") id=request("id") author=conn.execute("select NameEn from [user] where username='"&request.Cookies("username")&"'")(0) if isNull(author) then author=request.Cookies("username") end if insql="insert into Comments (newsid,Content,author) values ("&id&",'"&Comments&"','"&author&"')" conn.execute(insql) end if if request("action")="delc" then did=request("did") id=request("id") delsql="delete * from Comments where id="&did conn.execute(delsql) rurl="blogshow.asp?id="&id response.Redirect(rurl) end if updatesql="update news set clicknum=clicknum+1 where id="&request("id") conn.execute(updatesql) %>
 
<% set rs=server.CreateObject("adodb.recordset") rs.open "select * from news where id="&request("id")&"",conn,1,1 if rs.bof and rs.eof then response.Write("") else %> <%if request.Cookies("username")<>"" then%> <%end if%> <% set rs1=server.CreateObject("adodb.recordset") rs1.open "select * from Comments where newsid="&request("id")&" order by id desc",conn,1,1 if rs1.bof and rs1.eof then response.Write("") else i=0 do while not rs1.eof%> <% rs1.movenext i=i+1 loop end if rs1.close set rs1=nothing %>
   
 
<%=rs("title")%>
By:<% set rsauthor=server.CreateObject("adodb.recordset") rsauthor.open "select NameEn from [user] where username='"&rs("author")&"'",conn,1,1 if rsauthor.bof and rsauthor.eof then response.Write("无名氏") else response.Write(rsauthor(0)) end if rsauthor.close set rsauthor=nothing %>
Browse (<%= rs("clicknum") %>) | Comments (<%= conn.execute("select count(id) from Comments where newsid="&rs("id")&"")(0) %>)   (<%=rs("adddate")%>)       <%if request.Cookies("username")="admin" then%> ">编辑 <%elseif trim(request.Cookies("username"))=trim(rs("author")) then%> ">编辑 <%end if%>
<%if rs("propics")<>"" then%> " width="500" />
<%=rs("shuoming1")%>
<%end if%> <%if rs("propics1")<>"" then%> " width="500" />
<%=rs("shuoming2")%>
<%end if%> <%if rs("propics2")<>"" then%> " width="500" />
<%=rs("shuoming3")%>
<%end if%> <%if rs("propics3")<>"" then%> " width="500" />
<%=rs("shuoming4")%>
<%end if%> <%if rs("propics4")<>"" then%> " width="500" />
<%=rs("shuoming5")%>
<%end if%>
 
  <%= rs("Content") %>
  Browse (<%= rs("clicknum") %>) | Comments (<%= conn.execute("select count(id) from Comments where newsid="&rs("id")&"")(0) %>)   (<%=rs("adddate")%>)
   
  添加评论
 

| " />

   
  讲过的
 
By:<%=rs1("author")%> <%if trim(request.Cookies("username"))="admin" then%>==>&id=<%=request("id")%>">Del <%end if%>
(<%=rs1("adddate")%>)
<%=rs1("content")%>
   
  <<返回
<% end if rs.close set rs=nothing %>