附:原始碼1:BBSSENDBEGIN.ASP

來源:互聯網
上載者:User
原始碼 <%@ 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" si



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.