if request("action")="del" then
id=""
idzu=request.QueryString("id")
idzu=Split(idzu,",")
for i=0 to Ubound(idzu)
ids=""
idn=idzu(i)
call lids(idn)
ids=idn&ids
rs.open "delete * from "&table&" where id in("&ids&")",conn,1,3
rs.open "delete * from "&tables&" where lid in("&ids&")",conn,1,3
rs.open "delete * from "&config&" where lid in("&ids&")",conn,1,3
next
response.Write "<script>window.location.href='?fenleiid="&fenleiid&"';</script>"
end if
'分类向上移动
if request("action")="midup" then
pid=Cint(request.QueryString("pid"))
lid=Cint(request.QueryString("lid"))
p=0
rs.open "select * from "&table&" where lid="&lid&" order by pid asc",conn,1,3
do while not rs.eof
p=p+1
rsf.open "select * from "&table&" where id="&rs("id")&"",conn,1,3
if p=pid-1 then
rsf("pid")=p+1
elseif p>1 and p=pid then
rsf("pid")=p-1
else
rsf("pid")=p
end if
rsf.update
rsf.close
rs.movenext
loop
rs.close
response.Write "<script>window.location.href='?fenleiid="&lid&"';</script>"
end if
'分类向下移动
if request("action")="middown" then
pid=Cint(request.QueryString("pid"))
lid=Cint(request.QueryString("lid"))
p=0
rs.open "select * from "&table&" where lid="&lid&" order by pid asc",conn,1,1
zongshu=rs.recordcount
do while not rs.eof
p=p+1
rsf.open "select * from "&table&" where id="&rs("id")&"",conn,1,3
if p=pid and p<zongshu then
rsf("pid")=p+1
elseif p=pid+1 then
rsf("pid")=p-1
else
rsf("pid")=p
end if
rsf.update
rsf.close
rs.movenext
loop
rs.close
response.Write "<script>window.location.href='?fenleiid="&lid&"';</script>"
end if
递归算法
最新推荐文章于 2024-10-19 23:09:59 发布