日期:2014-05-17  浏览次数:20946 次

为什么总是出错呢
<%     dim   ComeFrom,actCome,statuserid
statuserid=replace(Request.ServerVariables( "REMOTE_HOST "), ". ", " ")
set   rs=server.createobject( "adodb.recordset ")
if   membername= " "   then
if   session( "userid ")= " "   then
ComeFrom=address(Request.ServerVariables( "REMOTE_HOST "))
actCome=address(Request.ServerVariables( "HTTP_X_FORWARDED_FOR "))
sql= "insert   into   online(id,username,userclass,ip,startime,lastimebk,boardid,browser,stats,actforip,ComeFrom,actCome)   values   "&_
"( "&statuserid& ", '客人 ', '客人 ', ' "&_
Request.ServerVariables( "REMOTE_HOST ")& " ',Now(),Now(), "&boardid& ", ' "&_
Request.ServerVariables( "HTTP_USER_AGENT ")& " ', '论坛首页 ', ' "&_
                                Request.ServerVariables( "HTTP_X_FORWARDED_FOR ")& " ', ' "&ComeFrom& " ', ' "&actCome& " ') "
conn.execute(sql)
else
sql= "select   id   from   online   where   id= "&cstr(session( "userid "))
rs.open   sql,conn,1,3
if   rs.eof   and   rs.bof   then
ComeFrom=address(Request.ServerVariables( "REMOTE_HOST "))
actCome=address(Request.ServerVariables( "HTTP_X_FORWARDED_FOR "))
sql= "insert   into   online(id,username,userclass,ip,startime,lastimebk,boardid,browser,stats,actforip,ComeFrom,actCome)   values   "&_
"( "&statuserid& ", '客人 ', '客人 ', ' "&_
Request.ServerVariables( "REMOTE_HOST ")& " ',Now(),Now(), "&boardid& ", ' "&_
Request.ServerVariables( "HTTP_USER_AGENT ")& " ', '论坛首页 ', ' "&_
                                Request.ServerVariables( "HTTP_X_FORWARDED_FOR ")& " ', ' "&ComeFrom& " ', ' "&actCome& " ') "
conn.execute(sql)
else
sql= "update   online   set   lastimebk=Now(),boardid= "&boardid& "   where   id= "&cstr(session( "userid "))
conn.execute(sql)
end   if
end   if
session( "userid ")=statuserid
else
sql= "select   id   from   online   where   username= ' "&membername& " ' "
rs.open   sql,conn,1,3
if   rs.eof   and   rs.bof   then
ComeFrom=address(Request.ServerVariables( "REMOTE_HOST "))
actCome=address(Request.ServerVariables( "HTTP_X_FORWARDED_FOR "))
sql= "insert   into   online(id,username,userclass,ip,startime,lastimebk,boardid,browser,stats,actforip,ComeFrom,actCome)   values   "&_
"( "&statuserid& ", ' "&membername& " ', ' "&memberclass& " ', ' "&_
Request.ServerVariables( "REMOTE_HOST ")& " ',Now(),Now(), "&boardid& ", ' "&_
Request.Se