<!--#include file="WebConfig/Conn.asp"-->
<!--#include file="WebConfig/LoginYN.asp"-->
<!--#include file="WebConfig/Function.asp"-->
<html xmlns:v>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link type="text/css" rel="stylesheet" href="Css/BackStyle.css" />
<title></title>
<script language="javascript" src="Js/Nor.js"></script>
<script language="javascript" src="Js/checkBaseInfo.js"></script>
</head>
<%
	If Request.Form("ck")<>"" Then
		conn.Execute("Delete from book where Id in ("&Request.Form("ck")&")")
	End If
	cA=Request.QueryString("Case")
	If cA="" Then
		cA="Id"
	Else
		cA=cA
	End If
	yN=Request.QueryString("yN")
	If yN="" Then
		yN=1
	Else
		yN=-yN
	End If
	If yN=1 Then
		Ud="Asc"
	Else
		Ud="Desc"
	End If
%>
<body>
<div id="BackBg">
	<v:RoundRect id="BackCo" strokeColor="#7EB977" arcsize=".01" Filled="T">
		<div id="BackDocTitle" class="B cW">管理留言信息 | Manage the Information of GuestBook</div>
		<form id="BaseInfo" name="BaseInfor" method="post" action="">
		<div id="BackDoZone">
				<ul id="Ti" class="B">
					<p class="w5 bR"><a href="?Case=Id&yN=<%=yN%>">ID</a></p>
					<p class="w15 bR">姓名</a></p>
					<p class="w40 bR">地址</p>
					<p class="w20 bR">留言时间</p>
					<p class="w10 bR">查看</p>
					<p class="w10">选择</p>
				</ul>
				<%
					Set rsNews=Server.CreateObject("ADODB.RecordSet")
					rsNews.Open "Select * from book order by addtime desc ",conn,1,1
					If Not rsNews.Eof Then
						rsNews.PageSize=10
						Page=Cint(Request.QueryString("Page"))
						If Page<1 Then Page=1 End If
						If Page>rsNews.PageCount Then Page=rsNews.PageCount End If
						If rsNews.RecordCount<rsNews.PageSize Then CuPage=1 Else CuPage=Cint(rsNews.RecordCount/rsNews.PageSize) End If
						rsNews.AbsolutePage=Page
					End If
					for i=1 to rsNews.RecordCount
					If rsNews.Eof or i>rsNews.PageSize Then Exit for End If
				%>
				<ul id="Co">
					<p class="w5 bR bB"><%=rsNews("Id")%></p>
					<p class="w15 bR bB"><%=rsNews("name")%></p>
					<p class="w40 bR bB" align="left" style="padding-left:5px"><%=rsNews("address")%></p>
					<p class="w20 bR bB"  align="left" style="padding-left:5px"><%=rsNews("addTime")%></p>
					<p class="w10 bR bB"><a  href="#" onClick="javascript:window.open ('book_view.asp?Id=<%=rsNews("Id")%>', 'newwindow2', 'height=450, width=300, top=100, left=300,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no') " style="cursor:hand">查看</a></p>
					<p class="w10 bB"><input name="ck" type="checkbox" value="<%=rsNews("Id")%>" onClick="selectOne();" /></p>
				</ul>
				<%
					rsNews.MoveNext
					Next
				%>
		</div>
		<div id="BackPage">当前<%=CuPage%>页 每页 <%=rsNews.PageSize%> 新闻 / 共<%=rsNews.PageCount%>页 共有 <span class="Red"><%=rsNews.RecordCount%></span> 条新闻 <a href="SetNewsInfo.asp?Page=1">首页</a> <a href="SetNewsInfo.asp?Page=<%=Page-1%>">上一页</a> <a href="SetNewsInfo.asp?Page=<%=Page+1%>">下一页</a> <a href="SetNewsInfo.asp?Page=<%=rsNews.PageCount%>">尾页</a></div>
		<div id="BackBn"><input id="BnDel" disabled="disabled" type="button" value="删除所选内容"  onClick="confirmDel('BaseInfo');" /> 全选 <input name="Total" type="checkbox" onClick="selectAll(this);" /></div>
		</form>
		
	</v:roundrect>
</div>
<%
	rsNews.Close
	Set rsNews=Nothing
%>
</body>
</html>
