<!--#include file="../conn.asp" -->
<%
Select Case request.QueryString("a")
Case "bt"
sql="select count(*) as bt from diaryuser"
set rs=conn.execute(sql)
response.write("document.write(""<FONT color=brown>"&rs("bt")&"</FONT>"")")
rs.close
Set Rs=Nothing
Case "dt"
sql="select count(*) as bt from diary"
set rs=conn.execute(sql)
response.write("document.write(""<FONT color=brown>"&rs("bt")&"</FONT>"")")
rs.close
Set Rs=Nothing
Case "dtp"
sql="select count(*) as bt from diary"
set rs=conn.execute(sql)
response.write("document.write("""&(Int(rs("bt")/diarylistno)+1)&"</FONT>"")")
rs.close
Set Rs=Nothing
Case "btp"
sql="select count(*) as bt from diaryuser"
set rs=conn.execute(sql)
response.write("document.write("""&(Int(rs("bt")/diarylistno)+1)&"</FONT>"")")
rs.close
Set Rs=Nothing
Case else
Set rs=server.CreateObject("adodb.recordset")
id=request("id")
sqlhits="select hits from diary where diaryid="&CInt(id)
rs.open sqlhits,conn,1,3
If rs.eof Then
Else
If rs("hits")="" or isnull(rs("hits")) Or Len(rs("hits"))=0 then
hits=1
Else
hits=rs("hits")+1
End if
rs("hits")=hits
response.write("document.write(""<FONT color=brown>"&rs("hits")&"</FONT>"")")
End If
rs.update
rs.close
Set rs=Nothing
End select
%>





