<%
' Ss简单网站管理系统-开源版 
'晴天设计www.xxzwz.com
Sub HtmlProSort
    'Call SiteInfo()
	Dim rs,sql,ID,SortPath
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("Select count(ID) from ["&Datapre&"_Products] Where ViewFlag",1)(0)
    totalpage = Int(totalrec / ProInfo)
    If (totalpage * ProInfo)<totalrec Then
        totalpage = totalpage+1
    End If
    If totalpage<= 1 Then
        Call htmll("", "", ""&ProSortName&""&Separated&"1."&HTMLName&"", "ProductList.Asp", "Page=", 1, "", "")
    Else
        For i = 1 To totalpage
            Call htmll("", "", ""&ProSortName&""&Separated&""&i&"."&HTMLName&"", "ProductList.Asp", "Page=", i, "", "")
        Next
    End If
    sql = "select ID from ["&Datapre&"_ProductSort] order by ID desc"
    set rs=db(sql,2)
    If rs.EOF Then
        Class_Num = 0
    Else
        Class_Num = 1
        Do While Not rs.EOF
            ID = rs("ID")
            SortPath = db("select SortPath from ["&Datapre&"_ProductSort] Where ViewFlag And ID="&ID,1)(0)
            totalrec = db("Select count(ID) from ["&Datapre&"_Products] where ViewFlag and SortPath Like '%"&SortPath&"%'",1)(0)
            totalpage = Int(totalrec / ProInfo)
            If (totalpage * ProInfo)<totalrec Then
                totalpage = totalpage+1
            End If
            If totalpage<= 1 Then
                Call htmll("", "", ""&ProSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&"", "ProductList.Asp", "SortID=", rs("ID"), "Page=", 1)
            Else
                For i = 1 To totalpage
                    Call htmll("", "", ""&ProSortName&""&Separated&""&rs("ID")&""&Separated&""&i&"."&HTMLName&"", "ProductList.Asp", "SortID=", rs("ID"), "Page=", i)
                Next
            End If
            Response.Write "<script>bar_img.width="&Fix((Class_Num / rs.recordcount) * 300)&";"
            Response.Write "bar_txt1.innerHTML=""成功生成"&Class_Num&"个分类的HTML静态页面。完成比例：" & FormatNumber(Class_Num / rs.recordcount * 100) & """;</script>"
            Response.Flush
            rs.movenext
            Class_Num = Class_Num + 1
        Loop
    End If
    rs.Close
    Set rs = Nothing
End Sub

Sub HtmlOtherSort
    'Call SiteInfo()
	Dim ID,SortPath,rs,sql
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("Select count(ID) from ["&Datapre&"_Others] Where ViewFlag",1)(0)
    totalpage = Int(totalrec / OtherInfo)
    If (totalpage * OtherInfo)<totalrec Then
        totalpage = totalpage+1
    End If
    If totalpage<= 1 Then
        Call htmll("", "", ""&OtherSortName&""&Separated&"1."&HTMLName&"", "OtherList.Asp", "Page=", 1, "", "")
    Else
        For i = 1 To totalpage
            Call htmll("", "", ""&OtherSortName&""&Separated&""&i&"."&HTMLName&"", "OtherList.Asp", "Page=", i, "", "")
        Next
    End If
    sql = "select ID from ["&Datapre&"_OthersSort] order by ID desc"
    set rs=db(sql,2)
    If rs.EOF Then
        Class_Num = 0
    Else
        Class_Num = 1
        Do While Not rs.EOF
            ID = rs("ID")
            SortPath = db("select SortPath from ["&Datapre&"_OthersSort] Where ViewFlag And ID="&ID,1)(0)
            totalrec = db("Select count(ID) from ["&Datapre&"_Others] where ViewFlag and SortPath Like '%"&SortPath&"%'",1)(0)
            totalpage = Int(totalrec / OtherInfo)
            If (totalpage * OtherInfo)<totalrec Then
                totalpage = totalpage+1
            End If
            If totalpage<= 1 Then
                Call htmll("", "", ""&OtherSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&"", "OtherList.Asp", "SortID=", ID, "Page=", 1)
            Else
                For i = 1 To totalpage
                    Call htmll("", "", ""&OtherSortName&""&Separated&""&rs("ID")&""&Separated&""&i&"."&HTMLName&"", "OtherList.Asp", "SortID=", ID, "Page=", i)
                Next
            End If
            Response.Write "<script>bar_img.width="&Fix((Class_Num / rs.recordcount) * 300)&";"
            Response.Write "bar_txt1.innerHTML=""成功生成"&Class_Num&"个分类的HTML静态页面。完成比例：" & FormatNumber(Class_Num / rs.recordcount * 100) & """;</script>"
            Response.Flush
            rs.movenext
            Class_Num = Class_Num + 1
        Loop
    End If
    rs.Close
    Set rs = Nothing
