⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 goods_list.asp

📁 本源代码为大学生购物网的源代码,欢迎大家的下载,学习与交流
💻 ASP
字号:
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0 class=page>
  <TBODY>
    <TR> <td><!--#include file="top.asp"-->
<BODY topmargin="0">
<TABLE width=760 border=0 align=center cellpadding="4">
  <TBODY>
    <TR align="center"> 
      <TD vAlign=top> 
        <TABLE cellSpacing="1" width="100%" cellpadding="0" border=0 bgcolor="#C0C0C0">
          <TBODY>
                <TR> 
              <TD  align="left" height=25 background="img/bg.gif"> 
						&nbsp;<img border="0" src="images/news.gif" width="15" height="15"> 
						最新商品</TD>
                  
            </TR>
<SCRIPT LANGUAGE="JavaScript">
<!--
function GoPage() {
window.location.href="?page_no="+ page.value;
}
//-->
</SCRIPT>

<%
Dim StrSql,Rs
StrSql="select * from goods_info order by goods_id desc"
Set Rs=Server.CreateObject("adodb.recordset")
Rs.Open StrSql,conn,1,1
%>


                  <tr> 

                    <td height=18 bgcolor="#FFFFFF"</td>

                   <div align="center">
				<table border="0" width="100%" cellpadding="0" cellspacing="1" bgcolor="#C0C0C0">


						<tr>
							<td align="center" height="21" bgcolor="#FFFFFF">
							序号</td>
							<td align="center" height="21" bgcolor="#FFFFFF">
							商品图片</td>
							<td align="center" height="21" bgcolor="#FFFFFF">
							商品名称</td>
							<td align="center" height="21" bgcolor="#FFFFFF">
							商品价格</td>
							<td align="center" height="21" bgcolor="#FFFFFF">
							商品数量</td>
							<td align="center" height="21" bgcolor="#FFFFFF">
							发布时间</td>
							<td align="center" height="21" bgcolor="#FFFFFF">
							人气</td>
						</tr>
						<%
	  IF not rs.eof and not rs.bof then
	  dim page_size
	  dim page_no
	  dim page_total
	  page_size=10
	  if request.QueryString("page_no")="" then
	  page_no=1
	  else
	  page_no=cint(request.QueryString("page_no"))
	  end if
	  rs.pagesize=page_size
	  page_total=rs.pagecount
	  rs.absolutepage=page_no
	  dim I,J
	  I=0
	  J=page_size
	  do while not rs.eof and J>0
	  J=J-1
	  I=I+1
      %>

						<tr>
							<td align="center" bgcolor="#FFFFFF"><%=rs("goods_id")%></td>
							<td align="center" bgcolor="#FFFFFF"><a href="goods_info.asp?goods_id=<%=rs("goods_id")%>" target="_blank">
							<img src="<%=rs("goods_pic")%>" height=60 width=60 border=0 style="border: 1px solid #C0C0C0; "></a></td>
							<td align="center" bgcolor="#FFFFFF"><%=rs("goods_name")%>     <% 
		  Select Case rs("font")
                Case "1"
                response.write "<img src=img/good.gif border=0 alt=推荐商品>"
                 End Select
		   %></td>
							<td align="center" bgcolor="#FFFFFF"><%=rs("goods_price")%>元</td>
							<td align="center" bgcolor="#FFFFFF"><%=rs("goods_amount")%>个</td>
							<td align="center" bgcolor="#FFFFFF"><%=rs("goods_date")%></td>
							<td align="center" bgcolor="#FFFFFF"><%=rs("goods_hits")%></td>
						</tr><%
	      Rs.MoveNext
		Loop      
	  End IF
	  %>

					</table>
					
<table  width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td><div align="center">[本页是<%=int(page_no)%>/<%=int(page_total)%>] [<a href="?page_no=1">第一页</a>]
              <%if int(page_no)>1 then%>
              [<a href="?page_no=<%=cstr(int(page_no-1))%>">前一页</a>]
              <%elseif int(page_no)<=1 then%>
              [<a href="?page_no=1">前一页</a>]
              <%end if%>
              <%if int(page_no)<int(page_total) then%>
              [<a href="?page_no=<%=cstr(int(page_no+1))%>">后一页</a>]
              <%elseif int(page_no)>=int(page_total) then%>
              [<a href="?page_no=<%=cstr(int(page_total))%>">后一页</a>]
              <%end if%>
              [<a href="?page_no=<%=page_total%>">最后一页</a>] 转到
              <input name="page" type="text" value="<%=page_no%>" size="5">页
			<input type="button" class=input name="Submit" value="转到" onClick="GoPage()"></div></td>
              </tr>
</table>
		  </div>

                  </tr>



          </TBODY>
        </TABLE>
      </TD>
    </TR>
  </TBODY>
</TABLE>
<!--#include file="bottom.asp"--> </TD>
    </TR>
  </TBODY>
</TABLE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -