<!--#include file="../Include/Head.asp"-->

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="../Main/Right.asp">首页</a></li>
    <li><a href="Html.asp">静态化管理</a></li>
    </ul>
    </div>
    
    <div class="formbody">
        <div class="formtitle"><span>基本设置</span></div>
        <ul class="forminfo">
        <li><a href="?Html=Nav">导航静态化</a><i></i></li>
        <li></li>
        <li><a href="?Html=AList">新闻列表页静态化</a><i></i></li>
        <li><a href="?Html=ADetail">新闻内页静态化</a><i></i></li>
        <li></li>
        <li><a href="?Html=PList">产品列表页静态化</a><i></i></li>
        <li><a href="?Html=PDetail">产品内页静态化</a><i></i></li>
        <li></li>
        <li><a href="?Html=JobList">招聘列表页静态化</a><i></i></li>
        <li><a href="?Html=JobDetail">招聘内页静态化</a><i></i></li>
        <li></li>
        <li><a href="?Html=JinCms">单页静态化</a><i></i></li>
        <li>
        <form name="form" method="post" action="?Html=Page">
        <input type="text" name="aspPage" id="aspPage" style="border:1px solid ccc;" /> 
        <input type="text" name="htmlPage" id="htmlPage" style="border:1px solid ccc;" /> 
        <input type="submit" value="静态化" />
        </form>
        </li>
        <li>
        
        </li>
        </ul>
        <div style="width:90%; margin-left:23px; float:left;">
        <span style="width:300px; border: #ccc 1px solid; float:left"><img src="../Images/Survey_3.gif" width="0" height="16" id="bar_img" name="bar_img" align="absmiddle" ></span>
        <span id="bar_txt1" name="bar_txt1" style="font-size:12px; float:left; margin-left:10px;">0</span><span style="font-size:12px; float:left;">%</span>
        </div>
        
        <div id="htmllist" style="width:90%; float:left; margin-top:15px; margin-left:23px"></div>
        
    </div>

