<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/dsql.asp"-->
<%
dim newsid,commennum

if not isempty(request.QueryString("newsid")) then
	newsid=Clng(trim(request.QueryString("newsid")))
else
	response.Write("error")
	response.End()
end if

Set rs = Server.CreateObject("Adodb.RecordSet")				 
rs.Open "Select hits,commennum from news where id="&newsid,conn,3,3
if not rs.eof then
	num=rs(0)	
	commennum=rs(1)
end if
rs.close
set rs=nothing
conn.execute("update news set hits=hits+1 where id="&newsid)
response.Write("document.getElementById('Hits').innerHTML="""&num&""";")
response.Write("document.getElementById('CommenNum').innerHTML="""&commennum&""";")
call connclose()
%>