<!--#include file="tgzcm_Conn.asp"-->
<!--#include file="tgzcm_Check.asp"-->
<!--#include file="tgzcm_Class_Sub.asp"-->
<!--#include file="../tgzcm.Cache/tgzcm.Html.asp"-->
<!--#include file="../tgzcm.Cache/tgzcm.Admin.asp" -->
<%
Response.buffer=true '开启缓存
Dim Action
Action=Trim(Request.QueryString("Action"))
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<TITLE>管理页面</TITLE>
<link href="skins/css/tgzcm_main.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE2 {color: #FF0000}
.STYLE4 {color: #009900}
body {
margin:0px;
}
#Makebox{ float:left; width:780px; background:#FFFFFF;}
-->
</style>
</head>
<body>
<table id="Makebox" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
    <th colspan="14" style="text-align:center;font-size:14px;">TgzcmCms 一键生成合作伙伴<草根搜>蜘蛛爬行提交页&nbsp;&nbsp;<a href="http://sales.caogenso.com" target="_blank">登陆提交草根搜</a></th>
  </tr>
  <form action="?Action=Make" method="post" name="form1" id="form1">
  <tr style="text-align:center;">
    <td width="69" height="323" align="left" class="td1" >&nbsp;选择分类</td>
    <td width="122" align="left" class="td1" ><select name="ClassID">
           <option value="all">├┄全部分类</option>
			<%=tgzcm_Class_Name(0,"","")%>
	</select></td>
    <td width="70" align="left" class="td1" >生成方式</td>
    <td width="113" align="left" class="td1" ><label>
      <select name="timeid" id="timeid">
        <option value="data_lastdate">按更新时间</option>
        <option value="name_id">按电影ID</option>
      </select>
    </label></td>
    <td width="65" align="left" class="td1" >生成数量</td>
    <td width="99" align="left" class="td1" ><select name="shuid" id="shuid">
      <option value="20" selected>20条</option>
      <option value="50">50条</option>
      <option value="100">100条</option>
      <option value="200">200条</option>
      <option value="300">300条</option>
      <option value="all">全部数量</option>
                                </select></td>
    <td width="242" align="left" class="td1" ><label>
      <input type="submit" name="button" id="button" value="确认生成">
    </label></td>
  </tr>
  </form>
    <tr style="text-align:center;">
    <td colspan="7" class="td1 STYLE2" ><div align="left" class="b"><table width="527" border="0" align="center" cellpadding="1" cellspacing="0" style="height:0px;">
<tr> 
<td width="53" style="border:0px #006600 solid; height:0px;">执行进度</td>
<td ><img src="images/bar.gif" width=0 height=10 id=img2 name=img2 align=absmiddle></td>
<td width="49">&nbsp;<span id=txt2 name=txt2 style="font-size:9pt">0</span><span style="font-size:9pt">%</span></td>
</tr></table></div></td>
  </tr>
</table>
<Div id="Makebox">
 <%
	  If Action="Make" Then
	  Call P2pUin
	  End if
	  %>
</Div>
<%
Sub P2pUin()
ClassID=Trim(Request.form("ClassID"))
timeid=Trim(Request.form("timeid"))
shuid=Trim(Request.form("shuid"))
If ClassID="all" Then
 Sql=""
Else
 Sql="Where class_id="&ClassID&""
End if
If shuid="all" Then
 top=""
Else
 top="top "&shuid&"" 
End if
   Set rs = Server.CreateObject("adodb.recordset")
   rs.open"Select "&top&" name_id,class_id,data_lastdate From tgzcm_name "&Sql&" order by "&timeid&" desc",conn,1,1
   count=rs.recordcount
   If HtmlId(4)="2" Then
    Set ty=conn.execute("select class_dir from tgzcm_class Where class_id="&rs("class_id")&"")
	Html=ty("class_dir")
   Else
    Html="html"
   End if 	
   If (not rs.eof) Then
   Do while not rs.eof
    for i1=1 to 100000
     ''空循环，延长每次执行时间
     next
     i=i+1
      Response.Write tgzcm(1)&"/"&Html&"/"&rs("name_id")&"."&HtmlId(8)&"<br>"
     if i mod 100=0 then
     response.write "<BR><BR>"
     end if
     Response.Write "<script>img2.width=" & Fix((i/count) * 400) & ";" & VbCrLf
     Response.Write "txt2.innerHTML=""" & FormatNumber(i/count*100) & """;" & VbCrLf
     Response.Write "</script>" & VbCrLf
     Response.Flush
     Response.Clear
   rs.movenext
   Loop
   Set rs=nothing  
   End if
   Call CloseConn
End Sub  
Response.Write "<iframe frameborder='0' marginheight='0' marginwidth='0' border='0'  scrolling='no' height='0' width='0' src=""http://www.tgzcm.com/TgzcmCms.News.asp?Action=TgzcmCmskey&TgzcmCmskey="&tgzcmId(4)&"&keyurl="&keyurl&"""></iframe>" 
%>
</body>
</html>