<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

<!--#include file="Connections/conn_news.asp" -->
<!--#include file="yns_config.asp" -->
<!--#include file="yns_chklogin.asp" -->
<% chk_user_login(3) %>
<!--#include file="yns_chkerror.asp" -->
<%
if Trim(Request.QueryString("t"))="" then

Dim rst
Dim rst_numRows

Set rst = Server.CreateObject("ADODB.Recordset")
rst.ActiveConnection = MM_conn_news_STRING
rst.Source = "SELECT * FROM t_type ORDER BY t_id DESC"
rst.CursorType = 0
rst.CursorLocation = 2
rst.LockType = 1
rst.Open()

rst_numRows = 0
%>
<%
Dim rsts
Dim rsts_numRows

Set rsts = Server.CreateObject("ADODB.Recordset")
rsts.ActiveConnection = MM_conn_news_STRING
rsts.Source = "SELECT * FROM t_type_son"
rsts.CursorType = 0
rsts.CursorLocation = 2
rsts.LockType = 1
rsts.Open()

rsts_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rst_numRows = rst_numRows + Repeat1__numRows
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>湖南百润医药有限公司-------</title>
<script language="javascript">
function checkdata(){
    var ex = /^[0-9a-zA-Z_]*$/;
    var retu = ex.test(form1.t_dir.value);
if (document.form1.t_name.value=="") {
window.alert ("请输入大类名称 !")
return false
}
if (document.form1.t_dir.value=="") {
window.alert ("请输入文件夹名称 !")
return false
}
if (retu==false) {
window.alert ("文件夹名称只能是字母, 数字,下划线 !")
return false
}
return true
}
</script>
<link href="style/css.css" rel="stylesheet" type="text/css">
</head>

<body>
<p></p>
<table width="94%" border="1" cellpadding="4" cellspacing="0" class="table-line">
  <tr class="td-title-color">
    <td height="30">站点生成管理</td>
    <td height="30"><a href="#$" onclick="var x=window.open('?t=a','creater','top=200,left=200,width=450,height=150');x.focus()" title="生成所有新闻">生成所有</a></td>
  </tr>
  <%
While ((Repeat1__numRows <> 0) AND (NOT rst.EOF))
%>
  <tr class="td-body-color" onMouseOver=this.style.backgroundColor='#FFFFCC' onMouseOut=this.style.backgroundColor=''>
    <td width="70%" height="25">
      <img src="images/type_split.gif"> 大类名称:<font color="#CC0000"><%=(rst.Fields.Item("t_name").Value)%></font> 文件夹:<font color="#CC0000"><%=(rst.Fields.Item("t_dir").Value)%></font></td>
    <td height="25"><a href="#$" onclick="var x=window.open('?t=a&bid=<%=rst("t_id")%>','creater','top=200,left=200,width=450,height=150');x.focus()" title="生成该大类所有新闻">生成</a></td>
  </tr>
  <% FilterParam = rst.Fields.Item("t_id").value
		rsts.Filter = "ts_pid="&FilterParam
	%>
  <% do while not rsts.eof %>
  <tr onMouseOver=this.style.backgroundColor='#FFFFCC' onMouseOut=this.style.backgroundColor=''>
    <td height="22" class="pad-left">
      <img src="images/type_split.gif"> 小类名称:<font color="#FF0000"><%= (rsts.Fields.Item("ts_name").Value) %></font> 文件夹:<font color="#FF0000"><%= (rsts.Fields.Item("ts_dir").Value) %></font> </td>
    <td height="22"><a href="#$" onclick="var x=window.open('?t=a&sid=<%=rsts("ts_id")%>','creater','top=200,left=200,width=450,height=150');x.focus()" title="生成该小类所有新闻">生成</a></td>
  </tr>
  <%
		 rsts.movenext
		 loop
		%>
  <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rst.MoveNext()
Wend
%>
</table>

<%
rst.Close()
Set rst = Nothing
%>
<%
rsts.Close()
Set rsts = Nothing
%>
<%else%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr >
    <td id=d>正在生成...耐心等待.... </td>
  </tr>
  <tr>
    <td height="23"><img src="/images/probar.gif" width="0%" height="20" alt="" id="pro"></td>
  </tr>
  <tr>
    <td><div align="center" id="counter"></div></td>
  </tr>
  <tr>
    <td><input name="button" type="button" onClick="window.close();" value="取消"></td>
  </tr>
</table>
<iframe src="ds.asp?bid=<%=request.QueryString("bid")%>&sid=<%=request.QueryString("sid")%>" width="0" height="0"></iframe>
<%end if%>
<p>&nbsp;</p>
</body>
</html>