发送短信息 -NOIP2006
NOIPsendto1=(Request.Form("NOIPsendto"))
NOIPmsgtitle=Request.Form("NOIPmsgtitle")
NOIPmsg=Request.Form("NOIPmsg")
if NOIPmsgtitle"" and NOIPsendto1"" then
if name2id(NOIPsendto1) = -1 then Response.Write "查无此人" :Response.End
NOIPsendto=name2id(NOIPsendto1)
if not ( len(NOIPmsgtitle)>200 or len(NOIPmsg)>250 ) then
set rs = server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM 短信息 WHERE 来自="&NOIPUserID&" order by -id",conn ,3,3
if not rs.bof and not rs.eof then if rs("时间")+ 10 / 24 / 3600 > now then Response.Write "您发信息发得太快了,歇一下咽一点口水吧?" :Response.End
rs.AddNew
rs("信息标题")=NOIPmsgtitle
rs("发到")=CInt(NOIPsendto)
rs("来自")=NOIPUserID
rs("时间")=now
rs("信息内容")=NOIPmsg
rs.Update
rs.AddNew
rs("信息标题")=NOIPmsgtitle
rs("发到")=-CInt(NOIPsendto)
rs("来自")=NOIPUserID
rs("时间")=now
rs("信息内容")=NOIPmsg
rs("读否")=true
rs.Update
rs.Close
set rs=nothing
if Request.Form("MSGBOX")="ON" and NOIPUserTit="管理员" then application("NOIP_MSG_"&NOIPsendto) = application("NOIP_MSG_"&NOIPsendto) & vbcrlf & "--------------------" & vbcrlf& NOIPUserName & " 给您发信息:" & vbcrlf & NOIPmsg
set rs = server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM NOIP选手 WHERE id=" & NOIPsendto ,conn ,3,3
rs("短信")=rs("短信")+1
rs.update
rs.Close
set rs=nothing
%>
self.alert "信息成功发送到对方信箱中"
window.close()
Response.End
else
%>
self.alert "标题要在200字以内,内容要在250字以内"
end if
end if
if Request.QueryString("replay")"" then
NOIPsendto=(Request.QueryString("replay"))
NOIPmsgtitle="Re:" & Request.QueryString("NOIPmsgtitle")
end if
%>
function valigntop()
Response.Write ""
end function
function valignbottom()
Response.Write ("")
end function
%>
发送短信
主题:发给:
rs1.open "SELECT * FROM NOIP选手" ,conn ,3,1%>
内容:
使用直接弹出的方式
function submitFORM()
self.document.forms("msg").submit()
end function