<%
on_nickname=nickname
if nickname="" then on_nickname="ΏΝΘΛ"
sql="select * from online where username='"&on_nickname&"' or sessionid='"&session.sessionid&"' "
rs.Open sql,Conn,1,3
if rs.eof then
rs.addnew
rs("forumid")=forumid
rs("bbsname")=acturl
rs("lasttime")=now()
rs("eremite")=Request.Cookies("eremite")
rs("username")=on_nickname
rs("sessionid")=session.sessionid
else
rs("forumid")=forumid
rs("bbsname")=acturl
rs("lasttime")=now
rs("eremite")=Request.Cookies("eremite")
rs("username")=on_nickname
rs("sessionid")=session.sessionid
end if
rs.update
rs.close
conn.execute("delete * from [online] where lasttime < #" & Format_D(now()-0.01389) & "# ")
onlinemany=conn.execute("Select count(*)from online")(0)
Function Format_D(v)
	n=Year(v)
	y=Fd2(Month(v))
	r=Fd2(Day(v))
	s=Fd2(Hour(v))
	f=Fd2(Minute(v))
	m=Fd2(Second(v))
	Format_D=n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
End Function

Function Fd2(t)
	if len(t)=1 then t="0" & t
	Fd2=t
End Function
%>