asp中显示6个图片横排3个,排成两排 全部分类改成某一个栏目的分类,怎么改? 5
这个代码中要把6个图片排成一个3个,排两排,怎么改???同时要把代码中的全部分类msql=msql&"and(bClassID="&cid&"orbParentID="&...
这个代码中要把6个图片排成一个3个,排两排,怎么改???
同时要把代码中的全部分类msql=msql & " and (bClassID=" & cid & " or bParentID=" & cid & ")" 中搜索,改成一个栏目下的图片,怎么改??
<%
public sub tycms_best_picindex_list(cid)
set rss=server.CreateObject("adodb.recordset")
msql="select top 6 * from Ay_Content_v where bPic<>'' and bIsBest=1 and bIsPass=1 "
If cid<>"" Then
msql=msql & " and (bClassID=" & cid & " or bParentID=" & cid & ")"
End If
msql=msql & " order by bClick desc,bAddTime desc,bId "
Dim mvarpics
rss.open msql,conn
do while not rss.eof
mvarpics=""
if left(Trim(rss("bPic")&""),1)<>"/" and instr(lcase(Trim(rss("bPic")&"")),"http")<=0 then
mvarpics= ay_directory & "/" & Trim(rss("bPic")&"")
else
mvarpics= Trim(rss("bPic")&"")
if left(Trim(rss("bPic")&""),1)="/" then
mvarpics=ay_directory & Trim(rss("bPic")&"")
end if
end if
%>
<li>
<a href="<%=ay_directory%>/show/?<%=trim(rss("bClassID") & "")%>-<%=trim(rss("bId") & "")%>.html" target="_blank"><img src="<%=mvarpics%>" border="0" width="80" height="80" alt="<%=trim(rss("bTitle") & "")%>"></a>
</li>
<%
rss.movenext
loop
if rss.state<>0 then rss.close
set rss=nothing
end sub
%> 展开
同时要把代码中的全部分类msql=msql & " and (bClassID=" & cid & " or bParentID=" & cid & ")" 中搜索,改成一个栏目下的图片,怎么改??
<%
public sub tycms_best_picindex_list(cid)
set rss=server.CreateObject("adodb.recordset")
msql="select top 6 * from Ay_Content_v where bPic<>'' and bIsBest=1 and bIsPass=1 "
If cid<>"" Then
msql=msql & " and (bClassID=" & cid & " or bParentID=" & cid & ")"
End If
msql=msql & " order by bClick desc,bAddTime desc,bId "
Dim mvarpics
rss.open msql,conn
do while not rss.eof
mvarpics=""
if left(Trim(rss("bPic")&""),1)<>"/" and instr(lcase(Trim(rss("bPic")&"")),"http")<=0 then
mvarpics= ay_directory & "/" & Trim(rss("bPic")&"")
else
mvarpics= Trim(rss("bPic")&"")
if left(Trim(rss("bPic")&""),1)="/" then
mvarpics=ay_directory & Trim(rss("bPic")&"")
end if
end if
%>
<li>
<a href="<%=ay_directory%>/show/?<%=trim(rss("bClassID") & "")%>-<%=trim(rss("bId") & "")%>.html" target="_blank"><img src="<%=mvarpics%>" border="0" width="80" height="80" alt="<%=trim(rss("bTitle") & "")%>"></a>
</li>
<%
rss.movenext
loop
if rss.state<>0 then rss.close
set rss=nothing
end sub
%> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |