<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "tuzh_pri.asp"-->
<!--#include file = "../setup.asp"-->

<!--#include file="../connadmin.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../img/css.css"><title></title>
<title><%=site_name%></title>
<script language="vbscript">
function addnew()
if form1.addlm.value<>"" then
ck=msgbox("你确定新增加《"&form1.addlm.value&"》这个一级栏目？",1,"新增一级栏目确认")
if ck=1 then
addnew=true
else
addnew=false
end if
else
msgbox("请添上你要新增的一级栏目名称！")
addnew=false
end if
end function

function addnew2()
if form2.addlm2.value<>"" and form2.lmlist.value<>"" then
ck=msgbox("你确定新增加《"&form2.addlm2.value&"》这个二级栏目？",1,"新增二级栏目确认")
if ck=1 then
addnew2=true
else
addnew2=false
end if
else
msgbox("请添上你要新增的二级栏目名称！")
addnew2=false
end if
end function

function xg()
if form3.lmlist.value="" then
msgbox("请选择要操作的一级栏目！")
xg=false
elseif form3.xglm.value="" then
msgbox("请添上要改的名称！")
xg=false
else
ck=msgbox("你把一级栏目《"&form3.lmlist.value&"》改名为：《"&form3.xglm.value&"》？",1,"一级栏目改名确认")
if ck=1 then
xg=true
else
xg=false
end if
end if
end function

function xg2()
if form4.lm2list.value="" then
msgbox("请选择要操作的二级栏目！")
xg2=false
elseif form4.xglm2.value="" then
msgbox("请添上要改的名称！")
xg2=false
else
ck=msgbox("你把二级栏目《"&form4.lm2list.value&"》改名为：《"&form4.xglm2.value&"》？",1,"二级栏目改名确认")
if ck=1 then
xg2=true
else
xg2=false
end if
end if
end function

function del()
if form5.lmlist.value="" then
msgbox("请选择要操作的一级栏目！")
del=false
else
ck=msgbox("你确认把一级栏目《"&form5.lmlist.value&"》删除？此举将删除该栏目下所有的二级栏目以及所有文章！",1,"删除一级栏目确认")
if ck=1 then
del=true
else
del=false
end if
end if
end function

function del2()
if form6.lm2list.value="" then
msgbox("请选择要操作的二级栏目！")
del2=false
else
ck=msgbox("你确认把二级栏目《"&form6.lm2list.value&"》删除？此举将删除该二级栏目下的所有文章！",1,"删除二级栏目确认")
if ck=1 then
del2=true
else
del2=false
end if
end if
end function

function bing()
if form7.lmlist.value="" or form7.lmlist1.value="" then
msgbox("请选择要操作的一级栏目！")
bing=false
else
ck=msgbox("你确认合并这两个一级栏目?",1,"合并一级栏目确认")
if ck=1 then
bing=true
else
bing=false
end if
end if
end function

