<!--#include file="../Include/Const.Asp" -->
<!--#include file="../Include/ConnSiteData.Asp" -->
<!--#include file="../Include/System_Language.asp" -->
<!--#include file="../Include/Version.Asp" -->
<!--#include file="CheckAdmin.Asp"-->

<!--#Include file="Keyicms_css.Asp"-->
<div class="row" style=" background:#eee;">	
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h2><i class="fa fa-tasks"></i>页面生成进度</h2>
            </div>
            <div class="panel-body">
                <div class="progress">
                    <div style="width: 0;" aria-valuemax="100" aria-valuemin="0" aria-valuenow="60" role="progressbar" class="progress-bar" id="progress-bar">
                        0%
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<%
Call SiteInfo()
Ke01 = request.QueryString("Ke01")
If Ke01 = "PC" Then sql = "Select * from keyicms_Apage where ViewFlag"
If Ke01 = "Mobile" Then sql = "Select * from keyicms_Apage where MobileFlag"
Set rshtml = Conn.Execute(sql)
If not rshtml.eof Then
	do while not rshtml.eof
		ID = rshtml("ID")&","&ID
		rshtml.movenext
	loop
	ID = left(ID, len(ID)-1)
End If
rshtml.close : set rshtml = Nothing
%>
<script>
$(window.parent.document).find("#html_Bar").css("height", $(".row").css("height"))
$.ajax({
	type: "Get",
	url: "../Html/html_Ajax.Asp",  
	data: "DataTable=Apage&Ke01=<%=request.QueryString("Ke01")%>",
	cache: false, 
	beforeSend: function(){
		$("#progress-bar").css("background", "url(Ke01/img/progress.gif)")
		$("#progress-bar").css("width", "100%")
		$("#progress-bar").html("生成中...")
	},
	success: function(Msg){
		$("#progress-bar").css("background", "")
		$("#progress-bar").html("生成成功")
		$("#progress").append("<dl>" + Msg + "</dl>")

		$(window.parent.document).find("#html_Bar").css("height", $(".row").css("height"))
	},
	error: function(Msg){
		$("#progress-bar").css("background", "")
		$("#progress-bar").html("生成失败")
		$("#progress").append("<div class='form-group'><div class='col-md-12'><p class='form-control-static'>" + Msg + "</p></div></div>")

		$(window.parent.document).find("#html_Bar").css("height", $(".row").css("height"))
	}
})
</script>