📄 smsmt.asp
字号:
<!--#include file="top.asp"-->
<%
if request("action")="save" then
'--------------------取数据-----------------------------
id=session("id")
phone=request("phone")
emsg=trim(request("msg"))
mt=request("mt")
if request("smsid")="" then
smsid=0
else
smsid=int(request("smsid"))
end if
'------------------------------------------------------------
rem 如果phone不为空,则进行处理
If not phone="" Then
'------------------------------------------------------------
cmd=mid(phone,1,1)
if cmd=0 then
esg=42
else
esg=65
end if
msga=(len(emsg))/esg
if msga=int(msga) then
zs=int(msga)
else
zs=int(msga)+1
end if
for i=1 to zs
msg= Mid(emsg,(i-1)*esg+1,esg)
'--------------------扩展ID-----------------------------
set objHttpaa = CreateObject("Microsoft.XMLHTTP")
strurl="http://demosms.wuxicity.com/sms/send.asp?id="&id&"&smsid="&smsid&""
objHttpaa.Open "get",strURL,false
objHttpaa.setrequestheader "content-length",len(stra)
objHttpaa.send
esid=objHttpaa.responseText
essmsid=string(4-len(esid),"0")&esid
'--------------------存数据-----------------------------
set rs=server.createobject("adodb.recordset")
sql="select * from es_smsuser where es_id='&id&'"
rs.open sql,conn,1,3
if rs("es_pay")>=1 and rs("es_type")=0 then
'---------------------发送短信-----------------------------
if mt=0 then
set objHttp = CreateObject("Microsoft.XMLHTTP")
strurl="http://demosms.wuxicity.com/sms/send.asp?phone="&phone&"&msg="&msg&""
objHttp.Open "get",strURL,false
objHttp.setrequestheader "content-length",len(stra)
objHttp.send
zt=objHttp.responseText
else
set objHttp = CreateObject("Microsoft.XMLHTTP")
strurl="http://www.mhsms.com/sms/333.asp?phone="&phone&"&msg="&msg&"&essmsid="&essmsid&""
objHttp.Open "get",strURL,false
objHttp.setrequestheader "content-length",len(stra)
objHttp.send
zt=objHttp.responseText
end if
'---------------------保存发送记录-----------------------------
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
'将发送内容记录到数据库
set rs=server.createobject("adodb.recordset")
sql="select * from es_smsmt"
rs.open sql,conn,1,3
rs.addnew
rs("es_id")=id
rs("es_msg")=msg
rs("es_phone")=phone
rs("es_zt")=zt
rs("es_ip")=userip
rs("es_td")=mt
rs.update
rs.close
set rs=nothing
if zt=0 then
'从会员帐户扣除费用
conn.execute("update es_smsuser set es_pay=es_pay-1 where es_id="&id)
end if
rs.close
set rs=nothing
end if
next
response.write"<script>alert('提交"&zs&"条短信成功');window.open('mt.asp','_self');</script>"
response.end
end if
end if
%>
<script LANGUAGE=JavaScript>
function textLimitCheck(thisArea, maxLength){
if (thisArea.value.length > maxLength){
alert(maxLength + ' 个字限制. \r超出的将自动去除.');
thisArea.value = thisArea.value.substring(0, maxLength);
thisArea.focus();
}
/*回写span的值,当前填写文字的数量*/
messageCount.innerText = thisArea.value.length;
}
</script>
<%usertopview%>
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tr>
<td width="160" valign=top bgcolor=#efefef>
<!--==============-->
<!--#include file="left.asp"-->
<!--==============-->
</td>
<td align="center" valign=top>
<!--==============-->
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height=25>您现在的位置是:管理中心 > 自写短信</td></tr>
<tr>
<td>
<!--####################################-->
<table cellSpacing="0" cellPadding="0" width="92%" align="center" border="0" style="border:1px #cccccc solid;">
<%sql1="select * from es_smsuser where es_id="&session("id")
set rs1=server.createobject("ADODB.Recordset")
rs1.open sql1,conn,1,1%>
<tr>
<td width="358" height=33 colspan="2" background="img/tt2.gif"> <font color=black>自写短信</font></td>
</tr>
<tr>
<td bgcolor=#ffffff height=25>
<!--======-->
<table border="0" width="90%" id="table1">
<form name="addform" method="post" action="smsmt.asp?action=save" onSubmit="return checkdata()"> <tr>
<td width="251" rowspan="2"> <table width=251 border=0 cellpadding=0 cellspacing=0 style="background:url('../images/msg/fasongye0326_181.gif') no-repeat bottom;" onselectstart="return false">
<tr>
<td><img src=../images/msg/fasongye0326_03.gif border=0></td>
<td><img src=../images/msg/fasongye0326_04.gif border=0></td>
<td><img src=../images/msg/fasongye0326_05.gif border=0></td>
</tr>
<tr>
<td><img src=../images/msg/fasongye0326_09.gif border=0></td>
<td width=128 height=128 align="top" valign="top" bgcolor="#FFFFFF" style="padding-left:2px;padding-right:2px">
<textarea name="msg" cols=18 rows=9 wrap="VIRTUAL" onkeyUp="textLimitCheck(this, 70);" ><%=request("msg")%></textarea></td>
<td><img src=../images/msg/fasongye0326_11.gif border=0></td>
</tr>
<tr>
<td><img src=../images/msg/fasongye0326_13.gif border=0></td>
<td background=../images/msg/fasongye0326_14.gif border=0 width=136 height=29 align=center valign=bottom>门户短信平台</td>
<td><img src=../images/msg/fasongye0326_15.gif border=0></td>
</tr>
<tr align="center">
<td width=251 height=58 colspan=3 background="../images/msg/fasongye0326_171.gif" style="background-repeat:no-repeat;background-position:0 0">
限 70 个字符 已输入 <font color="#CC0000"><span id="messageCount">0</span></font>
个字</font> </td>
</tr>
</table></td>
<%if rs1("es_pay")<1 then%><font color="#FF0000" size="4">您已经欠费,请交费后再发送 </font><% else %>
<td valign="top"> <table width="248" border="0" cellspacing="0" cellpadding="0" id="table2">
<tr>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">
<img src="../images/msg/mms_pop_sendbox_top.gif" width="248" height="18"></td>
</tr>
<tr>
<td align="center" background="../images/msg/mms_pop_sendbox_bg.gif" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">
<table width="75%" border="0" cellspacing="0" cellpadding="2" id="table3">
<tr>
<td width="35%" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">手机号:</td>
<td width="65%" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">
<!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="11" i-maximum-length="12" -->
<input name="phone" type="text" size="15" maxlength="12" onpropertychange="if(/\D/g.test(value))value=value.replace(/\D/g,'')" style="ime-mode:disabled" ondragenter="return false" value=<%=request("phone")%>>
</td>
</tr>
<tr align="center">
<td colspan="2" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="table4">
<tr align="center">
<td align="right" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">
<input name="imageField1" type="image" src="../images/msg/mms_pop_button_send.gif" width="59" height="17" border="0" onClick="return true">
</td>
</tr>
<tr>
<td align="left" valign="top" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">
[<b>说明</b>] 手机号直接输入,小灵通请加区号!
发送费用将会在您的帐号扣除。</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">
<img src="../images/msg/mms_pop_sendbox_buttom.gif" width="248" height="20"></td>
</tr>
</table></td>
</tr>
</form>
<tr>
<td height="109"> <br> <table width="248" border="0" cellspacing="0" cellpadding="0" id="table5">
<tr>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">
<img src="../images/msg/mms_pop_inputbox_top.gif" width="248" height="18"></td>
</tr>
<tr>
<td align="center" background="../images/msg/mms_pop_inputbox_bg.gif" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">
<table width="75%" border="0" cellspacing="0" cellpadding="3" id="table6">
<tr>
<td width="100%" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">
手机点播:<br>
填入自己的手机号码,就可以将此短信发至自己的手机。 (发送费用将会在您的帐号扣除)。</td>
</tr>
</table></td>
</tr>
<tr>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px">
<img src="../images/msg/mms_pop_inputbox_buttom.gif" width="248" height="19"></td>
</tr>
</table></td><%end if%>
</tr>
</table>
<!--======-->
</td>
</tr>
</table>
<!--####################################-->
</td>
</tr>
<tr><td height=25>
</td></tr>
</table>
<!--==============--></td>
</tr>
</table>
<!--====== bottom ========-->
<!--====== bottom ========-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:0px #cccccc solid;">
<tr>
<td width="30%" align="right" valign="middle"><img src="../images/index_04.gif" alt=""></td>
<td width="70%" align="left"><%=citybottom%></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -