ThemeDetail.asp
上传用户:saigedz
上传日期:2019-10-14
资源大小:997k
文件大小:12k
源码类别:

中间件编程

开发平台:

HTML/CSS

  1. <%@ CODEPAGE=65001 %>
  2. <%
  3. '///////////////////////////////////////////////////////////////////////////////
  4. '// 插件应用:    1.8 Pre Terminator 及以上版本, 其它版本的Z-blog未知
  5. '// 插件制作:    haphic(http://haphic.com/)
  6. '// 备    注:    主题管理插件
  7. '// 最后修改:   2008-6-28
  8. '// 最后版本:    1.2
  9. '///////////////////////////////////////////////////////////////////////////////
  10. %>
  11. <% Option Explicit %>
  12. <% On Error Resume Next %>
  13. <% Response.Charset="UTF-8" %>
  14. <% Response.Buffer=True %>
  15. <!-- #include file="../../c_option.asp" -->
  16. <!-- #include file="../../function/c_function.asp" -->
  17. <!-- #include file="../../function/c_system_lib.asp" -->
  18. <!-- #include file="../../function/c_system_base.asp" -->
  19. <!-- #include file="../../function/c_system_plugin.asp" -->
  20. <!-- #include file="c_sapper.asp" -->
  21. <%
  22. Call System_Initialize()
  23. '检查非法链接
  24. Call CheckReference("")
  25. '检查权限
  26. If BlogUser.Level>1 Then Call ShowError(6)
  27. If CheckPluginState("ThemeSapper")=False Then Call ShowError(48)
  28. SelectedTheme=Request.QueryString("theme")
  29. SelectedThemeName=Request.QueryString("themename")
  30. If SelectedThemeName = "" Then SelectedThemeName = SelectedTheme
  31. BlogTitle="Theme Sapper"
  32. %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  33. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%=ZC_BLOG_LANGUAGE%>" lang="<%=ZC_BLOG_LANGUAGE%>">
  34. <head>
  35. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  36. <meta http-equiv="Content-Language" content="<%=ZC_BLOG_LANGUAGE%>" />
  37. <meta name="robots" content="noindex,nofollow"/>
  38. <link rel="stylesheet" rev="stylesheet" href="../../CSS/admin.css" type="text/css" media="screen" />
  39. <link rel="stylesheet" rev="stylesheet" href="images/style.css" type="text/css" media="screen" />
  40. <title><%=BlogTitle%></title>
  41. </head>
  42. <body>
  43. <div id="divMain">
  44. <div class="Header">Theme Sapper - 主题: "<%=SelectedThemeName%>" 的详细信息.</div>
  45. <%Call SapperMenu("0")%>
  46. <div id="divMain2">
  47. <%Call GetBlogHint()%>
  48. <div>
  49. <%
  50. Response.Write "<p id=""loading"">正在载入主题信息, 请稍候... 如果长时间停止响应, 请 <a href=""javascript:window.location.reload();"" title=""点此重试"">[点此重试]</a></p>"
  51. Response.Flush
  52. Dim objXmlFile,strXmlFile
  53. Dim fso
  54. Set fso = CreateObject("Scripting.FileSystemObject")
  55. If fso.FileExists(BlogPath & "/THEMES/" & SelectedTheme & "/" & "theme.xml") Then
  56. strXmlFile =BlogPath & "/THEMES/" & SelectedTheme & "/" & "theme.xml"
  57. Set objXmlFile=Server.CreateObject("Microsoft.XMLDOM")
  58. objXmlFile.async = False
  59. objXmlFile.ValidateOnParse=False
  60. objXmlFile.load(strXmlFile)
  61. If objXmlFile.readyState=4 Then
  62. If objXmlFile.parseError.errorCode <> 0 Then
  63. Else
  64. 'ThemeID=SelectedTheme
  65. ThemeID=objXmlFile.documentElement.selectSingleNode("id").text
  66. ThemeName=objXmlFile.documentElement.selectSingleNode("name").text
  67. ThemeURL=objXmlFile.documentElement.selectSingleNode("url").text
  68. ThemeNote=objXmlFile.documentElement.selectSingleNode("note").text
  69. ThemeAuthor_Name=objXmlFile.documentElement.selectSingleNode("author/name").text
  70. ThemeAuthor_Url=objXmlFile.documentElement.selectSingleNode("author/url").text
  71. ThemeAuthor_Email=objXmlFile.documentElement.selectSingleNode("author/email").text
  72. ThemeSource_Name=objXmlFile.documentElement.selectSingleNode("source/name").text
  73. ThemeSource_Url=objXmlFile.documentElement.selectSingleNode("source/url").text
  74. ThemeSource_Email=objXmlFile.documentElement.selectSingleNode("source/email").text
  75. ThemePlugin_Name=objXmlFile.documentElement.selectSingleNode("plugin/name").text
  76. ThemePlugin_Note=objXmlFile.documentElement.selectSingleNode("plugin/note").text
  77. ThemePlugin_Type=objXmlFile.documentElement.selectSingleNode("plugin/type").text
  78. ThemePlugin_Path=objXmlFile.documentElement.selectSingleNode("plugin/path").text
  79. ThemePlugin_Include=objXmlFile.documentElement.selectSingleNode("plugin/include").text
  80. ThemePlugin_Level=objXmlFile.documentElement.selectSingleNode("plugin/level").text
  81. ThemeAdapted=objXmlFile.documentElement.selectSingleNode("adapted").text
  82. ThemeVersion=objXmlFile.documentElement.selectSingleNode("version").text
  83. ThemePubDate=objXmlFile.documentElement.selectSingleNode("pubdate").text
  84. ThemeModified=objXmlFile.documentElement.selectSingleNode("modified").text
  85. ThemeDescription=objXmlFile.documentElement.selectSingleNode("description").text
  86. ThemeDescription=TransferHTML(ThemeDescription,"[enter]")
  87. End If
  88. End If
  89. Set objXmlFile=Nothing
  90. Else
  91. ThemeID=SelectedTheme
  92. ThemeName=SelectedTheme
  93. ThemeURL=Empty
  94. ThemeNote="Nothing"
  95. ThemeSource_Name="unknown"
  96. ThemeSource_Url=Empty
  97. ThemeSource_Email="unknown"
  98. ThemeAuthor_Name="unknown"
  99. ThemeAuthor_Url=Empty
  100. ThemeAuthor_Email="unknown"
  101. ThemePlugin_Name="Nothing"
  102. ThemePlugin_Note="Nothing"
  103. ThemePlugin_Type="Nothing"
  104. ThemePlugin_Path="Nothing"
  105. ThemePlugin_Include="Nothing"
  106. ThemePlugin_Level="Nothing"
  107. ThemeAdapted="unknown"
  108. ThemeVersion="unknown"
  109. ThemePubDate="unknown"
  110. ThemeModified="unknown"
  111. ThemeDescription="Nothing"
  112. End If
  113. If fso.FileExists(BlogPath & "/THEMES/" & SelectedTheme & "/" & "screenshot.png") Then
  114. ThemeScreenShot="../../THEMES/" & SelectedTheme & "/" & "screenshot.png"
  115. Else
  116. ThemeScreenShot="Images/noscreenshot.png"
  117. End If
  118. Response.Write "<form id=""edit"" name=""edit"" method=""post"" action=""../../cmd.asp?act=ThemesSav"">"
  119. Response.Write "<div class=""themeDetail"">"
  120. Response.Write "<p><img src=""" & ThemeScreenShot & """ title=""" & ThemeName & """ alt=""ScreenShot"" /></p>"
  121. If fso.FileExists(BlogPath & "/THEMES/" & ThemeID & "/" & "verchk.xml") Then
  122. Response.Write "<p><a href=""Xml_Install.asp?act=update&amp;url=" & Server.URLEncode(Update_URL & ThemeID) & """ title=""升级主题""><b class=""notice"">发现该主题的新版本!</b></a></p><br />"
  123. ElseIf fso.FileExists(BlogPath & "/THEMES/" & ThemeID & "/" & "error.log") Then
  124. Response.Write "<p><b class=""somehow"">该主题不支持在线更新.</b></p><br />"
  125. End If
  126. If UCase(ThemeID)<>UCase(SelectedTheme) Then
  127. Response.Write "<p>该主题ID错误, 请 <a href=""Xml_Edit.asp?theme=" & Server.URLEncode(SelectedTheme) & """ title=""编辑主题信息""><font color=""red""><b>[重新编辑主题信息]</b></font></a>.</p><br />"
  128. Else
  129. Response.Write "<p><b>主题 ID:</b> " & ThemeID & "</p><br />"
  130. End If
  131. Response.Write "<p><b>主题名称:</b> " & ThemeName & "</p>"
  132. If ThemeURL<>Empty Then Response.Write "<p><b>发布地址:</b> <a href=""" & ThemeURL & """ target=""_blank"" title=""主题的发布地址"">" & ThemeURL & "</a></p>"
  133. If ThemeAuthor_Url=Empty Then
  134. Response.Write "<p><b>主题作者:</b> " & ThemeAuthor_Name & "</p>"
  135. Else
  136. Response.Write "<p><b>主题作者:</b> <a href=""" & ThemeAuthor_Url & """ target=""_blank"" title=""作者主页"">" & ThemeAuthor_Name & "</a></p>"
  137. End If
  138. If ThemeAuthor_Email<>Empty Then Response.Write "<p><b>作者邮箱:</b> <a href=""mailto:" & ThemeAuthor_Email & """ title=""作者邮箱"">" & ThemeAuthor_Email & "</a></p>"
  139. Response.Write "<p><b>发布日期:</b> " & ThemePubDate & "</p>"
  140. Response.Write "<p><b>主题简介:</b> " & ThemeNote & "</p><br />"
  141. Response.Write "<p><b>适用于:</b> " & ThemeAdapted & "</p>"
  142. Response.Write "<p><b>主题版本:</b> " & ThemeVersion & "</p>"
  143. Response.Write "<p><b>修正日期:</b> " & ThemeModified & "</p><br />"
  144. If ThemeSource_Name<>Empty Then
  145. If ThemeSource_Url=Empty Then
  146. Response.Write "<p><b>主题源作者:</b> " & ThemeSource_Name & "</p>"
  147. Else
  148. Response.Write "<p><b>主题源作者:</b> <a href=""" & ThemeSource_Url & """ target=""_blank"" title=""源作者主页"">" & ThemeSource_Name & "</a></p>"
  149. End If
  150. If ThemeSource_Email<>Empty Then Response.Write "<p><b>源作者邮箱:</b> <a href=""mailto:" & ThemeSource_Email & """ title=""源作者邮箱"">" & ThemeSource_Email & "</a></p>"
  151. End If
  152. If ThemePlugin_Name<>Empty Then
  153. Response.Write "<br /><p><b>此主题含有附带插件:</b></p>"
  154. Response.Write "<p><b>插件名称:</b> " & ThemePlugin_Name & "</p>"
  155. Response.Write "<p><b>插件简介:</b> " & ThemePlugin_Note & "</p>"
  156. Response.Write "<p><b>插件类型:</b> " & ThemePlugin_Type & "</p>"
  157. Response.Write "<p><b>管理主口:</b> " & ThemePlugin_Path & "</p>"
  158. Response.Write "<p><b>包含文件:</b> " & ThemePlugin_Include & "</p>"
  159. Response.Write "<p><b>插件权限:</b> " & ThemePlugin_Level & "</p>"
  160. End If
  161. If ThemeDescription<>"" Then Response.Write "<hr /><br /><p><b>详细说明:</b></p>" & "<blockquote>" & ThemeDescription & "</blockquote><br />"
  162. Response.Write "<p><b><a href=""Xml_Install.asp?act=update&amp;url=" & Server.URLEncode(Update_URL & ThemeID) & """ title=""升级修复主题"">[升级修复主题]</a>:</b> 重新下载安装此主题以完成对主题的升级和修复.</p>"
  163. Response.Write "<p><b><a href=""Xml_Edit.asp?theme=" & Server.URLEncode(SelectedTheme) & """ title=""编辑主题信息"">[编辑信息]</a>:</b> 此功能可用于生成或编辑该主题的信息文档 Theme.xml.</p>"
  164. Response.Write "<p><b><a href=""Xml_Pack.asp?theme=" & Server.URLEncode(SelectedTheme) & """ title=""导出主题为 ZTI 文件"">[导出主题]</a>:</b> 将此主题导出为 ZTI 主题安装包文件, 并保存于 TS 插件中的 Export 目录下.</p>"
  165. Response.Write "<p><b><a href=""ThemeList.asp?act=themedel&amp;theme=" & Server.URLEncode(SelectedTheme) & "&amp;themename=" & Server.URLEncode(ThemeName) & """ title=""删除此主题"" onclick=""return window.confirm('您将删除此主题的所有文件, 确定吗?');"">[删除主题]</a>:</b> 从 THEMES 目录下删除该主题, 正在使用的主题无法删除.</p>"
  166. Dim i,j
  167. Dim aryFileList
  168. Dim Theme_Style_Name
  169. aryFileList=LoadIncludeFiles("themes" & "/" & SelectedTheme & "/style")
  170. Response.Write "<br /><hr /><p><input type=""hidden"" name=""edtZC_BLOG_THEME"" value="""& SelectedTheme &""">"
  171. If IsArray(aryFileList) Then
  172. j=UBound(aryFileList)
  173. For i=1 to j
  174. GetFileExt(f1.name)="zti" Or GetFileExt(f1.name)="xml"
  175. If (GetFileExt(aryFileList(i))="css") Or (GetFileExt(aryFileList(i))="asp") Then
  176. Theme_Style_Name=Replace(aryFileList(i),"." & GetFileExt(aryFileList(i)),"")
  177. Response.Write "<p>"
  178. If i=1 Then
  179. Response.Write " <input type=""radio"" checked=""checked"" name=""edtZC_BLOG_CSS"" value="""& Theme_Style_Name &"""> 选择样式 "&aryFileList(i)&"; "
  180. Else
  181. Response.Write " <input type=""radio"" name=""edtZC_BLOG_CSS"" value="""& Theme_Style_Name &"""> 选择样式 "&aryFileList(i)&"; "
  182. End If
  183. Response.Write "</p>"
  184. End If
  185. Next
  186. End If
  187. Response.Write "</p><br /><p><input type=""submit"" class=""button"" value=""应用此主题"" id=""btnPost"" title=""应用此主题"" /> <input onclick=""self.location.href='ThemeList.asp';"" type=""button"" class=""button"" value=""返回主题管理"" title=""返回主题管理页"" /> <input onclick=""window.scrollTo(0,0);"" type=""button"" class=""button"" value=""TOP"" title=""返回页面顶部"" /></p>"
  188. Response.Write "</div>"
  189. Response.Write "</form>"
  190. Set fso = nothing
  191. Err.Clear
  192. Response.Write "<script language=""JavaScript"" type=""text/javascript"">try{document.getElementById('loading').style.display = 'none';}catch(e){};</script>"
  193. %>
  194. </div>
  195. </div>
  196. </div>
  197. </body>
  198. </html>
  199. <%
  200. Call System_Terminate()
  201. If Err.Number<>0 then
  202. Call ShowError(0)
  203. End If
  204. %>