<!--#include file="function.asp"-->
<%CheckAdmin2%>
<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<%
dim i
currFile="888wang_sclass_main.asp"
i=0 
MaxList=9
set rs=server.createobject("adodb.recordset")

sql="select * from class order by classid"
rs.open sql,conn,1,1
i=request("id")
if i="" then i=rs("Classid")
%>
<div align="center">
<center>
<form method="POST" action="888wang_sclass_add.asp?act=add&Classid=<%=rs("Classid")%>" align="center">
<table border="0" width="96%" cellspacing="0" cellpadding="0"  bordercolorlight="#000000">
<tr>
  <td width="100%" height="20" align=center class="bg1"><font color="white"><b>分　类 管 理</b></font></td>
</tr>

<tr>
  <td width="100%" align=center><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" class="bordercolor">   
          <td width="20%" background="tt90/bgleft.gif" height=20 align=center><b>总类</b></td>
          <td width="40%" background="tt90/bgleft.gif" height=20 align=center><b>生成HTM</b></td>
          <td width="40%" background="tt90/bgleft.gif" height=20 align=center><b>添加分类</b></td>
        </tr>
 
      <%
do while not rs.eof
	i=i+1
%>     
        <tr>
          <td width="20%"  height=25 align=center><a title="点击进入管理 <%=rs("class")%> 的二级分类" href=888wang_sclass_all.asp?id=<%=rs("Classid")%>><%=rs("Class")%></a></td>
		  
          <td width="40%" height=25 align=left><a title='生成 <%=rs("class")%> 的所有二级分类' href='make_mlist.asp'><font color=BLUE>1.生成分类HTM文件</font></a>&nbsp;&nbsp;&nbsp;&nbsp;<br>
            <a title='生成 <%=rs("Class")%> 的所有歌手相关专辑歌曲列表' href='make_playall.asp'><font color=BLUE>2.生成歌曲HTM</font></a>&nbsp;&nbsp;<br>
          </td>
			
			
          <td width="40%" height=25 align=center><input class=input type="text" name="SClass" size="15">
            &nbsp;&nbsp;
            <input class=input type="submit" value="添 加" name="B1"></td>
			
        </tr>

      <%
if (i mod (MaxList/2)=0) and i>=(MaxList/2) then

	end if
	if i>=MaxList then exit do
    rs.movenext
	loop
	rs.close
		%>
    </table>
        </form>
    </center>
</div>


<%
dim ii
set rs=server.createobject("adodb.recordset")
set rs2=server.createobject("adodb.recordset")

sql="select * from class order by classid"
rs.open sql,conn,1,1
ii=request("id")
if ii="" then ii=rs("Classid")
do while not rs.eof
rs.movenext
loop
rs.close
sql="select * from class where classid="&ii
rs.open sql,conn,1,1
if rs.eof then
else
%>
     <div align="center">
      <center>
        <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" class="bordercolor">
        <tr class="bg1">
          <td width="100%" height="22" background="tt90/bgleft.gif" align=center><b>二 级 分 类 管 理</b></td>
        </tr>
<%
	sql2="select * from SClass where Classid="&rs("Classid")&" order by Sclassid"
		rs2.open sql2,conn,1,1
		if rs2.eof then
%>
              <tr><td align="center">尚无任何二级分类</td></tr>
<%
			else
			j=0
			do while not rs2.eof
			j=j+1
%>

		<tr>
          <td width="100%" height="22" align=left>
                <div align="center">
                  <table border="0" cellpadding="0" cellspacing="0" width="100%">
                  <form method="POST" action="888wang_sclass_add.asp?act=rename&SClassid=<%=rs2("SClassid")%>" id=form<%=j%> name=form<%=j%>>
                    <tr>
                      <td width="5%"  height=22 align=left>
                     
    &nbsp;&nbsp;<%=rs2("SClassid")%>.</td>
                      <td width="37%" height=22><input size=15 type="text" name="SClass" class=input value="<%=rs2("SClass")%>">&nbsp;&nbsp;<input class=input type="submit" value="改 名" name="Submit"></td>
                      <td width="58%" height=22 align="right"><a href="888wang_song_add.asp?sclassid=<%=rs2("SClassID")%>">添加dj</a>&nbsp;&nbsp;<a href="888wang_song_main.asp?sclassid=<%=rs2("SClassID")%>">此类所有dj</a>&nbsp;&nbsp;<a title='生成 <%=rs2("SClass")%> 的所有dj列表' href='make_mlist.asp?sclassidAct=<%=rs2("sclassid")%>'><font color=BLUE> 生成此类所有dj列表</font></a>&nbsp;&nbsp;<a title="不到万一请不要用此功能" href='888wang_sclass_add.asp?act=del&SClassid=<%=rs2("SClassID")%>' onClick="{if(confirm('确定要删除记录吗?')){return true;}return false;}"><font color=red>删除</font></a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                     
                    </tr>
                   </form>
                  </table>
                </div>
		  </td>
        </tr>
<%
			rs2.movenext
			loop
		end if
		rs2.close

end if
rs.close
%>
      </table>
	  <br>
     </center>
    </div>
<% 
set rs=nothing
set rs2=nothing
conn.close
set conn=nothing

%>
</body>
</html>






