📄 b2b_sms.asp
字号:
<!--#include file="conn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
if session("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
else
if request.cookies("Buy2Buy")("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
end if
end if
'限制添加权限管理员
if session("rank")=2 then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('您的管理权限未达到此操作等级!');history.go(-1);</script>"
response.End
end if
%>
<title>订单管理</title>
<style type="text/css">
<!--
.style4 {color: #FF0000}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.STYLE1 { color: #000000;
font-weight: bold;
}
-->
</style>
<script language="javascript">
function chk()
{
if (document.myform.content.value == '')
{
alert("信息内容为空!");
return false;
}
return true;
}
</script>
<%
action = trim(request("action"))
if action = "Add" then
op_obj = trim(request("op_obj"))
SingleUserName = trim(request("SingleUserName"))
selectGroup = trim(request("selectGroup"))
content = trim(request("content"))
if op_obj = "SingleUser" then
sql= "select UserID from [User] where UserName ='"&SingleUserName&"'"
set tmpRs=conn.execute(sql)
if not (tmpRs.eof and tmpRs.bof) then
sql = "Insert Into welcomemesbuy(UserID,Content,PublishTime) values('"
sql = sql & tmpRs("userid") & "','"&content&"','"&Now&"')"
conn.execute(sql)
end if
tmpRs.close
set tmpRs=nothing
end if
if op_obj = "GroupUser" then
sql = "select userid from [user] where grpid =" & selectGroup
set tmpRs = conn.execute(sql)
if not (tmpRs.eof and not tmpRs.bof) then
while not tmpRs.eof
sql = "Insert Into welcomemesbuy(UserID,Content,PublishTime) values('"
sql = sql & tmpRs("userid") & "','"&content&"','"&Now&"')"
conn.execute(sql)
tmpRs.movenext
wend
end if
tmpRs.close
set tmpRs=nothing
end if
if op_obj = "AllUser" then
sql = "select userid from [user] "
set tmpRs = conn.execute(sql)
if not (tmpRs.eof and not tmpRs.bof) then
while not tmpRs.eof
sql = "Insert Into welcomemesbuy(UserID,Content,PublishTime) values('" & tmpRs("userid") & "','"&content&"','"&Now&"')"
conn.execute(sql)
tmpRs.movenext
wend
end if
tmpRs.close
set tmpRs=nothing
end if
response.write "<script>alert('操作成功!');window.location.href='b2b_sms.asp';</Script>"
response.end
end if
%>
<table width="99%" border="5" align="center" cellpadding="5" cellspacing="5" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td background="images/topbg.gif"><span class="STYLE1"><img src="images/pic5.gif" width="28" height="22" align="absmiddle" />您现在所在的位置是: <a href="adminhelp.asp">管理首页</a> -> <span class="style4">站内短信发布</span></span></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF">
<table width="70%" border="2" align="center" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#CCCCCC">
<form action="b2b_sms.asp?action=Add" method="post" name="myform" onsubmit="return chk();">
<tr bgcolor="#F7F7F7" align="center">
<td width="19%" height="25" align="center" background="images/topbg.gif"><strong>操作名称</strong></td>
<td width="81%" height="25" background="images/topbg.gif"><strong>基本参数设置</strong></td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#F7F7F7"><strong>操作对象</strong></td>
<td height="25" bgcolor="#FFFFFF"><input type="radio" name="op_obj" value="SingleUser" />
指定用户
<input name="SingleUserName" type="text" class="input_sr" id="SingleUserName" size="30" />
<br />
<input type="radio" name="op_obj" value="GroupUser" />
用户等级
<select name="selectGroup" id="selectGroup">
<%
sql = "select * from b2b_userjb order by grpID"
set tmpRs=conn.execute(sql)
if not (tmpRs.eof and tmpRs.bof) then
while not tmpRs.eof
%>
<option value="<%=trim(tmpRs("grpid"))%>"><%=trim(tmpRs("GRPName"))%></option>
<%
tmpRs.movenext
wend
end if
tmpRs.close
set tmpRs=nothing
%>
</select>
<br />
<input name="op_obj" type="radio" value="AllUser" checked="checked" />
所有用户</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#F7F7F7"><strong>短信内容</strong></td>
<td height="25" bgcolor="#FFFFFF"><textarea name="content" cols="70" rows="16" class="input_sr" id="content"></textarea></td>
</tr>
<tr>
<td height="25" colspan="2" align="center" bgcolor="#F7F7F7"><input name="Submit" type="submit" class="input_bot" value="发送站内短信" onclick="javascript:return confirm('确定发送吗?');"/> </td>
</tr></form>
</table>
</td>
</tr></table>
<br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -