⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newinc.asp

📁 新闻类的。很好很小。有FLASH.源码 适合模块加载
💻 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 + -