<%Session.CodePage=65001%> BdeCMS网站后台管理登陆 <%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 nsclass where ns_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 nsclass where ns_id="&theX&"" rs.open sql,conn,1,3 if rs.eof then call backurl("容错是个好习惯!") else rs("ns_name")=theName rs("nb_id")=theClass if theOrd<>"" then rs("ns_order")=theOrd end if rs("ns_wtime")=now() rs("ns_note")=thenote rs("Fileurl")=picpath rs.update rs.close set rs=nothing end if '----------------------------因为牵涉到大类ID的修改,所以相关新闻也要跟这修改 conn.execute("update bdnews set nb_id="&theClass&" where ns_id="&theX&"") conn.close set conn=nothing response.Redirect("NCMag.asp") end if%>
后台管理:>> 小类修改

<%theX=trim(request("theX")) Set rssmall=Server.Createobject("Adodb.Recordset") sql="select * from nsclass where ns_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 nbclass where nb_id="&rssmall("nb_id")&"" rsbig.open sql,conn,1,3 if not rsbig.eof then TheB=rsbig("nb_name") rsbig.close set rsbig=nothing end if%>
小类修改
小类名称 " /> " /> " />
所属类别 <%=Clachg(0)%>
排  序 " size="4" maxlength="4"/>
简  介
上传图片 " size="50" />
 
<%rssmall.close set rssmall=nothing end if%>