End Sub

Sub HtmlNewSort
    'Call SiteInfo()
	Dim ID,SortPath,rs,sql
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("Select count(ID) from ["&Datapre&"_News] Where ViewFlag",1)(0)
    totalpage = Int(totalrec / NewInfo)
    If (totalpage * NewInfo)<totalrec Then
        totalpage = totalpage+1
    End If
    If totalpage<= 1 Then
        Call htmll("", "", ""&NewSortName&""&Separated&"1."&HTMLName&"", "NewsList.Asp", "Page=", 1, "", "")
    Else
        For i = 1 To totalpage
            Call htmll("", "", ""&NewSortName&""&Separated&""&i&"."&HTMLName&"", "NewsList.Asp", "Page=", i, "", "")
        Next
    End If
    sql = "select ID from ["&Datapre&"_NewsSort] order by ID desc"
    set rs=db(sql,2)
    If rs.EOF Then
        Class_Num = 0
    Else
        Class_Num = 1
        Do While Not rs.EOF
            ID = rs("ID")
            SortPath = db("select SortPath from ["&Datapre&"_NewsSort] Where ViewFlag And ID="&ID,1)(0)
            totalrec = db("Select count(ID) from ["&Datapre&"_News] where ViewFlag and SortPath Like '%"&SortPath&"%'",1)(0)
            totalpage = Int(totalrec / NewInfo)
            If (totalpage * NewInfo)<totalrec Then
                totalpage = totalpage+1
            End If
            If totalpage<= 1 Then
                Call htmll("", "", ""&NewSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&"", "NewsList.Asp", "SortID=", ID, "Page=", 1)
            Else
                For i = 1 To totalpage
                    Call htmll("", "", ""&NewSortName&""&Separated&""&ID&""&Separated&""&i&"."&HTMLName&"", "NewsList.Asp", "SortID=", ID, "Page=", i)
                Next
            End If
            Response.Write "<script>bar_img.width="&Fix((Class_Num / rs.recordcount) * 300)&";"
            Response.Write "bar_txt1.innerHTML=""成功生成"&Class_Num&"个分类的HTML静态页面。完成比例：" & FormatNumber(Class_Num / rs.recordcount * 100) & """;</script>"
            Response.Flush
            rs.movenext
            Class_Num = Class_Num + 1
        Loop
    End If
    rs.Close
    Set rs = Nothing
End Sub

Sub HtmlJobSort
    'Call SiteInfo()
	Dim ID,SortPath,rs,sql
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("Select count(ID) from ["&Datapre&"_Jobs] Where ViewFlag",1)(0)
    totalpage = Int(totalrec / JobInfo)
    If (totalpage * JobInfo)<totalrec Then
        totalpage = totalpage+1
    End If
    If totalpage<= 1 Then
        Call htmll("", "", ""&JobSortName&""&Separated&"1."&HTMLName&"", "JobsList.Asp", "Page=", 1, "", "")
    Else
        For i = 1 To totalpage
            Call htmll("", "", ""&JobSortName&""&Separated&""&i&"."&HTMLName&"", "JobsList.Asp", "Page=", i, "", "")
            Response.Write "<script>bar_img.width="&Fix((i / totalpage) * 300)&";"
            Response.Write "bar_txt1.innerHTML=""成功生成"&i&"个分类的HTML静态页面。完成比例：" & FormatNumber(i / totalpage * 100) & """;</script>"
            Response.Flush
        Next
    End If
