|
<%
TAB_Name="M_info_type_1"
sqlstr = "select * from "&TAB_Name&" order by order_id desc"
'response.write sqlstr&" "
'response.end
i=0
Set rst=server.CreateObject("Adodb.recordset")
rst.open sqlstr,conn,1,1
do until rst.eof
'type_1_id=rs("type_id")
type1=rst("typename")
type1_show=rst("typename"&lang_type_show)
type1_str=type1_str&type1&"||"
type1_show_str=type1_show_str&type1_show&"||"
%>
<%
strlen=240
TAB_Name="M_information"
topN=3
sqlstr="select top "&topN&" * from "&TAB_Name&" where type1='"&type1&"' and info_state=1 order by order_id desc,id desc"
'response.write sqlstr&"-- "
'response.end
set rs=server.createobject("adodb.recordset")
rs.open sqlstr,conn,1,1
j=1
do until rs.eof
info_id=rs("i_id")
info_name=rs("info_name"&lang_type_show)
info_name=leftT(info_name,strlen)
set rs2=server.createobject("adodb.recordset")
sqlstr2="select top 1 * from "&TAB_Name&"_Pic where i_id="& info_id &" order by pic_id" '首图片
'response.write sqlstr&"-- "
rs2.open sqlstr2,conn,1,1
if rs2.eof then
product_pic="none.gif"
else
product_pic=rs2("pic_s")
if rs2("pic_b")<>"" then product_pic2=rs2("pic_b") else product_pic2=rs2("pic_s")
end if
rs2.close
set rs2=nothing
%>
|
<%
rs.movenext
if j mod 3 =0 and not rs.eof then
response.write " "
end if
j=j+1
loop
rs.close
%>
<%
rst.movenext
i=i+1
loop
rst.close
%>
|