<% author = request.form ("n_author") title = request.form ("n_title") content = request.form ("n_content") TEMPXML = Replace (Replace (now, ",", ",", ",", ",", ",,",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, Objrootset Objroot = ObjDom.createElement ("Moonpiazza") objdom.Appendchild Objroot
Set objpi = objDom.createProcessinginstructionTRUction ("XML", "Version = '1.0') ObjDom.Insertbefore Objpi, objDom.childNodes (0)
Dim objBookset Objbook = objDom.createElement ("book") ObjRoot.Appendchild Objbook
Set objtit = objDom.createElement ("book name" Objtit.text = titleObjbook.appendchild objtit
Set objaut = objDom.createElement ("author" objaut.text = authorobjbook.appendchild Objaut
Set objpri = objDom.createElement ("Pricing") ObjPri.Text = ContentObjbook.Appendchild ObjPri
'Generate temporary XML is placed under TEMP folder
Objdom.save (Server.MAppath ("Temp /" & Tempxml)
'// The following section is generating HTM section chtmlfile = replace (Replace (now, ":", ",", "," "),", "") & ".htm"
CXMLFILE = Server.mappath ("Temp /" & Tempxml) cxslfile = server.mappath ("book.xsl") coutputfile = server.mappath ("news /" & chtmlfile)
Set oxml = server.createObject ("Microsoft.xmLDom") oxml.async = falseoxml.load (cxmlfile)
Set oxsl = server.createObject ("Microsoft.xmLDom") oxsl.async = falseoxl.load (cxslfile)
Set Ooutput = Server.createObject ("Microsoft.xmldom") Call Oxml.TransformNodeToObject (OxSl, Ooutput) Ooutput.save (coutputfile)
Set oxml = NothingSet oxsl = Nothingset Ooutput = Nothing
SQL = "INSERT INTO News (Author, Title, Content, URL) Values ('" & author & ",'" & title & ", '" & content & ",' news /" & chtmlfile & ")"
CONN.EXECUTE (SQL)
'Generate HTM files to the news folder
Response.Redirect ("news /" & chtmlfile)
%>
File list ->
<% response.contenttype = "text / html"%>
<% response.write (" "& rs (" title ") &" td> tr> ") rs.movenextLoopResponse.write (" Table> ")%>
转载请注明原文地址:https://www.9cbs.com/read-87784.html New Post(0)
|