<!-- #include file="include/adovbs.inc" -->
<!-- #include file="include/dataconn.asp" -->
<!-- #include file="include/checksession.asp" -->
<html><head><title>在线留言</title>
<meta content="zh-cn" http-equiv="Content-Language">
<meta content="text/html; charset=gb2312" http-equiv="Content-Type">
<link href="include/e1.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
td { font-family: "宋体"; font-size: 9pt; line-height: 14pt; }
-->
</style>
<meta content="Microsoft FrontPage 5.0" name="GENERATOR"></head>
<body bgColor="#ffffff" leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">
<center>
<br>
<table width="99%" border="0" align="center" cellPadding="0" cellSpacing="0" bordercolor="#111111" style="border-collapse: collapse">
  <tbody>
<tr>
<td vAlign="top" width="100%">
<table border="0" cellPadding="0" cellSpacing="0" width="100%" style="border-collapse: collapse" bordercolor="#111111">
        <tbody>
            
          <tr class="tdtitle"> 
            <td width="38" align="right"> 　 </td>

              
            <td width="50%" height="25"> <span style="font-size: 10.5pt; letter-spacing: 1"><b><font color="#FFFFFF"> 
              &nbsp; 留言管理</font></b></span></td>
            <td width="50%">&nbsp;</td>
            </tr>
          </tbody>
        </table>
<div align="center">
<table border="0" cellSpacing="1" width="100%" style="border-collapse: collapse" bordercolor="#111111" background="image/bg1.gif">
<tr>
<td align="middle" height="5" width="100%">　</td></tr>
<tr>
<td align="middle" height="169" width="100%">
<table border="0" cellPadding="0" cellSpacing="0" height="112" width="100%" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#FFFFFF">
<tr vAlign="top">
<td colSpan="5" height="112">
<div align="center">
<center>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr> 
<td valign="top"> 
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" height="132">
<tr> 
<td height="112"> 
<%
const MaxPerPage=8 '分页显示留言个数
dim sql,rs,totalput,CurrentPage,TotalPages,i
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from GuestBook order by id desc"
rs.open sql,conn,1,1 
if rs.eof and rs.bof then 
response.write "<p align='center'> 还 没 有 任 何 留 言</p>" 
else 
totalPut=rs.recordcount 
if currentpage<1 then 
currentpage=1 
end if 
if (currentpage-1)*MaxPerPage>totalput then 
if (totalPut mod MaxPerPage)=0 then 
currentpage= totalPut \ MaxPerPage 
else 
currentpage= totalPut \ MaxPerPage + 1 
end if 
end if 
if currentPage=1 then 
showContent 
showpages 
else 
if (currentPage-1)*MaxPerPage<totalPut then 
rs.move (currentPage-1)*MaxPerPage 
dim bookmark 
bookmark=rs.bookmark 
showContent 
showpages 
else 
currentPage=1 
showContent 
end if 
end if 
rs.close 
end if 
set rs=nothing 
conn.close 
set conn=nothing 
sub showContent 
i=0 
do while not (rs.eof or err) %>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff" style="border-collapse: collapse">
<tr> 
<td width="95%"> 
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr> 
<td width="485" align="right" valign="bottom"> 
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber10" height="20">
<tr>
<td width="100%"> <b><font color="#000066">
&nbsp;
<img src="image/gb.gif" WIDTH="11" HEIGHT="11"> 主题：&nbsp;</font><font color="#000099"><%=rs("Title")%></font></b><font color="#CC6600">&nbsp;&nbsp;&nbsp;
</font> 
<%if rs("where")<>"" then%> 
<img alt="<%=rs("where")%>" border="0" src="image/gb_where.gif" WIDTH="13" HEIGHT="11">
<%else%>
<img alt="未知" border="0" src="image/l1.gif" WIDTH="13" HEIGHT="11"> 
<%end if%>
<%if rs("tel")<>"" then%> 
<img alt="<%=rs("tel")%>" border="0" src="image/gb_msn.gif" WIDTH="14" HEIGHT="11">
<%else%>
<img alt="未知" border="0" src="image/l2.gif" WIDTH="14" HEIGHT="11"> 
<%end if%>
                                                            【接收人：<%=rs("UserEmail")%> 】
 </td>
