<%
sql="select * from guest order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align=center>还 没 有 任 何 留 言</p>"
else
'分页的实现
listnum=12
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs.absolutepage=page
'编号的实现
j=rs.recordcount
j=j-(page-1)*listnum
<!--#include file="admin_check.asp" -->
<% Title="会员管理" %>
<!--#include file="admin_head.asp" -->
<!--#include file="admin_error.asp"-->
<%
if request.querystring("page")="" then
ipagecurrent=1
else
ipagecurrent=cint(request.querystring("page"))
end if
CS="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("..\db\database.mdb")
DBC.open CS
set RS=Server.CreateObject("ADODB.Recordset")
RS.open "select * from list where user_id='"&user_id&"'",DBC,1,2
set BS=Server.CreateObject("ADODB.Recordset")
BS.open "select * from board where board_no="&board_no&"",DBC,1,2
set DS=Server.CreateObject("ADODB.Recordset")
DS.open "select count(*) from article where board_no="&BS("board_no")&"",DBC,1,2
count=DS(0)
DS.close
DS.open "select count(*) from article where self_no=1 and board_no="&BS("board_no")&"",DBC,1,2
art_count=cint(DS(0))
DS.close
dim recount() 'カィメ衞ラ・
redim recount(art_count) 'ヨリカィメ衞ラ鬟ャホェチヒモテア菽ソカィメ衞センエ。
for i=1 to art_count
DS.open "select count(*) from article where art_no="&i&" and board_no="&BS("board_no")&""
recount(art_count+1-i)=DS(0)-1
DS.close
next 'スォク簧トユツオトサリクエハチソクウクラ魴トマ獗ヲオトヤェヒリ
%>
<b><center><font size=5 face="ソャフ蘋GB2312">タクトソ:<%=BS("board_name")%></font></center></b>
<%
if count=0 then
%>
<b><center><font size=3 face="ソャフ蘋GB2312">アセタクトソトソヌーテサモミホトユツ</center></b>
<a style=text-indent:150 href="post.asp?board_no=<%=board_no%>">キ「ムヤ</a></font>
<%
else
%>
<%
DS.open"select * from article where board_no="&BS("board_no")&" and self_no=1 order by write_time desc"
'aspヨミオトキヨメウシシハャPageSize,PageCount,AbsolutePageカシハヌrecordsetオトハヤ
DS.pagesize=20
if not IsEmpty(Request.QueryString("ToPage")) then
DS.AbsolutePage = ToPage
else
DS.MoveFirst
DS.AbsolutePage = 1
end if
Current_Page = DS.AbsolutePage
%>
<table width=80% align=center>
<td width=40% align=left>
<font size=2>
オレ<font color=#3333FF><b><%=Current_Page%></b></font>メウ/ケイ<font color=#3333FF><b><%=DS.PageCount%></b></font>メウ
ケイモミ<font color=#3333FF><b><%=art_count%></b></font>ニェホトユツ
</font>
</td>
<td width=40% align=right>
<font size=3 face="ソャフ蘋GB2312">
<a href="post.asp?board_no=<%=board_no%>">キ「ムヤ</a>
</font>
</td>
</table>
<table align=center width=80% border=1 >
<tr>
<td width=4% align=center><font size=2>ミナ</font></td>
<td width=33% align=center><font size=2>ア・・/font></td>
<%
if user_kind=0 then
j=1
else
set SS=Server.CreateObject("ADODB.Recordset")
for i=DS.pagesize*(DS.pagecount-current_page+1) to 1+(DS.pagecount-current_page)*DS.pagesize step -1
if i<=art_count then
SS.open "select * from article where board_no="&BS("board_no")&" and self_no=1 and art_no="&i&"",DBC,1,2
if user_id=SS("author") then
j=1
end if
SS.close
end if
next
end if
if user_kind=0 then
%>
<td width=3% align=right><font size=2>ラェフ・/font></td>
<%
end if
if j=1 then
%>
<td width=10% align=center><font size=2>イルラ・/font></td>
<%
end if
%>
<td width=10% align=center><font size=2>ラ゚</font></td>
<td width=15% align=center><font size=2>ハアシ・/font></td>
<td width=5% align=center><font size=2>サリクエ</font></td>
</tr>
<%
call display_page(DS,current_page,j)
%>
<center>
<% if Current_Page <> 1 then %>
<a href=board.asp?ToPage=1&board_no=<%=board_no%>><font size=2>オレメサメウ</font></a>
<a href=board.asp?ToPage=<%=Current_Page-1%>&board_no=<%=board_no%>><font size=2>ノマメサメウ</font></a>
<%
end if
if Current_Page <>DS.PageCount then
%>
<a href=board.asp?ToPage=<%=Current_Page+1%>&board_no=<%=board_no%>><font size=2>マツメサメウ</font></a>
<a href=board.asp?ToPage=<%=DS.PageCount%>&board_no=<%=board_no%>><font size=2>ラ鋓サメウ</font></a>
<%end if%>
<%end if%>
<a href="show.asp?judge=1">
<font size=2>キオサリツロフウ</a></font>
<a href="..\default.asp">
<font size=2>ヘヒウロフウ</a></font>