<% dim SmallClassID,Action,BigClassName, SmallClassName, OldSmallClassName,rs,FoundErr,ErrMsg 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")) if SmallClassID="" then Response.Redirect "allClassManage.asp?bigclasstable="&bigclasstable&"&SmallClasstable="&SmallClasstable end if Set rs=Server.CreateObject("Adodb.RecordSet") rs.Open "Select * from "&SmallClasstable&" where SmallClassID="&SmallClassID&"",conn,1,3 if rs.Bof or rs.EOF then FoundErr=True ErrMsg=ErrMsg & "
  • 此小类不存在!
  • " else if Action="Modify" then if SmallClassName="" then FoundErr=True ErrMsg=ErrMsg & "
  • 小类名不能为空!
  • " end if rs("BigClassName")=BigClassName rs("SmallClassName")=SmallClassName rs("picurl")=picurl 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 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="60">
       
     
    <% end if end if rs.close set rs=nothing call CloseConn() %>