<% editid=trim(request("editid")) saveid=trim(request("saveid")) delid=trim(request("delid")) lb1=trim(request("lb1")) lbid=trim(request("lbid")) lbsaveid=trim(request("lbsaveid")) lbeditid=trim(request("lbeditid")) addlb=trim(request("addlb")) lb2=trim(request("lb2")) lbdelid=trim(request("lbdelid")) sdmb=trim(request("sdmb")) lmid=trim(request("lmid")) mbid=trim(request("mbid")) if lb1<>"" and editid="" and saveid="" then conn.Execute "insert into [xsprolb] ([lb1]) values('"&lb1&"')" conn.close:set conn=nothing Response.Redirect "?" elseif lb1<>"" and editid="" and saveid<>"" then conn.Execute "update [xsprolb] set [lb1]='"&lb1&"' where id="&clng(saveid) conn.close:set conn=nothing Response.Redirect "?" elseif lb1="" and editid<>"" and saveid="" then set rs = Server.CreateObject("ADODB.RecordSet") rs.Open "select * from [xsprolb] where ID="&editid&" order by id desc",conn,1,1 if rs.recordcount<>0 then elb1=rs("lb1") end if rs.close:set rs=nothing elseif delid<>"" then conn.Execute "delete from [xsprolb] where ID="&Clng(delid) conn.Execute "delete from [xsprolb] where LBID="&Clng(delid) end if if lbeditid="" and lbsaveid="" and lb2<>"" and lbid<>"" then 'conn.Execute "insert into [xsprolb] ([lb2],[lbid]) values('"&lb2&"',"&lbid&")" set rs = Server.CreateObject("ADODB.RecordSet") rs.Open "select * from [xsprolb] order by id desc",conn,3,3 rs.addnew rs("lb2")=lb2 rs("lbid")=lbid rs.update rs.close set rs=nothing conn.close set conn=nothing Response.Redirect "?" elseif lbeditid<>"" and lbsaveid="" and lb2="" and lbid="" then set rs = Server.CreateObject("ADODB.RecordSet") rs.Open "select * from [xsprolb] where id="&lbeditid&" order by id desc",conn,1,1 if rs.recordcount<>0 then elb2=rs("lb2") end if rs.close:set rs=nothing elseif lbeditid="" and lbsaveid<>"" and lb2<>"" and lbid="" then conn.Execute "update [xsprolb] set [lb2]='"&lb2&"' where id="&clng(lbsaveid) conn.close:set conn=nothing Response.Redirect "?" end if if lbdelid<>"" then conn.Execute "delete from [xsprolb] where ID="&Clng(lbdelid) conn.Execute "delete from [xsprolb] where LBID="&Clng(lbdelid) end if if sdmb="1" and lmid<>"" then %>

选择模版

<% rs.close:set rs=nothing conn.close:set conn=nothing Response.end end if if sdmb="2" and mbid<>"" and lmid<>"" then conn.Execute "update [XSPROLB] set [mb]="&mbid&" where id="&clng(lmid) conn.close:set conn=nothing Response.Redirect "?" Response.end end if %>
产品分类管理
<% if addlb="1" then %> <% end if %>
 

  

  

<% set rs = Server.CreateObject("ADODB.RecordSet") rs.Open "select * from [xsprolb] where [lb1] is not null order by id asc",conn,1,1 while not rs.eof %> <% set rs2 = Server.CreateObject("ADODB.RecordSet") rs2.Open "select * from [xsprolb] where lbid="&rs("id")&" order by id desc",conn,1,1 while not rs2.eof %> <% rs2.movenext wend rs2.close:set rs2=nothing rs.movenext wend rs.close:set rs=nothing %>
系列名称 (分类名称调用) 数量 模版(管理) 操作
<%=rs("lb1")%> "> [添加子类别] <% set rs2 = Server.CreateObject("ADODB.RecordSet") rs2.Open "select * from [xspro] where lb1="&rs("id")&" order by id desc",conn,1,1 Response.Write rs2.recordcount rs2.close:set rs2=nothing %> <% mbid=rs("mb") if (not isNumeric(mbid)) then mbid=0 if mbid<>"0" then set rsmb = Server.CreateObject("ADODB.RecordSet"):rsmb.cursorlocation=3 rsmb.Open "select * from [xspromb] where [ID]="&mbid&" order by id desc",conn,1,1 if rsmb.recordcount<>0 then Response.Write rsmb("title") end if rsmb.close:set rsmb=nothing else Response.Write "未指定模版" end if %> 调用 &sdmb=1&embid=<%=mbid%>>模版 ">修改 ">删除
 ├ <%=rs2("lb2")%> <% set rs3 = Server.CreateObject("ADODB.RecordSet") rs3.Open "select * from [xspro] where lb2="&rs2("ID")&" order by id desc",conn,1,1 Response.Write rs3.recordcount rs3.close:set rs3=nothing %> <% mbid=rs2("mb") if (not isNumeric(mbid)) then mbid=0 if mbid<>"0" then set rsmb = Server.CreateObject("ADODB.RecordSet"):rsmb.cursorlocation=3 rsmb.Open "select * from [xspromb] where [ID]="&mbid&" order by id desc",conn,1,1 if rsmb.recordcount<>0 then Response.Write rsmb("title") end if rsmb.close:set rsmb=nothing else Response.Write "未指定模版" end if %> 调用 &sdmb=1&embid=<%=mbid%>>模版 &addlb=1">修改 ">删除
<% conn.close set conn=nothing %>