<!--#include file="../../connoklin.asp"-->
<!--#include file="../Config.asp"-->
<!--#include file="../../DecoPage.asp"-->
<html>
<head>
<title>留言管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>TD {
	FONT-SIZE: 12px
}
P {
	FONT-SIZE: 12px
}
LI {
	FONT-SIZE: 12px
}
SELECT {
	FONT-SIZE: 12px
}
INPUT {
	FONT-SIZE: 12px
}
TEXTAREA {
	FONT-SIZE: 12px
}
A:hover {
	COLOR: #ff0000
}
.f01 { 
font-family: "宋体"; font-size: 9pt; line-height: 12pt; color: #993300; text-decoration: 
none}
.box {  background-color: #FFFFFF; border-color: #999999 #253641 #253641 #999999; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
.gb2 { 
font-family: "宋体"; font-size: 9pt; line-height: 14pt; color: #000000; text-decoration: 
none}
.gb { 
font-family: "宋体"; font-size: 9pt; line-height: normal; color: #000000; text-decoration: 
none}
.lin { 
font-family: "宋体"; font-size: 9pt; line-height: normal; color: #ff0000; text-decoration: 
none}
.gb105 { 
font-family: "宋体"; font-size: 10.5pt; line-height: 14pt; color: #000000; text-decoration: 
none} 
a:hover { color: #FF0000; text-decoration: underline}
.c16 {
	BACKGROUND-COLOR: #ffcad7; BORDER-BOTTOM: #dd7f9d 1px solid; BORDER-LEFT: #dd7f9d 1px solid; BORDER-RIGHT: #dd7f9d 1px solid; BORDER-TOP: #dd7f9d 1px solid; VERTICAL-ALIGN: text-bottom
}
.go-wenbenkuang {
	font-family: "宋体";
	font-size: 9pt;
	color: #000000;
	background-color: #CCCCCC;
	cursor: hand;
	padding: 1px 1px;
	height: 21px;
	border-top: 1px solid #FFFFFF;
	border-right: 1px solid #666666;
	border-bottom: 1px solid #666666;
	border-left: 1px solid #FFFFFF;}
</STYLE>
<script language="javascript">
function BoardWin(url) {
  var oth="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=200,top=200";
  oth = oth+",width=600,height=450";
  var BoardWin = window.open(url,"BoardWin",oth);
  BoardWin.focus();
  return false;
}

function SelectChk()
{
  var s = false; 
  var newsid, n=0; 
  var strid, strurl;
  var nn = self.document.all.item("id"); 
  for (j=0; j<nn.length; j++) {
    if (self.document.all.item("id",j).checked) {
      n = n + 1;
      s = true;
      newsid = self.document.all.item("id",j).id+"";  

      if(n==1) {
        strid = newsid;
      }
      else {
        strid = strid + "," + newsid;
      }
    }
  }
  strurl = "newsDelt.asp?id=" + strid;
  if(!s) {
    alert("请选择要删除的留言!");
    return false;
  }	
  if (confirm("你确定要删除这些留言吗？")) {
    form1.action = strurl;
	form1.submit();
  }
}

function sltAll()
{
	var nn = self.document.all.item("id");
	for(j=0;j<nn.length;j++)
	{
		self.document.all.item("id",j).checked = true;
	}
}
function sltNull()
{
	var nn = self.document.all.item("id");
	for(j=0;j<nn.length;j++)
	{
		self.document.all.item("id",j).checked = false;
	}
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<form name="form1" method="post" >
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td width="64%" valign="top"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="3">
          <tr> 
            <td> 
              <table  width="98%" border="0" cellspacing="0" cellpadding="3" align="center">
                <tr> 
                  <td class="gb" colspan="2">以下为来访者留言：</td>
                </tr>
                <tr> 
                  <td class="gb" colspan="2" align="center"> 
                    <%
sql="SELECT * FROM guestbook  ORDER BY id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
const page_size=20
const link="info_modify.asp?page="
call DecoPage(rs,page_size,link) '调用分页显示函数
 %>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <%
for i=1 to page_size
if not rs.eof then
%>
          <tr> 
            <td> 
              <table  width="90%" border="0" cellspacing="1" cellpadding="3" bgcolor="#226845" align="center" class="gb">
                <tr bgcolor="#39867B"> 
                  <td class="gb" align="right"> 
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="20"> 
                          <input type="checkbox" name="id" value=<%=rs("id")%> id=<%=rs("id")%>>
                        </td>
                        <td align="right"><a href=bookdel.asp?bookid=<%=rs("id")%> class="gb"><font color="#FFFFFF"><b> 
                          </b></font></a> <a href=# onClick="if(confirm('你确定要删除这条留言吗？')) location='bookdel.asp?bookid=<%=rs("id")%>'"><font color="#FFFFFF">删除</font></a><font color="#FFFFFF">-----</font></td>
                      </tr>
                    </table>
                    
                  </td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td class="gb" bgcolor="#C6EBDE">留言时间：<%=rs(  "g_time")%></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td class="gb" bgcolor="#C6EBDE">姓 名：<%=rs(  "g_name")%></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td class="gb" bgcolor="#C6EBDE">电 话：<%=rs(  "g_tel")%></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td class="gb" bgcolor="#C6EBDE">E-mail：<a href=mailto:<%=rs(  "g_email")%> class="gb"><%=rs(  "g_email")%></a></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td class="gb" bgcolor="#C6EBDE">主 题：<%=rs(  "g_addr")%></td>
                </tr>
                <tr bgcolor="#FFFFFF"> 
                  <td class="gb" bgcolor="#C6EBDE">留言内容：<br>
                    &nbsp;&nbsp;&nbsp;&nbsp;<%=rs(  "g_content")%></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr> 
            <td> 
              <table  width="90%" border="0" cellspacing="0" cellpadding="3" align="center">
                <tr> 
                  <td class="gb" colspan="2" align="center" bgcolor="#FFFFFF">&nbsp; 
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <%
rs.movenext
end if
next
%>
          <tr> 
            <td> 
              <table  width="98%" border="0" cellspacing="0" cellpadding="3" align="center">
                <tr> 
                  <td class="gb" colspan="2" align="center"> 
                    <%call DecoPage(rs,page_size,link) '调用分页显示函数%>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
		  <tr><td>
		  
</td></tr>
          <tr>
            <td align="center"> 
					<!-- &nbsp;&nbsp;<input type="button" value="全 选" onclick="sltAll()" name=button1>
		 &nbsp;&nbsp;<input type="button" value="清 空" onclick="sltNull()" name=button2>
            <!-- <input type="submit" name="Submit" value="DEL ">-->
			  		<!-- &nbsp;&nbsp;<input type="submit" value="删 除" name="tijiao" onclick="SelectChk()">-->
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <input type=hidden name="id">
</form>
</body>
</html>
