代码如下,我想调用第一张图片为限定大小的缩略图,调用文章标题为标题。但现在这段代码是把所有图片都调出来了,麻烦高手解决下
<!--新闻列表开始-->
<%
call List(27)
'----------------------------------------------------------------------------------------- List() --------------------------
sub List(maxPerPage)
dim n,i
n = 1
i = 0
sum_id = MyRequest("page",1)
if sum_id = 0 then
sum_id = 1
end if
sum_id = (sum_id - 1) * maxPerPage + 1
sql = "select * from news where s_id = 73 order by UpdateTime desc"
'Response.Write(sql)
rs.Open sql,conn,1,1
if rs.EOF then
Response.write("暂无数据")
exit sub
end if
totalPut = rs.RecordCount
if page > 0 then
CurrentPage = page
else
CurrentPage = 1
end if
if (CurrentPage - 1) * maxPerPage > totalPut then
if (totalPut mod maxPerPage) = 0 then
CurrentPage = totalPut \ maxPerPage
else
CurrentPage = totalPut \ maxPerPage + 1
end if
end if
if CurrentPage <> 1 then
if (CurrentPage - 1) * maxPerPage < totalPut then
rs.Move(CurrentPage - 1) * maxPerPage
else
CurrentPage = 1
end if
end if
%>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0"><tr>
<%do while not rs.eof%>
<td><table width="150" border="0">
<tr><td><a href="teacher-info.asp?id=<%= rs("id") %>" class="a03"><%=RegExpExecute(rs("content"))%></a></td></tr>
<tr><td align="center"><a href="teacher-info.asp?id=<%= rs("id") %>" class="a03"><%= cuted(rs("Title"),40) %></a></td></tr></table></td>
<%
if n mod 3 = 0 then
Response.Write("</tr>")
end if
n = n + 1
i = i + 1
if i >= maxPerPage then
exit do
end if
rs.MoveNext
loop
%>
</tr></table>
<%
rs.Close
'call showPage(totalPut,maxPerPage)
end sub
%>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
</table>
<!--新闻列表结束-->