<!--#include file="../Inc.asp"-->
<!--#include file="../ydzq.asp"-->
<%call head()

%>
<SCRIPT language=javascript> function CheckAll(form) { for (var i=0;i<form.elements.length;i++) { var e = form.elements[i]; if (e.Name != "chkAll") e.checked = form.chkAll.checked; } } </SCRIPT>
<%
Call saycardd("同城设计")

response.write"<a href=""adminaddbbs.asp?sid="&sid&"&amp;saytk="&saytk&""">[添加菜单]</a>"
response.write"<br/>--------<br/>"
dim ydbbsname

If saytk>1 Then Response.write "<form name=""form"" method=""post"" action=""editall.asp?sid="&sid&"&amp;saytk="&saytk&""">" End If


set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from ydbbs where prentID=0 and city=1 order by pid asc",conn,1,1
If Not rs.eof	Then
	Dim PageSize,i
	If saytk>1 then
	PageSize=30		
	Else
	PageSize=10	
	End if
	Dim Count,page,pagecount,gopage			
	gopage="adminbbs.asp?sid="&sid&"&amp;saytk="&saytk&"&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")=3 Then


%>
<a href="adminbbsll.asp?id=<%=rs("id")%>&amp;p=<%=rs("lx")%>&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>"><%=i+(page-1)*PageSize%>.[管理]</a><%=rs("pid")%>.<%=rs("name")%>[<%=ydbbsname%>]
<%else%>
<a href="admineditbbsbk.asp?id=<%=rs("id")%>&amp;p=<%=rs("lx")%>&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>"><%=i+(page-1)*PageSize%>.[管理]</a><%=rs("pid")%>.<%=rs("name")%>[<%=ydbbsname%>]

<input   type=checkbox   name="id"   value="<%=rs("id")%>"><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/>"
if saytk=1 then
response.write "<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">跳到该页</a><br/>"
end if
Else
Response.write "暂时没有菜单！<br/>"
end if
rs.close
set rs=Nothing
If saytk>1 Then
%>

=====批量操作=====<br/>
全选<input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
<%

response.write "<input type=""hidden"" name=""tp"" value=""1""/>"
response.write "<input type=""submit"" name=""Submit"" value=""[删除选中项]""></form><br/>"

end if

%>

==================<br/>
<%


conn.close
set conn=nothing

response.write"<a href=""adminaddbbs.asp?sid="&sid&"&amp;saytk="&saytk&""">[添加菜单]</a>"

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