<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<%
	useflag=1
%>
<!--#include file="flag.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if
	if Trim(Request.Form("what"))="" then
	response.write "<script language=JavaScript>" & chr(13) & "alert('项目不能为空！');" & "history.back()" & "</script>" 
	Response.End
	end if
	set rs=server.CreateObject("adodb.recordset")
	sql="select id from "&Trim(Request.QueryString("how"))&"list where "&Trim(Request.QueryString("how"))&"class='"&Trim(Request.Form("what"))&"'"
	rs.open sql,conn,2,3
	if not rs.eof then
	rs.close
	set rs=nothing
	set conn=nothing
	response.write "<script language=JavaScript>" & chr(13) & "alert('此项目已经存在');" & "history.back()" & "</script>" 
	Response.End
	else
	rs.close
	sql="insert into "&request("how")&"list("&request("how")&"class) values('"&request("what")&"')"
	rs.open sql,conn,2,3
	set rs=nothing
	set conn=nothing
	response.write "<script language=JavaScript>" & chr(13) & "alert('项目添加成功！');"&"window.location.href = 'admin_list.asp'"&" </script>"
	end if
%>
