<!-- #include file="conn.asp" -->
<!-- #include file="admin.asp" -->
<%Call Head()
Call saycardd("添加栏目类别")
 IF KEY<>0 then
  Call Error("你的权限不足！")
  end if
dim id,lxl,class1,num,relid,cent,vipin,activee,numm
 id= cint(request("id"))
        lxl= cint(request("lxl"))
        class1=request("class1")
        relid=request("relid")
        num=request("num")
        reidd=request("reidd")
        numm=request("numm")
        cent=request("cent")
        mm=request("mm")
        vipin=request("vipin")
        if mm="" then mm="0"
if class1="" then
        Call Error("栏目名称不能为空！")
        end if
if relid="" or IsNumeric(relid)=False then
 relid=0
  end if
if vipin="" or IsNumeric(vipin)=False then
 vipin=0
  end if
if num="" or IsNumeric(num)=False then
 num=0
  end if
  if cent="" or IsNumeric(cent)=False then
 cent=0
  end if
        pid=request.form("pid")
if pid="" or IsNumeric(pid)=False then
  Call Error("排序无效！")
  end if
        br=request.form("br")
if br="" or IsNumeric(br)=False then
  Call Error("换行无效！")
  end if
  lx=request.form("lx")
if lx="" or IsNumeric(lx)=False then
  Call Error("类型无效！")
  end If
  if lx=0 or IsNumeric(lx)=False then
  Call Error("类型无效！")
  end if
        parent=request.form("parent")
        if parent="" or IsNumeric(parent)=False then parent=0
        lid=request.form("lid")
 if lid <>"" then
if IsNumeric(lid)=False then
  Call Error("ID无效！")
  end if
  end if
        img=request.form("img")
        url=request.form("url")
        wmltxt=request.form("wmltxt")
        active=request.form("active")
		activee=request.form("activee")
        opera=request.form("opera")
	set rs=server.createobject("adodb.recordset")
	sql="select * from class" 
	rs.open sql,conn,2,3
	rs.addnew
	rs("class")=class1
        rs("pid")=pid
        rs("br")=br
        rs("lx")=lx
        rs("parent")=parent
        rs("lid")=numm
        rs("relid")=relid
		rs("ids")=reidd
        rs("cent")=activee
        rs("prentmm")=mm
        rs("vipin")=vipin
        rs("img")=img
        rs("url")=url
        rs("wmltxt")=wmltxt
        rs("active")=active
        rs("opera")=opera
        rs("num")=num
	rs.update
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
%>
栏目添加成功!
<br/>----------<br/>
<%if id<>0 then %>
<a href="Clist.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;id=<%=id%>&amp;lx=<%=lxl%>">[栏目分类]</a><br/>
<%end if%>
<a href='class.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[栏目分类]</a><br/>
<a href="index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[后台管理]</a>
<%call headsay()%>
