CreateHtml.asp
资源名称:haohj.rar [点击查看]
上传用户:angela
上传日期:2022-05-11
资源大小:853k
文件大小:15k
源码类别:
外挂编程
开发平台:
ASP/ASPX
- <!--#include file="setup.asp"-->
- <!--#include file="check.asp"-->
- <%
- If Not CheckAdmin("CreateHtml") Then
- Server.Transfer("showerr.asp")
- Response.End
- End If
- Dim UrlName, Fname
- Server.ScriptTimeOut = 999
- Admin_header
- Action = LCase(Request("action"))
- Select Case Trim(Action)
- Case "index"
- Call IndexHtml()
- Case "other"
- Call otherHtml()
- Case "allcontent"
- Call ContentHtml()
- Case "artcontent"
- Call artContentHtml()
- Case Else
- Call IndexHtml()
- End Select
- If Founderr = True Then
- ReturnError(ErrMsg)
- End If
- Admin_footer
- CloseConn
- Sub IndexHtml()
- Dim FileUrl, FolderPath, FileName, FilePath
- FileUrl = tee5.WebUrl & "/Index.asp"
- FolderPath = tee5.ServerDir
- FileName = "Index"
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Write "<meta http-equiv=""refresh"" content=""60;url=CreateHtml.asp?action=index"">"
- Response.Write "<p align=center>"
- Response.Write "<font color=#0000FF>此页面一直开着,就可以享受首页静态HTML时时更新了</font><br><br><br>"
- Response.Write "生成首页HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</p>"
- End Sub
- Sub otherHtml()
- Response.Write "<ol>"
- Call JzIndexHtml()
- Call DownHtml()
- Call ArticleHtml()
- Call sfHtml()
- Call sfAddHtml()
- Call JzAddHtml()
- Call JzpageHtml()
- Call artpageHtml()
- Call softpageHtml()
- Call AboutHtml()
- Call ContactsHtml()
- Call advertiseHtml()
- Call helpHtml()
- Response.Write "</ol>"
- End Sub
- Sub JzIndexHtml()
- Dim FileUrl, FolderPath, FileName, FilePath
- FileUrl = tee5.WebUrl & "/Temp/3.asp"
- FolderPath = tee5.ServerDir
- FileName = "JzIndex"
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Write "<li>"
- Response.Write "生成家族首页HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- End Sub
- Sub DownHtml()
- Dim FileUrl, FolderPath, FileName, FilePath
- FileUrl = tee5.WebUrl & "/Temp/4.asp"
- FolderPath = tee5.ServerDir
- FileName = "Soft"
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Write "<li>"
- Response.Write "生成下载首页HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- End Sub
- Sub ArticleHtml()
- Dim FileUrl, FolderPath, FileName, FilePath
- FileUrl = tee5.WebUrl & "/Temp/5.asp"
- FolderPath = tee5.ServerDir
- FileName = "Article"
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Write "<li>"
- Response.Write "生成文章首页HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- End Sub
- Sub sfHtml()
- Dim FileUrl, FolderPath, FileName, FilePath
- FileUrl = tee5.WebUrl & "/Temp/6.asp"
- FolderPath = tee5.ServerDir
- FileName = "sf"
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Write "<li>"
- Response.Write "生成小偷首页HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- End Sub
- Sub sfAddHtml()
- Dim FileUrl, FolderPath, FileName, FilePath
- FileUrl = tee5.WebUrl & "/Temp/1.asp"
- FolderPath = tee5.ServerDir
- FileName = "add"
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Write "<li>"
- Response.Write "生成私服发布HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- End Sub
- Sub JzAddHtml()
- Dim FileUrl, FolderPath, FileName, FilePath
- FileUrl = tee5.WebUrl & "/Temp/2.asp"
- FolderPath = tee5.ServerDir
- FileName = "Jzadd"
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Write "<li>"
- Response.Write "生成家族发布HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- End Sub
- Sub AboutHtml()
- Dim FileUrl, FolderPath, FileName, FilePath
- FileUrl = tee5.WebUrl & "/Temp/a.asp"
- FolderPath = tee5.ServerDir
- FileName = "About"
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Write "<li>"
- Response.Write "生成关于我们HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- End Sub
- Sub ContactsHtml()
- Dim FileUrl, FolderPath, FileName, FilePath
- FileUrl = tee5.WebUrl & "/Temp/a.asp?Gq=Contacts"
- FolderPath = tee5.ServerDir
- FileName = "Contacts"
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Write "<li>"
- Response.Write "生成联系我们HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- End Sub
- Sub advertiseHtml()
- Dim FileUrl, FolderPath, FileName, FilePath
- FileUrl = tee5.WebUrl & "/Temp/a.asp?Gq=advertise"
- FolderPath = tee5.ServerDir
- FileName = "advertise"
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Write "<li>"
- Response.Write "生成广告合作HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- End Sub
- Sub helpHtml()
- Dim FileUrl, FolderPath, FileName, FilePath
- FileUrl = tee5.WebUrl & "/Temp/a.asp?Gq=help"
- FolderPath = tee5.ServerDir
- FileName = "help"
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Write "<li>"
- Response.Write "生成网站帮助HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- End Sub
- Sub JzpageHtml()
- Dim totalnum, FileUrl, FolderPath, FileName, FilePath, N
- totalnum = tee5.Execute("SELECT COUNT(*) FROM [Gq_jzdata]")(0)
- N = totalnumtee5.maxperpage + 1
- If N=0 Then
- N = 1
- End If
- For i = 1 To N
- FileUrl = tee5.WebUrl & "/Temp/3.asp?page=" & i
- FolderPath = tee5.ServerDir & "Html/JzList/"
- tee5.CreatPathEx (FolderPath)
- FileName = "Jz_" & tee5.Supplemental(i,3)
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Flush
- Response.Write "<li>"
- Response.Write "生成家族分页HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- Next
- End Sub
- Sub artpageHtml()
- Dim totalnum, FileUrl, FolderPath, FileName, FilePath, N
- totalnum = tee5.Execute("SELECT COUNT(*) FROM [Gq_Article]")(0)
- N = totalnumtee5.maxperpage + 1
- If N=0 Then
- N = 1
- End If
- For i = 1 To N
- FileUrl = tee5.WebUrl & "/Temp/5.asp?page=" & i
- FolderPath = tee5.ServerDir & "wz/"
- tee5.CreatPathEx (FolderPath)
- FileName = "News_" & tee5.Supplemental(i,3)
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Flush
- Response.Write "<li>"
- Response.Write "生成文章分页HTML完成... <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- Next
- End Sub
- Sub softpageHtml()
- Dim totalnum, FileUrl, FolderPath, FileName, FilePath, N
- totalnum = tee5.Execute("SELECT COUNT(*) FROM [Gq_Soft]")(0)
- N = totalnumtee5.maxperpage + 1
- If N=0 Then
- N = 1
- End If
- For i = 1 To N
- FileUrl = tee5.WebUrl & "/Temp/4.asp?page=" & i
- FolderPath = tee5.ServerDir & "Html/Soft/"
- tee5.CreatPathEx (FolderPath)
- FileName = "Soft_" & tee5.Supplemental(i,3)
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Flush
- Response.Write "<li>"
- Response.Write "生成软件分页HTML完成 <a href=" & FilePath & " target=_blank>"
- Response.Write Server.MapPath(FilePath)
- Response.Write "</a>"
- Response.Write "</li>"
- Response.Flush
- Next
- End Sub
- Sub ContentHtml()
- Dim totalnum, totalnumber, FileUrl, FolderPath, FileName, FilePath
- Dim maxperpage, Pcount, CurrentPage, totalpage, mm, nn, j
- If Trim(Request("p")) <> "" Then
- CurrentPage = CLng(Request("p"))
- Else
- CurrentPage = 1
- End If
- maxperpage = 100 '每页显示列表数
- totalnum = tee5.Execute("SELECT COUNT(*) FROM [Gq_sfData] WHERE Ulock <> 0")(0)
- If CurrentPage = 0 Then CurrentPage = 1
- SQL = "SELECT * FROM Gq_sfData WHERE Ulock <> 0 ORDER BY ID DESC"
- If Trim(Session("totalnumber")) = "" Then
- totalnumber = tee5.Execute("SELECT COUNT(ID) FROM [Gq_sfData] WHERE Ulock <> 0")(0)
- Session("totalnumber") = totalnumber
- Else
- totalnumber = Session("totalnumber")
- End If
- Pcount = CLng(totalnumber / maxperpage) '得到总页数
- If Pcount < CLng(totalnumber / maxperpage) Then Pcount = Pcount + 1
- If CurrentPage < 1 Then CurrentPage = 1
- If CurrentPage > Pcount Then CurrentPage = Pcount
- Set Rs = Server.CreateObject("adodb.recordset")
- Set Rs = Conn.Execute(SQL)
- ShowGuage("admin_list.asp")
- mm = CLng(Pcount - 1) * maxperpage
- nn = CLng(totalnum - mm)
- If CurrentPage < Pcount then
- totalpage = maxperpage
- Else
- totalpage = nn
- End If
- If Not (Rs.EOF And Rs.BOF) Then
- Rs.MoveFirst
- If Pcount > 1 then Rs.Move (CurrentPage - 1) * maxperpage
- j = (CurrentPage - 1) * maxperpage + 1
- If Rs.Eof Then Exit Sub
- SQL=Rs.GetRows(maxperpage)
- Set Rs = Nothing
- Response.Write "<ol>"
- For i = 0 To UBound(SQL,2)
- If Not Response.IsClientConnected Then ResponseEnd
- FolderPath = tee5.ServerDir & "sf" & tee5.ServerDir
- tee5.CreatPathEx (FolderPath)
- FileUrl = tee5.WebUrl & "/Temp/7.asp?ID=" & Clng(SQL(0,i))
- FileName = year(SQL(5,i)) & month(SQL(5,i)) & day(SQL(5,i)) & SQL(0,i)
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Flush
- ShowInnerHTML totalpage,totalnumber,SQL(0,i),i
- Response.Flush
- j = j + 1
- Next
- Response.Write "</ol>"
- SQL=Null
- Else
- Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已全部完成"";</script>"
- Response.Write "<meta http-equiv=""refresh"" content=""0;url='admin_list.asp'"">"
- Exit Sub
- End If
- If IsObject(Rs) Then Set Rs = Nothing
- If CurrentPage => Pcount Then
- Session("totalnumber") = ""
- Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已全部完成 <font color='#FFFF00'>3</font> 秒后自动转向首页"";</script>"
- Response.Write "<meta http-equiv=""refresh"" content=""3;url='admin_list.asp'"">"
- Else
- Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已完成 正在载入中 请稍后……"";</script>"
- Response.Write "<script language='JavaScript'>" & vbNewLine
- Response.Write "function build(){window.location.href='createhtml.asp?action=allcontent&p=" & CurrentPage + 1 & "';}" & vbNewLine
- Response.Write "setTimeout('build()',5000);" & vbNewLine
- Response.Write "</script>" & vbNewLine
- End If
- End Sub
- Sub artContentHtml()
- Dim totalnum, totalnumber, FileUrl, FolderPath, FileName, FilePath
- Dim maxperpage, Pcount, CurrentPage, totalpage, mm, nn, j
- If Trim(Request("p")) <> "" Then
- CurrentPage = CLng(Request("p"))
- Else
- CurrentPage = 1
- End If
- maxperpage = 100 '每页显示列表数
- totalnum = tee5.Execute("SELECT COUNT(*) FROM [Gq_Article]")(0)
- If CurrentPage = 0 Then CurrentPage = 1
- SQL = "SELECT * FROM Gq_Article ORDER BY ID DESC"
- If Trim(Session("totalnumber")) = "" Then
- totalnumber = tee5.Execute("SELECT COUNT(ID) FROM [Gq_Article]")(0)
- Session("totalnumber") = totalnumber
- Else
- totalnumber = Session("totalnumber")
- End If
- Pcount = CLng(totalnumber / maxperpage) '得到总页数
- If Pcount < CLng(totalnumber / maxperpage) Then Pcount = Pcount + 1
- If CurrentPage < 1 Then CurrentPage = 1
- If CurrentPage > Pcount Then CurrentPage = Pcount
- Set Rs = Server.CreateObject("adodb.recordset")
- Set Rs = Conn.Execute(SQL)
- ShowGuage("admin_article.asp?action=cat")
- mm = CLng(Pcount - 1) * maxperpage
- nn = CLng(totalnum - mm)
- If CurrentPage < Pcount then
- totalpage = maxperpage
- Else
- totalpage = nn
- End If
- If Not (Rs.EOF And Rs.BOF) Then
- Rs.MoveFirst
- If Pcount > 1 then Rs.Move (CurrentPage - 1) * maxperpage
- j = (CurrentPage - 1) * maxperpage + 1
- If Rs.Eof Then Exit Sub
- SQL=Rs.GetRows(maxperpage)
- Set Rs = Nothing
- Response.Write "<ol>"
- For i = 0 To UBound(SQL,2)
- If Not Response.IsClientConnected Then ResponseEnd
- FolderPath = tee5.ServerDir & "wz/"
- tee5.CreatPathEx (FolderPath)
- FileUrl = tee5.WebUrl & "/Temp/8.asp?ID=" & Clng(SQL(0,i))
- FileName = "News_" & SQL(0,i)
- FilePath = FolderPath & FileName & ".html"
- Call GetRemoteFiels(FileUrl, FolderPath, FileName)
- Response.Flush
- ShowInnerHTML totalpage,totalnumber,SQL(0,i),i
- Response.Flush
- j = j + 1
- Next
- Response.Write "</ol>"
- SQL=Null
- Else
- Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已全部完成"";</script>"
- Response.Write "<meta http-equiv=""refresh"" content=""0;url='admin_article.asp?action=cat'"">"
- Exit Sub
- End If
- If IsObject(Rs) Then Set Rs = Nothing
- If CurrentPage => Pcount Then
- Session("totalnumber") = ""
- Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已全部完成 <font color='#FFFF00'>3</font> 秒后自动转向首页"";</script>"
- Response.Write "<meta http-equiv=""refresh"" content=""3;url='admin_article.asp?action=cat'"">"
- Else
- Response.Write "<script>table2.style.width=500;txt1.innerHTML=""完成:100"";txt2.innerHTML=""本次生成已完成 正在载入中 请稍后……"";</script>"
- Response.Write "<script language='JavaScript'>" & vbNewLine
- Response.Write "function build(){window.location.href='createhtml.asp?action=allcontent&p=" & CurrentPage + 1 & "';}" & vbNewLine
- Response.Write "setTimeout('build()',5000);" & vbNewLine
- Response.Write "</script>" & vbNewLine
- End If
- End Sub
- %>