<%call log_chk()%> <% if request("myact")="mod" then dim theName,oldName,theX,theClass,thenote,picpath theX=trim(request("theX")) theName=trim(request("thename")) oldName=trim(request("oldname")) theClass=trim(request("theclass")) theOrd=trim(request("theOrd")) thenote=request("thenote") picpath=request("picpath") if theName="" then call backurl("类名不能为空!") end if '-----------------------避免重复 ' if theName<>oldName then ' Set rs=Server.Createobject("Adodb.Recordset") ' sql="select * from csclass where cs_name='"&theName&"'" ' rs.open sql,conn,1,3 ' if not rs.eof and not rs.bof then ' call backurl("该类名已存在!") ' rs.close ' set rs=nothing ' end if ' end if '-----------------------开始修改 Set rs=Server.Createobject("Adodb.Recordset") sql="select * from csclass where cs_id="&theX&"" rs.open sql,conn,1,3 if rs.eof then call backurl("容错是个好习惯!") else rs("cs_name")=theName rs("cb_id")=theClass if theOrd<>"" then rs("cs_order")=theOrd end if rs("cs_wtime")=now() rs("cs_note")=thenote rs("Fileurl")=picpath rs.update rs.close set rs=nothing end if '----------------------------因为牵涉到大类ID的修改,所以相关新闻也要跟这修改 conn.execute("update bdcp set cb_id="&theClass&" where cs_id="&theX&"") conn.close set conn=nothing response.Redirect("PCMag.asp") end if %>
后台管理:>> 小类修改

<% theX=trim(request("theX")) Set rssmall=Server.Createobject("Adodb.Recordset") sql="select * from csclass where cs_id="&theX&"" rssmall.open sql,conn,1,3 if not rssmall.eof and not rssmall.bof then Set rsbig=Server.Createobject("Adodb.Recordset") sql="select * from cbclass where cb_id="&rssmall("cb_id")&"" rsbig.open sql,conn,1,3 if not rsbig.eof then TheB=rsbig("cb_name") rsbig.close set rsbig=nothing end if %>
小类修改
小类名称 " /> " /> " />
所属类别 <%=Clachg(1)%>
排  序 " size="4" maxlength="4"/>
简  介
上传图片 " size="50" />
 
<%rssmall.close set rssmall=nothing end if%>