<!--#include file="include/conn.asp"-->
<!--#include file="include/page.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Angel工作室留言板系统V1.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="留言板系统V1.0-Powered By angelasp.com" />
<meta name="description" content="留言板系统V1.0-Powered By angelasp.com" />
<link type="text/css" href="css/css.css" rel="stylesheet"/>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/thickbox_plus.js"></script>
<link rel="stylesheet" type="text/css" href="css/thickbox.css"/>
</head>
<body>
<div class="bodycontent">
<!--#include file="head.asp"-->
<div class="msg_content">
<%
Set rs = server.CreateObject("ADODB.Recordset")
     sql="select * from Message order by id desc"
	 rs.Open sql,conn,1,1
if rs.bof or rs.eof Then

     response.Write "<div><center>暂无内容！</center></div>"
Else 

' rs.pagesize = 3   
   '接收传过来的page值
' page=request.QueryString("page")
 '如果page没有传值
 'if page = "" then page=1
   '判断如果不是数字，那么page = 1
'	if isnumeric(page) then
		'如果是0或者负数，那么page还是1 cint是整型，clng是长整形
'		if clng(page) <1 then page = 1
'		'如果page大于最大的分页数，那么就是最后一页
'		if clng(page) > rs.pagecount then page = rs.pagecount
'	else	
'		page = 1
' end if
 '
 '把接收到的值赋值给页码即可
	'如果没有数据，rs.absolutepage不能设置
'	if not rs.eof then
'		rs.absolutepage = page
'	end If

rs.pagesize=6  '每页记录条数
iCount=rs.recordcount  '记录总条数
ipagesize=rs.pagesize
maxpage=rs.pagecount
page=request("page")
if not Isnumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
end if
if page>maxpage then
page=maxpage
end if
rs.Absolutepage=page
if maxpage=page then
x=iCount-(maxpage-1)*ipagesize
else
x=ipagesize
end if




 
 
%>


<%
	  for i=1 to ipagesize
                        if rs.eof or rs.bof then
                            exit for
                        end if
%>
<div class="messagelist">


 <div class="msg_title">
   <div style="width:250px;float:left;">留言人</div>
   <div style="width:520px;float:left;">留言内容</div>
 </div>



<div id="msg_contentlist">
<div style="height:170px;width:250px;float:left">
     <div class="msg_img"><img src='<%=rs("msg_face")%>' width="60px" height="60px"></div>
	 <div class="mian_img_buttom">
	 <a href="support.asp?id=<%=rs("id")%>&msg_yes=1">支持(<font style="font-size:16px"><%=rs("msg_yes")%></font>)</a>
	 | <a href="support.asp?id=<%=rs("id")%>&msg_not=1">砸鸡蛋(<font style="font-size:16px"><%=rs("msg_not")%></font>)</a>
	 </div>
</div>

<div class="msgcontent">
<div class="mian_content">
    <div class="content"><font style="color:red;font-size:12px;font-weight:bold;"><%=rs("msg_name")%></font> 说:  <%=rs("msg_content")%></div>
	    <%if rs("msg_reply")<>"" then%>
		<div class="reply"><font style="color:red;font-size:12px;font-weight:bold;">管理员回复</font>:<%=rs("msg_reply")%></div>
		<%
		else
		   response.Write "内容审核中。。。"
		%>
	<%end if%>
</div>
<ul>
<li>IP:<%=rs("msg_ip")%> 留言时间：<%=rs("msg_addtime")%></li>
</ul>
</div>
</div>





</div>


 <%	
 rs.movenext 
  Next
 %>
	    
</div>

<div class="page">
<div ><% Call PageControl(iCount,maxpage,page,"border=0 align=right","<p align=right >")%></div>
 </div>

 <%
end if
rs.close
set rs=nothing 
 %>



 <!--#include file="foot.asp"-->
 <!--#include file="couter.asp"-->


</div>
<%
'如果不在操做数据库，使用下面语句关闭数据库链接
conn.close
set conn=nothing 
%>
</body>
</html>
