⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 webmsg_send.asp

📁 视频点播系统
💻 ASP
字号:
<!--#include file="chklogin.asp"-->
<%

call myobj.chkrq()
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>发送站内短信</title>
<link href="images/style2.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
a:link {
	color: #0000FF;
	text-decoration: none;
}
a:visited {
	color: #0000FF;
	text-decoration: none;
}
a:hover {
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
-->
</style></head>

<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<%
action_e=request.Querystring("action")
Select Case action_e
	Case ""
	  Call main()
	Case "send_msg"
	  Call send_msg()
end select
%>
<%
sub main
if request.Querystring("userid")<>"" then
	if myobj.ChkID(request.Querystring("userid"))=false then
		response.write"<script language=javascript>alert('用户账号值类型错误');history.back();</Script>"
		response.end
	end if
	if len(request.Querystring("userid"))>24 then
		response.write"<script language=javascript>alert('用户账号值格式错误');history.back();</Script>"
		response.end
	end if
	set rs=server.createobject("adodb.recordset")
	rs.open "select * from member where userid='"&request.QueryString("userid")&"'",conn,1,1
	if rs.eof then
		rs.close
		set rs=nothing
		conn.close
		set conn=nothing
		response.write"<script>alert('接收站内短信的用户账号并不存在');history.back();</Script>"
		response.end
	end if
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
end if
%>
<form name="form1" method="post" action="<%=filename%>?action=send_msg">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="500" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
  <tr>
    <td align="center" class="font1"><strong class="font1">发送站内短信</strong></td>
  </tr>
</table>

<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
  <tr>
    <td align="center" bgcolor="#F7F7F7"><table width="400" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="25">用户账号:</td>
        <td><%if request.Querystring("userid")<>"" then%><%=request.Querystring("userid")%><%else%><input name="to_userid" type="text" class="input1" id="to_userid" size="20" maxlength="24">
          <%end if%></td>
      </tr>
      <tr>
        <td width="60" height="25">短信标题:</td>
        <td><input name="msg_title" type="text" class="input1" id="msg_title" size="50" maxlength="50"></td>
      </tr>
      <tr>
        <td height="100">短信正文:</td>
        <td><textarea name="msg_body" cols="50" rows="5" class="input1" id="msg_body"></textarea></td>
      </tr>
      <tr align="center">
        <td height="50" colspan="2"><input name="Submit" type="submit" class="button1" value="发  送"> 
          <input name="rewrite" type="reset" class="button1" id="rewrite" value="重  写">
          <%if request.Querystring("userid")<>"" then%><input name="to_userid" type="hidden" id="to_userid" value="<%=request.Querystring("userid")%>"><%end if%></td>
        </tr>
    </table>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table></td>
  </tr>
</table>
</form>
<%
end sub

sub send_msg()
if request.form("to_userid")="" then
	response.write"<script language=javascript>alert('请填写接收站内短信的用户账号');history.back();</Script>"
	response.end
end if
if myobj.ChkID(request.form("to_userid"))=false then
	response.write"<script language=javascript>alert('用户账号值类型错误');history.back();</Script>"
	response.end
end if
if len(request.form("to_userid"))>24 then
	response.write"<script language=javascript>alert('用户账号值格式错误');history.back();</Script>"
	response.end
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from member where userid='"&request.form("to_userid")&"'",conn,1,1
if rs.eof then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	response.write"<script>alert('接收站内短信的用户账号并不存在');history.back();</Script>"
	response.end
end if
rs.close
if request.form("msg_title")="" then
	response.write"<script>alert('请填写站内短信标题');history.back();</Script>"
	response.end
end if
if myobj.ChkLen(request.form("msg_title"))>50 then
	response.write"<script>alert('短信标题不能大于50个字符,汉字占两个字符');history.back();</Script>"
	response.end
end if
if request.form("msg_body")="" then
	response.write"<script>alert('请填写站内短信正文');history.back();</Script>"
	response.end
end if
set rs=server.createobject("adodb.recordset")
rs.open "select * from webmessage where (id is null)",conn,1,3
rs.addnew
rs("msg_title")=request.form("msg_title")
rs("msg_body")=request.form("msg_body")
rs("from_userid")="@admin@"
rs("to_userid")=request.form("to_userid")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="500" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
  <tr>
    <td align="center" class="font1"><strong class="font1">发送站内短信</strong></td>
  </tr>
</table>
<table width="500" height="200" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
  <tr>
    <td align="center" bgcolor="#F7F7F7"><p>站内短信发送成功!</p>
    <p><a href="<%=filename%>">继续发送站内短信</a></p></td>
  </tr>
</table>
<%
end sub
%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -