<%@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="dean_book.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;
}
.style6 {
	color: #FFFFFF;
	font-weight: bold;
}
.style7 {color: #FFFFFF}
</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="39" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="39" align="center" valign="middle" class="bgtop"><table width="788" height="14" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="338"><font color="#FFFFFF">您的身份：<%=Session("deanname")%></font></td>
              <td width="450"><font color="#FFFFFF"><b> <a href="dean_book.asp"><span class="style6">留言管理</span></a></b></font><span class="style7"><strong> | </strong></span><a href="dean_pri_chpass.asp"><span class="style6">修改密码</span></a> <span class="style6">| </span><strong><a href="dean_logout.asp"><span class="style7"></span></a></strong><a href="dean_logout.asp"><span class="style6">退出</span></a> </td>
            </tr>
        </table></td>
      </tr>
    </table>
      <center>
      </center>
      <br>
      <%
set rs=server.createobject("ADODB.recordset")
sql="select * from tubook where deanno='"& session("deanno") &"' 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;"> 
            序号：<b><%=rs("id")%></b><br>
            姓名：<%=rs("bookname")%><br />
            E-mail：<%=rs("bookemail")%> <br>
            <%if rs("bookhui")="" then %><img src="../img/new.gif"><%end if%><br>
            <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"><a href="dean_book_reply.asp?act=hui&id=<%=rs("id")%>"><img src="../img/reply.gif" border="0"></a> 
              <a href="javascript:cdel('<%=rs("id")%>')"><img src="../img/delete.gif" border="0"></a> &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>
      <p>        <%rs.movenext
       if rs.eof then
           i=i+1
           exit for
       end if
next%>
      </p>
      <table width="801" height="13" border="1" cellpadding="3" cellspacing="0" bgcolor="#BCD8E4">
        <tr>
          <td><%
''''''''设置上一页,下一页功能///////////////////////////////////////////////////////////////////////////////////////
    response.Write "当前"&curpage&"页/总共"&rs.pagecount&"页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    if curpage = 1 then 
		response.write "首页 前页 "
	else
		response.write "<a class='xiahua' href='?page=1&id="&id &"'>首页</a> <a class='xiahua' href='?id="&id &"&page=" & cstr(curpage-1) & "'>前页</a> "
	end if
	if  curpage = rs.pagecount then
		response.write "后页 末页"
	else
		response.write "<a class='xiahua' href='?id="&id &"&page=" & cstr(curpage+1) & "'>后页</a> <a class='xiahua' href='?id="&id &"&page=" & cstr(rs.pagecount) & "'>末页</a>"
	end if
	response.write "(总共"&rs.recordcount&"条留言)"
''''''''设置上一页,下一页功能////////////////////////////////////////////////////////////////////////////////////

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