附:源代码1:BBSSENDBEGIN.ASP

发表于:2007-06-30来源:作者:点击数: 标签:
%@ Language= VB Script % % users=split(application(OnlineUser), ,, -1)‘’分割得到当前在线用户的列表,保存到一个数组中 If trim(request(act))=w ant send then‘’判断目前的操作状态 who=trim(Request.Form(who))‘’得到被呼叫用户名称 content=trim
<%@ 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%>
                     <option><%=users(i)%>
                 <%end if
              end if
           end if
        Next%>
      </select>
    </td>
   </tr>
   <tr>
    <td>讯息内容:</td>
    <td>
     <input type="text" name="content" size="20" maxlength="50">
    </td>
   </tr>
   <tr>
    <td colspan="2"> </td>
   </tr>
   <tr>
    <td colspan="2">
     <a href="javascript:check()"><img src="send.gif" border="0"></a>  
     <a href="javascript:document.send.reset()"><img src="renew.gif" border="0"></a>  
    </td>
   </tr>
  </table>
</form>
</center>
<% else %>
<br>
<br>
<br>
<center>
   目前站上只有您一个人喔,无法传送讯息给其他人呀!
</center>
<center>
<a href="javascript:self.close()"><img src="images/close.jpg" ></a>
</center>
<%end if%>
</body>
</html>

原文转自:http://www.ltesting.net