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>