<!--#include file="include/ht.asp"-->
<!--#include file="include/menu_top.asp"-->
<%
id=request.querystring("id")
zt=request.querystring("zt")
if zt=1 then
sql="update xld_main set zt=0 where id="&id&""
elseif zt=0 then
sql="update xld_main set zt=1 where id="&id&""
end if
conn.execute(sql)
%>

<div style="width:100%"><div id="left"><!--#include file="include/menu_left.asp"--></div>
<div id="right" class="right">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="bb">
       <tr>
         <td width="50%" align="left" valign="top"><table width="100%" height="50" border="0" cellpadding="0" cellspacing="0" class="dl1">
           <tr align="center" height="25">
             <td width="89" class="bb1">序 号</td>
             <td width="239" class="bb1">栏 目</td>
             <td width="118" class="bb1">状 态</td>
           </tr>
           <%
			sql="select * from xld_main where id mod 2=1"
			set rs=server.createobject("adodb.recordset")
			rs.open sql,conn,1,1
			do until rs.eof
			zt=rs("zt")
			id=rs("id")
			if zt=1 then
			ztt="<a href='?zt=1&id="&id&"' class='lk_bk'>已开通</a>"
			elseif zt=0 then
			ztt="<a href='?zt=0&id="&id&"'>[ 已关闭 ]</a>"
			end if
			%>
           <tr height="23">
             <td align="center" class="bb1"><%=rs("id")%></td>
             <td align="center" class="bb1"><a href="xie_edit.asp?id=<%=id%>"><%=rs("mc")%></a></td>
             <td align="center" class="bb1"><%=ztt%></td>
           </tr>
           <%
rs.movenext
loop
rs.close
set rs=nothing
%>
         </table></td>
         <td width="50%" align="right" valign="top"><table width="100%" height="50" border="0" cellpadding="0" cellspacing="0" class="dl1">
           <tr align="center" height="25">
             <td width="89" class="bb1">序 号</td>
             <td width="239" class="bb1">栏 目</td>
             <td width="118" class="bb1">状 态</td>
           </tr>
           <%
			sql="select * from xld_main where id mod 2=0"
			set rs=server.createobject("adodb.recordset")
			rs.open sql,conn,1,1
			do until rs.eof
			zt=rs("zt")
			id=rs("id")
			if zt=1 then
			ztt="<a href='?zt=1&id="&id&"' class='lk_bk'>已开通</a>"
			elseif zt=0 then
			ztt="<a href='?zt=0&id="&id&"'>[ 已关闭 ]</a>"
			end if
			%>
           <tr height="23">
             <td align="center" class="bb1"><%=rs("id")%></td>
             <td align="center" class="bb1"><a href="xie_edit.asp?id=<%=id%>"><%=rs("mc")%></a></td>
             <td align="center" class="bb1"><%=ztt%></td>
           </tr>
           <%
rs.movenext
loop
rs.close
set rs=nothing
%>
         </table></td>
       </tr>
    </table>
	<br>
	<form name="form1" method="post" action="xld_action.asp" style="margin:0px">
	<div style="width:100%; text-align:center;">新增二级分类:<input name="mc" type="text" id="mc" class=input>
                  <select name="fl" id="fl" class=input>
				    <%
					sql="select * from xld_main"
					set rs=server.createobject("adodb.recordset")
					rs.open sql,conn,1,1
					do until rs.eof
					mc=rs("mc")
					id=rs("id")
					%>
					<option value="<%=rs("mc")%>"><%=rs("mc")%></option>
					<%
					rs.movenext
					loop
					rs.close
					set rs=nothing
					%>
				  </select>&nbsp;<input type="submit" name="Submit" value="新增" class="button"></div></form><br>
	<div><table width="100%" height="50" border="0" cellpadding="0" cellspacing="0" class="bb">
          <tr align="center" bgcolor="#4E91E8" height="25" style="color:#FFFFFF">
            <td width="18%">序 号</td>
            <td width="34%">所属大类</td>
            <td width="35%">所属小类</td>
            <td width="13%">删除</td>
          </tr>
          <%
			sql="select * from xld_lm order by dl desc"
			set rs=server.createobject("adodb.recordset")
			rs.open sql,conn,1,1
			do until rs.eof
			dl=rs("dl")
			xl=rs("xl")
			id=rs("id")
			
			%>
          <tr height="25">
            <td align="center" class="bb1"><%=rs("id")%></td>
            <td class="bb1">&nbsp;<a href="ins_edit.asp?id=<%=id%>"><%=rs("dl")%></a></td>
            <td class="bb1">&nbsp;<a href="install_edit.asp?id=<%=id%>"><%=rs("xl")%></a></td>
            <td align="center" class="bb1"><a href="xld_action.asp?action=del&id=<%=id%>"><img src="images/del.gif" width="18" height="18" border="0"></a></td>
          </tr>
          <%
rs.movenext
loop
rs.close
set rs=nothing
%>
      </table></div><br><br>
</div></div>
<!--#include file="include/Bottom.asp"-->