'/////////////////////////////////////////////////////////////////////////////// '// RainbowSoft ATOM Export '// 作 者: 朱煊(zx.asd) '// 版權所有: RainbowSoft Studio '// 技術支持: rainbowsoft@163.com '// 程序名稱: '// 程序版本: '// 單元名稱: atom_lib.asp '// 開始時間: 2005.07.27 '// 最后修改: '// 備 注: ATOM輸出 '/////////////////////////////////////////////////////////////////////////////// '********************************************************* ' 目的: 定義TAtom10Export類 ' 輸入: 無 ' 返回: 無 '********************************************************* Class TAtom10Export Public TimeZone Public Property Get xml xml = objXMLdoc.xml End Property Private objXMLdoc Private objXMLfeed Public Function GetFeed(objAtomFeed) Set objXMLfeed=objAtomFeed objXMLdoc.AppendChild(objXMLfeed) objXMLfeed.setAttribute "xmlns","http://www.w3.org/2005/Atom" Dim i Dim objItemNodes Set objItemNodes=objXMLfeed.getElementsByTagName("updated") For i=0 To (objItemNodes.Length-1) objItemNodes(i).Text=ParseDateForRFC3339(objItemNodes(i).Text) Next Set objItemNodes=Nothing End Function Public Function GetEntry(objEntryFeed) Dim i Dim objItemNodes Set objItemNodes=objEntryFeed.getElementsByTagName("updated") For i=0 To (objItemNodes.Length-1) objItemNodes(i).Text=ParseDateForRFC3339(objItemNodes(i).Text) Next Set objItemNodes=Nothing Set objItemNodes=objEntryFeed.getElementsByTagName("published") For i=0 To (objItemNodes.Length-1) objItemNodes(i).Text=ParseDateForRFC3339(objItemNodes(i).Text) Next Set objItemNodes=Nothing objXMLfeed.appendChild(objEntryFeed) End Function Public Function Execute() 'Response.ContentType = "text/html" Response.ContentType = "text/xml" Response.Clear Response.Write xml Execute=True End Function Public Function SaveToFile(strFileName) objXMLdoc.save(strFileName) SaveToFile=True End Function Function ParseDateForRFC3339(dtmDate) Dim dtmDay, dtmWeekDay, dtmMonth, dtmYear Dim dtmHours, dtmMinutes, dtmSeconds Dim strTimeZone dtmYear = Year(dtmDate) dtmMonth = Right("00" & Month(dtmDate),2) dtmDay = Right("00" & Day(dtmDate),2) dtmHours = Right("00" & Hour(dtmDate),2) dtmMinutes = Right("00" & Minute(dtmDate),2) dtmSeconds = Right("00" & Second(dtmDate),2) strTimeZone=Left(TimeZone,3) & ":" & Right(TimeZone,2) ParseDateForRFC3339 = dtmYear & "-" & dtmMonth & "-" & dtmDay & "T" & dtmHours & ":" & dtmMinutes & ":" & dtmSeconds & strTimeZone End Function ' 類初始化 Private Sub Class_Initialize() On Error Resume Next '對objXMLdoc進行初始化,如不能建對象則報錯 Set objXMLdoc =Server.CreateObject("Microsoft.XMLDOM") If Err.Number<>0 Then End If Dim objPI Set objPI = objXMLdoc.createProcessingInstruction("xml-stylesheet","type=""text/css"" href=""css/atom.css""") objXMLdoc.insertBefore objPI, objXMLdoc.childNodes(0) Set objPI = Nothing Set objPI = objXMLdoc.createProcessingInstruction("xml","version=""1.0"" encoding=""UTF-8"" standalone=""yes""") objXMLdoc.insertBefore objPI, objXMLdoc.childNodes(0) Set objPI = Nothing Set objXMLfeed = objXMLdoc.createElement("feed") End Sub ' 類釋放 Private Sub Class_Terminate() Set objXMLfeed = Nothing Set objXMLdoc = Nothing End Sub End Class '********************************************************* '********************************************************* ' 目的: BLOG信息類 ' 輸入: 無 ' 返回: 無 '********************************************************* Class TAtomFeed Public Property Get Node Set Node=objFeedNode End Property 'Public atomAuthor 'Public atomCategory 'Public atomContributor 'Public atomGenerator 'Public atomIcon 'Public atomId 'Public atomLink 'Public atomLogo 'Public atomRights 'Public atomSubtitle 'Public atomTitle 'Public atomUpdated Private objXMLdoc Private objFeedNode Private Function CommomAppendNode(strElement,strText,strType) Dim objSingleNode Dim objNodeText Dim objNodeCdata Set objSingleNode = objXMLdoc.createNode("element",strElement,"") If strType="" Then Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) ElseIf strType="text" Then objSingleNode.setAttribute "type",strType Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) ElseIf strType="html" Then objSingleNode.setAttribute "type",strType Set objNodeCdata=objXMLdoc.createNode("cdatasection", "", "") objNodeCdata.NodeValue=strText objSingleNode.AppendChild(objNodeCdata) ElseIf strType="xhtml" Then objSingleNode.setAttribute "type",strType Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) End If Set CommomAppendNode=objSingleNode Set objSingleNode = Nothing End Function Public Property Let atomCategory(strCategory) objFeedNode.AppendChild(CommomAppendNode("category",strCategory,"")) End Property Public Property Let atomIcon(strIcon) objFeedNode.AppendChild(CommomAppendNode("icon",strIcon,"")) End Property Public Property Let atomId(strId) objFeedNode.AppendChild(CommomAppendNode("id",strId,"")) End Property Public Property Let atomLogo(strLogo) objFeedNode.AppendChild(CommomAppendNode("logo",strLogo,"")) End Property Public Property Let atomRights(strRights) objFeedNode.AppendChild(CommomAppendNode("rights",strRights,"text")) End Property Public Property Let atomSubtitle(strSubtitle) objFeedNode.AppendChild(CommomAppendNode("subtitle",strSubtitle,"html")) End Property Public Property Let atomTitle(strTitle) objFeedNode.AppendChild(CommomAppendNode("title",strTitle,"html")) End Property Public Property Let atomUpdated(strUpdated) objFeedNode.AppendChild(CommomAppendNode("updated",strUpdated,"")) End Property Public Function atomPerson(strPerson,strName,strEmail,strUrl) Dim objSingleNode Dim objNodeText Dim objAuthorNameNode Dim objAuthorUrlNode Dim objAuthorEmailNode Set objSingleNode = objXMLdoc.createNode("element",strPerson,"") If strName<>"" Then Set objAuthorNameNode = objXMLdoc.createNode("element","name","") Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strName objAuthorNameNode.AppendChild(objNodeText) objSingleNode.AppendChild(objAuthorNameNode) Set objNodeText = Nothing End If If strUrl<>"" Then Set objAuthorUrlNode = objXMLdoc.createNode("element","uri","") Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strUrl objAuthorUrlNode.AppendChild(objNodeText) objSingleNode.AppendChild(objAuthorUrlNode) Set objNodeText = Nothing End If If strEmail<>"" Then Set objAuthorEmailNode = objXMLdoc.createNode("element","email","") Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strEmail objAuthorEmailNode.AppendChild(objNodeText) objSingleNode.AppendChild(objAuthorEmailNode) Set objNodeText = Nothing End If objFeedNode.AppendChild(objSingleNode) Set objSingleNode = Nothing End Function Public Function atomLink(strRel,strType,strHref) Dim objSingleNode Dim objNodeText Set objSingleNode = objXMLdoc.createNode("element","link","") objSingleNode.setAttribute "rel",strRel objSingleNode.setAttribute "type",strType objSingleNode.setAttribute "href",strHref objFeedNode.AppendChild(objSingleNode) Set objSingleNode = Nothing End Function Public Function atomGenerator(strGenerator,strUri,strVersion) Dim objSingleNode Dim objNodeText Set objSingleNode = objXMLdoc.createNode("element","generator","") Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strGenerator objSingleNode.setAttribute "uri",strUri objSingleNode.setAttribute "version",strVersion objSingleNode.AppendChild(objNodeText) objFeedNode.AppendChild(objSingleNode) Set objSingleNode = Nothing Set objNodeText = Nothing End Function Private Sub Class_Initialize() Set objXMLdoc =Server.CreateObject("Microsoft.XMLDOM") Set objFeedNode = objXMLdoc.createElement("feed") End Sub Private Sub Class_Terminate() Set objXMLdoc = Nothing Set objFeedNode = Nothing End Sub End Class '********************************************************* '********************************************************* ' 目的: 日志類 ' 輸入: 無 ' 返回: 無 '********************************************************* Class TAtomEntry Public Property Get Node Set Node=objEntryNode End Property 'Public atomAuthor 'Public atomCategory 'Public atomContributor 'Public atomLink 'Public atomTitle 'Public atomUpdated 'Public atomPublished 'Public atomContent 'Public atomSummary 'Public atomId 'Public atomRights Private objXMLdoc Private objEntryNode Private Function CommomAppendNode(strElement,strText,strType) Dim objSingleNode Dim objNodeText Dim objNodeCdata Set objSingleNode = objXMLdoc.createNode("element",strElement,"") If strType="" Then Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) ElseIf strType="text" Then objSingleNode.setAttribute "type",strType Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) ElseIf strType="html" Then objSingleNode.setAttribute "type",strType Set objNodeCdata=objXMLdoc.createNode("cdatasection", "", "") objNodeCdata.NodeValue=strText objSingleNode.AppendChild(objNodeCdata) ElseIf strType="xhtml" Then objSingleNode.setAttribute "type",strType Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) End If Set CommomAppendNode=objSingleNode Set objSingleNode = Nothing End Function Public Function atomContent(strContent,strType) objEntryNode.AppendChild(CommomAppendNode("content",strContent,strType)) End Function Public Property Let atomSummary(strSummary) objEntryNode.AppendChild(CommomAppendNode("summary",strSummary,"html")) End Property Public Property Let atomRights(strRights) objEntryNode.AppendChild(CommomAppendNode("rights",strRights,"")) End Property Public Property Let atomId(strID) objEntryNode.AppendChild(CommomAppendNode("id",strID,"")) End Property Public Property Let atomUpdated(dtmUpdated) objEntryNode.AppendChild(CommomAppendNode("updated",dtmUpdated,"")) End Property Public Property Let atomPublished(dtmPublished) objEntryNode.AppendChild(CommomAppendNode("published",dtmPublished,"")) End Property Public Property Let atomTitle(strTitle) objEntryNode.AppendChild(CommomAppendNode("title",strTitle,"html")) End Property Public Function atomCategory(strTerm,strScheme,strLabel) Dim objSingleNode Set objSingleNode = objXMLdoc.createNode("element","category","") objSingleNode.setAttribute "term",strTerm objSingleNode.setAttribute "scheme",strScheme objSingleNode.setAttribute "label",strLabel objEntryNode.AppendChild(objSingleNode) Set objSingleNode = Nothing End Function Public Function atomPerson(strPerson,strName,strEmail,strUrl) Dim objSingleNode Dim objNodeText Dim objAuthorNameNode Dim objAuthorUrlNode Dim objAuthorEmailNode Set objSingleNode = objXMLdoc.createNode("element",strPerson,"") If strName<>"" Then Set objAuthorNameNode = objXMLdoc.createNode("element","name","") Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strName objAuthorNameNode.AppendChild(objNodeText) objSingleNode.AppendChild(objAuthorNameNode) Set objNodeText = Nothing End If If strUrl<>"" Then Set objAuthorUrlNode = objXMLdoc.createNode("element","uri","") Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strUrl objAuthorUrlNode.AppendChild(objNodeText) objSingleNode.AppendChild(objAuthorUrlNode) Set objNodeText = Nothing End If If strEmail<>"" Then Set objAuthorEmailNode = objXMLdoc.createNode("element","email","") Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strEmail objAuthorEmailNode.AppendChild(objNodeText) objSingleNode.AppendChild(objAuthorEmailNode) Set objNodeText = Nothing End If objEntryNode.AppendChild(objSingleNode) Set objSingleNode = Nothing End Function Public Function atomLink(strRel,strType,strHref) Dim objSingleNode Dim objNodeText Set objSingleNode = objXMLdoc.createNode("element","link","") objSingleNode.setAttribute "rel",strRel objSingleNode.setAttribute "type",strType objSingleNode.setAttribute "href",strHref objEntryNode.AppendChild(objSingleNode) Set objSingleNode = Nothing End Function Public Property Let atomTag(strTag) objEntryNode.AppendChild(CommomAppendNode("tag",strTag,"")) End Property Public Function GetComment(objCommentFeed) objEntryNode.appendChild(objCommentFeed) End Function Private Sub Class_Initialize() Set objXMLdoc =Server.CreateObject("Microsoft.XMLDOM") Set objEntryNode = objXMLdoc.createElement("entry") End Sub Private Sub Class_Terminate() Set objXMLdoc = Nothing Set objEntryNode = Nothing End Sub End Class '********************************************************* '********************************************************* ' 目的: 評論類 ' 輸入: 無 ' 返回: 無 '********************************************************* Class TAtomComment Public Property Get Node Set Node=objCommentNode End Property 'Public atomAuthor 'Public atomPublished 'Public atomContent Private objXMLdoc Private objCommentNode Private Function CommomAppendNode(strElement,strText,strType) Dim objSingleNode Dim objNodeText Dim objNodeCdata Set objSingleNode = objXMLdoc.createNode("element",strElement,"") If strType="" Then Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) ElseIf strType="text" Then objSingleNode.setAttribute "type",strType Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) ElseIf strType="html" Then objSingleNode.setAttribute "type",strType Set objNodeCdata=objXMLdoc.createNode("cdatasection", "", "") objNodeCdata.NodeValue=strText objSingleNode.AppendChild(objNodeCdata) ElseIf strType="xhtml" Then objSingleNode.setAttribute "type",strType Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) End If Set CommomAppendNode=objSingleNode Set objSingleNode = Nothing End Function Public Property Let atomTitle(strTitle) objCommentNode.AppendChild(CommomAppendNode("title",strTitle,"html")) End Property Public Function atomContent(strContent,strType) objCommentNode.AppendChild(CommomAppendNode("content",strContent,strType)) End Function Public Property Let atomPublished(dtmPublished) objCommentNode.AppendChild(CommomAppendNode("published",dtmPublished,"")) End Property Public Function atomPerson(strPerson,strName,strEmail,strUrl) Dim objSingleNode Dim objNodeText Dim objAuthorNameNode Dim objAuthorUrlNode Dim objAuthorEmailNode Set objSingleNode = objXMLdoc.createNode("element",strPerson,"") If strName<>"" Then Set objAuthorNameNode = objXMLdoc.createNode("element","name","") Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strName objAuthorNameNode.AppendChild(objNodeText) objSingleNode.AppendChild(objAuthorNameNode) Set objNodeText = Nothing End If If strUrl<>"" Then Set objAuthorUrlNode = objXMLdoc.createNode("element","uri","") Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strUrl objAuthorUrlNode.AppendChild(objNodeText) objSingleNode.AppendChild(objAuthorUrlNode) Set objNodeText = Nothing End If If strEmail<>"" Then Set objAuthorEmailNode = objXMLdoc.createNode("element","email","") Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strEmail objAuthorEmailNode.AppendChild(objNodeText) objSingleNode.AppendChild(objAuthorEmailNode) Set objNodeText = Nothing End If objCommentNode.AppendChild(objSingleNode) Set objSingleNode = Nothing End Function Private Sub Class_Initialize() Set objXMLdoc =Server.CreateObject("Microsoft.XMLDOM") Set objCommentNode = objXMLdoc.createElement("comment") End Sub Private Sub Class_Terminate() Set objXMLdoc = Nothing Set objCommentNode = Nothing End Sub End Class '********************************************************* '********************************************************* ' 目的: 評論類 ' 輸入: 無 ' 返回: 無 '********************************************************* Class TAtomTrackBack Public Property Get Node Set Node=objTrackBackNode End Property 'Public atomAuthor 'Public atomPublished 'Public atomContent Private objXMLdoc Private objTrackBackNode Private Function CommomAppendNode(strElement,strText,strType) Dim objSingleNode Dim objNodeText Dim objNodeCdata Set objSingleNode = objXMLdoc.createNode("element",strElement,"") If strType="" Then Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) ElseIf strType="text" Then objSingleNode.setAttribute "type",strType Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) ElseIf strType="html" Then objSingleNode.setAttribute "type",strType Set objNodeCdata=objXMLdoc.createNode("cdatasection", "", "") objNodeCdata.NodeValue=strText objSingleNode.AppendChild(objNodeCdata) ElseIf strType="xhtml" Then objSingleNode.setAttribute "type",strType Set objNodeText=objXMLdoc.createNode("text", "", "") objNodeText.NodeValue=strText objSingleNode.AppendChild(objNodeText) End If Set CommomAppendNode=objSingleNode Set objSingleNode = Nothing End Function Public Property Let atomTitle(strTitle) objTrackBackNode.AppendChild(CommomAppendNode("title",strTitle,"html")) End Property Public Function atomContent(strContent,strType) objTrackBackNode.AppendChild(CommomAppendNode("content",strContent,strType)) End Function Public Property Let atomPublished(dtmPublished) objTrackBackNode.AppendChild(CommomAppendNode("published",dtmPublished,"")) End Property Public Function atomLink(strRel,strType,strHref) Dim objSingleNode Dim objNodeText Set objSingleNode = objXMLdoc.createNode("element","link","") objSingleNode.setAttribute "rel",strRel objSingleNode.setAttribute "type",strType objSingleNode.setAttribute "href",strHref objTrackBackNode.AppendChild(objSingleNode) Set objSingleNode = Nothing End Function Private Sub Class_Initialize() Set objXMLdoc =Server.CreateObject("Microsoft.XMLDOM") Set objTrackBackNode = objXMLdoc.createElement("trackback") End Sub Private Sub Class_Terminate() Set objXMLdoc = Nothing Set objTrackBackNode = Nothing End Sub End Class '********************************************************* 无码中文字幕久久久一区二区|最新日本一道免费一区二区|色婷婷五月亚洲一区二区|久久精品一级爱片

