<!--#include file="conn.asp"-->
<!--#include file="../../inc/function.asp"-->
<!--#include file="_html_fun.asp"-->
<!--#include file="../../../include/Lebi_Db_cls.asp"-->
<!--#include file="../../../include/lebi_cache_cls.asp"-->
<!--#include file="../../../include/lebi_cache.asp"-->
<!--#include file="_html_lang.asp"-->
<!--#include file="../../../include/lebi_main.asp"-->
<!--#include file="../../../include/lebi_item/item_help_class_fn.asp"-->
<%
'**************************************
'* 最后更新 2012-05-20 by 56770.kingdge
'* copyright www.56770.com
'**************************************
server.scripttimeout =99999
html_page="1"
eshop_url = replace(eshop_url,"/tohtml/","/")
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<style type="text/css">
body{margin-top:0px;margin-left:0px;position:absolute;background-color:#ffffff;font-size:11px;}
td{font-size:11px;}
</style>
<body>
<!--#include file="../../../include/lebi_function.asp"-->
<!--#include file="../../../include/lebi_page_cls.asp"-->
<%
admin_flag=",12.6,"
if request.cookies(cookiesname)("admin_name")="" or instr(","&request.cookies(cookiesname)("flag")&",",admin_flag)=0 then
		response.write("没有操作此功能的权限！")
		response.end
end if
if show_html <> 1 then
		response.write("请先选择静态模式(HTML)！")
		response.end
end if
news_type=request("type")
if not isnumeric(news_type) or isempty(news_type) then news_type = "0"
stoptime=request("stoptime")
if not isnumeric(stoptime) or isempty(stoptime) then stoptime = "3"
nextid=request("nextid")
if not isnumeric(nextid) or isempty(nextid) then nextid = "0"
set rs = conn.execute("select top 1 type_id from [lebi_helptype] order by type_id desc")
lastid = rs(0)
rs.close : set rs = nothing
write_lebi_eshop("<div id=""table_sort"">")
write_lebi_eshop("<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"">")
write_lebi_eshop("<td width=""300"" align=""left"">")
write_lebi_eshop("<table width=""300"" border=""0"" cellspacing=""1"" cellpadding=""1"" height=""8"" bgcolor=""#b2b2a6""><tr><td bgcolor=ffffff height=""8""><img src=""../../images/bar.gif"" width=0 height=8 id=bar_p_img name=bar_p_img align=absmiddle></td></tr></table></td>")
write_lebi_eshop("<td><span id=bar_p_txt2 name=bar_p_txt2 style=""font-size:9pt;color:red;""></span><span id=bar_p_txt1 name=bar_p_txt1 style=""font-size:9pt"">0</span><span style=""font-size:9pt"">%</span></td></tr></table></div>")
dim body_help
set fs=server.createobject("scripting.filesystemobject")
if fs.folderexists(server.mappath("../../../"& LangPath & folder(6)))=false then
        fs.createfolder(server.mappath("../../../"& LangPath & folder(6)))
end if
s_text=loadfile("../../text/lebi_help"& LangTxt &".text")
skin_body = LoadFile("../../../skins/"& template &"/template/help_list.htm")
sitename = trim(split(s_text,"$$$")(0))
description = trim(split(s_text,"$$$")(2))
keywords = trim(split(s_text,"$$$")(3))
sql_i = "select type_id from [lebi_help] where 1=1"
if news_type="0" then sql_i = sql_i &" and syxs=1"
if news_type<>"0" and news_type<>"56770" then sql_i = sql_i &" and type_id="& news_type &""
if news_type<>"0" and news_type="56770" then sql_i = sql_i &" and type_id="& nextid &""
sql_i = sql_i &" order by id desc"
set rs_i = server.createobject("adodb.recordset")
rs_i.open sql_i,conn,1,1
rs_i.pagesize = top25
if rs_i.eof then
        pagecounts = 1
		id = "56770"
else
		if news_type <> 0 then id = rs_i("type_id")
	    pagecounts = rs_i.pagecount
end if
if news_type = 0 then
        newstype = lebi_word(22)
else
        if news_type="56770" then
		        news_type = nextid
		        oldnewstype = "56770"
		else
		        oldnewstype = news_type
		end if
        sql = "select newstype from [lebi_helptype] where type_id = "& news_type &""
		set rs = conn.execute(sql)
        if not rs.eof then
                newstype = rs(0)
        end if
        rs.close : set rs = nothing
end if
for page = 1 to pagecounts
        rem ----------------------------------------------------------------------------
		write_lebi_eshop("<script>bar_p_img.width=" & fix((page/pagecounts) * 300) & ";")
		write_lebi_eshop("bar_p_txt1.innerHTML=""当前分页数 " & page & " ，完成 " & formatnumber2(page/pagecounts*100) & """;")
		write_lebi_eshop("bar_p_img.title=""成功生成分页数 (" & page & ") "";</script>")
		response.flush
		%><!--#include file="../../../include/lebi_item/item_help_class.asp"--><%
		if news_type = 0 then
                HtmlName = "../../../"& LangPath & folder(6) &"news."& page &"."& Sys_Ext
		else
		        HtmlName = "../../../"& LangPath & folder(6) & news_type&"."& page &"."& Sys_Ext
		end if
		savehtml HtmlName,html_splits(skin_body)
        rem -----------------------------------------------------------------------------------------
next
if oldnewstype="56770" then
        if clng(news_type) < clng(lastid) then
                set rs = conn.execute("select top 1 type_id from [lebi_helptype] where type_id>"& nextid &" order by type_id asc")
                nextid = rs(0)
                rs.close : set rs = nothing
				write_lebi_eshop("<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"" class=""classlist""><tr><td class=classtd>·缓解服务器压力，<font color=red><span id=""resettime"">0</span></font> 秒后生成任务继续执行...</td></tr></table>")
				write_lebi_eshop("<script>document.getElementById(""table_sort"").style.display=""none"";</script>")
				write_lebi_eshop("<script language=""JavaScript"">Url=""?type="&oldnewstype&"&Nextid="&Nextid&"&stoptime="&stoptime&""";if (!Url){Url=document.referrer}function countDown(secs){document.getElementById(""resettime"").innerHTML=secs;if(--secs>0) {setTimeout(""countDown(""+secs+"")"",1000);}else {window.location.href=Url;}}countDown("&stoptime&");</script>")
		else
        		write_lebi_eshop("<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"" class=""classlist""><tr><td class=classtd>·全部分类生成完毕！</td></tr></table>")
				write_lebi_eshop("<script>document.getElementById(""table_sort"").style.display=""none"";</script>")
		end if
end if
rs_i.close:set rs_i=nothing
write_lebi_eshop("<script>bar_p_img.width=300;bar_p_txt2.innerHTML='';bar_p_txt1.innerHTML=""100"";</script>")
%>
</body>
</html>