<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->

<%call head()
Call saycarda("社区排版")


pag=request("pag")
if pag="" then 
If saytk>1 then
pag=50
Else
pag=20
End If
End If
%><a href="../index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">后台</a>><a href="../saytksj.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">设计</a>>主站排版<br/><%
If saytk>1 then
Response.write "<form name=""form"" method=""post"" action=""adminbbs.asp?saytk="&saytk&"&amp;sid="&sid&""">"


%>

显示:<input name="pag" format="*N" size="3" value="<%=pag%>"/>
<%
response.write "<input type=""submit"" name=""Submit"" value=""更改条数""></form><br/>"
else
%>
显示:<input name="pid<%=minute(now)%><%=second(now)%>" format="*N" size="3" value="<%=pag%>"/>
<anchor title="显示数量">更改条数
<go href="adminbbs.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>" method="post" accept-charset='utf-8'>
<postfield name="pag" value="$(pid<%=minute(now)%><%=second(now)%>)"/>
</go>
</anchor>
<%End If
response.write"<br/><a href=""adminaddbbs.asp?saytk="&saytk&"&amp;sid="&sid&""">[社区添加栏目]</a><br/>"
response.write"--------<br/>"
dim ydbbsname
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from ydbbs where prentID=0 and city=0 order by pid asc",conn,1,1
If Not rs.eof	Then
	Dim PageSize,i
	PageSize=pag						
	Dim Count,page,pagecount,gopage			
	gopage="adminbbs.asp?saytk="&saytk&"&amp;sid="&sid&"&amp;"
	Count=rs.recordcount	
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize
        if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))					
	For i=1 To PageSize     						
	If rs.eof Then Exit For	
if rs("lx")=3 then ydbbsname="页面"
if rs("lx")=1 then ydbbsname="论坛"
if rs("lx")=2 then ydbbsname="链接"
if rs("lx")=0 then ydbbsname="UBB"
if rs("lx")=4 then ydbbsname="WML"
if rs("lx")=10 then ydbbsname="新贴"
if rs("lx")=20 then ydbbsname="动态"
if rs("lx")=30 then ydbbsname="精华"
if rs("lx")=40 then ydbbsname="相片"
if rs("lx")>90 then ydbbsname="系统"
if rs("lx")=3 then
%>
<a href="adminbbsll.asp?id=<%=rs("id")%>&amp;p=<%=rs("lx")%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>"><%=i+(page-1)*PageSize%>.[管理]</a><%=rs("pid")%>.<%=rs("name")%>[<%=ydbbsname%>]<br/>
<%else%>
<a href="admineditbbsbk.asp?id=<%=rs("id")%>&amp;p=<%=rs("lx")%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>"><%=i+(page-1)*PageSize%>.[管理]</a><%=rs("pid")%>.<%=rs("name")%>[<%=ydbbsname%>]<br/>
<%end if
	rs.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"
	if pagecount>1 then response.write "<br/>"&page&"/"&pagecount&"页,共"&Count&"条<br/><input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">跳到该页</a><br/>"
Else
Response.write "暂时没有菜单！<br/>"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write"----------<br/>"
response.write"<a href=""adminaddbbs.asp?saytk="&saytk&"&amp;sid="&sid&""">[添加菜单]</a>"

%><!--#include file="fanhui.asp"-->
<%
call headsay()
%>
