📄 controlsendmessage.asp
字号:
<!--#include file="conn.asp"-->
<%
IF Request.Form.Count<>0 Then
Suc=True
Name1=Trim(Request.Form("Touser"))
Name=Split(Name1,",")
Title=Trim(Request.Form("Title"))
Content=Trim(Request.Form("Content"))
If Title="" Then
Suc=False
ErrInfo=ErrInfo & "·请填写短消息主题!<BR>"
End IF
If Content="" Then
Suc=False
ErrInfo=ErrInfo & "·请填写短消息内容!<BR>"
End IF
IF Suc Then
SQL="Select * From 短信"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,Connstr,3,2
N=0
N=Ubound(Name)
IF N > 5 Then N = 5
For I= 0 to N
IF Name2="" Then
Name2=Trim(Name(I))
Else
Name2=Name2 & "," & Trim(Name(I))
End IF
SQL="Select 姓名 From 注册信息 Where 姓名='" & Trim(Name(I)) & "'"
Set CheckRS=Server.CreateObject("ADODB.Recordset")
CheckRS.Open SQL,Connstr,1,1
IF CheckRS.EOF Then
ErrInfo=ErrInfo & "·该用户不存在!<BR>"
Else
IF ErrInfo="" Then
RS.Addnew
RS("收件人")=Trim(Name(I))
RS("发件人")=Session("User")
RS("主题")=Title
RS("内容")=Content
RS("日期")=Now
RS.Update
End IF
End IF
Next
IF ErrInfo="" Then
Msg=Request.Form("Msg")
If Msg="yes" Then
SQL="Select * From 发件箱"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,Connstr,3,2
RS.Addnew
RS("收件人")=Name2
RS("发件人")=Session("User")
RS("主题")=Title
RS("内容")=Content
RS("日期")=Now
RS.Update
End IF
End IF
End IF
End IF
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<!--#include file="inc/css.asp"-->
<title><%=WebsiteName%></title>
</head>
<body topmargin="0" background="images/bg.gif">
<!--#include file="top.asp"-->
<div align="center">
<center>
<table border="0" width="755" cellspacing="0" cellpadding="0" height="341">
<tr>
<td width="189" style="background-color: #FFFFFF; border-left: 1 solid #000000; border-top: 1 solid #000000; border-bottom: 1 solid #000000" valign="top" height="341">
<!--#include file="cleft.asp"-->
</td>
<td width="562" style="background-color: #FFFFFF; border: 1 solid #000000" valign="top" height="341">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="20%" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #000000; border-bottom: 1 solid #000000" align="center">
<b>
<a href="control.asp">
控制面板首页</a></b>
</td>
</center>
<td width="20%" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #000000; border-bottom: 1 solid #000000" align="center">
<b>
<a href="controledit.asp">
编辑个人资料</a></b>
</td>
<center>
<td width="20%" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #000000; border-bottom: 1 solid #000000" align="center">
<b>
<a href="controlpass.asp">
修改登录密码</a></b>
</td>
<td width="20%" height="25" bgcolor="#FFFFFF" style="border-right: 1 solid #000000;" align="center">
<b>
<font color="#545454">
短消息信箱</font></b>
</td>
<td width="20%" height="25" bgcolor="#EDEDED" style="border-bottom: 1 solid #000000" align="center">
<b>
<a href="controlfriend.asp">
好友列表</a></b>
</td>
</tr>
<tr>
<td width="100%" valign="middle" colspan="5" height="10"></td>
</tr>
<%IF Request.Form.Count=0 Then%>
<tr>
<td width="100%" valign="middle" colspan="5" height="5">
<div align="center">
<center>
<table border="0" width="504" cellspacing="0" cellpadding="0" style="border: 1 solid #000000" height="136">
<tr>
<td width="500" background="images/bg2.gif" height="22" colspan="2">
<p align="center"><font color="#333333"><b><%=Session("User")%>,欢迎使用您的短信息</b></font></td>
</tr>
<tr>
<td width="500" align="center" height="50" colspan="2">
<!--#include file="controlnavigatin.asp"-->
</td>
</tr>
</center>
<tr>
<td width="502" height="22" bgcolor="#F6F6F6" style="border-right: 1 solid #cccccc; border-top: 1 solid #cccccc; border-bottom: 1 solid #cccccc" colspan="2">
<p align="center"><b><font color="#545454">发送短信息,请完整填写</font></b>
</td>
</tr>
<Form action="" method=post name=messager>
<tr>
<td width="502" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc" colspan="2">
<p align="center">向多个人发送信息请用英文逗号隔开,同时只能向五个人发送.
</td>
</tr>
<tr>
<td width="145" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p align="center">收件人</p>
</td>
<td width="357" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc" valign="middle">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="31%">
<p style="margin-left: 5">
<input type=text name="touser" size=12 maxlength=30 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 103; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%" value="<%=Request.QueryString("name")%>">
</p>
</td>
<td width="69%" valign="bottom"> <select size="1" name="D1" style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 23; width: 86; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%">
<option>好友名单</option>
<%
SQL="Select * From 好友列表 Where 用户名='"& Session("User") &"'"
Set FriendListRS=Server.CreateObject("ADODB.Recordset")
FriendListRS.Open SQL,Connstr,1,1
Do While Not FriendListRS.EOF
%>
<option value="<%=FriendListRS("好友名字")%>"><%=FriendListRS("好友名字")%></option>
<%
FriendListRS.MoveNext
Loop
%>
</select></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="145" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p align="center">标 题
</td>
<td width="357" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p style="margin-left: 5">
<input type=text name="Title" size=12 maxlength=30 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 203; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%">
</p>
</td>
</tr>
<tr>
<td width="145" height="22" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p align="center">内 容
</td>
<td width="357" height="22" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p style="margin-left: 5; margin-top: 2; margin-bottom: 2"><textarea rows="4" name="Content" cols="26"></textarea></p>
</td>
</tr>
<tr>
<td width="502" height="22" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc" colspan="2">
<p align="center"><input type="checkbox" name="msg" value="yes" class=1><font color="#333333">是否复制一份消息至发件箱?</font>
</td>
</tr>
<tr>
<td colspan="2" width="500">
<p align="center" style="margin-top: 5; margin-bottom: 5"> <input type="submit" name="submit" value=" 发 送 " style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 75; border: 1px groove #000000; background-position: 0% 50%">
<input type="reset" name="Reset" value=" 重 置 " style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 75; border: 1px groove #000000; background-position: 0% 50%">
</td>
</tr>
</form>
</table>
</div>
</td>
</tr>
<%End IF%>
<%IF ErrInfo<>"" Then%>
</center>
<tr>
<td width="100%" valign="middle" colspan="5">
<div align="center">
<center>
<table border="0" width="90%" cellspacing="0" cellpadding="0" style="border: 1 solid #000000">
<tr>
<td width="100%" height="22" colspan="2" background="images/bg2.gif">
<p align="center"><font color="#FF0000"><b>发送</b></font><font color="#FF0000"><b>信息出错</b></font></td>
</tr>
<tr>
<td width="100%" colspan="2">
<p style="line-height: 150%; margin-left: 50; margin-top: 3; margin-bottom: 3">
<font color="#FF0000">
<%=ErrInfo%>
</font></td>
</tr>
<tr>
<td width="40%" height="22" background="../images/bg3.GIF" valign="bottom">
<p align="right"><img border="0" src="images/go.gif" width="15" height="15"></td>
<td width="60%" height="22" background="../images/bg3.GIF" valign="bottom"><a href="javascript:history.back()">返回上一页重新填写</a></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<center>
<%End IF%>
<%IF Request.Form.Count<>0 And ErrInfo="" Then%>
<tr>
<td width="100%" valign="middle" colspan="5" height="5">
<div align="center">
<table border="0" width="90%" cellspacing="0" cellpadding="0" style="border: 1 solid #000000">
<tr>
<td width="100%" background="images/bg2.gif" height="22">
<p align="center"><font color="#FF0000"><b>发布信息成功</b></font></td>
</tr>
<tr>
<td width="100%">
<p style="line-height: 150%; margin-left: 50; margin-top: 3; margin-bottom: 3"><font color="#FF0000">·您已经成功发送信息!
<a href="controlmail.asp">短消息首页-->>></a></font></td>
</tr>
</table>
</div>
</td>
</tr>
<%End IF%>
<tr>
<td width="100%" valign="middle" colspan="5" height="5">
</td>
</tr>
<tr>
<td width="100%" valign="middle" colspan="5" height="5">
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</div>
<!--#include file="bottom.asp"-->
<p>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -