<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "tuzh_pri.asp"-->
<!--#include file = "../setup.asp"-->
<!--#include file="../connadmin.asp"-->
<%action=request("chuli")
select case action
       case "addnew" 
	   			
			set rstxt=server.createobject("ADODB.recordset")
			sqltxt="select * from erkind"
			rstxt.open sqltxt,conn,3,3
						rstxt.addnew
						rstxt("yiid") = trim(request.form("lmlist"))
						rstxt("ername") = trim(request.form("addlm2"))
						rstxt("erorder") = cint(request.form("erid"))
				        rstxt("ernum") = cint( er_lanmu_no)
						rstxt.update
			rstxt.close
			set rstxt=nothing
			'	conn.execute("insert into [erkind] (yiid,ername) values ("&trim(request.form("lmlist"))&",'"&trim(request.form("addlm2"))&"')")
	   case "xg" conn.execute("update [erkind] set ername='"&trim(request.form("xglm2"))&"' where erid="&trim(request.form("lm2list"))&"")
	   case "del" conn.execute("delete from [erkind] where erid="&trim(request.form("lm2list"))&"")
	   case "bing" 
	   	                set rs=nothing
	                set rs=conn.execute("select * from [erkind] where erid="&trim(request.form("lm2list1"))&"")
                       lmid=rs("yiid")
                        rs.close
 
                       conn.execute("delete from [erkind] where erid="&trim(request.form("lm2list"))&"")
                       conn.execute("update [news] set yiid="&lmid&",erid="&request("lm2list1")&" where erid="&request("lm2list")&"")
end select
conn.close
response.write "<script>this.location.href='addkind.asp';</script>"
%>
