⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bbssendinfo.asp

📁 来自中国老乡录的一套交友系统
💻 ASP
字号:
<%@ Language=VBScript %>
<%
'id=session("userid")
id=trim(Request.QueryString("userid")) '得到当前的用户名称,就是自己(等于Session(“UserID”))
if Request.QueryString("act")="send" then '获取当前的操作状态
   who=trim(Request.Form("who"))              '如果是发送状态,就获取发送到的用户名称
   content=trim(Request.Form("content"))   '如果是发送状态,就获取发送的内容

   if who="" or content="" then
     Response.Redirect "error.asp?msg=姓名或者讯息内容为空,无法传送!"
   end if
   '因为&,$是传呼信息区的分割符号,所以要过滤掉这些字符,不允许用户输入这些字符
   if instr(1,who,"&")>=1 or instr(1,who,"$")>=1 or instr(1,content,"&")>=1 or instr(1,content,"$")>=1 then
     Response.Redirect "error.asp?msg=姓名或者讯息内容包含非法字符($/&),无法传送!"
   end if
   
   if trim(application("Message"))="" then
     Application.Lock    '将传呼信息放到传呼信息队列当中
     application("Message")=who & "$" & content & "$" &  trim(Request.QueryString("userid"))

     Application.UnLock 
   else
     Application.Lock   '将传呼信息放到传呼信息队列当中
     application("Message")="&" & who & "$" & content & "$" &  trim(Request.QueryString("userid"))
     Application.UnLock 
   end if
 
   Response.Write "<script language=javascript>self.close()</script>"
   Response.End 
else   
'**************************
'开始分析处理“传呼信息队列”,取得属于自己的传呼信息
'application("Message")=""
  if trim(application("Message"))<>"" then
   Response.Write(application("Message"))
     msg=split(application("Message"),"&")  '分割得到传呼信息区,并保存到数组
     for i=0 to ubound(msg)
       if instr(1,trim(msg(i)),trim(Request.QueryString("userid")))>=1 then
         mymsg=split(msg(i),"$")  '分割得到每个传呼信息区的详细信息
         if trim(mymsg(0))=trim(Request.QueryString("userid")) then '这条传呼信息是发给我的!
            msgok=1    '有人呼叫我的表记置为1
            from=trim(mymsg(2)) '获得传呼的详细内容
            content=trim(mymsg(1))
            sendto=trim(mymsg(0))
         end if
       end if
     next
end if
'****************************
end if
%>
<html>
<title>网络传呼机</title>
<head>
<script language="javascript">
function nosend()
{
document.frmmail.action="bbsSendInfo.asp?act=wait&userid=<%=trim(Request.QueryString("userid"))%>"
  document.frmmail.submit();
}
function meclose()
{
document.frmmail.action="bbsSendInfo.asp?act=closeme&userid=<%=trim(Request.QueryString("userid"))%>"
  document.frmmail.submit();
}
function destory()
{
<% if trim(request("act"))="closeme" then
   cancelme=trim(Request.QueryString("userid")) & "$" & content & "$" & trim(from) 
   application.lock
   application("Message")=replace(application("Message"),cancelme,"")
   application.unlock %>
   self.close()
<% end if%>
}
function chkok()
{
  if (document.frmmail.content.value=="")
  {
    alert("您不能说\"空话\"喔!");
    return;
  }
document.frmmail.submit();  
} 
</script>
</head>
<body bgcolor="GhostWhite" onload="javascript:destory();" topmargin="0">
<br>
<form name="frmmail" action="bbsSendInfo.asp?act=send&userid=<%=trim(Request.QueryString("userid"))%>" method="post">
<table border="0" width="200" align="center" cellspacing="1" cellpadding="1">
  <tr>
    <td colspan="2" align="center">嘻嘻,有人呼你喔...
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td nowrap><%=from%>说:</td>
    <td><%=content%></td>
  </tr>
  <tr>
    <td nowrap>回覆内容:</td>
    <td><input name="content" size="34" maxlength="35"></td>
  </tr>
</table>
<br><br>
<center>
  <a href="javascript:chkok();">发送信息</a> <a href="javascript:document.frmmail.reset()">重新填写</a> 
  <a href="javascript:self.close();">稍后再回</a> <a href="javascript:meclose();">关闭窗口</a> 
  <input name="who" type="hidden" value="<%=from%>">
</center>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -