📄 sort_move.asp
字号:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="../inc/Config.asp"-->
<!--#include file="../inc/conn.asp"-->
<%
dim id,action,Sequence,Language
id=Request.QueryString("id")
If id="" or not isnumeric(id) then Check_Alert "非法操作","Sort_admin.asp"
action=Request.QueryString("action")
Language=formatStr(Request("Language"))
table_behind="LinkSort_"
table=Get_Table(table_behind,Language)
sub up()
dim sql,rs,Sequence
sql="select * from "&table&" where LS_ID="&id
set rs=conn.execute(sql)
Sequence=rs("LS_Order")
Sortid=rs("LS_Parentid")
if Sequence>0 then
conn.execute("update "&table&" set LS_Order=LS_Order+1 where LS_Parentid="&Sortid&" and LS_Order="&(Sequence-1))
conn.execute("update "&table&" set LS_Order=LS_Order-1 where LS_Parentid="&Sortid&" and LS_ID="&id)
end if
set rs=nothing
closeconn
response.Redirect(request.ServerVariables("HTTP_REFERER"))
end sub
sub down()
dim sql,rs,Sequence
sql="select * from "&table&" where LS_ID="&id
set rs=conn.execute(sql)
Sequence=rs("LS_Order")
Sortid=rs("LS_Parentid")
rs.close
sql="select Max(LS_Order) as MaxSequ from "&table
set rs=conn.execute(sql)
if Sequence<>rs("MaxSequ") then
conn.execute("update "&table&" set LS_Order=LS_Order-1 where LS_Parentid="&Sortid&" and LS_Order="&(Sequence+1))
conn.execute("update "&table&" set LS_Order=LS_Order+1 where LS_Parentid="&Sortid&" and LS_ID="&id)
end if
set rs=nothing
closeconn
response.Redirect(request.ServerVariables("HTTP_REFERER"))
end sub
select case action
case "up" up
case "down" down
end select
closeconn
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -