<%@ 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" size="20" maxlength="50">
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">
<a href="javascript:check()"><img src="send.gif" border="0"></a>
<a href="javascript:document.send.reset()"><img src="renew.gif" border="0"></a>
</td>
</tr>
</table>
</form>
</center>
<% else %>
<br>
<br>
<br>
<center>
目前站上只有您一个人喔,无法传送讯息给其他人呀!
</center>
<center>
<a href="javascript:self.close()"><img src="images/close.jpg" ></a>
</center>
<%end if%>
</body>
</html>
附:源代码1:BBSSENDBEGIN.ASP
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 附:源代码1:BBSSENDBEGIN.ASP
相关推荐
- 暂无文章
