CreateHtml.asp
上传用户:angela
上传日期:2022-05-11
资源大小:853k
文件大小:15k
源码类别:

外挂编程

开发平台:

ASP/ASPX

  1. <!--#include file="setup.asp"-->
  2. <!--#include file="check.asp"-->
  3. <%
  4. If Not CheckAdmin("CreateHtml") Then
  5.     Server.Transfer("showerr.asp")
  6.     Response.End
  7. End If
  8. Dim UrlName, Fname
  9. Server.ScriptTimeOut = 999
  10. Admin_header
  11. Action = LCase(Request("action"))
  12. Select Case Trim(Action)
  13. Case "index"
  14. Call IndexHtml()
  15. Case "other"
  16. Call otherHtml()
  17. Case "allcontent"
  18. Call ContentHtml()
  19. Case "artcontent"
  20. Call artContentHtml()
  21. Case Else
  22. Call IndexHtml()
  23. End Select
  24. If Founderr = True Then
  25. ReturnError(ErrMsg)
  26. End If
  27. Admin_footer
  28. CloseConn
  29. Sub IndexHtml()
  30. Dim FileUrl, FolderPath, FileName, FilePath
  31. FileUrl    = tee5.WebUrl & "/Index.asp"
  32. FolderPath = tee5.ServerDir
  33. FileName   = "Index"
  34. FilePath   = FolderPath & FileName & ".html"
  35. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  36. Response.Write "<meta http-equiv=""refresh"" content=""60;url=CreateHtml.asp?action=index"">"
  37. Response.Write "<p align=center>"
  38. Response.Write "<font color=#0000FF>此页面一直开着,就可以享受首页静态HTML时时更新了</font><br><br><br>"
  39. Response.Write "生成首页HTML完成 <a href=" & FilePath & " target=_blank>"
  40. Response.Write Server.MapPath(FilePath)
  41. Response.Write "</a>"
  42. Response.Write "</p>"
  43. End Sub
  44. Sub otherHtml()
  45. Response.Write "<ol>"
  46. Call JzIndexHtml()
  47. Call DownHtml()
  48. Call ArticleHtml()
  49. Call sfHtml()
  50. Call sfAddHtml()
  51. Call JzAddHtml()
  52. Call JzpageHtml()
  53. Call artpageHtml()
  54. Call softpageHtml()
  55. Call AboutHtml()
  56. Call ContactsHtml()
  57. Call advertiseHtml()
  58. Call helpHtml()
  59. Response.Write "</ol>"
  60. End Sub
  61. Sub JzIndexHtml()
  62. Dim FileUrl, FolderPath, FileName, FilePath
  63. FileUrl    = tee5.WebUrl & "/Temp/3.asp"
  64. FolderPath = tee5.ServerDir
  65. FileName   = "JzIndex"
  66. FilePath   = FolderPath & FileName & ".html"
  67. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  68. Response.Write "<li>"
  69. Response.Write "生成家族首页HTML完成 <a href=" & FilePath & " target=_blank>"
  70. Response.Write Server.MapPath(FilePath)
  71. Response.Write "</a>"
  72. Response.Write "</li>"
  73. Response.Flush
  74. End Sub
  75. Sub DownHtml()
  76. Dim FileUrl, FolderPath, FileName, FilePath
  77. FileUrl    = tee5.WebUrl & "/Temp/4.asp"
  78. FolderPath = tee5.ServerDir
  79. FileName   = "Soft"
  80. FilePath   = FolderPath & FileName & ".html"
  81. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  82. Response.Write "<li>"
  83. Response.Write "生成下载首页HTML完成 <a href=" & FilePath & " target=_blank>"
  84. Response.Write Server.MapPath(FilePath)
  85. Response.Write "</a>"
  86. Response.Write "</li>"
  87. Response.Flush
  88. End Sub
  89. Sub ArticleHtml()
  90. Dim FileUrl, FolderPath, FileName, FilePath
  91. FileUrl    = tee5.WebUrl & "/Temp/5.asp"
  92. FolderPath = tee5.ServerDir
  93. FileName   = "Article"
  94. FilePath   = FolderPath & FileName & ".html"
  95. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  96. Response.Write "<li>"
  97. Response.Write "生成文章首页HTML完成 <a href=" & FilePath & " target=_blank>"
  98. Response.Write Server.MapPath(FilePath)
  99. Response.Write "</a>"
  100. Response.Write "</li>"
  101. Response.Flush
  102. End Sub
  103. Sub sfHtml()
  104. Dim FileUrl, FolderPath, FileName, FilePath
  105. FileUrl    = tee5.WebUrl & "/Temp/6.asp"
  106. FolderPath = tee5.ServerDir
  107. FileName   = "sf"
  108. FilePath   = FolderPath & FileName & ".html"
  109. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  110. Response.Write "<li>"
  111. Response.Write "生成小偷首页HTML完成 <a href=" & FilePath & " target=_blank>"
  112. Response.Write Server.MapPath(FilePath)
  113. Response.Write "</a>"
  114. Response.Write "</li>"
  115. Response.Flush
  116. End Sub
  117. Sub sfAddHtml()
  118. Dim FileUrl, FolderPath, FileName, FilePath
  119. FileUrl    = tee5.WebUrl & "/Temp/1.asp"
  120. FolderPath = tee5.ServerDir
  121. FileName   = "add"
  122. FilePath   = FolderPath & FileName & ".html"
  123. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  124. Response.Write "<li>"
  125. Response.Write "生成私服发布HTML完成 <a href=" & FilePath & " target=_blank>"
  126. Response.Write Server.MapPath(FilePath)
  127. Response.Write "</a>"
  128. Response.Write "</li>"
  129. Response.Flush
  130. End Sub
  131. Sub JzAddHtml()
  132. Dim FileUrl, FolderPath, FileName, FilePath
  133. FileUrl    = tee5.WebUrl & "/Temp/2.asp"
  134. FolderPath = tee5.ServerDir
  135. FileName   = "Jzadd"
  136. FilePath   = FolderPath & FileName & ".html"
  137. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  138. Response.Write "<li>"
  139. Response.Write "生成家族发布HTML完成 <a href=" & FilePath & " target=_blank>"
  140. Response.Write Server.MapPath(FilePath)
  141. Response.Write "</a>"
  142. Response.Write "</li>"
  143. Response.Flush
  144. End Sub
  145. Sub AboutHtml()
  146. Dim FileUrl, FolderPath, FileName, FilePath
  147. FileUrl    = tee5.WebUrl & "/Temp/a.asp"
  148. FolderPath = tee5.ServerDir
  149. FileName   = "About"
  150. FilePath   = FolderPath & FileName & ".html"
  151. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  152. Response.Write "<li>"
  153. Response.Write "生成关于我们HTML完成 <a href=" & FilePath & " target=_blank>"
  154. Response.Write Server.MapPath(FilePath)
  155. Response.Write "</a>"
  156. Response.Write "</li>"
  157. Response.Flush
  158. End Sub
  159. Sub ContactsHtml()
  160. Dim FileUrl, FolderPath, FileName, FilePath
  161. FileUrl    = tee5.WebUrl & "/Temp/a.asp?Gq=Contacts"
  162. FolderPath = tee5.ServerDir
  163. FileName   = "Contacts"
  164. FilePath   = FolderPath & FileName & ".html"
  165. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  166. Response.Write "<li>"
  167. Response.Write "生成联系我们HTML完成 <a href=" & FilePath & " target=_blank>"
  168. Response.Write Server.MapPath(FilePath)
  169. Response.Write "</a>"
  170. Response.Write "</li>"
  171. Response.Flush
  172. End Sub
  173. Sub advertiseHtml()
  174. Dim FileUrl, FolderPath, FileName, FilePath
  175. FileUrl    = tee5.WebUrl & "/Temp/a.asp?Gq=advertise"
  176. FolderPath = tee5.ServerDir
  177. FileName   = "advertise"
  178. FilePath   = FolderPath & FileName & ".html"
  179. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  180. Response.Write "<li>"
  181. Response.Write "生成广告合作HTML完成 <a href=" & FilePath & " target=_blank>"
  182. Response.Write Server.MapPath(FilePath)
  183. Response.Write "</a>"
  184. Response.Write "</li>"
  185. Response.Flush
  186. End Sub
  187. Sub helpHtml()
  188. Dim FileUrl, FolderPath, FileName, FilePath
  189. FileUrl    = tee5.WebUrl & "/Temp/a.asp?Gq=help"
  190. FolderPath = tee5.ServerDir
  191. FileName   = "help"
  192. FilePath   = FolderPath & FileName & ".html"
  193. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  194. Response.Write "<li>"
  195. Response.Write "生成网站帮助HTML完成 <a href=" & FilePath & " target=_blank>"
  196. Response.Write Server.MapPath(FilePath)
  197. Response.Write "</a>"
  198. Response.Write "</li>"
  199. Response.Flush
  200. End Sub
  201. Sub JzpageHtml()
  202. Dim totalnum, FileUrl, FolderPath, FileName, FilePath, N
  203. totalnum = tee5.Execute("SELECT COUNT(*) FROM [Gq_jzdata]")(0)
  204. N = totalnumtee5.maxperpage + 1
  205. If N=0 Then
  206. N = 1
  207. End If
  208. For i = 1 To N
  209. FileUrl    = tee5.WebUrl & "/Temp/3.asp?page=" & i
  210. FolderPath = tee5.ServerDir & "Html/JzList/"
  211. tee5.CreatPathEx (FolderPath)
  212. FileName   = "Jz_" & tee5.Supplemental(i,3)
  213. FilePath   = FolderPath & FileName & ".html"
  214. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  215. Response.Flush
  216. Response.Write "<li>"
  217. Response.Write "生成家族分页HTML完成 <a href=" & FilePath & " target=_blank>"
  218. Response.Write Server.MapPath(FilePath)
  219. Response.Write "</a>"
  220. Response.Write "</li>"
  221. Response.Flush
  222. Next
  223. End Sub
  224. Sub artpageHtml()
  225. Dim totalnum, FileUrl, FolderPath, FileName, FilePath, N
  226. totalnum = tee5.Execute("SELECT COUNT(*) FROM [Gq_Article]")(0)
  227. N = totalnumtee5.maxperpage + 1
  228. If N=0 Then
  229. N = 1
  230. End If
  231. For i = 1 To N
  232. FileUrl    = tee5.WebUrl & "/Temp/5.asp?page=" & i
  233. FolderPath = tee5.ServerDir & "wz/"
  234. tee5.CreatPathEx (FolderPath)
  235. FileName   = "News_" & tee5.Supplemental(i,3)
  236. FilePath   = FolderPath & FileName & ".html"
  237. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  238. Response.Flush
  239. Response.Write "<li>"
  240. Response.Write "生成文章分页HTML完成... <a href=" & FilePath & " target=_blank>"
  241. Response.Write Server.MapPath(FilePath)
  242. Response.Write "</a>"
  243. Response.Write "</li>"
  244. Response.Flush
  245. Next
  246. End Sub
  247. Sub softpageHtml()
  248. Dim totalnum, FileUrl, FolderPath, FileName, FilePath, N
  249. totalnum = tee5.Execute("SELECT COUNT(*) FROM [Gq_Soft]")(0)
  250. N = totalnumtee5.maxperpage + 1
  251. If N=0 Then
  252. N = 1
  253. End If
  254. For i = 1 To N
  255. FileUrl    = tee5.WebUrl & "/Temp/4.asp?page=" & i
  256. FolderPath = tee5.ServerDir & "Html/Soft/"
  257. tee5.CreatPathEx (FolderPath)
  258. FileName   = "Soft_" & tee5.Supplemental(i,3)
  259. FilePath   = FolderPath & FileName & ".html"
  260. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  261. Response.Flush
  262. Response.Write "<li>"
  263. Response.Write "生成软件分页HTML完成 <a href=" & FilePath & " target=_blank>"
  264. Response.Write Server.MapPath(FilePath)
  265. Response.Write "</a>"
  266. Response.Write "</li>"
  267. Response.Flush
  268. Next
  269. End Sub
  270. Sub ContentHtml()
  271. Dim totalnum, totalnumber, FileUrl, FolderPath, FileName, FilePath
  272. Dim maxperpage, Pcount, CurrentPage, totalpage, mm, nn, j
  273. If Trim(Request("p")) <> "" Then
  274. CurrentPage = CLng(Request("p"))
  275. Else
  276. CurrentPage = 1
  277. End If
  278. maxperpage = 100   '每页显示列表数
  279. totalnum = tee5.Execute("SELECT COUNT(*) FROM [Gq_sfData] WHERE Ulock <> 0")(0)
  280. If CurrentPage = 0 Then CurrentPage = 1
  281. SQL = "SELECT * FROM Gq_sfData WHERE Ulock <> 0 ORDER BY ID DESC"
  282. If Trim(Session("totalnumber")) = "" Then
  283. totalnumber = tee5.Execute("SELECT COUNT(ID) FROM [Gq_sfData] WHERE Ulock <> 0")(0)
  284. Session("totalnumber") = totalnumber
  285. Else
  286. totalnumber = Session("totalnumber")
  287. End If
  288. Pcount = CLng(totalnumber / maxperpage)  '得到总页数
  289. If Pcount < CLng(totalnumber / maxperpage) Then Pcount = Pcount + 1
  290. If CurrentPage < 1 Then CurrentPage = 1
  291. If CurrentPage > Pcount Then CurrentPage = Pcount
  292. Set Rs = Server.CreateObject("adodb.recordset")
  293. Set Rs = Conn.Execute(SQL)
  294. ShowGuage("admin_list.asp")
  295. mm = CLng(Pcount - 1) * maxperpage
  296. nn = CLng(totalnum - mm)
  297. If CurrentPage < Pcount then
  298. totalpage = maxperpage
  299. Else
  300. totalpage = nn
  301. End If
  302. If Not (Rs.EOF And Rs.BOF) Then
  303. Rs.MoveFirst
  304. If Pcount > 1 then Rs.Move (CurrentPage - 1) * maxperpage
  305. j = (CurrentPage - 1) * maxperpage + 1
  306. If Rs.Eof Then Exit Sub
  307. SQL=Rs.GetRows(maxperpage)
  308. Set Rs = Nothing
  309. Response.Write "<ol>"
  310. For i = 0 To UBound(SQL,2)
  311. If Not Response.IsClientConnected Then ResponseEnd
  312. FolderPath = tee5.ServerDir & "sf" & tee5.ServerDir
  313. tee5.CreatPathEx (FolderPath)
  314. FileUrl    = tee5.WebUrl & "/Temp/7.asp?ID=" & Clng(SQL(0,i))
  315. FileName   = year(SQL(5,i)) & month(SQL(5,i)) & day(SQL(5,i)) & SQL(0,i)
  316. FilePath   = FolderPath & FileName & ".html"
  317. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  318. Response.Flush
  319. ShowInnerHTML totalpage,totalnumber,SQL(0,i),i
  320. Response.Flush
  321. j = j + 1
  322. Next
  323. Response.Write "</ol>"
  324. SQL=Null
  325. Else
  326. Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已全部完成"";</script>"
  327. Response.Write "<meta http-equiv=""refresh"" content=""0;url='admin_list.asp'"">"
  328. Exit Sub
  329. End If
  330. If IsObject(Rs) Then Set Rs = Nothing
  331. If CurrentPage => Pcount Then
  332. Session("totalnumber") = ""
  333. Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已全部完成 <font color='#FFFF00'>3</font> 秒后自动转向首页"";</script>"
  334. Response.Write "<meta http-equiv=""refresh"" content=""3;url='admin_list.asp'"">"
  335. Else
  336. Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已完成 正在载入中 请稍后……"";</script>"
  337. Response.Write "<script language='JavaScript'>" & vbNewLine
  338. Response.Write "function build(){window.location.href='createhtml.asp?action=allcontent&p=" & CurrentPage + 1 & "';}" & vbNewLine
  339. Response.Write "setTimeout('build()',5000);" & vbNewLine
  340. Response.Write "</script>" & vbNewLine
  341. End If
  342. End Sub
  343. Sub artContentHtml()
  344. Dim totalnum, totalnumber, FileUrl, FolderPath, FileName, FilePath
  345. Dim maxperpage, Pcount, CurrentPage, totalpage, mm, nn, j
  346. If Trim(Request("p")) <> "" Then
  347. CurrentPage = CLng(Request("p"))
  348. Else
  349. CurrentPage = 1
  350. End If
  351. maxperpage = 100   '每页显示列表数
  352. totalnum = tee5.Execute("SELECT COUNT(*) FROM [Gq_Article]")(0)
  353. If CurrentPage = 0 Then CurrentPage = 1
  354. SQL = "SELECT * FROM Gq_Article ORDER BY ID DESC"
  355. If Trim(Session("totalnumber")) = "" Then
  356. totalnumber = tee5.Execute("SELECT COUNT(ID) FROM [Gq_Article]")(0)
  357. Session("totalnumber") = totalnumber
  358. Else
  359. totalnumber = Session("totalnumber")
  360. End If
  361. Pcount = CLng(totalnumber / maxperpage)  '得到总页数
  362. If Pcount < CLng(totalnumber / maxperpage) Then Pcount = Pcount + 1
  363. If CurrentPage < 1 Then CurrentPage = 1
  364. If CurrentPage > Pcount Then CurrentPage = Pcount
  365. Set Rs = Server.CreateObject("adodb.recordset")
  366. Set Rs = Conn.Execute(SQL)
  367. ShowGuage("admin_article.asp?action=cat")
  368. mm = CLng(Pcount - 1) * maxperpage
  369. nn = CLng(totalnum - mm)
  370. If CurrentPage < Pcount then
  371. totalpage = maxperpage
  372. Else
  373. totalpage = nn
  374. End If
  375. If Not (Rs.EOF And Rs.BOF) Then
  376. Rs.MoveFirst
  377. If Pcount > 1 then Rs.Move (CurrentPage - 1) * maxperpage
  378. j = (CurrentPage - 1) * maxperpage + 1
  379. If Rs.Eof Then Exit Sub
  380. SQL=Rs.GetRows(maxperpage)
  381. Set Rs = Nothing
  382. Response.Write "<ol>"
  383. For i = 0 To UBound(SQL,2)
  384. If Not Response.IsClientConnected Then ResponseEnd
  385. FolderPath = tee5.ServerDir & "wz/"
  386. tee5.CreatPathEx (FolderPath)
  387. FileUrl    = tee5.WebUrl & "/Temp/8.asp?ID=" & Clng(SQL(0,i))
  388. FileName   = "News_" & SQL(0,i)
  389. FilePath   = FolderPath & FileName & ".html"
  390. Call GetRemoteFiels(FileUrl, FolderPath, FileName)
  391. Response.Flush
  392. ShowInnerHTML totalpage,totalnumber,SQL(0,i),i
  393. Response.Flush
  394. j = j + 1
  395. Next
  396. Response.Write "</ol>"
  397. SQL=Null
  398. Else
  399. Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已全部完成"";</script>"
  400. Response.Write "<meta http-equiv=""refresh"" content=""0;url='admin_article.asp?action=cat'"">"
  401. Exit Sub
  402. End If
  403. If IsObject(Rs) Then Set Rs = Nothing
  404. If CurrentPage => Pcount Then
  405. Session("totalnumber") = ""
  406. Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已全部完成 <font color='#FFFF00'>3</font> 秒后自动转向首页"";</script>"
  407. Response.Write "<meta http-equiv=""refresh"" content=""3;url='admin_article.asp?action=cat'"">"
  408. Else
  409. Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已完成 正在载入中 请稍后……"";</script>"
  410. Response.Write "<script language='JavaScript'>" & vbNewLine
  411. Response.Write "function build(){window.location.href='createhtml.asp?action=allcontent&p=" & CurrentPage + 1 & "';}" & vbNewLine
  412. Response.Write "setTimeout('build()',5000);" & vbNewLine
  413. Response.Write "</script>" & vbNewLine
  414. End If
  415. End Sub
  416. %>