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

📄 56770_rqph.asp

📁 本实例为一个完整的网上购物商城的完整例子程序,里面有所以的源代码.希望对大家学习有用.
💻 ASP
字号:
<TABLE border=0 cellPadding=0 cellSpacing=0 width=180>
<tr>
<td height="23">
<table cellspacing=0 cellpadding=0 width=180 bgcolor="#FFC7C7">
<tr>
<td style="padding-left:10px;padding-top:2px" width="100%" height="23" bgcolor="#FFC7C7"><%=request("sort_name")%>&nbsp;人气排行榜</td>
</tr>
</table>
</td>
</tr>
<td>
<table width="180" border="0" cellpadding="0" cellspacing="0" align="center" height="63"  bgcolor="#FFE7E9">
<tr>
<%
if request("sort_name")="" then
        sql="select top 1 * from 56770_product where stj=true order by views desc"
else
        sql="select top 1 * from 56770_product where sort_name='"&request("sort_name")&"' and stj=true order by views desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql, conn, 3, 3
if rs.eof then
        response.write "...尚无排行..."
else
        i=0
do while not rs.eof
%>
<td ><a href="showproduct.asp?id=<%=rs("id")%>"><img border="0" src="pic/<%=rs("pic")%>" width="78" height="78" vspace="2" hspace="2"></a>
</a>
</td>
<td><font color=red> <%if rs("price")=0  then %>特价:<%=rs("cprice")%>.00<%else%>商城价:<%=rs("price")%>.00<%end if%></font>
<br><a href="showproduct.asp?id=<%=rs("id")%>" class=a2>详细资料</a> <br>
<a href="basket.asp?id=<%=rs("id")%>"><img src="IMAGES/in54_r44_c43.gif" width="54" height="18" border="0"></a>
</td></tr>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing%>
</TR>
</table>
<table width="180" border="0" cellpadding="0" cellspacing="0" align="center" bgcolor="#FFE7E9">
<tr>
<%
if request("sort_name")="" then
        sql="select id,product_name from 56770_product where etj=true order by views desc"
else
        sql="select id,product_name from 56770_product where sort_name='"&request("sort_name")&"' and etj=true order by views desc"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql, conn, 3, 3
if rs.eof then
        response.write "...尚无排行..."
else
        i=0
do while not rs.eof
%>
<tr>
<td height="10"> <b><font color=red>↑</font></b> <a href="showproduct.asp?id=<%=rs("id")%>" target="_blank" class=a2>
<% if len(rs("product_name"))>12 then%>
<%=left(rs("product_name"), 12)%>...
<%else%>
<%=rs("product_name")%>
<%end if%>
</a></td>
</TR>
<%i=i+1
if i>7 then exit do
        rs.movenext
loop
end if
rs.close
set rs=nothing%>
</table>
</td>
</tr>
</table>

⌨️ 快捷键说明

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