?? newinc.asp
字號:
<%
Const Data="royu.mdb" '數據庫
Set Conn= Server.CreateObject("ADODB.Connection")
Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(Data)
Conn.Open
Session.CodePage="936"
Dim Eor_Msg,Suc_Msg
Eor_Msg="<script language=javascript>alert( ""登陸失敗!!"" ); window.location.href=('new.asp')</script>"
Suc_Msg="<script language=javascript>alert( ""操作成功!!"" ); window.location.href=('new.asp')</script>"
Sub newplay
response.Write("<div>new播放</div><EMBED src=""news.swf"" quality=high WIDTH=""140"" height=""100"" TYPE=""application/x-shockwave-flash"" PLUGINSPAGE=""http://www.macromedia.com/go/getflashplayer""></EMBED>")
response.Write("<hr size=""1"" noshade style=""border:1px dotted #000000"">")
End Sub
'輸出配置文件
Sub WriteXML()
Dim objDom,objRoot,objRoot1,objPI,objField,objField1,Text,links,Author,word,big
Set objDom = Server.CreateObject("Microsoft.XMLDOM")
objDom.preserveWhiteSpace = True
Set objRoot = objDom.createElement("data")
objDom.appendChild objRoot
Set objField = objDom.createElement("new")
'標題
dim newList
set newList=Conn.Execute("select * from new ORDER BY new_ID DESC")
while not newList.Eof
Set objField1 = objDom.createElement("news")
'標題
Set big = objDom.createAttribute("id")
big.Text = newList("new_big")
objField1.setAttributeNode big
Set text = objDom.createAttribute("myTitle")
text.Text = newList("new_text")
objField1.setAttributeNode text
Set links = objDom.createAttribute("myTime")
links.Text = newList("new_links")
objField1.setAttributeNode links
Set Author = objDom.createAttribute("myIntro")
Author.Text = newList("new_Author")
objField1.setAttributeNode Author
Set word = objDom.createAttribute("myPic")
word.Text = newList("new_word")
objField1.setAttributeNode word
objField.appendChild objField1
objRoot.appendChild objField
newList.movenext
wend
Set objPI = objDom.createProcessingInstruction("xml","version='1.0' encoding='gb2312'" & vbcrlf)
objDom.insertBefore objPI, objDom.childNodes(0)
objDom.Save Server.MapPath("news1.asp")
End Sub
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -