<!-- #include virtual = "/include/myopen.asp" -->
<%
	set RS = Server.CreateObject("ADODB.RecordSet")
	set RS1 = Server.CreateObject("ADODB.RecordSet")
%>
<%'类别填加
	'判断用户是否登陆过
	IF Request.Cookies ("Admin_name") = "" OR Request.Cookies ("Admin_Pass") ="" THEN
	'没有登陆
	Response.Redirect ("/manage/Admin_Login.ASP")
	END IF
	IF REQUEST("HOME") <> "" THEN
	Response.Redirect ("/manage/default.asp")
	END IF
	IF REQUEST("Add") <> "" THEN
	Response.Redirect ("/manage/name_add.asp")
	END IF
	'用户已经成功注册

	IF REQUEST("ASAVE") <> "" THEN
				SQL = "INSERT INTO QIANBI (NUM,CLASS,ZLB,LB,NO1,JG,BJG,DW,ZMTA,BMTA,BZ,ZMTP,BMTP,STATUS)"
				SQL = SQL & " VALUES(" & REQUEST("NUM") & ",'" & REQUEST("CLASS") & "','"
				SQL = SQL &  REQUEST("ZLB") & "','" & REQUEST("LB") & "','"
				SQL = SQL &  REQUEST("NO1") & "'," & REQUEST("JG") & ","
				SQL = SQL &  REQUEST("BJG") & ",'" & REQUEST("DW") & "','"
				SQL = SQL &  REQUEST("ZMTA") & "','" & REQUEST("BMTA") & "','"
				SQL = SQL &  REQUEST("BZ") & "','" & REQUEST("ZMTP") & "','"
				SQL = SQL &  REQUEST("BMTP") & "','" & REQUEST("STATUS") & "')"
				'Response.Write SQL
				CONN.Execute (SQL)	
				Response.Redirect ("name_add.asp")
	END IF
	
	IF REQUEST("MSAVE") <> "" THEN
				SQL = "UPDATE QIANBI SET CLASS = '" & REQUEST("CLASS") & "',ZLB='"
				SQL = SQL & REQUEST("ZLB") & "',LB = '" & REQUEST("LB") & "',NO1='"
				SQL = SQL & REQUEST("NO1") & "',JG = " & REQUEST("JG") & ",BJG="
				SQL = SQL & REQUEST("BJG") & ",DW = '" & REQUEST("DW") & "',ZMTA = '" & REQUEST("ZMTA") & "',BMTA='"
				SQL = SQL & REQUEST("BMTA") & "',ZZDW = '" & REQUEST("ZZDW") & "',BZ='"
				SQL = SQL & REQUEST("BZ") & "',ZMTP = '" & REQUEST("ZMTP") & "',BMTP='"
				SQL = SQL & REQUEST("BMTP") & "',STATUS = '" & REQUEST("STATUS") & "'"
				SQL = SQL & " WHERE NUM = " & REQUEST("NUM") & ""
				'Response.Write sql
				CONN.Execute (SQL)	
				Response.Redirect ("name_search.asp?PageNo=" & request("PageNo") & "&search=all")

	END IF
  %>
