📄 ismsevent.asp
字号:
<%
Dim strOption,strRecord,strMobile,strContent,strDateTime,mSql,strSms_Msg_No,mResult
strOption = request("OPTION")
strRecord = request("RECORD")
strMobile = request("MOBILE")
strContent = MarkText(request("CONTENT"))
strDateTime = request("DATETIME")
mSql = ""
strSms_Msg_No=""
mResult=false
If (strOption="GET") then
strSms_Msg_No = GetMaxFieldNo(Session("iSMSDemo"),"Sms_Tb_Msg","Sms_Msg_No",6)
mSql="Insert Into Sms_Tb_Msg (Sms_Msg_No,From_Mobile,To_Mobile,Content,Finish_DateTime,Msg_Status) values ('"+ strSms_Msg_No +"','"+ strMobile +"','','"+ strContent +"','"+strDateTime+"','R')"
mResult = true
Else
If (strOption="PUT") then
mSql="Update Sms_Tb_Msg Set Msg_Status='Y',Finish_DateTime='"+strDateTime+"' where Sms_Msg_No='"+strRecord+"'"
mResult = true
End If
End If
if (mResult) then
Session("iSMSDemo").Execute(mSql)
Response.Write "OK"
Else
Response.Write "ERROR"
end if
'取出最大的记录流水号
Function GetMaxFieldNo(Conn,TableName,FieldName,FieldLen)
Dim Sql, MaxNo
Set Rsc = Server.CreateObject("ADODB.RecordSet")
Sql = "Select Max(" & FieldName & ") as MaxNo From " & TableName
Rsc.Open Sql, Conn
If Not Rsc.EOF Then
MaxNo = CLng(Rsc("MaxNo"))
Else
MaxNo = "0000000000000000000000000"
End If
Rsc.Close
Set Rsc = Nothing
MaxNo = Right(("0000000000000000000000000" + CStr(MaxNo + 1)), FieldLen)
GetMaxFieldNo = MaxNo
End Function
Function MarkText(InLine)
Dim OutLine
OutLine=Replace(InLine,"'","''")
MarkText=OutLine
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -