|
<!--#include file="../conn/conn.asp"-->
<!--#include file="../common/common.asp"-->
<%
'创作时间:<fc:date>
'作者:yxl
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title>asp-列表</title>
<link href="../style/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../js/function.js"></script>
</head>
<body class="mainBody">
<form name='form1' action='dict_loveQuery.asp' method='post'>
<table border='0' cellspacing='0' cellpadding='0' width='90%' align='center' height='25'>
<tr>
<td width='20%'>
<input type='button' class='butInput' name='butAdd' value='新增' onclick = "location.href='dict_loveNew.asp'">
</td>
</tr>
</table>
<table class='tblBorder' cellspacing='1' cellpadding='5' width='90%' border='0' align='center'>
<tr class='tblTitle'>
<td colspan="6">≡ 列表 ≡</td>
</tr>
<tr class="tblHead">
<td> </td>
<td></td>
<td></td>
<td></td>
<td></td>
<td width='6%' align="center">操作</td>
</tr>
<tr>
<%
sql = "select * from dict_love where 1=1 "
set rs = server.createObject("adodb.recordset")
if request("page")<>"" then
curpage=cint(request("page"))'当前是第几页
else
curpage=1
end if
rs.open sql,conn,3,3
pages = 1
If not (rs.bof or rs.eof) then
rs.PageSize = 10一页几条记录
pages = rs.pagecount总页数
recordCount = rs.recordCount总记录数
if (curpage-1) * rs.pagesize < recordcount then游标位置
rs.move (curpage-1) * rs.PageSize
showcontent
else
showcontent
end if
end if
call closeRs(rs)
closeConn
sub showcontent()
do while not (rs.eof or err)
i = i +1
if i mod 2 =0 then
trStyle = "tblRow2"
else
trStyle = "tblRow1"
end if
id = rs("id")
name = rs("name")
flag = rs("flag")
orders = rs("orders")
%>
<tr class="<%=trStyle%>">
<td width="1"><input type="checkbox" name="" value="<%=rs("")%>"></td>
<td><%=id%></td>
<td><%=name%></td>
<td><%=flag%></td>
<td><%=orders%></td>
<td align='center'><a href="dict_loveModify.asp?=<%=rs("")%>" class="fun">修改</a></td>
</tr>
<%
j=j+1
if j >= rs.PageSize Then exit do
rs.movenext
loop
end sub
%>
</table>
<table border='0' cellspacing='0' cellpadding='1' width='90%' align='center'>
<tr>
<td height='25'>
<input type='button' class='butInput' name='butSelectAll' value='全部选择' onclick = "selectAllCheck('',true)">
<input type='button' class='butInput' name='butCancleSelect' value='取消选择' onclick="selectAllCheck('',false)">
<input type='button' class='butInput' name='butDel' value=' 删除 ' onclick="executeBut(form1,'dict_loveDel.asp','','请选择要删除的记录!','确定要删除选择的记录!')">
</td>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align='right'>
<%
if curpage<>1 then
response.write "<a href=dict_loveList.asp class='pagebreak'>第一页</A>"
response.write "<a href=dict_loveList.asp?page=" & (curpage - 1) & " class='pagebreak'>上一页</A> "
end if
if curpage<>pages then
response.write "<a href=dict_loveList.asp?page=" & (curpage + 1) & " class='pagebreak'>下一页</A> "
response.write "<a href=dict_loveList.asp?page=" & pages & " class='pagebreak'>最后一页</A> "
end if
%>
<font color="#000000">第</font> <font color="#FF0000"><%=curpage%></font>
<font color="#000000">页,共</font> <font color="#FF0000"><%=pages%></font>
页
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html> |
|