<!--#include file="conn.asp"-->
<!--#include file="inc/cook2.asp"-->
<!--#include file="inc/dimflag.asp" -->
<!--#include file="top.asp"-->
<!--#include file="inc/htmlconfig.asp"-->
<%
tid=request.QueryString("tid")

if tid=1 then
htmlpage="news_show"
end if
%>
<div id="container">
<div class="top_but">
 <li class="left">&nbsp;</li>
 <li><a href="news_add.asp?tid=<%=tid%>"><img src="images/but_1.gif" alt="添加" ></a></li>
 <li><a href="news_manage.asp?tid=<%=tid%>"><img src="images/but_11.gif" alt="管理"></a></li>
 <li><a href="?tid=<%=tid%>"><img src="images/but_10.gif" alt="生成页面" ></a></li>
 <li><img src="images/but_8.gif" alt="刷新" onClick="window.location.reload(true);"></li>
 <li><img src="images/but_9.gif" alt="打印" onClick="window.print() "/></li>
</div>
<div class="tableAll titlebgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:700px;">生成静态页面</li>
</div>

<div class="html titlebgcolor" style="padding-left:35px;">
<%
call Htmlcall()
%>
</div>
</div>
<!--#include file="footer.asp"-->
<%
totalrec=Conn.Execute("select count(*) from com_news where type="&tid&"")(0)
sql="Select * from com_news where type="&tid&" order by ID desc"
Set Rs=Conn.Execute(sql)
if totalrec=0 then
Detail_Num=0
Else
Detail_Num=1
do while not rs.eof
CID=rs("cid")
ID=rs("id")

call htmll(""&HTMLname1_cn&"",""&HTMLname2_cn&"",""&HTMLname3_cn&htmlpage&"_"&CID&"_"&ID&".html",""&htmlpage&".asp","typeid=",CID,"id=",ID,"","")
if Const_webEn=1 then call htmll(""&HTMLname1_en&"",""&HTMLname2_en&"",""&HTMLname3_en&htmlpage&"_"&CID&"_"&ID&".html",""&htmlpage&".asp","typeid=",CID,"id=",ID,"","") end if
if Const_webUtf=1 then call htmll(""&HTMLname1_utf&"",""&HTMLname2_utf&"",""&HTMLname3_utf&htmlpage&"_"&CID&"_"&ID&".html",""&htmlpage&".asp","typeid=",CID,"id=",ID,"","") end if

Response.Write "<script>bar_img.width="&Fix((Detail_Num/totalrec)*200)&";"
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
conn.close
set conn=Nothing
%>