www.gusucode.com > 凡人网络购物系统 2008源码程序 > IncAsp/all_ph.asp

    <table cellSpacing="0" cellPadding="0" border="0" class="ph_la">
<tr><td class="ph_la1"><span class="ph_laf">分类推荐产品</span></td></tr>
<tr><td class="ph_la2">
<%
select case prot
case 1
%>
<table border="0" cellpadding="3" cellspacing="0" width="90%">
<%set rs=server.createobject("adodb.recordset")
if nsort_id<>"" then
sql="select top 3 hw_id,hw_name,hw_price2,hw_pic,hw_content from venshop_hw where hw_kucun>0 and tjsort=1 and nsort_id="&nsort_id&" order by hw_id DESC"
elseif sort_id<>"" then
sql="select top 3 hw_id,hw_name,hw_price2,hw_pic,hw_content from venshop_hw where hw_kucun>0 and tjsort=1 and sort_id="&sort_id&" order by hw_id DESC"
else
sql="select top 3 hw_id,hw_name,hw_price2,hw_pic,hw_content from venshop_hw where hw_kucun>0 and tjsort=1 order by hw_id DESC"
end if
  rs.open sql,conn,1,1
  i=-1
  do while not rs.eof
  i=i+1%>
<tr><td height="26"<%if i>0 then%> class="heng"<%end if%>><p align="center" style="line-height: 150%; margin: 3px">
<a <%if photoh=1 then%>class=photo<%end if%>  target="_blank" href="views.asp?hw_id=<%=rs("hw_id")%>"><img border="0" src="<%pic=split(rs("hw_pic"),"*")%><%=pic(1)%>" <%=sort_wh%>></a><br>
<a href="views.asp?hw_id=<%=rs("hw_id")%>" target=_blank><%=rs("hw_name")%></a><br>
<p align="left" style="line-height: 150%; margin: 3px" class="anse"><%=rs("hw_content")%><br>
<span class="price">价格:<%=fuhao%><%=rs("hw_price2")%><%=danwei%></span></td></tr>
<%
rs.movenext
loop
rs.close
set rs=nothing%></table>
<%case 2%>
<table border="0" cellpadding="0" cellspacing="0" width="90%">
<%set rs=server.createobject("adodb.recordset")
if nsort_id<>"" then
sql="select top 10 hw_id,hw_name,hw_price2,hw_pic,hw_content from venshop_hw where hw_kucun>0 and tjsort=1 and nsort_id="&nsort_id&" order by hw_id DESC"
elseif sort_id<>"" then
sql="select top 10 hw_id,hw_name,hw_price2,hw_pic,hw_content from venshop_hw where hw_kucun>0 and tjsort=1 and sort_id="&sort_id&" order by hw_id DESC"
else
sql="select top 10 hw_id,hw_name,hw_price2,hw_pic,hw_content from venshop_hw where hw_kucun>0 and tjsort=1 order by hw_id DESC"
end if
  rs.open sql,conn,1,1
  do while not rs.eof%>
<tr><td><p style=" margin: 3px"><IMG src="Skin/<%=venshop_skin%>/dot2.gif" border=0 align="absmiddle"> <a href="views.asp?hw_id=<%=rs("hw_id")%>" target=_blank><%=rs("hw_name")%></a></td></tr>
<%
rs.movenext
loop
rs.close
set rs=nothing%></table>
<%case else%>
<table border="0" cellpadding="3" cellspacing="0" width="90%">
<%set rs=server.createobject("adodb.recordset")
if nsort_id<>"" then
sql="select top 8 hw_id,hw_name,hw_price2,hw_pic,hw_content from venshop_hw where hw_kucun>0 and tjsort=1 and nsort_id="&nsort_id&" order by hw_id DESC"
elseif sort_id<>"" then
sql="select top 8 hw_id,hw_name,hw_price2,hw_pic,hw_content from venshop_hw where hw_kucun>0 and tjsort=1 and sort_id="&sort_id&" order by hw_id DESC"
else
sql="select top 8 hw_id,hw_name,hw_price2,hw_pic,hw_content from venshop_hw where hw_kucun>0 and tjsort=1 order by hw_id DESC"
end if
  rs.open sql,conn,1,1
  i=-1
  do while not rs.eof
  i=i+1%>
<tr><td<%if i>0 then%> class="heng"<%end if%> width="60"><p align="center" style="line-height: 150%; margin: 3px">
<a <%if photoh=1 then%>class=photo<%end if%>  target="_blank" href="views.asp?hw_id=<%=rs("hw_id")%>">
<img border="0" src="<%pic=split(rs("hw_pic"),"*")%><%=pic(1)%>" width="50"></a></td>
<td height="26"<%if i>0 then%> class="heng"<%end if%>>
<p style="line-height: 150%; margin: 3px"><a href="views.asp?hw_id=<%=rs("hw_id")%>" target=_blank><%=rs("hw_name")%></a><br>
<span class="price">价格:<%=fuhao%><%=rs("hw_price2")%><%=danwei%></span></td></tr>
<%
rs.movenext
loop
rs.close
set rs=nothing%></table>
<%end select%>
<div class="d5"></div></td></tr>
<tr><td class="ph_la3"></td></tr></table>