Attachment: Source Code 3:bbssendinfo.asp

Source: Internet
Author: User
Source Code <%@ Language=vbscript%>
<%
Id=trim (Request.QueryString ("userid")) ' Gets the current user name, which is himself (equal to session ("UserID")
If Request.QueryString ("act") = "send" Then ' get current operation status
Who=trim (Request.Form ("who")) ' If the status is sent, get the name of the user sent to
Content=trim (Request.Form ("content")) ' Get what you send if you send it

If who= "" or content= "" Then
Response.Redirect "error.asp?msg= name or message content is empty, unable to transmit!"
End If
' Because &,$ is the split symbol of the paging information area, so you want to filter out these characters and not allow the user to enter these characters
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= name or message content contains illegal characters ($/&) and cannot be transmitted!"
End If

If Trim (Application ("message")) = "" Then
Application.Lock ' Put the paging information in the paging information queue
Application ("message") =who & "$" & Content & "$" & Trim (Request.QueryString ("userid"))
Application.UnLock
Else
Application.Lock ' Put the paging information in the paging information queue
Application ("message") = "&" & Who & "$" & Content & "$" & Trim (Request.QueryString ("userid"))
Application.UnLock
End If

Response.Write "<script language=javascript>self.close () </script>"
Response.End
Else
'**************************
' begin to analyze and process the paging information queue ' and get the paging information that belongs to you.
If Trim (Application ("message")) <> "then"
Msg=split (Application ("message"), "&") ' Splits the paging information area and saves it to the array
For i=0 to UBound (msg)
If InStr (1,trim (MSG (i)), Trim (Request.QueryString ("userid")) >=1 Then
Mymsg=split (msg (i), "$") ' Split to get detailed information for each paging information area
If Trim (mymsg (0)) =trim (Request.QueryString ("userid")) Then ' This paging message is sent to me!
Msgok=1 ' Someone calls me for 1
From=trim (mymsg (2)) ' Get details of paging
Content=trim (mymsg (1))
Sendto=trim (mymsg (0))
End If
End If
Next
End If
'****************************
End If
%>
<title> Network Pager </title>
<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=<%=session (" 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 ("You can't say \" Empty talk \ "Oh!");
Return
}
Document.frmmail.submit ();
}
</script>



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.