function bing2()
if form8.lm2list.value="" or form8.lm2list1.value="" then
msgbox("请选择要操作的二级栏目！")
bing2=false
else
ck=msgbox("你确认合并这两个二级栏目?",1,"合并二级栏目确认")
if ck=1 then
bing2=true
else
bing2=false
end if
end if
end function
</script>
</head>
<style type=text/css>
body  {
SCROLLBAR-FACE-COLOR: #9CC5D7;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #006699; 
SCROLLBAR-3DLIGHT-COLOR: #006699; 
SCROLLBAR-ARROW-COLOR: #330000; 
SCROLLBAR-TRACK-COLOR: #E2F3F1; 
SCROLLBAR-DARKSHADOW-COLOR: #ffffff;}
</style>

<body>
<table class="border" width="98%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr> 
    <td height="565" align="center" valign="top" class="bg_low"> 
      <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="center" valign="middle" class="bgtop"><font color="#FFFFFF"><b>栏目管理</b></font> 
          </td>
        </tr>
      </table>
      <%
set rs=server.createobject("adodb.recordset")
sql="select * from erkind order by yiid"
rs.open sql,conn,1,1
langmu2=""
if not rs.eof then
rs.movefirst
end if
do while not rs.eof
langmu2=langmu2&"<option value='"&rs("erid")&"'>"&rs("ername")&"</option>"
rs.movenext
loop
rs.close


'***********************************************************
sql="select * from yikind"
rs.open sql,conn,1,1
langmu1=""
if not rs.eof then
rs.movefirst
end if
do while not rs.eof
langmu1=langmu1&"<option value='"&rs("yiid")&"'>"&rs("yiname")&"</option>"
rs.movenext
loop
rs.close
%>
      <table width="653" height="280" border="1" cellpadding="2" cellspacing="0" bordercolor="#ABCEDD">
        <tr> 
          <form name="form1" action="dokind1.asp?chuli=addnew" method="POST" >
            <td width="107"  height="30" align="center">新增一级栏目</td>
            <td width="431" height="30">&nbsp; 
              <input type="text" name="addlm" size="20" ></td>
            <td width="107" height="30" align="center"> <input type="submit" value="新增一级栏目" name="B1" ></td>
          </form>
        </tr>
        <tr> 
          <form name="form2" action="dokind2.asp?chuli=addnew" method="POST" onsubmit="javascript:return addnew2();">
            <td width="107"  height="30" align="center">新增二级栏目</td>
            <td width="431" height="30" >&nbsp; <select size="1" name="lmlist" >
                <option selected>一级栏目</option>
                <%=langmu1%> 
              </select>
              下增加
              <input type="text" name="addlm2" size="18" ></td>
            <td width="107" height="30" align="center" > <input type="submit" value="新增二级栏目" name="B1"  ></td>
          </form>
        </tr>
        <tr> 
          <form name="form3" action="dokind1.asp?chuli=xg" method="POST" onsubmit="javascript:return xg();">
            <td width="107"  height="30" align="center">一级栏目改名</td>
            <td width="431" height="30">&nbsp; 
              <select size="1" name="lmlist" >
                <option selected>一级栏目</option>
                <%=langmu1%> 
              </select>
              改名为：
              <input type="text" name="xglm" size="12" ></td>
            <td width="107" height="30" align="center"> <input type="submit" value="一级栏目改名" name="B2" ></td>
          </form>
        </tr>
        <tr> 
          <form name="form4" action="dokind2.asp?chuli=xg" method="POST" onsubmit="javascript:return xg2();">
            <td width="107"  height="30" align="center">二级栏目改名</td>
            <td width="431" height="30" >&nbsp; <select size="1" name="lm2list" >
                <option selected>二级栏目</option>
                <%=langmu2%> 
              </select>
              改名为：
              <input type="text" name="xglm2" size="12" ></td>
            <td width="107" height="30" align="center" > <input type="submit" value="二级栏目改名" name="B2" ></td>
          </form>
        </tr>
        <tr> 
          <form name="form5" action="dokind1.asp?chuli=del" method="POST" onsubmit="javascript:return del();">
            <td width="107"  height="30" align="center">删除一级栏目</td>
            <td width="431" height="30">&nbsp; 
              <select size="1" name="lmlist" >
                <option selected>一级栏目</option>
                <%=langmu1%> </select> </td>
            <td width="107" height="30" align="center"> <input type="submit" value="删除一级栏目" name="B3" ></td>
          </form>
        </tr>
        <tr> 
          <form name="form6" action="dokind2.asp?chuli=del" method="POST" onsubmit="javascript:return del2();">
            <td width="107"  height="30" align="center">删除二级栏目</td>
            <td width="431" height="30" >&nbsp; <select size="1"?????1 name="lm2list" >
                <option selected>二级栏目</option>
                <%=langmu2%> </select></td>
            <td width="107" height="30" align="center" > <input type="submit" value="删除二级栏目" name="B3" ></td>
          </form>
        </tr>
        <tr> 
          <form name="form7" action="dokind1.asp?chuli=bing" method="POST" onsubmit="javascript:return bing();">
            <td width="107"  height="30" align="center">合并一级栏目</td>
            <td width="431" height="30">&nbsp; 
              <select size="1" name="lmlist" >
                <option selected>一级栏目</option>
                <%=langmu1%> 
              </select>
              合并到&nbsp;&nbsp;
              <select size="1" name="lmlist1" >
                <option selected>一级栏目</option>
                <%=langmu1%> </select> </td>
            <td width="107" height="30" align="center"> <input type="submit" value="合并一级栏目" name="B3" ></td>
          </form>
        </tr>
        <tr> 
          <form name="form8" action="dokind2.asp?chuli=bing" method="POST" onsubmit="javascript:return bing2();">
            <td width="107"  height="30" align="center">合并二级栏目</td>
            <td width="431" height="30" >&nbsp;
<select size="1" name="lm2list" >
                <option selected>二级栏目</option>
                <%=langmu2%> 
              </select>
              合并到 
              <select size="1" name="lm2list1" >
                <option selected>二级栏目</option>
            <%=langmu2%> </select></td>
            <td width="107" height="30" align="center" > <input type="submit" value="合并二级栏目" name="B3" ></td>
          </form>
        </tr>
      </table> </td>
  </tr>
</table>
</body>
</html>
