日期:2013-06-28  浏览次数:20729 次

<%@ Language=VBScript %>
<%
users=split(application("OnlineUser"), ",", -1)  '分割得到当前在线用户的列表,保存到一个数组中
If trim(request("act"))="wantsend" then  '判断目前的操作状态
  who=trim(Request.Form("who"))          '得到被呼叫用户名称
  content=trim(Request.Form("content")) '得到呼叫内容
  meme=trim(request("userid"))                '得到发送传呼的用户名称
  If who="" or content="" then
      Response.Redirect "bbsmsg.asp?msg=姓名或者讯息内容为空,无法传送!"
  end if
'下面将发送的信息送至传呼信息队列当中.
  If trim(application("Message"))="" then
      Application.Lock
      application("Message")=who & "$" & content & "$" & meme   '放置到传呼信息队列当中
      Application.UnLock
  else
      Application.Lock   ''放置到传呼信息队列当中
      application("Message")=application("message") & "&" & who & "$" & content & "$" & meme
      Application.UnLock
  end if
  '发送完毕,关闭页面
  'Response.Write "<script language=javascript>self.close();</script>"
  Response.Redirect "bbsmsg.asp?msg=完成了!"
end if
%>
<html>
<title>网络传呼机</title>
<head>
<script language="javascript">
function check()
{
  if(document.send.content.value.length<1)
  {
    alert("您必须要说两句喔!");
    return;
  }
document.send.action="bbsSendBegin.asp?act=wantsend&userid=<%=trim(session("userid"))%>";
document.send.submit();
}
</script>
</head>
<body bgcolor=GhostWhite >
<br>
<center>
网  络  传  呼  机
</center>
<br>
<%if Ubound(users)>=1 then%>
<center>
<form name="send" method="post">
  <table>
   <tr>
    <td>送讯息给:</td>
    <!--  得到当前在线用户的列表,并放到下拉列表框中  -->
    <td>
      <select name="who">
        <%For i=0 to ubound(users)%>
           <%If trim(users(i))<>trim(meme) then%>
              <%if i>1 then
                  if users(i)<>users(i-1) then%>
                     <option><%=users(i)%>
                 <%end if
              else
                   if users(i)<>meme then%>
               &n