<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<%
dim rs,sql,class1,class2,paixu
class1=request("class1")
class2=trim(request("class2"))
paixu=trim(request("paixu"))
if class1="" then
response.write "<li>错误，类别为空！"
response.write "<meta http-equiv=refresh content=""2;URL=fenlei.asp"">"
response.end
end if
if class2="" then
response.write "<li>错误，类别为空！"
response.write "<meta http-equiv=refresh content=""2;URL=fenlei.asp"">"
response.end
end if
if paixu="" then
response.write "<li>错误，类别为空！"
response.write "<meta http-equiv=refresh content=""2;URL=fenlei.asp"">"
response.end
end if
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [jle_class2] where class2='"&class2&"' order by paixu desc" 
rs.open sql,conn,1,3
if rs.eof then
rs.addnew
rs("class1")=class1
rs("class2")=class2
rs("paixu")=paixu
rs.update
response.write "类别添加成功！！<br>"
response.write "<a href=""fenlei_2.asp?id="&request("id")&""">继续添加</a>"
else
response.write "类别已经存在，请确认你的输入是正确的！"
response.write "<meta http-equiv=refresh content=""2;URL=fenlei.asp"">"
response.end
end if
rs.close
set rs=nothing
closedb
%>