日期:2009-02-11  浏览次数:20885 次

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+           超级+无敌--------XML+JAVASCRIPT+ASP在线短信息功能---介绍
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



---------下面的文件就是发送新信息的CREATEINFORMATION.ASP页,代码比较长,慢慢看看-----------



<%@EnableSessionState=False%>
<%
Option Explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = 0
'下面使用了一个WRITEXML.ASP文件,里面是一个WRITEXML函数.作用是在XML文件里根据传入参数
'生成一行新数据,该文件将等等列举.
%>
<!--#include Virtual="/turbo/Inc/WriteXml.asp"-->
<%
Dim Dom
Dim Root
Dim Bool
Dim MyID
Dim MyName
MyID = Request.Cookies("MyID")    
MyName = Request.Cookies("MyName")
Set Dom = Server.CreateObject("Microsoft.XMLDOM")
With Dom
.async = False
.Load Request
If .parseError.errorCode <> 0 Then
Response.Write("<A><B>2</B></A>")
ElseIf Not Isnumeric(MyID) or MyName="" Then
Response.Write("<A><B>2</B></A>")
Else
Set Root = .documentElement
Bool = Check(Root.childNodes.item(0).Text)
If Bool = False Then
Response.Write("<A><B>1</B></A>")
ElseIf WriteXml(Dom, Server.MapPath("Xml/" & Bool & ".xml"), MyID, MyName, Date, replace(replace(replace(now,"-",""),":","")," ",""), Root.childNodes.item(1).Text) Then
Response.Write("<A><B>2</B></A>")
Else
Response.Write("<A><B>3</B></A>")
End If
End If
End With
Set Dom = Nothing



Function Check(Name)
Dim Re
Set Re = Server.CreateObject("ADODB.Recordset")
With Re
.ActiveConnection = Application.Contents("dsn")
.Open "Exec SearchOnline '" & Name & "'",,1,1,adcmdtext
If .EOF And .BOF Then
Check = False
Else
Check = Re(1)
End If
End With
Set Re = Nothing
End Function

%>







-----------------------------------等等是回复信息的MISSYOU.ASP文件---------------------------