<!--#include file="../main.asp" -->
<!--#include file="../IsLogin.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML 
xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>管理中心-这里是所有管理的入口</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="images/global.css" type=text/css rel=stylesheet><LINK 
href="images/main.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.3790.218" name=GENERATOR>
<script language="javascript">
function Del(id){
if ( confirm("你确定要删除吗？")) {
window.location.href = "book_individual_del.asp?id="+id
}
}
</script></HEAD>
<BODY id=main background="../images/bj.gif">
<%
dim m_UserID
m_UserID = Request.Cookies("aspxnet")("CurUserID")

%>

<DIV id=wrapper>
<!--#include file="top.asp"-->
<DIV class=row>
<!--#include file="left.asp"-->
<DIV class=right_side>
<DIV class=col id=bulletin>
<DIV class=col_head>
<H3><IMG height=16 alt=a hspace=3 src="images/ico_dots.gif" 
width=20 align=left vspace=3><a href='book_individual.asp'>留言管理</a>:		&#8226; <a href='book_individual.asp?id=2'>主页留言</a>
		&#8226; <a href='book_individual.asp?id=1'>MP3留言</a>
		&#8226; <a href='book_individual.asp?id=3'>文章留言</a>
		&#8226; <a href='book_individual.asp?id=4'>相册留言</a></H3>
</DIV>
<DIV class=col_body><P><table width="98%" border="0" cellspacing="1" cellpadding="0" align="center">
            <tr>
              <td colspan="5" height="4"></td>
            </tr>
            
            <tr align="center" bgcolor="#adb6bd">
              <td width="7%" height="20" bgcolor="#B5DFDE">编号</td>
              <td width="24%" bgcolor="#B5DFDE">名 称</td>
              <td width="54%" align="left" bgcolor="#B5DFDE">内容</td>
              <td width="15%" bgcolor="#B5DFDE">删除</td>
            </tr>
            <%
if request("id")<>"" then
sql="select * from message where key1="&request("id")&" and user_id="&session("goid")&" order by id desc"
else
sql="select * from message where user_id="&session("goid")&" order by id desc"
end if
set rs=server.createobject("adodb.recordset")                     
rs.open sql,conn,1,1                     
if rs.eof and rs.bof then                     
	response.write "暂无内容"
else  
'分页的实现 
listnum=20
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%>
            <%i=0
nn=request("page")
if nn="" then
n=0
else
nn=nn-1
n=listnum*nn
end if%>
<%do while not rs.eof and i<listnum
n=n+1
%>
            <tr align="center">
              <td height="20" bgcolor="#DEF3E1"><%=n%></td>
              <td align="left" bgcolor="#DEF3E1"><%=rs("username")%></td>
              <td align="left" bgcolor="#DEF3E1" title="<%=rs("message")%>"><%=left(rs("message"),50)%></td>
              <td bgcolor="#DEF3E1"><a href="javascript:Del(<%=rs("id")%>)">删除</a></td>
            </tr><tr>
  <td height="1" colspan="4" bgcolor="#CCCCCC"></td>
  </tr>
<tr>
 <td height="5" colspan="4" align="left"></td>
</tr>
            <%
rs.movenext 
i=i+1 
j=j-1
loop%></table>

<%filename="book_individual.asp"%>
共 <%=Rs.pagecount%> 页
<% if page=1 then %>
<%else%>
<a href="<%=filename%>">|&lt;&lt;</a><a href="<%=filename%>?page=<%=page-1%>">&lt;&lt;</a><a href="<%=filename%>?page=<%=page-1%>">[<%=page-1%>]</a>
                    <%end if%>
                    <% if Rs.pagecount=1 then %>
                    <%else%>
                [<%=page%>]
                <%end if%>
                <% if Rs.pagecount-page <> 0 then %>
                <a href="<%=filename%>?page=<%=page+1%>">[<%=page+1%>]</a><a href="<%=filename%>?page=<%=page+1%>">&gt;&gt;</a>&nbsp; <a href="<%=filename%>?page=<%=Rs.pagecount%>">&gt;&gt;|</a>
                <%end if%>
              <%end if%>
        </p>
</DIV>
</DIV>
</DIV>
</DIV>
<!--#include file="bottom.asp"-->

</DIV></BODY></HTML>
