日期:2014-05-16  浏览次数:20376 次

研究了一天,还是不知道错在那里?还请高手帮忙,谢谢!
我用ASP做一个BBS系统,其中用一个下拉列表统计了在线用户,本来我要达到的效果是: "选中用户名就可以转到guestinfo.asp以查看用户信息,和给用户发送信息 "可是实际上功能没达到,代码里有一段JS我不是很明白,求大家帮忙看看,我快要晕了!

<%  
  Set   conn=Server.CreateObject( "ADODB.Connection ")

connstr= "Provider=SQLOLEDB.1;Password=123456;Persist   Security   Info=True;User   ID=sa;Initial   Catalog=shujuku;Data   Source=(local);Connect   Timeout=15 "  
conn.Open   connstr
set   rs=server.CreateObject( "adodb.recordset ")
serialnum=request.querystring( "serialnum ")
query= "select*from   currentuser   where   serialnum= ' "&serialnum& " ' "
rs.open   query,conn,1,3
 
%>      
<%check   =request( "serialnum ")%>

<html>

<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<meta   http-equiv= "refresh "   content= "10;url=userlist.asp?serialnum= <%=request( "serialnum ")%> ">
<title> 当前用户列表 </title>
<style   type= "text/css ">
<!--
a:visited,a:link{text-decoration:none;color:#003399}
a:hover{text-decoration:none;color:#3333ff}
a.linkwhite:link,a.linkwhite:visited{text-decoration:none;color:white}
a.linkwhite:hover{text-decoration:underline;color:white}
a.linkblack:link,a.linkblack:visited{text-decoration:none;color:black}
a.linkblack:hover{text-decoration:underline;color:black}
input{font-family: "宋体 ";font-size:9pt}
td{font-family: "宋体 ";font-size:9pt;color:#000000}
.en{font-family: "verdana ", "arial ";font-size:9pt}
.white{color:#ffffff}
.line{line-height:20px}
.title{font-size:14px}
-->
</style>

<%
sql= "select   *   from   ever_user   where   uid   in( "
sql=sql& "select   uid   from   currentuser   where   serialnum= ' "&request( "serialnum ")& " ') "
set   save_rs=conn.execute(sql)
    if   save_rs.eof   or   save_rs.bof   then
            response.write "你的帐号已经过期,请重新登录或注册新的用户。 <br> "
    response.end
    else
            if   isnull(save_rs( "totaltime "))then
    totaltime=0
      else
              totaltime=save_rs( "totaltime ")
      end   if
      totaltime=totaltime+1
      sql= "update   ever_user   set   totaltime= ' "&totaltime& " '   where   uid= ' "&save_rs( "uid ")& " ' "
      conn.execute(sql)
    end   if
    set   currentuserrs=conn.execute( "select*from   currentuser ")
    set   newfile=conn.execute( "select*from   new_essay ")
     
      on   error   resume   next
      currentuserrs.movefirst
      newfile.movefirst
      if   not   currentusers.eof   then
&n