End Sub

Sub HtmlDownSort
    'Call SiteInfo()
	Dim ID,SortPath,rs,sql
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("Select count(ID) from ["&Datapre&"_Download] Where ViewFlag",1)(0)
    totalpage = Int(totalrec / DownInfo)
    If (totalpage * DownInfo)<totalrec Then
        totalpage = totalpage+1
    End If
    If totalpage<= 1 Then
        Call htmll("", "", ""&DownSortName&""&Separated&"1."&HTMLName&"", "DownList.Asp", "Page=", 1, "", "")
    Else
        For i = 1 To totalpage
            Call htmll("", "", ""&DownSortName&""&Separated&""&i&"."&HTMLName&"", "DownList.Asp", "Page=", i, "", "")
        Next
    End If
    sql = "select ID from ["&Datapre&"_DownSort] order by ID desc"
    set rs=db(sql,2)
    If rs.EOF Then
        Class_Num = 0
    Else
        Class_Num = 1
        Do While Not rs.EOF
            ID = rs("ID")
            SortPath = db("select SortPath from ["&Datapre&"_DownSort] Where ViewFlag And ID="&ID,1)(0)
            totalrec = db("Select count(ID) from ["&Datapre&"_Download] where ViewFlag and SortPath Like '%"&SortPath&"%'",1)(0)
            totalpage = Int(totalrec / DownInfo)
            If (totalpage * DownInfo)<totalrec Then
                totalpage = totalpage+1
            End If
            If totalpage<= 1 Then
                Call htmll("", "", ""&DownSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&"", "DownList.Asp", "SortID=", ID, "Page=", 1)
            Else
                For i = 1 To totalpage
                    Call htmll("", "", ""&DownSortName&""&Separated&""&ID&""&Separated&""&i&"."&HTMLName&"", "DownList.Asp", "SortID=", ID, "Page=", i)
                Next
            End If
            Response.Write "<script>bar_img.width="&Fix((Class_Num / rs.recordcount) * 300)&";"
            Response.Write "bar_txt1.innerHTML=""成功生成"&Class_Num&"个分类的HTML静态页面。完成比例：" & FormatNumber(Class_Num / rs.recordcount * 100) & """;</script>"
            Response.Flush
            rs.movenext
            Class_Num = Class_Num + 1
        Loop
    End If
    rs.Close
    Set rs = Nothing
End Sub

Sub HtmlPro
    'Call SiteInfo()
	Dim ID,SortPath,rs,sql
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("select count(ID) from ["&Datapre&"_Products] where Viewflag",1)(0)
    sql = "Select ID from ["&Datapre&"_Products] where ViewFlag order by ID desc"
    Set Rs =db(sql,1)
    If totalrec = 0 Then
        Detail_Num = 0
    Else
        Detail_Num = 1
        Do While Not rs.EOF
            ID = rs("ID")
            Call htmll("", "", ""&ProName&""&Separated&""&ID&"."&HTMLName&"", "ProductView.Asp", "ID=", ID, "", "")
            Response.Write "<script>bar_img.width="&Fix((Detail_Num / totalrec) * 300)&";"
            Response.Write "bar_txt1.innerHTML=""已成功生成静态页"&Detail_Num&"页，完成比例：" & FormatNumber(Detail_Num / totalrec * 100) & """;</script>"
            Response.Flush
            rs.movenext
            Detail_Num = Detail_Num + 1
        Loop
    End If
    rs.Close
    Set rs = Nothing
End Sub

