<!--#include file="admin_chk.asp"-->
<!--#include file="book_conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>商品管理</title>
<link href="page.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
</script>
<style type="text/css">
<!--
.style1 {color: #FF9900}
-->
</style>
</head>

<body>
<table width="188" height="34" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div align="center">房间管理</div></td>
  </tr>
</table>
<table width="568" height="366" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999">
  <tr>
    <td valign="top" bgcolor="#FFFFFF"><br>
        <table width="465" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><div align="center" class="helptopic">点击房间名称可进行编辑修改！</div></td>
          </tr>
        </table>
        <br>
        <hr width="90%" size="1" class="form">
        <table width="512" height="35" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="34"><div align="center">选择</div></td>
            <td width="77"><div align="center">房间编号</div></td>
            <td width="101"><div align="center">房间名称</div></td>
			<td width="100"><div align="center">英文名称</div></td>
            <td width="100"><div align="center">门市价</div></td>
            <td width="100"><div align="center">会员价</div>              <div align="center"></div></td>
          </tr>
        </table>
        <form name="form1" method="post" action="shop_del.asp">
          <%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop order by shop_tj,id desc",conn,1,1
url="shop.asp"
page=1    ' 设置变量PAGE=1
rs.PageSize = 10 '每页显示记录数
if Not IsEmpty(Request("Page")) then '如果PAGE已经初始化...
Page = CInt(Request("Page")) '接收PAGE并化为数字型赋给PAGE变量
        if Page > rs.PageCount then '如果接收的页数大于总页数
        rs.AbsolutePage = rs.PageCount '设置当前显示页等于最后页
            elseif Page <= 0 then '如果page小于等于0
        Page = 1 '设置PAGE等于第一页
    else
        rs.AbsolutePage = Page '如果大于零,显示当前页等于接收的页数 
    end if
End if
Page = rs.AbsolutePage 
total = rs.RecordCount
%>
          <% 
For i = 1 to rs.PageSize
if rs.EOF then     
Exit For 
end if '利用for next 循环依次读出记录
%>
          <table width="512" height="24" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="34"><div align="center"> <span class="b">
                  <input name=id type='checkbox' class="Gray" value='<%=Cstr(rs("Id"))%>'>
              </span> </div></td>
              <td width="77"><div align="center">【<span class="style1"><%=rs("prodid")%></span>】</div></td>
              <td width="101"><div align="center"><a href="shop_edit.asp?id=<%=rs("id")%>"><%= rs("shop_name") %></a></div></td>
			  <td width="100"><div align="center"><a href="shop_edit.asp?id=<%=rs("id")%>"><%= rs("eng_name") %></a></div></td>
              <td width="100"><div align="center"><%= rs("shop_msj") %>元</div></td>
              <td width="100"><div align="center"><%= rs("shop_jg") %>元</div>                <div align="center">
              </div></td>
            </tr>
          </table>
          <% rs.MoveNext
					  next %>
          <br>
          <br>
          <table width="512" height="27" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="32"><div align="center">
                  <input name=chkall type='checkbox' class="Gray" onclick='CheckAll(this.form)'>
              </div></td>
              <td width="34">全选</td>
              <td width="63"><div align="center">
                <input type="submit" name="Submit" value="删除">
                </div>
              <td width="82"><div align="center">
              </div></td>
              <td width="289"><div align="right">
                  <%
					  response.Write("第"&page&"/"&rs.pagecount&"页 共"&total&"条记录 ")

if Page>1 then
    response.write "<a Href="&url&"?Page="&"1"&">首页</a> <a Href='"&url&"?Page="&Page-1&"'>上一页</a> "

else
    response.write "首页 上一页 "
end if

if Page<>rs.pagecount then
    response.write "<a Href='"&url&"?Page="&Page+1&"'>下一页</a> <a Href='"&url&"?Page="&rs.PageCount&"'>尾页</a>"
else
    response.write "下一页 尾页"
end if
%>
              </div></td>
              <td width="12">&nbsp;</td>
            </tr>
          </table>
        </form>
        <hr width="90%" size="1" class="form"></td>
  </tr>
</table>
</body>
</html>
 
