<!--#include file="../include/conn.asp"-->
<!--#include file="../include/page.asp" -->
<!--#include file="seeion.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-1.js"></script>
<script type="text/javascript" src="../js/js.js"></script>
</head>
<body>
<%
if Request.QueryString("action")<>"" Then
       new_password = Request.Form("news_password")
	   sql = "update [Admin] set book_password='"&new_password&"'"
	   conn.execute(sql)
	   Response.Write "<script>alert('密码修改成功！');location='admin_index.asp';</script>"
End if

%>

<div class="bodycontent">
<!--#include file="head.asp"-->

<!--修改密码-->
<div id="login_password">
  <h1>===修改密码===</h1>
  <form method="post" action="?action=ok">
  <dd>新 密 码：<input type="password" size="10" name="news_password"  class="word" /></dd>
  <dd><input type="submit" value="登陆" class="button" />&nbsp;&nbsp;<input type="button" value="关闭" id="close" class="button" /></dd>
  </form>
</div>
<!--修改密码结束-->

<div class="msg_content">

<div class="left_menu">

<div class="leftmenutext"><a href="../index.asp">前台首页</a> <a href="index.asp">后台首页</a></div>

<div class="leftmenutext_top">留言板管理</div>

<div class="leftmenulistnav">

<!--#include file="left_menu.asp"-->

</div>




</div>
<div class="right_messagelist">
<div class="leftmenutext">当前操作：管理留言</div>
<%
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 class=""messagelist""><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:306px;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">

	    <%if rs("msg_reply")<>"" then%>

	    <div class="content"> <%=rs("msg_content")%></div>

		<div class="reply"><%=rs("msg_reply")%></div>
		<%
		else
		   response.Write "内容审核中。。。"
		%>
	<%end if%>
</div>
<ul>
<li>IP:<%=rs("msg_ip")%> 留言时间：<%=rs("msg_addtime")%></li>
<li><a href="adminreply.asp?id=<%=rs("id")%>">管理员回复</a></li>
<li><a href="delmessage.asp?id=<%=rs("id")%>">删除</a></li>
</ul>
</div>

</div>






</div>








 <%	
 rs.movenext 
  Next
 %>


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

</div>



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

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

