Attachment: Source Code 1:bbssendbegin.asp

Source: Internet
Author: User
Tags close page trim
Source Code <%@ Language=vbscript%>
<%
Users=split (Application ("Onlineuser"), ",",-1) ' Splits the list of current online users and saves them to an array
If Trim (Request ("act") = "Wantsend" then "determines the current operating state
Who=trim (Request.Form ("who")) ' gets called user name
Content=trim (Request.Form ("content")) ' Get call content
Meme=trim ("userid") ' Gets the name of the user who sent the pager
If who= "" or content= "" Then
Response.Redirect "bbsmsg.asp?msg= name or message content is empty, unable to transmit!"
End If
' Send the information below to the paging information queue.
If Trim (Application ("message")) = "" Then
Application.Lock
Application ("message") =who & "$" & Content & "$ & meme" placed in the paging information queue
Application.UnLock
Else
Application.Lock ' placed in the paging information queue
Application ("message") =application (' message ') & "&" & Who & "$" & Content & "$" & meme
Application.UnLock
End If
' Send finished, close page
' Response.Write ' <script language=javascript>self.close ();</script> "
Response.Redirect "Bbsmsg.asp?msg= finished!" "
End If
%>
<title> Network Pager </title>
<script language= "JavaScript" >
function Check ()
{
if (document.send.content.value.length<1)
{
Alert ("You have to say a few words!");
Return
}
Document.send.action= "Bbssendbegin.asp?act=wantsend&userid=<%=trim" (Session ("userid"))%> ";
Document.send.submit ();
}
</script>
<body bgcolor=ghostwhite >
<br>
<center>
Network Paging machine
</center>
<br>
<%if Ubound (users) >=1 then%>
<center>
<form name= "Send" method= "POST" >
<table>
<tr>
<td> send a message to:</td>
<!--get a list of current online users and put them in the Drop-down list box-->
<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> Message Content:</td>
<td>
<input type= "text" name= "content" si



Related Article

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.