<%Server.ScriptTimeout=900%>
<!--#include file="../Include/QvodCms.Lable.asp"-->
<!--#include file="QvodCms_Function.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<TITLE>网站生成管理</TITLE>
<link href="skins/css/jaja_main.css" rel="stylesheet" type="text/css" />
<style type="text/css">
h1{font-size:14px; color:#FF0000;}
td{text-align:left}
form{padding:0;margin:0}
</style>
</head>
<body> 
<%Dim Action
Dim StrTemp,StrPath,CurrentPage,nCurrentPage,AllPages,PageStr,iPages,allclassday,data_playurl,data_playpath,allid,newsTimes,newsContent
Action=Trim(Request.QueryString("action"))
allid=Trim(Request.Form("data_id"))'批量影片ID
List_Id=QvodCms_CLng(Request("ClassId"))
class_id=QvodCms_CLng(Request("class_id"))
CurrentPage=QvodCms_CLng(Request.QueryString("Page")) : If CurrentPage<1 Then CurrentPage=1
nCurrentPage=QvodCms_CLng(Request.QueryString("Page")) : If nCurrentPage<1 Then nCurrentPage=1
name_id=QvodCms_CLng(Request.QueryString("dataid"))
data_py=Trim(Request.QueryString("data_py"))
data_playurl=Trim(Request.QueryString("data_playurl"))
data_playpath=Trim(Request.QueryString("data_playpath"))
Data_Id=QvodCms_CLng(Request.QueryString("dataid"))
PlayJD=QvodCms_CLng(Request.QueryString("PlayJD"))
PlaySv=QvodCms_CLng(Request.QueryString("PlaySv"))
iPages=QvodCms_CLng(Request.QueryString("iPages"))
allclassday=Trim(Request.QueryString("allclassday"))
PageType=Trim(Request.QueryString("PageType"))
newsid=QvodCms_CLng(Request.QueryString("id"))
newsTimes=Trim(Request.QueryString("newsTimes"))
Call OpenConn()
Select  Case Lcase(Action)
	Case "data" : CheckHtml : makeDataClass : ClearObj
	Case "dataid" : CheckHtml : makeDataById : ClearObj
	Case "alldata" : CheckHtml : makeAllData : ClearObj
	Case "class" : CheckHtml : makeClass : ClearObj
	Case "allclass" : CheckHtml : makeAllClass : ClearObj
	Case "index" : CheckHtml : makeIndex : ClearObj
	Case "day" : CheckHtml : makeDataDay : ClearObj
	Case "other" : makeOther : ClearObj
	Case "othertime" : CheckHtml : makeOtherData : ClearObj
	Case "othernew" : CheckHtml : makeOtherData : ClearObj
	Case "otherid" : CheckHtml : makeOtherData : ClearObj
	Case "otherallid" : CheckHtml : makeOtherData : ClearObj
	Case "map" : makeMap : ClearObj
	Case "top" : makeTop : ClearObj'排行榜
	Case "site" : CheckHtml : makeSite
	Case "newsall" : CheckHtml : makeAllNews : ClearObj
	Case "newstime" : CheckHtml : makeDataNews : ClearObj
	Case "newsdata" : CheckHtml : makeDataNews : ClearObj
	Case "newsotherid" : CheckHtml : makeDataNews : ClearObj
	Case "newsotherallid" : CheckHtml : makeDataNews : ClearObj
	Case "newsclass" : CheckHtml : makeClassNews : ClearObj
	Case "allnewsclass" : CheckHtml : makeAllClassNews : ClearObj
	Case Else : main
End Select

Function GetClassTongJi(str)
	Set Shu=Conn.Execute("Select count(name_id) from qvodcms_class a  inner join qvodcms_name b on a.class_id=b.class_id where (a.class_id="&str&" or  a.class_bigid="&str&")")
	'Sql="Select count(name_id) from jaja_class a  inner join jaja_name b on a.class_id=b.class_id where (a.class_id="&str&" or  a.class_bigid="&str&")"
	GetClassTongJi=Shu(0)
	Set Shu=Nothing
End Function

Sub	makeMap
    On Error Resume Next
    Dim allmovie,allclass,sqltop,alldata:allmovie=""
	if QvodCms_CLng(Config(10))>0 Then sqltop="Top "&QvodCms_CLng(Config(10))&""
	Set cs=Conn.Execute("select "&sqltop&" class_id,class_name from qvodcms_class where class_orderid>0 and class_id<>15 and class_id<>20 and class_id<>21 and class_id<>16 order by class_orderid asc")
	If Not(cs.bof And cs.eof) Then
		Do while not cs.eof
			allclass="":allclass="<div id=allmove><div class=allmove_title><span><a href='"&GetListLink(cs("class_id"))&"' target='_blank' title='"&cs("class_name")&"'>更多"&cs("class_name")&"&gt;&gt;</a></span><a href='"&GetListLink(cs("class_id"))&"' target=_blank>类型："&cs("class_name")&"("&GetClassTongJi(cs("class_id"))&")</a></div><div class=allmovelist><ul>"
			Set ms=Conn.Execute("Select "&sqltop&" name_id,class_id,data_name,data_lastdate,data_py from qvodcms_name where class_id="&cs("class_id")&" and data_status=1 order by data_lastdate desc")
			If Not(ms.bof And ms.eof) Then
			alldata=""
			Do while not ms.eof
			alldata=alldata&"<li><a href='"&GetDataLink(ms("class_id"),ms("name_id"),ms("data_py"))&"' target='_blank' title='"&ms("data_name")&"'>"&GetSubStr(ms("data_name"),Config(11),True)&"</a></li>"
			ms.movenext
			loop
			Else
			alldata="<li>该分类没有数据!</li>"
			End If
			ms.close
			Set ms=nothing
			allmovie=allmovie&""&allclass&""&alldata&"</ul></div></div>"
		cs.movenext
		loop
	Else
		allmovie="<li>没有作何分类</li></ul></div></div>"
	End If
	Set cs=nothing
	Call Moban_Index_Str("../Skin/"&Config(12)&"/"&AdminId(12)&"all.html")
	StrTemp = LableObj.Content	
	StrTemp=replace(StrTemp,"@AllMovie@",allmovie)
	Call MakeHtml("../movieall.html",StrTemp):QvodCmsError()
	divwrite "<p style='font-size:14px;'>全部电影网页生成成功．．．<a target='_blank' href='../movieall.html'><font color=red>浏览全部电影页面</font></a></p>"	
End Sub

Sub	makeTop
   Dim allclass,alltop:alltop=""
   Set cs=Conn.Execute("select class_id,class_name from qvodcms_class where class_id<>15 and class_id<>16 and class_id<>20 and class_id<>21 order by class_orderid asc")
If Not(cs.bof And cs.eof) Then
	Do while not cs.eof
		allclass="<table border=""0"" cellspacing=""0"" cellpadding=""0""  class=""topbox"">"
		allclass=allclass&"<tr><td height='23' class='topboxbg'><strong>"&Config(8)&" "&cs("class_name")&" 排行榜</strong></td></tr><tr><td valign='top'>"
		allclass=allclass&"<table border='0' align='center' cellpadding='0' cellspacing='0'  class='topboxa'><tr><td width='310'  height='22'><div class='toptbg'>本周收视榜</div></td><td width='310'><div class='toptbg'>本月收视榜</div></td><td width='310'><div class='toptbg'>收视总榜</div></td></tr>"
		allclass=allclass&"<tr>"
        allclass=allclass&"<td height='138' valign='top'>"&qvodcmstop(cs("class_id"),7)&"</td>"
        allclass=allclass&"<td valign='top'>"&qvodcmstop(cs("class_id"),30)&"</td>"
        allclass=allclass&"<td valign='top'>"&qvodcmstop(cs("class_id"),0)&"</td>"
        allclass=allclass&"</tr>"
	    alltop=alltop&""&allclass&""&alldata&"</table></td></tr></table>"
	cs.movenext
	loop
Else
	alltop="没有作何分类</td></tr></table>"
End If
    On Error Resume Next
    cs.Close:Set cs=nothing
    Call Moban_Index_Str("../Skin/"&Config(12)&"/"&AdminId(12)&"top.html")
	StrTemp = LableObj.Content	
	StrTemp=replace(StrTemp,"@MovieTop@",alltop)
	Call MakeHtml ("../top."&Config(25)&"",StrTemp):QvodCmsError() '生成文件
	divwrite "<p style='font-size:14px; '>排行榜网页生成成功．．．<a target='_blank' href='../top."&Config(25)&"'><font color=red>浏览排行榜页面</font></a></p>" 	
End Sub

Sub	makeOther
    On Error Resume Next
    dim jstype,jsname,jspath,StrTemp:StrTemp=""
    jstype=Trim(Request.Form("jstype"))
    jsname=Trim(Request.Form("jsname"))
	Define=Trim(Request.Form("Define"))
	cpath=Trim(Request.Form("cpath"))
	If jstype="New" Then
		jspath= "../Skin/"&Config(12)&"/"&AdminId(12)&"new.html"
	ElseIf jstype="Hot" Then
		jspath= "../Skin/"&Config(12)&"/"&AdminId(12)&"hot.html"    
	ElseIf jstype="Elite" Then
		jspath= "../Skin/"&Config(12)&"/"&AdminId(12)&"elite.html" 
	ElseIf jstype="Define" Then 
		jspath= "../Skin/"&Config(12)&"/Define/"&Define 	
	Else
		Response.Write("参数不正确,请返回!") 
		Response.End()
	End If
	Call Moban_Index_Str(jspath)
	StrTemp = LableObj.Content
	If jsname="js" Then
		StrTemp=Replace(StrTemp,vbCrLf,"")
		StrTemp="document.write('" & StrTemp & "')"
		Call MakeHtml("../ad/"&jstype&".js",StrTemp):QvodCmsError() '生成JS文件
		divwrite "<p style='font-size:14px; color:#FF0000'>"&jstype&"."&jsname&" 生成成功．．．JS调用代码如下：<br><br>"&Server.htmlencode("<script language=""javascript"" src=""@InstallDir@ad/"&jstype&".js""></script>")&"</p>"
	ElseIf jsname="Define" Then	
		Call MakeHtml(cpath,StrTemp):QvodCmsError() '生成自定义页面
		divwrite "自定义页面"&Define&" 生成成功．．．" 
	Else
		Call MakeHtml("../ad/"&jstype&"."&jsname,StrTemp):QvodCmsError()'生成其它格式的文件
		divwrite ""&jstype&"."&jsname&" 生成成功．．．" 
	End If	
End Sub

Sub	makeAllClass
    Call CheckClassHtml
    Dim CrsPageCount
	Set Crs = Server.CreateObject("adodb.recordset")
	if allclassday<>"cmsday" then
	    Sql="Select class_id,class_name,class_orderid from qvodcms_class where class_orderid>0 order by class_orderid asc"
	else
	  BeginDate=date()
	  EndDate=date()+1
	  If Config(1)="SQL" Then
	    Sqld="select distinct class_id from qvodcms_name where data_lastdate>='"&BeginDate&"' and data_lastdate<='"&EndDate&"'"
	  Else
        Sqld="select distinct class_id from qvodcms_name where data_lastdate between #"&BeginDate&"# and #"&EndDate&"# "
	  End If
	 Set drs=conn.execute(Sqld)
	 If Not (drs.bof And drs.eof) Then
	     do while not drs.eof
		 Classid=Classid&drs("class_id")&","
	   	 drs.movenext:Loop:Set drs=Nothing
	 Else
	 Response.Write "今日无分类需要生成":Response.End()  
	 End if
	 Classida=split(Classid,",")
	  For j=0 to ubound(Classida)
	    dd=dd&Classida(j)&","
	  Next
	Classid=Replace(dd,",,","")  
	Sql="select class_id,class_name,class_bigid,class_orderid from qvodcms_class where class_id in("&Classid&") order by class_orderid asc" 
	End if
	Crs.Open sql, Conn, 1, 1
	If Not (Crs.bof And Crs.eof) Then   
		AllClassi=0
		Crs.pagesize=1'每页数据
		CrsPageCount=Crs.PageCount'总页数
		If CurrentPage>Crs.PageCount Then CurrentPage=Crs.PageCount
		Crs.AbsolutePage=CurrentPage
		CurrentClassPage=CurrentPage
		Response.Write("总共需要生成 <font color='red'><b>"&Crs.recordcount&"</b></font> 个栏目,当前正在生成第 <font color='red'><b>"&CurrentPage&"</b></font> 个栏目,")
		Do while not Crs.eof and AllClassi<Crs.pagesize
			List_Id=Crs("class_id"):makeClass
			AllClassi=AllClassi+1	
		Crs.movenext
		Loop	
	Else
		QvodCms_Err("暂时没有数据无需生成！")
	End If
	Crs.Close
	Set Crs=nothing
	If PageType="alldataok" or PageType="allclassok" or allclassday="cmsday" Then'判断是否有接着生成任务
		Call AllPageGo(CurrentClassPage,CrsPageCount,"?action=allclass","allclassok")	
	Else
		Call AllPageGo(CurrentClassPage,CrsPageCount,"?action=allclass","allok")	
	End If
End Sub

Sub	makeClass
    Call CheckClassHtml
    If List_Id<1 Then QvodCms_Err("请选择分类！")
	Sql=" Select B.class_id from qvodcms_class a  inner join qvodcms_name b on a.class_id=b.class_id where (a.class_id="&List_Id&" or  a.class_bigid="&List_Id&")"
	Set rh = Server.CreateObject("adodb.recordset")
    rh.Open sql, Conn, 1, 1
    If Not(rh.bof And rh.eof) Then
	    classi=0:Pageurl="?action=class&ClassId="&List_Id&""
		rh.pagesize=GetClassNumber(List_Id)'每页数据
		If CurrentPage>rh.PageCount Then CurrentPage=rh.PageCount
		rh.AbsolutePage=CurrentPage
		iPages=rh.PageCount
		Response.Write("该分类共有 <font color='red'><b>"&iPages&"</b></font> 个分页需要生成<br>")
		For classi=1 to rh.PageCount
		CurrentPage=classi:makeClassById
		Next
	Else
	    DivWrite "此分类下暂无影片信息,不需要生成!" 
	End If
	rh.close:Set rh=nothing
End Sub

Sub	makeClassById
    On Error Resume Next
    Dim StrTemp:StrTemp=""
    If List_Id<1 Then QvodCms_Err("请选择分类！")
	Lable_Cache="Lable_Cache_List_"&List_Id
	If Cint(Config(19))=1 and CacheObj.ChkCache(Lable_Cache) Then '直接替换缓存模板值
		StrTemp = CacheObj.GetCache(Lable_Cache)
		Call LableObj.OpenQvodCmsList(StrTemp)
		Call LableObj.OpenQvodCmsNews(LableObj.Content)
	    Call LableObj.OpenQvodCmsProduct(LableObj.Content)
	Else
		Call Moban_Class_Str(Config(0)&"Skin/"&Config(12)&"/"&AdminId(12)&GetClassSkin(List_Id))
		If Cint(Config(19))=1 Then Call CacheObj.SetCache(Lable_Cache,LableObj.Content)
		Call LableObj.OpenQvodCmsList(LableObj.Content)
		Call LableObj.OpenQvodCmsNews(LableObj.Content)
		Call LableObj.OpenQvodCmsProduct(LableObj.Content)
	End If
	StrTemp = LableObj.Content
	If Config(22)="2" Then
	StrPath=GetClassEn(List_Id)&"/"&GetListPath(0, GetClassEn(List_Id), CurrentPage,iPages)&"."&Config(26)'Xj/index.html
	Else
	StrPath=Config(28)&"/"&GetListPath(1, list_id, CurrentPage,iPages)&"."&Config(26)         'List/List_2_5.html
	End If
    Call MakeHtml ("../"&StrPath,StrTemp):QvodCmsError() '生成文件
	DivWrite "分类<font color='red'>"&StrPath&"</font>生成完毕 <a target='_blank' href='../"&StrPath&"'><font color=red>浏览此分类</font></a><br>" 
End Sub

Sub	makeAllData
	sql = "Select name_id,class_id,data_py from qvodcms_name where data_status=1 order by name_id desc"
	Set rh = Server.CreateObject("adodb.recordset")
    rh.Open sql, Conn, 1, 1
    If Not(rh.bof And rh.eof) Then
	    datai=0
		rh.pagesize=QvodCms_CLng(AdminId(20))'每页数据
		If CurrentPage>rh.PageCount Then CurrentPage=rh.PageCount
		rh.AbsolutePage=CurrentPage
		Response.Write("总共需要生成 <font color='red'><b>"&rh.recordcount&"</b></font> 部电影，每页生成 <font color='red'><b>"&rh.pagesize&"</b></font> 部电影，共需要分 <font color='red'><b>"&rh.PageCount&"</b></font> 页生成，当前正在生成 <font color='red'><b>"&CurrentPage&"</b></font> 页<br>")
		Do while not rh.eof and datai<rh.pagesize	
		List_Id=rh("class_id"):name_id=rh("name_id"):data_py=rh("data_py")
		Call makeDataById()
		datai=datai+1:rh.movenext 
		Loop
		If PageType="alldataok" Then'判断是否有接着生成任务
			Call AllPageGo(CurrentPage,rh.PageCount,"?action=alldata","alldataok")	
		Else
			Call AllPageGo(CurrentPage,rh.PageCount,"?action=alldata","allok")	
		End If		
	Else
	    DivWrite "暂无数据不需要生成"
	End If
	rh.close:Set rh=nothing
End Sub

Sub	makeDataDay
    Dim datatime:datatime=1
    If Config(1)="SQL" Then
	Sql="select name_id,class_id,data_lastdate,data_py from qvodcms_name where data_lastdate>='"&(date()-datatime)&"' and data_status=1 order by name_id desc"
	Else
    Sql="select name_id,class_id,data_lastdate,data_py from qvodcms_name where data_lastdate between #"&(date()-datatime)&"# and #"&(date()+datatime)&"# and data_status=1 order by name_id desc"
	End If
	Set rh = Server.CreateObject("adodb.recordset")
    rh.Open sql, Conn, 1, 1
    If Not(rh.bof And rh.eof) Then
	    datai=0
		rh.pagesize=QvodCms_CLng(AdminId(20))'每页数据
		If CurrentPage>rh.PageCount Then CurrentPage=rh.PageCount
		rh.AbsolutePage=CurrentPage
		Response.Write("总共需要生成 <font color='red'><b>"&rh.recordcount&"</b></font> 部电影，每页生成 <font color='red'><b>"&rh.pagesize&"</b></font> 部电影，共需要分 <font color='red'><b>"&rh.PageCount&"</b></font> 页生成，当前正在生成 <font color='red'><b>"&CurrentPage&"</b></font> 页<br>")
		Do while not rh.eof and datai<rh.pagesize	
		List_Id=rh("class_id"):name_id=rh("name_id"):data_py=rh("data_py"):makeDataById
		datai=datai+1:rh.movenext 
		Loop
		Call AllPageGo(CurrentPage,rh.PageCount,"?action=day&datatime="&Data_Time&"","alldataok")
	Else
	    DivWrite "暂无数据不需要生成"
	End If
	rh.close:Set rh=nothing
End Sub

Sub	makeDataClass
    If List_Id<1 Then QvodCms_Err("请选择分类！")
	Sql=" Select B.class_id,B.name_id,B.data_py from qvodcms_class a  inner join qvodcms_name b on a.class_id=b.class_id where (a.class_id="&List_Id&" or  a.class_bigid="&List_Id&")"
	Set rh = Server.CreateObject("adodb.recordset")
    rh.Open sql, Conn, 1, 1
    If Not(rh.bof And rh.eof) Then
	    datai=0
		rh.pagesize=QvodCms_CLng(AdminId(20))'每页数据
		If CurrentPage>rh.PageCount Then CurrentPage=rh.PageCount
		rh.AbsolutePage=CurrentPage
		Response.Write("总共需要生成 <font color='red'><b>"&rh.recordcount&"</b></font> 部电影，每页生成 <font color='red'><b>"&rh.pagesize&"</b></font> 部电影，共需要分 <font color='red'><b>"&rh.PageCount&"</b></font> 页生成，当前正在生成 <font color='red'><b>"&CurrentPage&"</b></font> 页<br>")
		Do while not rh.eof and datai<rh.pagesize	
		List_Id=rh("class_id"):name_id=rh("name_id"):data_py=rh("data_py"):makeDataById
		datai=datai+1:rh.movenext 
		Loop
		Call AllPageGo(CurrentPage,rh.PageCount,"?action=data&ClassId="&List_Id&"","allok")
	Else
	    DivWrite "暂无数据不需要生成"
	End If
	rh.close:Set rh=nothing
End Sub

Sub	makeOtherData
    Dim BeginID,EndID,BeginDate,EndDate,pagestr
	Select  Case Lcase(Action)
	Case "othernew"
		BeginID=QvodCms_CLng(Request("BeginID"))
		If BeginID<1 Then QvodCms_Err("请输入生成范围！")
		Sql="select top "&BeginID&" name_id,class_id,data_py from qvodcms_name order by name_id desc"
	Case "othertime"
		BeginDate=Request("BeginDate")
		EndDate=Request("EndDate")
		If Config(1)="SQL" Then
		Sql="select name_id,class_id,data_lastdate,data_py from qvodcms_name where data_lastdate>='"&BeginDate&"' and data_lastdate<='"&EndDate&"' order by name_id desc"
		Else
		Sql="select name_id,class_id,data_lastdate,data_py from qvodcms_name where data_lastdate between #"&BeginDate&"# and #"&EndDate&"# order by name_id desc"
		End If  
	Case "otherid"
		BeginID=QvodCms_CLng(Request("BeginID"))
		EndID=QvodCms_CLng(Request("EndID"))
		Sql="select name_id,class_id,data_py from qvodcms_name where name_id between "&BeginID&" and "&EndID&" order by name_id desc"	
	Case "otherallid"
	   If allid="" Then QvodCms_Err("请选择生成影片！")	
	    Sql="select name_id,class_id,data_lastdate,data_py from qvodcms_name where name_id in("&allid&") order by name_id desc"
		
	Case Else : QvodCms_Err("请输入生成范围！")	
	End Select
    pagestr="?action="&Action&"&BeginID="&BeginID&"&EndID="&EndID&"&BeginDate="&BeginDate&"&EndDate="&EndDate&""	
	Set rh = Server.CreateObject("adodb.recordset")
    rh.Open sql, Conn, 1, 1
    If Not(rh.bof And rh.eof) Then
	    datai=0
		rh.pagesize=QvodCms_CLng(AdminId(20))'每页数据
		If CurrentPage>rh.PageCount Then CurrentPage=rh.PageCount
		rh.AbsolutePage=CurrentPage
		Response.Write("总共需要生成 <font color='red'><b>"&rh.recordcount&"</b></font> 部电影，每页生成 <font color='red'><b>"&rh.pagesize&"</b></font> 部电影，共需要分 <font color='red'><b>"&rh.PageCount&"</b></font> 页生成，当前正在生成 <font color='red'><b>"&CurrentPage&"</b></font> 页<br>")
		Do while not rh.eof and datai<rh.pagesize	
		List_Id=rh("class_id"):name_id=rh("name_id"):data_py=rh("data_py"):makeDataById
		datai=datai+1:rh.movenext 
		Loop
		Call AllPageGo(CurrentPage,rh.PageCount,pagestr,"allok")
	Else
	    DivWrite "暂无数据不需要生成"
	End If
	rh.close:Set rh=nothing
End Sub

Sub	makeDataById
    On Error Resume Next
    Dim StrTemp:StrTemp=""
    Lable_Cache="Lable_Cache_Data_"&name_id
	StrPath=GetDataLink(List_Id,name_id,data_py)
	If Config(0)<>"/" Then StrPath=Replace(StrPath,Config(0),"/")
	If Config(23)="3" or Config(23)="4" Then StrPath=StrPath&"index."&Config(27)
	If Cint(Config(19))=1 and CacheObj.ChkCache(Lable_Cache) Then
		StrTemp = CacheObj.GetCache(Lable_Cache)
		Call LableObj.OpenData(StrTemp)
		Call LableObj.OpenQvodCmsNews(LableObj.Content)
	    Call LableObj.OpenQvodCmsProduct(LableObj.Content)
	Else
		Call Moban_Data_Str(Config(0)&"Skin/"&Config(12)&"/"&AdminId(12)&GetDataSkin(name_id))
		If Cint(Config(19))=1 Then Call CacheObj.SetCache(Lable_Cache,LableObj.Content)
		Call LableObj.OpenData(LableObj.Content)
		Call LableObj.OpenQvodCmsNews(LableObj.Content)
	    Call LableObj.OpenQvodCmsProduct(LableObj.Content)
	End If
	StrTemp = LableObj.Content
    Call MakeHtml (".."&StrPath,StrTemp):QvodCmsError() '生成文件
	DivWrite "内容<font color='red'>"&StrPath&"</font>生成成功 <a target='_blank' href='.."&StrPath&"'><font color=red>浏览→"&StrPath&"</font></a><br>" 
End Sub

Sub	makeAllClassNews
    Call CheckClassHtml
    Dim CrsPageCount
	Set Crs = Server.CreateObject("adodb.recordset")
	Sql="Select news_class_id,class_name,class_orderid from qvodcms_news_class where class_orderid>0 order by class_orderid asc"
	Crs.Open sql, Conn, 1, 1
	If Not (Crs.bof And Crs.eof) Then   
		AllClassi=0
		Crs.pagesize=1'每页数据
		CrsPageCount=Crs.PageCount'总页数
		If CurrentPage>Crs.PageCount Then CurrentPage=Crs.PageCount
		Crs.AbsolutePage=CurrentPage
		CurrentClassPage=CurrentPage
		Response.Write("总共需要生成 <font color='red'><b>"&Crs.recordcount&"</b></font> 个新闻栏目,当前正在生成第 <font color='red'><b>"&CurrentPage&"</b></font> 个栏目,")
		Do while not Crs.eof and AllClassi<Crs.pagesize
			class_id=Crs("news_class_id"):makeClassNews
			AllClassi=AllClassi+1	
		Crs.movenext
		Loop	
	Else
		QvodCms_Err("暂时没有数据无需生成！")
	End If
	Crs.Close
	Set Crs=nothing
	If PageType="alldataok" or PageType="allclassok" or allclassday="cmsday" Then'判断是否有接着生成任务
		Call AllPageGo(CurrentClassPage,CrsPageCount,"?action=allnewsclass","allclassok")	
	Else
		Call AllPageGo(CurrentClassPage,CrsPageCount,"?action=allnewsclass","allok")	
	End If
End Sub


Sub	makeClassNews
    Call CheckClassHtml
    If class_id<1 Then QvodCms_Err("请选择分类！")
	Sql=" Select B.class_id from qvodcms_news_class a  inner join qvodcms_news b on a.news_class_id=b.class_id where (a.news_class_id="&class_id&" or  a.class_bigid="&class_id&")"
	Set rh = Server.CreateObject("adodb.recordset")
    rh.Open sql, Conn, 1, 1
    If Not(rh.bof And rh.eof) Then
	    classi=0:Pageurl="?action=newsclass&class_id="&class_id&""
		rh.pagesize=GetClassNumberNews(class_id)'每页数据
		If CurrentPage>rh.PageCount Then CurrentPage=rh.PageCount
		rh.AbsolutePage=CurrentPage
		iPages=rh.PageCount
		Response.Write("该新闻分类共有 <font color='red'><b>"&iPages&"</b></font> 个分页需要生成<br>")
		For classi=1 to rh.PageCount
		CurrentPage=classi:makeClassNewsById
		Next
	Else
	    DivWrite "此分类下暂无新闻信息,不需要生成!" 
	End If
	rh.close:Set rh=nothing
End Sub

Sub	makeClassNewsById
    On Error Resume Next
    Dim StrTemp:StrTemp=""
    If class_id<1 Then QvodCms_Err("请选择分类！")
	Lable_Cache="Lable_Cache_ListNews"&class_id
	If Cint(Config(19))=1 and CacheObj.ChkCache(Lable_Cache) Then '直接替换缓存模板值
		StrTemp = CacheObj.GetCache(Lable_Cache)
	   	Call LableObj.OpenQvodCmsNews(StrTemp)
	    Call LableObj.OpenQvodCmsList(LableObj.Content)
	    Call LableObj.OpenQvodCmsProduct(LableObj.Content)
	Else
		Call Moban_Class_Str(Config(0)&"Skin/"&Config(12)&"/"&AdminId(12)&GetClassSkinNews(class_id))
		If Cint(Config(19))=1 Then Call CacheObj.SetCache(Lable_Cache,LableObj.Content)
	  	Call LableObj.OpenQvodCmsNews(LableObj.Content)
	    Call LableObj.OpenQvodCmsList(LableObj.Content)
	    Call LableObj.OpenQvodCmsProduct(LableObj.Content)
	End If
	StrTemp = LableObj.Content
	If Config(35)="2" Then
	StrPath=GetClassEnNews(class_id)&"/"&GetListPath(0, GetClassEnNews(class_id), CurrentPage,iPages)&"."&Config(26)'Xj/index.html
	Else
	StrPath=Config(33)&"/"&GetListPath(3, class_id, CurrentPage,iPages)&"."&Config(26)         'List/List_2_5.html
	End If
    Call MakeHtml ("../"&StrPath,StrTemp):QvodCmsError() '生成文件
	DivWrite "新闻列表<font color='red'>"&StrPath&"</font>生成完毕 <a target='_blank' href='../"&StrPath&"'><font color=red>浏览此分类</font></a><br>" 
End Sub

Sub	makeAllNews
	sql = "Select class_id,id,datetimes,Content from qvodcms_news where status=1 order by id desc"
	Set rh = Server.CreateObject("adodb.recordset")
    rh.Open sql, Conn, 1, 1
    If Not(rh.bof And rh.eof) Then
	 	datai=0
		rh.pagesize=QvodCms_CLng(AdminId(20))'每页数据
		If nCurrentPage>rh.PageCount Then nCurrentPage=rh.PageCount
		rh.AbsolutePage=nCurrentPage
		Response.Write("总共需要生成 <font color='red'><b>"&rh.recordcount&"</b></font> 篇新闻，每页生成 <font color='red'><b>"&rh.pagesize&"</b></font> 篇新闻，共需要分 <font color='red'><b>"&rh.PageCount&"</b></font> 页生成，当前正在生成 <font color='red'><b>"&nCurrentPage&"</b></font> 页<br>")
		Do while not rh.eof and datai<rh.pagesize	
		class_id=rh("class_id"):newsid=rh("id"):newsContent=rh("Content"):newsTimes=rh("datetimes"):makeNewsById
		datai=datai+1:rh.movenext 
		Loop
	    If PageType="allnewsok" Then'判断是否有接着生成任务
		  Call AllPageGo(nCurrentPage,rh.PageCount,"?action=newsall","allnewsok")	
	    Else
		  Call AllPageGo(nCurrentPage,rh.PageCount,"?action=newsall","allok")	
	    End If		
	Else
	    DivWrite "暂无新闻数据不需要生成"
	End If
	rh.close:Set rh=nothing
End Sub

Sub	makeDataNews
    Dim BeginID,EndID,BeginDate,EndDate,pagestr
	Select  Case Lcase(Action)
	Case "newsdata"
	    If class_id<1 Then QvodCms_Err("请选择分类！")
	    Sql=" Select B.class_id,B.id,B.datetimes,B.Content from qvodcms_news_class a  inner join qvodcms_news b on a.news_class_id=b.class_id where (a.news_class_id="&class_id&" or  a.class_bigid="&class_id&")"
	Case "newsotherid"
		BeginID=QvodCms_CLng(Request("BeginID"))
		EndID=QvodCms_CLng(Request("EndID"))
		Sql="select class_id,id,datetimes,Content from qvodcms_news where id between "&BeginID&" and "&EndID&" order by id desc"
	Case "newstime"
		BeginDate=Request("BeginDate")
		EndDate=Request("EndDate")
		If Config(1)="SQL" Then
		Sql="select class_id,id,datetimes,Content from qvodcms_news where datetimes>='"&BeginDate&"' and datetimes<='"&EndDate&"' order by id desc"
		Else
		Sql="select class_id,id,datetimes,Content from qvodcms_news where datetimes between #"&BeginDate&"# and #"&EndDate&"# order by id desc"
		End If  
    Case "newsotherallid"
	    If allid="" Then QvodCms_Err("请选择生成新闻！")	
	    Sql="select class_id,id,datetimes,Content from qvodcms_news where id in("&allid&") order by id desc"			
	Case Else : QvodCms_Err("请输入生成范围！")	
	End Select
    pagestr="?action="&Action&"&BeginID="&BeginID&"&EndID="&EndID&"&BeginDate="&BeginDate&"&EndDate="&EndDate&""	
	Set rh = Server.CreateObject("adodb.recordset")
    rh.Open sql, Conn, 1, 1
    If Not(rh.bof And rh.eof) Then
	    datai=0
		rh.pagesize=QvodCms_CLng(AdminId(20))'每页数据
		If nCurrentPage>rh.PageCount Then nCurrentPage=rh.PageCount
		rh.AbsolutePage=CurrentPage
		Response.Write("总共需要生成 <font color='red'><b>"&rh.recordcount&"</b></font> 篇新闻，每页生成 <font color='red'><b>"&rh.pagesize&"</b></font> 篇新闻，共需要分 <font color='red'><b>"&rh.PageCount&"</b></font> 页生成，当前正在生成 <font color='red'><b>"&nCurrentPage&"</b></font> 页<br>")
		Do while not rh.eof and datai<rh.pagesize	
		class_id=rh("class_id"):newsid=rh("id"):newsContent=rh("Content"):newsTimes=rh("datetimes"):makeNewsById
		datai=datai+1:rh.movenext 
		Loop
		Call AllPageGo(nCurrentPage,rh.PageCount,pagestr,"allok")
	Else
	    DivWrite "暂无新闻数据不需要生成"
	End If
	rh.close:Set rh=nothing
End Sub

Sub	makeNewsById
    On Error Resume Next
    Dim StrTemp:StrTemp=""
	Lable_Cache = "Lable_Cache_News_"&newsid
	Content=Split(newsContent,"$分页$"):ContentNum=ubound(Content) 
      For p=1 to ContentNum+1:y=p
	    CurrentPage=y
        StrPath=GetDataLinkNews(class_id,newsid,newsTimes,y)
		If Config(0)<>"/" Then StrPath=Replace(StrPath,Config(0),"/")
	    If Cint(Config(19))=1 and CacheObj.ChkCache(Lable_Cache) Then
		  StrTemp = CacheObj.GetCache(Lable_Cache)
		  Call LableObj.GetNewsData(StrTemp)
	      Call LableObj.OpenQvodCmsProduct(LableObj.Content)
	      Call LableObj.OpenQvodCmsList(LableObj.Content)
	    Else
		  Call Moban_Data_Str(Config(0)&"Skin/"&Config(12)&"/"&AdminId(12)&"news_content.html")
		  If Cint(Config(19))=1 Then Call CacheObj.SetCache(Lable_Cache,LableObj.Content)
		  Call LableObj.GetNewsData(LableObj.Content)
	      Call LableObj.OpenQvodCmsProduct(LableObj.Content)
	      Call LableObj.OpenQvodCmsList(LableObj.Content)
	    End If
	    StrTemp = LableObj.Content
        Call MakeHtml (".."&StrPath,StrTemp):QvodCmsError() '生成文件
	    DivWrite "内容<font color='red'>"&StrPath&"</font>生成成功 <a target='_blank' href='.."&StrPath&"'><font color=red>浏览→"&StrPath&"</font></a><br>" 
      Next    
End Sub

Sub makeIndex
    On Error Resume Next
	Lable_Cache = "Lable_Cache_Index":
	If Cint(Config(19))=1 and CacheObj.ChkCache(Lable_Cache) Then '直接替换缓存模板值
	    StrTemp = CacheObj.GetCache(Lable_Cache)
    Else
	    Call Moban_Index_Str(Config(0)&"Skin/"&Config(12)&"/"&AdminId(12)&"Index.html") 
		If Cint(Config(19))=1 Then Call CacheObj.SetCache(Lable_Cache,LableObj.Content)'写入缓存
		StrTemp = LableObj.Content	
	End If
	Call MakeHtml ("../Index."&Config(25)&"",StrTemp):QvodCmsError() '生成文件
	divwrite "<p style='font-size:14px; '>网站首页生成完毕．．．<a target='_blank' href='../Index."&Config(25)&"'><font color=red>浏览首页</font></a></p>" 	
End Sub

Sub CheckHtml
	If Config(17)<>"html" Then  DivWrite "<h1 style='margin-top:50px;height:200px;'>网站运行模式为动态，不允许生成</h1>":response.end
End Sub

Sub CheckClassHtml
	If QvodCms_CLng(Config(21))<>1 Then
		If PageType="alldataok" Then
			Call AllPageGo(CrsPageCount,CrsPageCount,"?action="&action&"","allclassok")
		Else
			DivWrite "<h1 style='margin-top:50px;height:200px;'>网站列表页为动态模式，不允许生成</h1>"
		End If
		Response.end
	End If
End Sub

Sub DivWrite(str)
	response.write(str)
	response.Flush()
End Sub

Sub ClearObj
	Set CacheObj = Nothing
	Set LableObj = Nothing
End Sub

Sub AllPageGo(Pagei,Pages,PageUrl,PageNextType)
	If Pagei>=Pages Then
	    If PageNextType="alldataok" Then
	        Response.Write("<script language='javascript'>self.location='?action=allclass&allclassday=cmsday&PageType=alldataok';</script>")
		ElseIf PageNextType="allclassok" Then
		    Call makeIndex:Call makeMap
		    Response.Write("<p style='font-size:14px;font-weight:bold;color:#009900'>恭喜您!!所有操作已经执行完成！</p>")
	    ElseIf PageNextType="allnewsok" Then
		    Response.Write("<script language='javascript'>self.location='?action=newsall&allclassday=cmsday&PageType=allnewsok';</script>")		
		Else
		    Response.Write("<p style='font-size:14px;font-weight:bold;color:#009900'>恭喜您!!所有操作已经执行完成！</p>")
		End If
	Else
	    Response.Write("<br>暂停"&AdminId(21)&"秒后继续生成 <meta http-equiv='refresh' content="&AdminId(21)&";url='"&PageUrl&"&Page="&Pagei+1&"&PageType="&PageNextType&"&allclassday="&allclassday&"'>")
	End If	
End Sub

Function GetListPath(iListFileType, iClassID, iCurrentPage,iPages)
    Select Case iListFileType
    Case 0
        If iCurrentPage = 1 Then
            GetListPath = "index"
        Else
			GetListPath = "index"&iCurrentPage
        End If
    Case 1, 2
        If iCurrentPage = 1 Then
			GetListPath = Config(28)&"_" & iClassID&"_1"
        Else
			GetListPath = Config(28)&"_" & iClassID & "_" & iCurrentPage
        End If
    Case 3
        If iCurrentPage = 1 Then
			GetListPath = Config(33)&"_" & iClassID&"_1"
        Else
			GetListPath = Config(33)&"_" & iClassID & "_" & iCurrentPage
        End If		
    End Select
End Function

Function GetClassNumber(strid)'取分类分页数量
    Lable_Cache="Cache_List_Num_"&strid
	If Cint(Config(19))=1 and CacheObj.ChkCache(Lable_Cache) Then
	    GetClassNumber=CacheObj.GetCache(Lable_Cache)
	Else
		StrType=GetSkinCache(Config(0)&"Skin/"&Config(12)&"/"&AdminId(12)&GetClassSkin(strid))
		StrType=GetContent(StrType,"@List(-1,0,False,False,True,",")@",0)
		If ubound(Split(StrType,","))<>5 Then 
		GetClassNumber=15
		Else
		GetClassNumber=QvodCms_CLng(Split(StrType,",")(5))
		End If
		If Cint(Config(19))=1 Then Call CacheObj.SetCache(Lable_Cache,GetClassNumber)
	End If
End Function

Function GetClassNumberNews(strid)'取分类分页数量
    Lable_Cache="Cache_News_Num_"&strid
	If Cint(Config(19))=1 and CacheObj.ChkCache(Lable_Cache) Then
	    GetClassNumberNews=CacheObj.GetCache(Lable_Cache)
	Else
		StrType=GetSkinCache(Config(0)&"Skin/"&Config(12)&"/"&AdminId(12)&"news_type.html")
		StrType=GetContent(StrType,"@News(-1,0,False,False,True,",")@",0)
		If ubound(Split(StrType,","))<>3 Then 
		GetClassNumberNews=15
		Else
		GetClassNumberNews=QvodCms_CLng(Split(StrType,",")(3))
		End If
		If Cint(Config(19))=1 Then Call CacheObj.SetCache(Lable_Cache,GetClassNumberNews)
	End If
End Function

Sub Main()
If Lcase(Config(17))="html" and Cint(Config(19))=1 Then Call CacheObj.ClearAll
randomize
list=ubound(Split(GetFolderlist("../Skin/"&Config(12)&"/Define/"),","))'自定义个数
Dim rndmsg:rndmsg="msg"&int(2100*rnd)
%>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th colspan=2 background="Skins/images/tdbg.gif" class="title">&nbsp;电影生成选项</th>
</tr>
<tr><td height="151" class="td2">
<table width="100%" height="100" border="0 "align="center" cellpadding="5" cellspacing="1" style="background: #cad9ea;">	
<tr bgcolor="#FFFFFF" >
<form action="?action=class" method="post">
<td width="15%" height="29" ><select name="ClassId" ><option value="">请选择分类</option><%=QvodCms_Class_Name(0,"","")%></select></td>
<td width="85%" ><input type="submit" value="生成选中栏目页" > <input type="button"  value="生成全部栏目页" onClick="javascript:self.location='?action=allclass';"></td>
</form>
</tr>		
<tr bgcolor="#FFFFFF" >
<form action="?action=data" method="post">
	<td ><select name="ClassId" ><option value="">请选择分类</option><%=QvodCms_Class_Name(0,"","")%></select></td>
	<td ><input type="submit" value="生成选中内容页" > <input type="button" value="生成全部内容页" onClick="javascript:self.location='?action=alldata';"></td>
</form>
</tr>
<tr bgcolor="#999999"  style="border-bottom:1px red solid" >

	<td colspan="2" background="Skins/images/tdbg.gif" class="title">&nbsp;<b>播放生成选项</b></td>
	</tr>	
<tr bgcolor="#FFFFFF" >
<form action="QvodCms_CreatePlay.asp?action=class" method="post">
	<td ><select name="ClassId" ><option value="">请选择分类</option><%=QvodCms_Class_Name(0,"","")%></select></td>
	<td ><input type="submit" value="生成选中播放页" > <input type="button" style=" color:#FF0000" value="生成今日播放页" onClick="javascript:self.location='QvodCms_CreatePlay.asp?action=day';"></td>
</form>
</tr>	
<tr bgcolor="#999999"  style="border-bottom:1px red solid" >

	<td colspan="2" background="Skins/images/tdbg.gif" class="title">&nbsp;<b>新闻生成选项</b></td>
	</tr>	
<tr bgcolor="#FFFFFF" >
<form action="?action=newsclass" method="post">
<td width="15%" height="29" ><select name="class_id" style="width:131px;" ><option value="">请选择分类</option><%=QvodCms_Class_News(0,"","")%></select></td>
<td width="85%" ><input type="submit" value="生成选中新闻栏" > <input type="button"  value="生成全部新闻栏" onClick="javascript:self.location='?action=allnewsclass';"></td>
</form>
</tr>		
<tr bgcolor="#FFFFFF" >
<form action="?action=newsdata" method="post">
	<td ><select name="class_id" style="width:131px;" ><option value="">请选择分类</option><%=QvodCms_Class_News(0,"","")%></select></td>
	<td ><input type="submit" value="生成选中新闻页" > <input type="button" value="生成全部新闻页" onClick="javascript:self.location='?action=newsall';"></td>
</form>
</tr>

<tr bgcolor="#FFFFFF">
	<td colspan="2" style="height:15px;"></td>
</tr>
</table></td></tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th colspan=2 class="title"><input type="button" value="生成首页HTML" onClick="javascript:window.open('?action=index','<%=rndmsg%>');">&nbsp;&nbsp;<input type="button" value="生成全部电影" onClick="javascript:window.open('?action=map','<%=rndmsg%>');">&nbsp;&nbsp;<input type="button" value="生成排行榜" onClick="javascript:window.open('?action=top','<%=rndmsg%>');">&nbsp;&nbsp;<input type="button" value="一键生成全站" onClick="javascript:self.location='?action=alldata&PageType=alldataok';">&nbsp;&nbsp;<input type="button" style=" color:#FF0000" value="一键生成今日更新" class="btn"  onClick="javascript:self.location='?action=day';"></th>
</tr>
<tr><td class="td2">
<table width="100%" height="120" border="0 "align="center" cellpadding="5" cellspacing="1" style="background: #cad9ea;">
<tr bgcolor="#FFFFFF">
	<td colspan="2" ><form action="?action=othernew" method="post" name="form4" id="form4">
	    生成最新
	    <input size="10" value="50" name="BeginID" >
	    部电影
	    <input id="submit" type="submit" value="开始生成" name="submit" ></form></td>
</tr>
<tr bgcolor="#FFFFFF">
	<td colspan="2" ><form action="?action=othertime" method="post" name="form5" id="form5">
	    生成日期
	    <input size="10" value="<%=date()%>" name="BeginDate" /> 到 <input title="不包含此日期" maxlength="20" size="10" value="<%=date()+1%>" name="EndDate" /> 的内容页 <input id="submit" type="submit" value="开始生成" name="submit" /></form></td>
</tr>
<tr bgcolor="#FFFFFF">
	<td colspan="2" ><form action="?action=otherid" method="post" name="form6" id="form6">
	    生成ID号
	    <input id="BeginID" size="10" value="1" name="BeginID" /> 到 <input id="EndID" maxlength="10" size="10" value="100" name="EndID" /> 
	    的内容页 
	    <input id="submit3" type="submit" value="开始生成" name="submit3" /></form></td>
</tr>
<tr bgcolor="#FFFFFF">
	<td colspan="2" ><form action="QvodCms_CreatePlay.asp?action=othertime" method="post" name="form5" id="form5">
	    生成日期
	    <input size="10" value="<%=date()%>" name="BeginDate" /> 到 <input title="不包含此日期" maxlength="20" size="10" value="<%=date()+1%>" name="EndDate" /> 
	    的播放页 
	    <input id="submit" type="submit" value="开始生成" name="submit" /></form></td>
</tr>
<tr bgcolor="#FFFFFF">
	<td colspan="2" ><form action="QvodCms_CreatePlay.asp?action=otherid" method="post" name="form6" id="form6">
	    生成ID号
	    <input id="BeginID" size="10" value="1" name="BeginID" /> 到 <input id="EndID" maxlength="10" size="10" value="100" name="EndID" /> 
	    的播放页 
	    <input id="submit3" type="submit" value="开始生成" name="submit3" /></form></td>
</tr>
<tr bgcolor="#FFFFFF">
	<td colspan="2" ><form action="?action=newstime" method="post" name="form11" id="form11">
	    生成日期
	    <input size="10" value="<%=date()%>" name="BeginDate" /> 到 <input title="不包含此日期" maxlength="20" size="10" value="<%=date()+1%>" name="EndDate" /> 的新闻页 
	    <input id="submit" type="submit" value="开始生成" name="submit" /></form></td>
</tr>
<tr bgcolor="#FFFFFF">
	<td colspan="2" ><form action="?action=newsotherid" method="post" name="form62" id="form62">
	    生成ID号
	    <input id="BeginID" size="10" value="1" name="BeginID" /> 到 <input id="EndID" maxlength="10" size="10" value="100" name="EndID" /> 
	    的新闻页 
	    <input id="submit33" type="submit" value="开始生成" name="submit33" /></form></td>
</tr>
</table></td></tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th colspan=2 class="title">&nbsp;生成前台调用</th>
</tr>
<tr>
<form method="post" action="?action=other" target="<%=rndmsg%>">
<td width="300" class="td1" style="text-align:left; padding-left:10px;"><input name="jstype" type="hidden" value="New"><input name="jsname" type="radio" style="border:none" value="js" checked>.Js <input type="radio" name="jsname" value="html" style="border:none">.Html <input type="radio" name="jsname" value="htm" style="border:none">.Htm <input type="radio" name="jsname" value="shtml" style="border:none">.Shtml <input type="radio" name="jsname" value="shtm" style="border:none">.Shtm</td>
<td class="td1" style="padding-left:10px;"><input name='submit2' type='submit' id='submit2' value='生成调用最新'></td>
</form>
</tr>
<tr>
<form method="post" action="?action=other" target="<%=rndmsg%>">
<td width="270"  class="td1" style="text-align:left; padding-left:10px;"><input name="jstype" type="hidden" value="Hot"><input name="jsname" type="radio" style="border:none" value="js" checked>.Js <input type="radio" name="jsname" value="html" style="border:none">.Html <input type="radio" name="jsname" value="htm" style="border:none">.Htm <input type="radio" name="jsname" value="shtml" style="border:none">.Shtml <input type="radio" name="jsname" value="shtm" style="border:none">.Shtm</td>
<td class="td1" style="padding-left:10px;"><input name='submit2' type='submit' id='submit2' value='生成调用热门'></td>
</form>
</tr>
<tr>
<form method="post" action="?action=other" target="<%=rndmsg%>">
<td width="270" class="td1" style="text-align:left; padding-left:10px;"><input name="jstype" type="hidden" value="Elite"><input name="jsname" type="radio" style="border:none" value="js" checked>.Js <input type="radio" name="jsname" value="html" style="border:none">.Html <input type="radio" name="jsname" value="htm" style="border:none">.Htm <input type="radio" name="jsname" value="shtml" style="border:none">.Shtml <input type="radio" name="jsname" value="shtm" style="border:none">.Shtm</td>
<td class="td1" style="padding-left:10px;"><input name='submit2' type='submit' id='submit2' value='生成调用推荐'></td>
</form>
</tr>
<%If list>0 Then%>
<tr>
<form method="post" action="?action=other" target="<%=rndmsg%>">
<input name="jstype" type="hidden" value="Define">
<input name="jsname" type="hidden" value="Define">
<td width="270" class="td1" style="padding-left:10px;">自定义模板保存路径：<input name="cpath" type="text" value="../<%=Split(GetFolderlist("../Skin/"&Config(12)&"/Define/"),",")(0)%>" style="color:#FF0000"></td>
<td class="td1" style="padding-left:10px;"><select name="Define" onChange="cpath.value='../'+this.options[this.selectedIndex].value;"><%For i=0 to (list-1)%><option value="<%=Split(GetFolderlist("../Skin/"&Config(12)&"/Define/"),",")(i)%>">../Skin/<%=Config(12)%>/Define/<%=Split(GetFolderlist("../Skin/"&Config(12)&"/Define/"),",")(i)%><%Next%></option></select>　<input type='submit' value='生成自定义模板'></td>
</form>
</tr>
<%End If%>
<tr bgcolor="#FFFFFF">
	<td colspan="2" ><iframe style="z-index:1;visibility:inherit;width:100%;height:100px;" name="<%=rndmsg%>" frameborder=0 scrolling=yes ></iframe></td>
</tr>

</table>
<%End Sub%> 
<%Call CloseConn()%>
<div style="text-align:center; margin-top:5px; color: #FF0000">页面执行时间：<%=GetRunTime()%>秒</div>
</body>
</html>