<%
mainurl = "http://"&Request.ServerVariables("HTTP_HOST") 
act = Request_QueryString("Html")
Select Case act
	'--------------------------  自定义静态化  ——--------------------
	Case "Nav"
	
		SQL = "SELECT * FROM Jin_Class WHERE ModuleID="&Web_ModuleID&" and ParentID=0 and ShowNav ORDER BY RootID,OrdeRs"
		Set Rs = Server.CreateObject("ADODB.Recordset")
		Rs.Open SQL, Conn, 1, 1
		For i=1 To Rs.Recordcount
		call getHtml( "Index.asp"&Rs("Url") , Rs("ClassName_en")&".Html" ) 
		If Rs("Child")>0 Then
			SQLa = "SELECT * FROM Jin_Class WHERE ModuleID="&Web_ModuleID&" and ParentID="&Rs("ID")&" and ShowNav ORDER BY RootID,OrdeRs"
			Set Rsa = Server.CreateObject("ADODB.Recordset")
			Rsa.Open SQLa, Conn, 1, 1
			For j=1 To Rsa.Recordcount
			IndexNum=Rsa.recordcount
			If Web_HtmlType=1 then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID") , "Class"&Rsa("ID")&".html" ) 
			If Web_HtmlType=2 then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID") , Rsa("ClassName_en")&".html" ) 
			If Web_HtmlType=3 then 
				If Rsa("ClassName_en")<>"" Then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID") , Rsa("ClassName_en")&".html" ) Else call getHtml( "Index.asp?page:"&Rsa("ClassName")&"@"&Rsa("ID") , Rsa("ClassName_en")&".html" )
			End If
			Response.Write "<script>bar_img.width="&Fix((j / IndexNum) * 300)&";"
			Response.Write "bar_txt1.innerHTML=""成功生成"&j&"个HTML静态页面，完成比例：" & FormatNumber(j / IndexNum * 100) & """;</script>"
			Response.Flush
			
			Rsa.movenext
			Next
			Rsa.Close
			Set Rsa = Nothing
		End If
		Rs.movenext
		Next
		Rs.Close
		Set Rs = Nothing
	

	'--------------------------  文章列表页静态化  ——--------------------
	Case "AList"
		
		SQLa = "SELECT * FROM Jin_Class WHERE ModuleID="&Web_ModuleID&" and ClassType='Article' and ShowNav ORDER BY RootID,OrdeRs"
		Set Rsa = Server.CreateObject("ADODB.Recordset")
		Rsa.Open SQLa, Conn, 1, 1
		For j=1 To Rsa.Recordcount
			Set Rs=server.createobject("adodb.recordSet")
			Sql="select * from Jin_Article where (title<>'' And Verify And Pid in ("&Rsa("ChildStr")&")) order by sysID desc"
			Rs.Open Sql,Conn,1,1
			ListPageSize=Web_PageSizeA
			'显示页数
			AllCount=Rs.RecordCount
			Pages=Fix(AllCount/ListPageSize)
			If Pages*ListPageSize<AllCount Then Pages=Pages+1	
			For i=1 To Pages
				If Web_HtmlType=1 then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID")&"_"&i , "Class"&Rsa("ID")&"_"&i&".html" ) 
				If Web_HtmlType=2 then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID")&"_"&i , Rsa("ClassName_en")&"_"&i&".html" ) 
				If Web_HtmlType=3 then 
					If Rsa("ClassName_en")<>"" Then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID")&"_"&i , Rsa("ClassName_en")&"_"&i&".html" ) Else call getHtml( "Index.asp?page:"&Rsa("ClassName")&"@"&Rsa("ID")&"_"&i , Rsa("ClassName_en")&"_"&i&".html" )
				End If
				Response.Write "<script>bar_img.width="&Fix((i / Pages) * 300)&";"
				Response.Write "bar_txt1.innerHTML=""成功生成"&i&"个HTML静态页面，完成比例：" & FormatNumber(i / Pages * 100) & """;</script>"
				Response.Flush
			Rs.MoveNext
			Next
			Rs.Close
			Set Rs=nothing
		
		Rsa.movenext
		Next
		Rsa.Close
		Set Rsa = Nothing
	
	'--------------------------  新闻内页静态化  ——--------------------
	Case "ADetail"
	
	
		Set Rs=server.createobject("adodb.recordSet")
		Sql="select * from Jin_Article where (title<>'' And Verify) order by sysID desc"
		Rs.Open Sql,Conn,1,1
		AllCount=Rs.RecordCount
		For i=1 To AllCount
			If Web_HtmlType=1 Then call getHtml( "Index.asp?page:Article@"&Rs("sysID") , "Article/"&Rs("sysID")&".Html" )
			If Web_HtmlType=2 Then call getHtml( "Index.asp?page:Article@"&Rs("sysID") , "Article/"&getDate(Rs("Addtime"),"YMDHMS")&".Html" )
			If Web_HtmlType=3 Then 
			If Rs("PageName")<>"" Then call getHtml( "Index.asp?page:Article@"&Rs("sysID") , "Article/"&Rs("PageName")&".Html" ) else call getHtml( "Index.asp?page:Article@"&Rs("sysID") , "Article/"&Rs("Title")&".Html" )
			End If
			Response.Write "<script>bar_img.width="&Fix((i / AllCount) * 300)&";"
			Response.Write "bar_txt1.innerHTML=""成功生成"&i&"个HTML静态页面，完成比例：" & FormatNumber(i / AllCount * 100) & """;</script>"
			Response.Flush
		Rs.MoveNext
		Next
		Rs.Close
		Set Rs=nothing
		
		
	'--------------------------  产品列表页静态化  ——--------------------
	Case "PList"
		
		SQLa = "SELECT * FROM Jin_Class WHERE ModuleID="&Web_ModuleID&" and ClassType='Photos' and ShowNav ORDER BY RootID,OrdeRs"
		Set Rsa = Server.CreateObject("ADODB.Recordset")
		Rsa.Open SQLa, Conn, 1, 1
		For j=1 To Rsa.Recordcount
			Set Rs=server.createobject("adodb.recordSet")
			Sql="select * from Jin_Photos where (title<>'' And Verify And Pid in ("&Rsa("ChildStr")&")) order by sysID desc"
			Rs.Open Sql,Conn,1,1
			ListPageSize=Web_PageSizeB
			'显示页数
			AllCount=Rs.RecordCount
			Pages=Fix(AllCount/ListPageSize)
			If Pages*ListPageSize<AllCount Then Pages=Pages+1	
			For i=1 To Pages
				If Web_HtmlType=1 then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID")&"_"&i , "Class"&Rsa("ID")&"_"&i&".html" ) 
				If Web_HtmlType=2 then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID")&"_"&i , Rsa("ClassName_en")&"_"&i&".html" ) 
				If Web_HtmlType=3 then 
					If Rsa("ClassName_en")<>"" Then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID")&"_"&i , Rsa("ClassName_en")&"_"&i&".html" ) Else call getHtml( "Index.asp?page:"&Rsa("ClassName")&"@"&Rsa("ID")&"_"&i , Rsa("ClassName_en")&"_"&i&".html" )
				End If
				Response.Write "<script>bar_img.width="&Fix((i / Pages) * 300)&";"
				Response.Write "bar_txt1.innerHTML=""成功生成"&i&"个HTML静态页面，完成比例：" & FormatNumber(i / Pages * 100) & """;</script>"
				Response.Flush
			Rs.MoveNext
			Next
			Rs.Close
			Set Rs=nothing
		
		Rsa.movenext
		Next
		Rsa.Close
		Set Rsa = Nothing
	

			
	'--------------------------  产品内页静态化  ——--------------------
	Case "PDetail"
	
	
		Set Rs=server.createobject("adodb.recordSet")
		Sql="select * from Jin_Photos where (title<>'') order by sysID desc"
		Rs.Open Sql,Conn,1,1
		AllCount=Rs.RecordCount
		For i=1 To AllCount
			If Web_HtmlType=1 Then call getHtml( "Index.asp?page:Product@"&Rs("sysID") , "Product/"&Rs("sysID")&".Html" )
			If Web_HtmlType=2 Then call getHtml( "Index.asp?page:Product@"&Rs("sysID") , "Product/"&getDate(Rs("Addtime"),"YMDHMS")&".Html" )
			If Web_HtmlType=3 Then 
			If Rs("PageName")<>"" Then call getHtml( "Index.asp?page:Product@"&Rs("sysID") , "Product/"&Rs("PageName")&".Html" ) else call getHtml( "Index.asp?page:Product@"&Rs("sysID") , "Product/"&Rs("Title")&".Html" )
			End If
			
			Response.Write "<script>bar_img.width="&Fix((i / AllCount) * 300)&";"
			Response.Write "bar_txt1.innerHTML=""成功生成"&i&"个HTML静态页面，完成比例：" & FormatNumber(i / AllCount * 100) & """;</script>"
			Response.Flush
		Rs.MoveNext
		Next
		Rs.Close
		Set Rs=nothing
			
	
		
	'--------------------------  产品列表页静态化  ——--------------------
	Case "JobList"
		
		SQLa = "SELECT * FROM Jin_Class WHERE ModuleID="&Web_ModuleID&" and ClassType='Jobs' and ShowNav ORDER BY RootID,OrdeRs"
		Set Rsa = Server.CreateObject("ADODB.Recordset")
		Rsa.Open SQLa, Conn, 1, 1
		For j=1 To Rsa.Recordcount
			Set Rs=server.createobject("adodb.recordSet")
			Sql="select * from Jin_Jobs where (datediff('d','"&getDate(Now(),"Y-M-D")&"',EndDate)>=0 And Pid in ("&Rsa("ChildStr")&")) order by sysID desc"
			Rs.Open Sql,Conn,1,1
			ListPageSize=Web_PageSizeE
			'显示页数
			AllCount=Rs.RecordCount
			Pages=Fix(AllCount/ListPageSize)
			If Pages*ListPageSize<AllCount Then Pages=Pages+1	
			For i=1 To Pages
				If Web_HtmlType=1 then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID")&"_"&i , "Class"&Rsa("ID")&"_"&i&".html" ) 
				If Web_HtmlType=2 then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID")&"_"&i , Rsa("ClassName_en")&"_"&i&".html" ) 
				If Web_HtmlType=3 then 
					If Rsa("ClassName_en")<>"" Then call getHtml( "Index.asp?page:"&Rsa("ClassName_en")&"@"&Rsa("ID")&"_"&i , Rsa("ClassName_en")&"_"&i&".html" ) Else call getHtml( "Index.asp?page:"&Rsa("ClassName")&"@"&Rsa("ID")&"_"&i , Rsa("ClassName_en")&"_"&i&".html" )
				End If
				Response.Write "<script>bar_img.width="&Fix((i / Pages) * 300)&";"
				Response.Write "bar_txt1.innerHTML=""成功生成"&i&"个HTML静态页面，完成比例：" & FormatNumber(i / Pages * 100) & """;</script>"
				Response.Flush
			Rs.MoveNext
			Next
			Rs.Close
			Set Rs=nothing
		
		Rsa.movenext
		Next
		Rsa.Close
		Set Rsa = Nothing
		
		
	'--------------------------  产品列表页静态化  ——--------------------
	Case "JobDetail"
	
		Set Rs=server.createobject("adodb.recordSet")
		Sql="select * from Jin_Jobs order by sysID desc"
		Rs.Open Sql,Conn,1,1
		AllCount=Rs.RecordCount
		For i=1 To AllCount
			If Web_HtmlType=1 Then call getHtml( "Index.asp?page:Job@"&Rs("sysID") , "Job/"&Rs("sysID")&".Html" )
			If Web_HtmlType=2 Then call getHtml( "Index.asp?page:Job@"&Rs("sysID") , "Job/"&getDate(Rs("Addtime"),"YMDHMS")&".Html" )
			If Web_HtmlType=3 Then 
			If Rs("PageName")<>"" And not isnull(Rs("PageName")) Then call getHtml( "Index.asp?page:Job@"&Rs("sysID") , "Job/"&Rs("PageName")&".Html" ) else call getHtml( "Index.asp?page:Job@"&Rs("sysID") , "Job/"&Rs("Position")&".Html" )
			End If
			Response.Write "<script>bar_img.width="&Fix((i / AllCount) * 300)&";"
			Response.Write "bar_txt1.innerHTML=""成功生成"&i&"个HTML静态页面，完成比例：" & FormatNumber(i / AllCount * 100) & """;</script>"
			Response.Flush
		Rs.MoveNext
		Next
		Rs.Close
		Set Rs=nothing
		
		
	'--------------------------  单页静态化  ——--------------------
	Case "JinCms"
	
		Set Rs=server.createobject("adodb.recordSet")
		Sql="select * from Jin_Page order by sysID desc"
		Rs.Open Sql,Conn,1,1
		AllCount=Rs.RecordCount
		For i=1 To AllCount
			If Web_HtmlType=1 Then call getHtml( "Index.asp?page:JinCms@"&Rs("sysID") , "JinCms/"&Rs("sysID")&".Html" )
			If Web_HtmlType=2 Then call getHtml( "Index.asp?page:JinCms@"&Rs("sysID") , "JinCms/"&getDate(Rs("Addtime"),"YMDHMS")&".Html" )
			If Web_HtmlType=3 Then 
			If Rs("PageName")<>"" And not isnull(Rs("PageName")) Then call getHtml( "Index.asp?page:JinCms@"&Rs("sysID") , "JinCms/"&Rs("PageName")&".Html" ) else call getHtml( "Index.asp?page:JinCms@"&Rs("sysID") , "JinCms/"&Rs("Title")&".Html" )
			End If
			Response.Write "<script>bar_img.width="&Fix((i / AllCount) * 300)&";"
			Response.Write "bar_txt1.innerHTML=""成功生成"&i&"个HTML静态页面，完成比例：" & FormatNumber(i / AllCount * 100) & """;</script>"
			Response.Flush
		Rs.MoveNext
		Next
		Rs.Close
		Set Rs=nothing
		

End Select
%>
    

</body>

</html>

<%
connclose()
%>