</tr>
</table>
</td>
<td valign="bottom" width="110">　</td>
<td width="36" align="center" valign="bottom">
<a href="hfbook.asp?id=<%=rs("Id")%>">回复</a></td>
<td width="14" align="center" valign="bottom">　</td>
<td width="43" align="center" valign="bottom">
<a href="lyDel.asp?id=<%=rs("Id")%>">删除</a>&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr> 
<td>
<div align="center">
<center>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" height="62">
<tr> 
<td width="89" align="right" valign="top" height="50" rowspan="2" bgcolor="#FDFEFF"> <strong><font color="#000066"><br>
内容：&nbsp; </font></strong></td>
<td height="29" width="648" valign="middle" colspan="2" bgcolor="#FDFEFF"> 
<div align="center">
<center>
<table border="0" cellpadding="2" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="98%" id="AutoNumber9">
<tr>
<td width="100%">
<%=rs("Content")%></td>
</tr>
</table>
</center>
</div>
</td>
<td height="50" width="41" rowspan="2" bgcolor="#FDFEFF"> 　</td>
</tr>
<tr>
<td height="21" width="364" bgcolor="#FDFEFF"> 
　</td>
<td height="21" width="284" bgcolor="#FDFEFF"> 
<p><font color="#CC6600"><b>&nbsp; →</b><%=rs("UserName")%></font><font color="#808080">[<%=rs("AddTime")%>]</font></td>
</tr>
<%
set rsg=server.createobject("adodb.recordset")
sql="select * from hfbook where Gid="&rs("Id")
rsg.open sql,conn,1,1 
if rsg.eof then
response.Write(" ") 
else
while not rsg.eof
%>
<tr>
<td colSpan="4" height="12" width="778">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="95%" id="AutoNumber7">
<tr>
<td height="1" background="image/line.gif"></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</table></center>
</div>
</td>
</tr>
<tr> 
<td> <table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> 
<td width="70" align="right"><strong>
<font color="#FF3300">
回复：&nbsp;</font></strong></td>
<td height="20" bgcolor="#FDFCF2"> 
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr> 
<td width="665" height="20" bgcolor="#FDFBEE"> 
<%If rsg("IsA")=True then%>
<font color="#FF3300">&lt;&gt; <%=rsg("Gcontent")%> —— </font> 
<%if rsg("GEmail")="@" then%>
<font color="#FF3300"><b><%=rsg("Gname")%></b></font> 
<%else%>
<font color="#FF3300"> <b><%=rsg("Gname")%></b> 
</font> <a href="mailto:<%=rsg("GEmail")%>"><font color="#FF3300">
[Email]</font></a> 
<%end if%>
<font color="#FF3300"><%=rsg("Gtime")%></font> 
<%else%>
<font color="#000066">&lt;&gt; <%=rsg("Gcontent")%> —— </font> 
<%if rsg("GEmail")="@" then%>
<font color="#000066"><b><%=rsg("Gname")%></b></font> 
<%else%>
<font color="#000066"><b><%=rsg("Gname")%></b></font> 
<a href="mailto:<%=rsg("GEmail")%>"><font color="#000066">
[Email]</font></a> 
<%end if%>
<font color="#000066"><%=rsg("Gtime")%></font> 
<%End If%><font color="#FF0000">[<a href="lyDel.asp?gid=<%=rsg("Id")%>" style="text-decoration: none"><font color="#FF3300">删除</font></a>]</font></td>
<td width="43" align="center"> 
　</td>
</tr>
</table>
<%
rsg.movenext
wend
end if
%>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr> 
                                <td align="right" bgcolor="2b7aa0" height="1"> 
                                  <font color="#FFFFFF">
                                  <% i=i+1 
if i>=MaxPerPage then exit do 
rs.movenext 
loop 
end sub 
sub showpages() 
dim n 
if (totalPut mod MaxPerPage)=0 then 
n= totalPut \ MaxPerPage 
else 
n= totalPut \ MaxPerPage + 1 
end if 
if n=0 then 
response.write "<p align='right'><a href=gbadd.asp>请留下您宝贵的意见！</a></p>" 
exit sub 
end if 
dim k 
response.write "分页 &gt;&gt; " 
for k=1 to n 
if k=currentPage then 
response.write"["+Cstr(k)+"]" 
else 
response.write"<a href='khbook.asp?page="+cstr(k)+"'>[ "+Cstr(k)+" ]</a>"
end if 
next 
end sub 
%>
                                  </font></td>
</tr>
<tr> 
</tr>
</table></td>
<%'rs.close%>
</tr>
</table>
</center>
</div>
</td></tr></tbody></table></td></tr>
</table>
</center>
</td>
<td width="3"></td></tr>
</table></body>
</html>