
<!--#include file="../inc/Conn.asp"-->
<!--#include file="Inc/Admin.Asp"-->
<!--#include file="Inc/Head.asp" -->
<%
PurviewValue="downloadtclass"
If not CheckAdmin(PurviewValue) then
Response.Write("<script language=""JavaScript"">alert(""越权操作!"");history.go(-1);")
response.end
End If
%>
<%
dim sql,rsBigClass,rsSmallClass
set rsBigClass=server.CreateObject("adodb.recordset")
rsBigClass.open "Select * From BigClass_Down",conn,1,3
%>
<script language="JavaScript" type="text/JavaScript">
function checkBig()
{
  if (document.form1.BigClassName.value=="")
  {
    alert("大类名称不能为空！");
    document.form1.BigClassName.focus();
    return false;
  }
}
function checkSmall()
{
  if (document.form2.BigClassName.value=="")
  {
    alert("请先添加大类名称！");
	document.form1.BigClassName.focus();
	return false;
  }

  if (document.form2.SmallClassName.value=="")
  {
    alert("小类名称不能为空！");
	document.form2.SmallClassName.focus();
	return false;
  }
}
function ConfirmDelBig()
{
   if(confirm("确定要删除此大类吗？删除此大类同时将删除所包含的小类和该类下的所有新闻，并且不能恢复！"))
     return true;
   else
     return false;
	 
}

function ConfirmDelSmall()
{
   if(confirm("确定要删除此小类吗？删除此小类同时将删除该类下的所有新闻，并且不能恢复！"))
     return true;
   else
     return false;
	 
}
</script>
<table width="90" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
        <tr> 
          <td width="50%" align="center" valign="top" class="topbg"><strong>栏目名称</strong></td>
          <td align="center" valign="top" class="topbg"><strong>操作选项</strong></td>
        </tr>
        <tr>
          <td colspan="2" align="center" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" >
            <tr class=tdbg>
              <td width="50%" height="30" align="center" class="Title">　</td>
              <td height="30" align="right" class="Title"><strong><a href="Down_ClassAddBig.asp"><font color="#FFffff">添加下载一级分类</font></a>&nbsp;&nbsp;</td>
            </tr>
            <%
	do while not rsBigClass.eof
%>
            <tr class="tdbg">
              <td width="233" height="22"><img src="../Images/tree_folder4.gif" width="15" height="15"><%=rsBigClass("BigClassName")%></td>
              <td align="right" style="padding-right:10"><a href="Down_ClassAddSmall.asp?BigClassName=<%=rsBigClass("BigClassName")%>"><font color="#FF0000">添加二级分类</font></a> | <a href="Down_ClassModifyBig.asp?BigClassID=<%=rsBigClass("BigClassID")%>">修改</a> | <a href="Down_ClassDelBig.asp?BigClassName=<%=rsBigClass("BigClassName")%>" onClick="return ConfirmDelBig();">删除</a>&nbsp;&nbsp;</td>
            </tr>
            <%
	  set rsSmallClass=server.CreateObject("adodb.recordset")
	  rsSmallClass.open "Select * From SmallClass_down Where BigClassName='" & rsBigClass("BigClassName") & "'",conn,1,1
	  if not(rsSmallClass.bof and rsSmallClass.eof) then
		do while not rsSmallClass.eof
	%>
            <tr bgcolor="#EAEAEA" class="tdbg">
              <td width="233" height="22">&nbsp;&nbsp;<img src="../Images/tree_folder3.gif" width="15" height="15"><%=rsSmallClass("SmallClassName")%></td>
              <td align="right" style="padding-right:10"><a href="Down_ClassModifySmall.asp?SmallClassID=<%=rsSmallClass("SmallClassID")%>">修改</a> | <a href="Down_ClassDelSmall.asp?SmallClassID=<%=rsSmallClass("SmallClassID")%>&SmallClassName=<%=rsSmallClass("SmallClassName")%>" onClick="return ConfirmDelSmall();">删除</a>&nbsp;&nbsp;</td>
            </tr>
            <%
			rsSmallClass.movenext
		loop
	  end if
	  rsSmallClass.close
	  set rsSmallClass=nothing	
	  rsBigClass.movenext
	loop
%>
          </table></td>
        </tr>
      </table>
      <%
rsBigClass.close
set rsBigClass=nothing
%>
<!-- #include file="Inc/Foot.asp" -->
<%
%>