<% dim SmallClassID,Action,BigClassName, SmallClassName, OldSmallClassName,rs,FoundErr,ErrMsg,smBigid,SmallcID,SmallName bigclasstable=trim(Request("bigclasstable")) SmallClasstable=trim(Request("SmallClasstable")) infotable=trim(Request("infotable")) SmallClassID=trim(Request("SmallClassID")) Action=trim(Request("Action")) num=trim(request("num")) BigClassName=trim(Request("BigClassName")) SmallClassName=trim(Request("SmallClassName")) OldSmallClassName=trim(request("OldSmallClassName")) picurl=trim(Request("picurl")) SmallName=trim(request("SmallName")) SmallcID=trim(Request("SmallcID")) 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 if SmallcID="" then Response.Redirect "allClassManage.asp?bigclasstable="&bigclasstable&"&SmallClasstable="&SmallClasstable end if Set rs=Server.CreateObject("Adodb.RecordSet") rs.Open "Select * from "&tableSm&" where SmallClassID="&SmallcID&"",conn,1,3 if rs.Bof or rs.EOF then FoundErr=True ErrMsg=ErrMsg & "
  • 此小类不存在!
  • " else if Action="Modify" then if SmallName="" then FoundErr=True ErrMsg=ErrMsg & "
  • 小类名不能为空!
  • " else rs("BigClassName")=SmallClassName rs("SmallClassName")=SmallName rs("num")=num rs.update rs.Close set rs=Nothing ' if SmallClassName<>OldSmallClassName then ' conn.execute "Update "&infotable&" set SmallClassName='" & SmallClassName & "' where BigClassName='" & BigClassName & "' and SmallClassName='" & OldSmallClassName & "'" 'end if 'call CloseConn() Response.Redirect "allClassManage.asp?bigclasstable="&bigclasstable&"&SmallClasstable="&SmallClasstable end if end if if FoundErr=True then call WriteErrMsg() else %>
      返回列表 
    修改小类名称
    所属大类: <% Set rsbig=Server.CreateObject("Adodb.RecordSet") sql = "select * from "&bigclasstable rsbig.open sql,conn,1,1 if rsbig.eof then response.write "请先添加栏目。" else %> "> ">  排序:" size="5" maxlength="50"> (必须是数字,数字大,排在前)
    小类名称: " size="50">
       
     
    <% end if end if rs.close set rs=nothing call CloseConn() %>