久久精品国产99久久久古代_无码人妻精品一区二区三区久久_亚洲国产成人精品无码区在线观看_精品国产乱码久久久久软件_亚洲国产精品无码久久

查看權限

名稱:來賓

等級:游客

登錄:ok

驗證身份:ok

登出:ok

后臺管理:fail

發表評論:ok

傳送引用:ok

查看權限:ok

索引重建:fail

文章重建:fail

管理文章:fail

編輯文章:fail

發布文章:fail

刪除文章:fail

管理分類:fail

修改分類:fail

刪除分類:fail

管理評論:fail

刪除評論:fail

回復評論:ok

管理引用:fail

刪除引用:fail

發送引用:fail

管理用戶:fail

修改用戶:fail

創建用戶:fail

刪除用戶:fail

附件管理:fail

附件上傳:fail

附件刪除:fail

站內搜索:ok

Tag管理:fail

Tag編輯:fail

Tag保存:fail

Tag刪除:fail

網站設置管理:fail

網站設置保存:fail

插件管理:fail

查看RSS和ATOM輸出:ok

站內文件管理:fail

站內文件編輯:fail

站內文件保存:fail

站內文件刪除:fail

超級管理:fail

主站蜘蛛池模板: 马鞍山市| 南投市| 启东市| 旬阳县| 浦东新区| 双鸭山市| 桦甸市| 宁安市| 越西县| 阿荣旗| 门源| 夏津县| 叙永县| 理塘县| 玉屏| 礼泉县| 竹溪县| 屏东县| 孟津县| 罗江县| 新巴尔虎左旗| 清流县| 京山县| 昭苏县| 晴隆县| 伊金霍洛旗| 汝州市| 光泽县| 吉木萨尔县| 桐城市| 湾仔区| 苗栗县| 汨罗市| 拉孜县| 衡山县| 山阳县| 金寨县| 咸阳市| 江门市| 文水县| 嫩江县|