Sub HtmlOther
    'Call SiteInfo()
	Dim ID,SortPath,rs,sql
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("select count(ID) from ["&Datapre&"_Others]",1)(0)
    sql = "Select ID from ["&Datapre&"_Others] order by ID desc"
    Set Rs = db(sql,1)
    If totalrec = 0 Then
        Detail_Num = 0
    Else
        Detail_Num = 1
        Do While Not rs.EOF
            ID = rs("ID")
            Call htmll("", "", ""&OtherName&""&Separated&""&ID&"."&HTMLName&"", "OtherView.Asp", "ID=", ID, "", "")
            Response.Write "<script>bar_img.width="&Fix((Detail_Num / totalrec) * 300)&";"
            Response.Write "bar_txt1.innerHTML=""已成功生成静态页"&Detail_Num&"页，完成比例：" & FormatNumber(Detail_Num / totalrec * 100) & """;</script>"
            Response.Flush
            rs.movenext
            Detail_Num = Detail_Num + 1
        Loop
    End If
    rs.Close
    Set rs = Nothing
End Sub

Sub HtmlNews
    'Call SiteInfo()
	Dim ID,SortPath,rs,sql
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("select count(ID) from ["&Datapre&"_News]",1)(0)
    sql = "Select ID from ["&Datapre&"_News] order by ID desc"
    Set Rs = db(sql,1)
    If totalrec = 0 Then
        Detail_Num = 0
    Else
        Detail_Num = 1
        Do While Not rs.EOF
            ID = rs("ID")
            Call htmll("", "", ""&NewName&""&Separated&""&ID&"."&HTMLName&"", "NewsView.Asp", "ID=", ID, "", "")
            Response.Write "<script>bar_img.width="&Fix((Detail_Num / totalrec) * 300)&";"
            Response.Write "bar_txt1.innerHTML=""已成功生成静态页"&Detail_Num&"页，完成比例：" & FormatNumber(Detail_Num / totalrec * 100) & """;</script>"
            Response.Flush
            rs.movenext
            Detail_Num = Detail_Num + 1
        Loop
    End If
    rs.Close
    Set rs = Nothing
End Sub
Sub HtmlJob
    'Call SiteInfo()
	Dim ID,SortPath,rs,sql
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("select count(ID) from ["&Datapre&"_Jobs]",1)(0)
    sql = "Select ID from ["&Datapre&"_Jobs] order by ID desc"
    Set Rs = db(sql,1)
    If totalrec = 0 Then
        Detail_Num = 0
    Else
        Detail_Num = 1
        Do While Not rs.EOF
            ID = rs("ID")
            Call htmll("", "", ""&JobNameDiy&""&Separated&""&ID&"."&HTMLName&"", "JobsView.Asp", "ID=", ID, "", "")
            Response.Write "<script>bar_img.width="&Fix((Detail_Num / totalrec) * 300)&";"
            Response.Write "bar_txt1.innerHTML=""已成功生成静态页"&Detail_Num&"页，完成比例：" & FormatNumber(Detail_Num / totalrec * 100) & """;</script>"
            Response.Flush
            rs.movenext
            Detail_Num = Detail_Num + 1
        Loop
    End If
    rs.Close
    Set rs = Nothing
End Sub

Sub HtmlInfo
    'Call SiteInfo()
	Dim ID,SortPath,rs,sql
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("select count(ID) from ["&Datapre&"_About]",1)(0)
    sql = "Select ID from ["&Datapre&"_About] order by OrderNum,ID desc"
    Set Rs = db(sql,1)
    If totalrec = 0 Then
        Detail_Num = 0
    Else
        Detail_Num = 1
        Do While Not rs.EOF
            ID = rs("ID")
            Call htmll("", "", ""&AboutNameDiy&""&Separated&""&ID&"."&HTMLName&"", "About.Asp", "ID=", ID, "", "")
            Response.Write "<script>bar_img.width="&Fix((Detail_Num / totalrec) * 300)&";"
            Response.Write "bar_txt1.innerHTML=""已成功生成静态页"&Detail_Num&"页，完成比例：" & FormatNumber(Detail_Num / totalrec * 100) & """;</script>"
            Response.Flush
            rs.movenext
            Detail_Num = Detail_Num + 1
        Loop
    End If
    rs.Close
    Set rs = Nothing
End Sub

