<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="dean_pri.asp"-->
<!--#include file="../setup.asp"-->
<!--#include file="../connadmin.asp"-->
<%
act=request("act")
id=request("id")

if act="del" then

conn.execute("delete from [tubook] where id="&id&"")
end if
%>
<SCRIPT language=javascript>
<!--
  function mOvr(src,clrOver) {
    if (!src.contains(event.fromElement)) {
	  src.bgColor = clrOver;
	}
  }
  function mOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
	  src.bgColor = clrIn;
	}
  }
  
function cdel(id){
var id;
if (confirm("你真的要删除这条留言吗？")){
	document.location.href="admin_do.asp?id="+id+"&act=del";
	}
}

// -->	
</SCRIPT>



<html>
<head>
<link rel="stylesheet" type="text/css" href="../img/css.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=site_name%></title>
<style type=text/css>
body  {
SCROLLBAR-FACE-COLOR: #9CC5D7;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #006699; 
SCROLLBAR-3DLIGHT-COLOR: #006699; 
SCROLLBAR-ARROW-COLOR: #330000; 
SCROLLBAR-TRACK-COLOR: #E2F3F1; 
SCROLLBAR-DARKSHADOW-COLOR: #ffffff;}
.style4 {
	color: #990000;
	font-weight: bold;
}
.style5 {color: #990000}
</style></head>

<body>
<table class="border" width="98%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr> 
    <td height="565" align="center" valign="top" class="bg_low"> <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="center" valign="middle" class="bgtop"><font color="#FFFFFF"><b>留言管理</b></font> 
          </td>
        </tr>
      </table>
      <br />
      <%
set rs=server.createobject("ADODB.recordset")
sql="select * from tubook order by id desc"
rs.open sql,conn,1,1
if  rs.eof then
response.Write("暂无信息")
response.End()
end if
number=hou_message_show_count   '设置梅页显示条数
if request("page")="" then
curpage = 1
else
curpage = cint(request("page"))
end if

rs.pagesize=cint(number)
rs.absolutepage = curpage


for i= 1 to rs.pagesize%>
      <table width="800" style="border:1px dashed #000000 "  height="54" border="0" cellpadding="3" cellspacing="0" bgcolor="#BCD8E4">
        <tr>
          <td width="200" rowspan="3" valign="top" style="word-wrap:break-word;word-break:break-all;border-right:1px dashed #999999;"> 
            序号：<%=rs("id")%><br>
            姓名：<%=rs("bookname")%><br />
            E-mail：<%=rs("bookemail")%> <br /> </td>
          <td width="600" valign="top" >
<div style="word-wrap:break-word;word-break:break-all;border-bottom:1px dashed #999999;"><strong>[留言]</strong>：<%=rs("bookcon")%> 
              <%if rs("bookhui")<>"" then%>
              <br />
            </div></td>
        </tr>
        <tr> 
          <td width="600" valign="top" style="word-wrap:break-word;word-break:break-all;border-bottom:1px dashed #999999;"><span class="style4">[回复]</span>： 
            <%=rs("bookhui")%> 
            <% 
	end if%>
          </td>
        </tr>
        <tr> 
          <td width="600" valign="top"><span class="style5"><a href="book_do.asp?act=hui&amp;id=<%=rs("id")%>"><strong>[回复]</strong></a> 
              <a href="javascript:cdel('<%=rs("id")%>')"><strong>[删除]</strong></a> </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
            <font style="color:#468DAC">时间：<%=rs("booktime")%>&nbsp; |&nbsp; ip:<%=rs("txtip")%></font></td>
        </tr>
      </table>
      <br /> 
      <%rs.movenext
       if rs.eof then
           i=i+1
           exit for
       end if
next%>
      <%
''''''''设置上一页,下一页功能///////////////////////////////////////////////////////////////////////////////////////
    response.Write "当前"&curpage&"页/总共"&rs.pagecount&"页"
     if curpage = 1 then 
		response.write "首页 前页 "
	else
		response.write "<a class='xiahua' href='admin_do.asp?page=1&id="&id &"'>首页</a> <a class='xiahua' href='admin_do.asp?id="&id &"&page=" & cstr(curpage-1) & "'>前页</a> "
	end if
	if  curpage = rs.pagecount then
		response.write "后页 末页"
	else
		response.write "<a class='xiahua' href='admin_do.asp?id="&id &"&page=" & cstr(curpage+1) & "'>后页</a> <a class='xiahua' href='admin_do.asp?id="&id &"&page=" & cstr(rs.pagecount) & "'>末页</a>"
	end if
	response.write "(总共"&rs.recordcount&"条新闻)"
''''''''设置上一页,下一页功能////////////////////////////////////////////////////////////////////////////////////

rs.close
set rs=nothing
conn.close
%>
    </td>
  </tr>
</table>
</body>
</html>
