<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "tuzh_pri.asp"-->
<!--#include file="../connadmin.asp"-->
<%action=request("chuli")
select case action
       case "addnew"
	   
			set rstxt=server.createobject("ADODB.recordset")
			sqltxt="select * from yikind"
			rstxt.open sqltxt,conn,3,3
						rstxt.addnew
						rstxt("yiname") = trim(request.form("addlm"))
						rstxt("yiorder") = rstxt("yiid")
						rstxt.update
			rstxt.close
            response.write "<script>alert('请接下来在新添加的一级栏目下面添加二级栏目！');</script>"
	    'conn.execute("insert into [yikind] (yiname) values ('"&trim(request.form("addlm"))&"')")
	   case "xg" conn.execute("update [yikind] set yiname='"&trim(request.form("xglm"))&"' where yiid="&trim(request.form("lmlist"))&"")
	   case "del" conn.execute("delete from [yikind] where yiid="&trim(request.form("lmlist"))&"")
	   case "bing"  
	                set rs=nothing
	                set rs=conn.execute("select * from [yikind] where yiid="&trim(request.form("lmlist1"))&"")
                       lmid=rs("yiid")
                        rs.close
					set rs=nothing
					set rs=conn.execute("select * from [yikind] where yiid="&trim(request.form("lmlist"))&"")
                       lmidshan=rs("yiid")
                        rs.close
                       conn.execute("delete from [yikind] where yiid="&lmidshan&"")
                       conn.execute("update [news] set yiid="&lmid&" where yiid="&lmidshan&"")
                         conn.execute("update [erkind] set yiid="&lmid&" where yiid="&lmidshan&"")
                        response.write "<script>alert('一级栏目合并成功！');</script>"
end select
conn.close
response.write "<script>this.location.href='addkind.asp';</script>"
%>
