<%@ LANGUAGE = VBScript.Encode %>
<!-- #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/class_add.asp")
	END IF
	'用户已经成功注册
	IF REQUEST("ASAVE") <> "" THEN
	SQL = "SELECT * FROM CLASS WHERE  CLASS_NAME = '" & REQUEST("CLASS_NAME") & "'"
		RS.Open SQL,CONN,adOpenKeyset,adLockReadOnly
			IF RS.RecordCount >0 THEN
				Response.Write "记录已经存在，请返回从新填写"
			ELSE
				SQL = "INSERT INTO CLASS VALUES('" & REQUEST("CLASS_NO") & "','"
				SQL = SQL  & REQUEST("CLASS_NAME") & "')"
				CONN.Execute (SQL)	
				Response.Redirect ("class_add.asp")
			END IF	
	END IF
	
	IF REQUEST("MSAVE") <> "" THEN
				SQL = "UPDATE CLASS SET CLASS_NAME='"
				SQL = SQL & REQUEST("CLASS_NAME") & "' WHERE CLASS_NO = '" & REQUEST("NO") & "'"
				CONN.Execute (SQL)	
				Response.Redirect ("class_slD14xl^Vr#@#@&73gf~qw@#@&,PuwEBAA==^#~@%>
1zHAJbP'~rB~_3IAP/Jz??mH}PxPEE,[~"25j2UKvE1}JbPLPEvr@#@&i7diZrgH 2X+1EO+~cUpJ#i@#@&id77"+/2G	/nR"n9k.mDP`rm^C/k{d+mD^4cl/a_/lD14xl^Vr#@#@&73gf~qw@#@&,PuwEBAA==^#~@%>
