• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

附:源代码2:BBSAUTOSEARCH.ASP

发布: 2007-6-30 18:56 | 作者: admin | 来源: | 查看: 12次 | 进入软件测试论坛讨论

领测软件测试网 <%@ Language=VBScript %>
<%
‘’*****************************
user=split(application("OnlineUser"),",",-1) ‘’获得在线用户列表
for i=0 to ubound(user) ‘’获得非空的在线用户列表
if user(i)<>"" then
nowcount=nowcount+1 ‘’统计在线人数
   if trim(temp)="" then
       temp=user(i)
   else
       temp=temp+","+user(i)
   end if
end if
next
if trim(temp)<>"" then
  Application.Lock
  application("OnlineUser")=temp ‘’重新整理在线用户列表
  Application.UnLock
end if
%>
<%
dim quit
‘’**************************
‘’开始分析处理"传呼信息队列"中的信息,并分割出来是自己的信息
if trim(application("Message"))<>"" then
   msg=split(application("Message"),"&")  ‘’分割得到传呼信息区,并保存到数组
   for i=0 to ubound(msg)
     if instr(1,trim(msg(i)),trim(session("userid")))>=1 then
       mymsg=split(msg(i),"$")  ‘’分割得到每个传呼信息区的详细信息
       if trim(mymsg(0))=trim(session("userid")) then  ‘’这条传呼信息是发给我的!
          msgok=1‘’有人呼叫我的表记置为1
          from=trim(mymsg(2))  ‘’获得传呼的详细内容
          content=trim(mymsg(1))
          sendto=trim(mymsg(0))
       end if
     end if
   next
end if
‘’****************************
quit=0
if (trim(session("UserID"))="" or instr(1,application("OnlineUser"),session("UserID"))<1) and trim(session("UserID"))<>"guest" then
      quit=1
else
     if trim(application("OnlineUser"))="" then
         counts=0
     else  
        counts=ubound(split(application("OnlineUser"),","))+1
     end if  
end if
%>
<HTML>
<HEAD>
<meta HTTP-EQUIV="refresh" CONTENT="60;URL=bbsAutoSearch.asp"  charset=gb2312 >
<script language=javascript>
function window_onload()
{
//**************
//在这里就调用了"显示传呼信息"的页面进行信息的显示
<%if msgok=1 then%>
   mail="     网 络 传 呼 机\n\n"+"<%=from%>"+"对您说:\n\n"+"<%=content%>";
sendinfo=window.open("bbssendinfo.asp?userid=<%=session("UserID")%>","SendInfo","toolbar=no,top=0,left=0");
<%end if%>
//**************
//如果当前用户超时,就踢出系统
<%if quit=1 then%>
  alert("由於超时或者操作非法而无法使用系统,请您重新登录!");
  document.kickout.target="_top";
  document.kickout.submit();
<%end if%>
}
</script>
</HEAD>
<BODY  onload="javascript:window_onload()">
<%if quit=1 then%>
<center>
  超时或者操作非法!

<%else%>
<%if session("UserID")<>"guest" then%>
  
   目前在线用户:<font color=red><b><%=counts%></b></font>人
   <br>
   <br>
   欢迎你:<%=Session("userid")%>
   <br>
   <br>
   <font color=red>退出前,请不要关闭此窗口!</font>
<%else%>
   注册用户才可发表文章.
  
<%end if
end if%>
<form name=kickout method=post action="bbslogin.htm"></form>
<a href="bbsSendBegin.asp" target="_blank"><img src="send.gif" border="0"></a>  
<a href="bbscheckout.asp"><img src="exit.gif" border="0"></a>
</center>
</BODY>
</HTML>

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网