📄 shangpin.asp
字号:
<!--#include file="conn.asp"--><html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#799AE1">
<table width="80%" border="1" cellspacing="0" cellpadding="1" bordercolor="#336699" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="../images/back_3.gif" rowspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
<tr>
<td class="12v" >
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="96" width="100%">
<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF" height="128">
<tr>
<td height="20" bgcolor="#FFFFFF">
<div align="center"></div>
</td>
</tr>
<tr>
<td height="2" valign="top" bgcolor="#E8F1FF"> <br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="24">
<tr>
<td width="4%">ID</td>
<td width="12%">所属</td>
<td width="19%">商品</td>
<td width="9%">价格</td>
<td width="10%">会员价格</td>
<td width="5%">简介</td>
<td width="26%">详细介绍</td>
<td width="4%">小图</td>
<td width="5%">大图</td>
<td width="6%">点击</td>
</tr>
</table>
<% set rs=server.createobject("adodb.recordset")
sql="SELECT * from sp order by stime desc"
rs.open sql,conn,1,3
page=1 ' 设置变量PAGE=1
rs.pagesize=20
if Not IsEmpty(Request("Page")) then '如果PAGE已经初始化...
Page = CInt(Request("Page")) '接收PAGE并化为数字型赋给PAGE变量
if Page > rs.PageCount then '如果接收的页数大于总页数
rs.AbsolutePage = rs.PageCount '设置当前显示页等于最后页
else
rs.AbsolutePage = Page '显示当前页等于接收的页数
end if
else
Page = 1 '如果page未被初始化则设为1
End if
rs.AbsolutePage=page
%>
<%
For i = 1 to rs.PageSize
if rs.EOF then
Exit For
end if '利用for next 循环依次读出记录
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="8">
<tr>
<td width="3%"><%=rs("id")%></td>
<td width="12%"><%=rs("ssid")%></td>
<td width="20%"><a href="addsp2.asp?id=<%=rs("id")%>"><%=rs("sname")%></a></td>
<td width="9%"><%=rs("scun1")%></td>
<td width="10%"><%=rs("scun2")%></td>
<td width="5%"><img src="images/1.gif" width="18" height="18" alt="<%=rs("jianjie")%>"></td>
<td width="5%"><img src="images/1.gif" width="18" height="18" alt="<%=rs("jianjie2")%>"></td>
<td width="13%">
<% if rs("slei")=0 then %>
<font color="#990000">未通过</font>
<% else
end if %>
</td>
<td width="8%"><%=rs("fabu")%></td>
<td width="4%"><a href="<%=rs("img")%>"><img src="images/6.gif" width="18" height="18" border="0"></a></td>
<td width="5%"><a href="<%=rs("img2")%>"><img src="images/6.gif" width="18" height="18" border="0"></a></td>
<td width="6%"><%=rs("dian")%><img src="images/delete.gif" alt="删除" width="12" height="12" border="0" onClick="if(confirm('您确定要删除吗?')){location='delsp.asp?id=<%=rs("id")%>'}else{return(false)}" onMouseMove="this.style.cursor='hand'">
</td>
</tr>
</table>
<%rs.movenext
next %>
</td>
</tr>
<tr>
<td height="106" valign="top" bgcolor="#E8F1FF"><div align="right"><br>
<%if request("page")>1 then%>
<a Href="shangpin.asp?Page=<% = 1%>">首页</a> <a Href="shangpin.asp?Page=<% =request("page") -1 %>">上一页</a>
<%end if %>
<%if request("page")<>rs.pagecount then %>
<a Href="shangpin.asp?Page=<% =request("page") + 1%>">下一页</a>
<a Href="shangpin.asp?Page=<% = rs.PageCount%>">尾页</a>
<% end if %>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -