<%
function cutstr(tempstr,tempwid)
if len(tempstr)>tempwid then
cutstr=left(tempstr,tempwid)&"..."
else
cutstr=tempstr
end if
end function%>
<html>
<body>
<table width=100% border=0 cellspacing=1 cellpadding=1 bgcolor=#b50aa8>
<%i=1
set rs_product=server.createobject("adodb.recordset")
sqltext="select top 24 * from product where passed=true and elite=true order by updatetime desc"
rs_product.open sqltext,conn,1,1
%>
<tr>
<%
do while not rs_product.eof
%>
<td width="120" height="22" bgcolor="#fddffb"><table width="120" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="150" valign="middle">
<div align="center"><a href='productshow.asp?id=<%=rs_product("id")%>' target=_blank title='<%=rs_product("title")%>'>
<%if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then%>
<img src="<%if rs_product("defaultpicurl")="" then%>img/nopic.gif<%else%><%=rs_product("defaultpicurl")%><%end if%>" alt="<%=rs_product("title")%>" width="100%" height="100" border="0" onload="javascript:drawimage(this);" />
<%end if%></a>
<a href='productshow.asp?id=<%=rs_product("id")%>' target=_blank title='<%=rs_product("title")%>'><%=cutstr(rs_product("title"),8)%></a></div></td>
</tr>
</table></td>
<% if i mod 4=0 then%></tr>
<tr>
<% end if %>
<%
i=i+1
rs_product.movenext
loop
rs_product.close
%></tr>
</table>