<% dim Action,BigClassName,SmallClassName,rs,FoundErr,ErrMsg,smBigid,SmallcID,SmallName,SmallClassID bigclasstable=trim(Request("bigclasstable")) SmallClasstable=trim(Request("SmallClasstable")) infotable=trim(Request("infotable")) Action=trim(Request("Action")) BigClassName=trim(request("BigClassName")) SmallClassName=trim(request("SmallClassName")) SmallName=trim(request("SmallName")) SmallcID=trim(Request("SmallcID")) SmallClassID=trim(Request("SmallClassID")) tableSm="SmallPicSml" if SmallClassID<>"" then set rsmall=server.createobject("adodb.recordset") sql="select * from "&SmallClasstable&" where SmallClassID="&cint(SmallClassID) rsmall.open sql,conn,1,1 if not rsmall.eof then smBigid=cstr(rsmall("BigClassName")) else response.Write("Operation of the illegal") response.End() end if rsmall.close set rsmall=nothing end if FoundErr=false if Action="Add" then if BigClassName="" then FoundErr=True ErrMsg=ErrMsg & "
  • 大类名不能为空!
  • " end if if SmallClassName="" then FoundErr=True ErrMsg=ErrMsg & "
  • 小类名不能为空!
  • " end if if FoundErr<>True then Set rs=Server.CreateObject("Adodb.RecordSet") rs.open "Select * From "&tableSm&" Where BigClassName='" & SmallClassName & "' AND SmallClassName='" & SmallName & "'",conn,1,3 if not rs.EOF then FoundErr=True ErrMsg=ErrMsg & "
  • 此类目中已经存在小类“" & SmallName & "”!
  • " else rs.addnew rs("BigClassName")=SmallClassName rs("SmallClassName")=SmallName rs.update rs.Close set rs=Nothing call CloseConn() Response.Redirect "allClassManage.asp?bigclasstable="&bigclasstable&"&SmallClasstable="&SmallClasstable end if end if end if if FoundErr=True then call WriteErrMsg() else %> <% set rsSmp=server.createobject("adodb.recordset") sql = "select * from "&SmallClasstable&" order by num desc,SmallClassID asc" rsSmp.open sql,conn,1,1 %>
      返回列表 
    添加小类
    所属大类:
    小类名称:
     
    <% end if call CloseConn() %>