<!-- #include file="conn.asp" -->
<!-- #include file="admin.asp" -->
<%Call Head()%>
<%
IF KEY<>0 then
  Call Error("<card title=""出错""><p>你的权限不足！")
  end if
dim rs,recordcount,xxx,id,lx,cc
id= int(request.QueryString("id"))
lx= int(request.QueryString("lx"))
if id="" then id=0 
cc= request.QueryString("cc")
if cc<>"" then%>
<card id="main" title="首页栏目重新排序" ontimer="class.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">
<timer value="10"/>
<p>
<% set rs=server.CreateObject("adodb.recordset")
sql="select * from class where parent=0"
rs.open sql,conn,1,3 
If Not rs.Eof Then
j=1
do while not rs.EOF
rs("pid")=j
rs.update
rs.MoveNext
j=j+1
loop
response.write"栏目重新排序成功！正在返回..."
Else
response.write"重新排序失败!可能暂时没有栏目！"
End if
rs.close
set rs=Nothing
conn.close
set conn=nothing
%>
<br/>----------<br/>
<%else%>
<card id="main" title="首页栏目重排序"> <p>
注意:本操作将重新排序栏目，栏目序号会从1开始排序.可能使你的排序变得凌乱！确定要重排吗？
<br/>
<a href="lmpx.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;id=<%=id%>&amp;lx=<%=lx%>&amp;cc=1">是,确定重排</a><br/>
<a href="Class.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">不,取消操作</a><br/>
<%end if%>
<a href="class.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[设计中心]</a><br/>
<a href="index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[后台管理]</a>
</p></card>
</wml>