
<%riqi=now+timeset/24   
ip=request.servervariables("remote_addr")                                      
pic=1                                                                                      
name=session("user")
conn.execute("delete from online where ltime<getdate()-0.012")   
set jilu=conn.execute("select ip from online where ip='"&ip&"'  and (name='"&name&"' or  name='')")                                                                                      
if jilu.eof then                                                                                      
conn.execute("insert into online (ip,ltime,name)VALUES('"&ip&"','"&riqi&"','')")                                                                                      
else                                                                                      
conn.execute("update online set ltime='"&riqi&"' where ip='"&ip&"' and (name='' or name='"&name&"')")                                                                                      
end if                                                                                      
set jilu=nothing                                                                                      
if name<>"" then                                                                                      
set ujilu=conn.execute("select name from online where name='"&name&"'")                                                                                      
if ujilu.eof then                                                                                      
conn.execute("delete from online where ip='"&ip&"' and name=''")                                                                                      
conn.execute("insert into online (name,ltime,ip)VALUES('"&name&"','"&riqi&"','"&ip&"')")                                                                                     
else                                                                                      
conn.execute("update online set ltime='"&riqi&"' where name='"&name&"'")                                                                                      
end if                                                                                      
set ujilu=nothing                                                                                      
end if                                                                                      

 %> 