附:原始碼2:BBSAUTOSEARCH.ASP

來源:互聯網
上載者:User
原始碼 <%@ 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=http://www.163design.net/a/y/"send.gif" border="0"></a>  
<a href="bbscheckout.asp"><img src=http://www.163design.net/a/y/"exit.gif" border="0"></a>
</cente



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.