Sub HtmlDown
   ' Call SiteInfo()
   Dim ID,SortPath,rs,sql
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("select count(ID) from ["&Datapre&"_Download]",1)(0)
    sql = "Select ID from ["&Datapre&"_Download] order by ID desc"
    Set Rs = db(sql,1)
    If totalrec = 0 Then
        Detail_Num = 0
    Else
        Detail_Num = 1
        Do While Not rs.EOF
            ID = rs("ID")
            Call htmll("", "", ""&DownNameDiy&""&Separated&""&ID&"."&HTMLName&"", "DownView.Asp", "ID=", ID, "", "")
            Response.Write "<script>bar_img.width="&Fix((Detail_Num / totalrec) * 300)&";"
            Response.Write "bar_txt1.innerHTML=""已成功生成静态页"&Detail_Num&"页，完成比例：" & FormatNumber(Detail_Num / totalrec * 100) & """;</script>"
            Response.Flush
            rs.movenext
            Detail_Num = Detail_Num + 1
        Loop
    End If
    rs.Close
    Set rs = Nothing
End Sub

Sub HtmlIndex
   ' Call SiteInfo()
   Dim ID,SortPath,rs,sql
	Dim Class_Num,totalrec,totalpage,Detail_Num 
    totalrec = db("Select count(ID) from ["&Datapre&"_Products] Where ViewFlag",1)(0)
    totalpage = Int(totalrec / ProInfo)
    If (totalpage * ProInfo)<totalrec Then
        totalpage = totalpage+1
    End If
    Call htmll("", "", "Index."&HTMLname&"", "Index.Asp", "", "", "", "")
    Response.Write "<script>bar_img.width="&Fix((1 / 8) * 300)&";bar_txt1.innerHTML=""成功生成首页。完成比例" & FormatNumber(1 / 8 * 100) & """;</script>"
    Response.Flush
    Call htmll("", "", ""&AboutNameDiy&"."&HTMLname&"", "Company.Asp", "", "", "", "")
    Response.Write "<script>bar_img.width="&Fix((2 / 8) * 300)&";bar_txt1.innerHTML=""成功生成“关于我们”静态页面。完成比例：" & FormatNumber(2 / 8 * 100) & """;</script>"
    Response.Flush
    Call htmll("", "", ""&NewSortName&"."&HTMLname&"", "NewsList.Asp", "", "", "", "")
    Response.Write "<script>bar_img.width="&Fix((3 / 8) * 300)&";bar_txt1.innerHTML=""成功生成“新闻列表”静态页面。完成比例：" & FormatNumber(3 / 8 * 100) & """;</script>"
    Response.Flush
    Call htmll("", "", ""&ProSortName&"."&HTMLname&"", "ProductList.Asp", "", "", "", "")
    Response.Write "<script>bar_img.width="&Fix((4 / 8) * 300)&";bar_txt1.innerHTML=""成功生成“产品列表”静态页面。完成比例：" & FormatNumber(4 / 8 * 100) & """;</script>"
    Response.Flush
    Call htmll("", "", ""&JobSortName&"."&HTMLname&"", "JobsList.Asp", "", "", "", "")
    Response.Write "<script>bar_img.width="&Fix((5 / 8) * 300)&";bar_txt1.innerHTML=""成功生成“人才列表”静态页面。完成比例：" & FormatNumber(5 / 8 * 100) & """;</script>"
    Response.Flush
    Call htmll("", "", ""&DownSortName&"."&HTMLname&"", "DownList.Asp", "", "", "", "")
    Response.Write "<script>bar_img.width="&Fix((6 / 8) * 300)&";bar_txt1.innerHTML=""成功生成“下载列表”静态页面。完成比例：" & FormatNumber(6 / 8 * 100) & """;</script>"
    Response.Flush
    Call htmll("", "", ""&OtherSortName&"."&HTMLname&"", "OtherList.Asp", "", "", "", "")
    Response.Write "<script>bar_img.width="&Fix((7 / 8) * 300)&";bar_txt1.innerHTML=""成功生成“其他信息列表”静态页面。完成比例：" & FormatNumber(7 / 8 * 100) & """;</script>"
    Response.Flush
    conn.Close
    Set conn = Nothing
End Sub
' Ss简单网站管理系统-开源版 
'晴天设计www.xxzwz.com
%>