"
if(idcount>0 and sqlid<>"") then'如果记录总数=0,则不处理
'用in刷选本页所语言的数据,仅读取本页所需的数据,所以速度快
sql="select * from ["& datafrom &"] where id in("& sqlid &") "&taxis
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,0,1
dim ProductName,SmallPicPath,Content
if request.cookies("Style")="Shopwindow" or request.cookies("Style")="" then'橱窗方式显示
dim R,C'显示行数和列数
for R=1 to 3
Response.Write "" & vbCrLf
for C=1 to 4 '填充数据到表格
if C=1 or C=4 then
Response.write"| "
elseif C=2 then
Response.write" | "
elseif C=3 then
Response.write" | "
end if
if StrLen(rs("ProductName"))<=18 then
ProductName=rs("ProductName")
else
ProductName=StrLeft(rs("ProductName"),16)
end if
SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
response.write ""
response.write" | "
rs.movenext
if rs.eof then exit for
next
Response.Write "
" & vbCrLf
if rs.eof then exit for
next
elseif request.cookies("Style")="List" then'列表显示方式
for R=1 to 5
Response.Write "" & vbCrLf
for C=1 to 2 '填充数据到表格
if C=1 then
Response.write"| "
else
Response.write" | "
end if
if StrLen(rs("ProductName"))<=28 then
ProductName=rs("ProductName")
else
ProductName=StrLeft(rs("ProductName"),26)
end if
SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
response.write "" &_
"" &_
" | " &_
" | " &_
" "&ProductName&" | " &_
" | " &_
"| 编号:"&rs("ProductNo")&" | " &_
"| 价格:"&rs("Price")&" | " &_
"| 厂商:"&rs("Maker")&" | " &_
"| 日期:"&rs("AddTime")&" | " &_
" | "
response.write" | "
rs.movenext
if rs.eof then exit for
next
Response.Write "
" & vbCrLf
if rs.eof then exit for
next
elseif request.cookies("Style")="Brief" then'简介显示方式
while not rs.eof '填充数据到表格
Response.write""
Response.write"| "
ProductName=rs("ProductName")
Content=rs("Content")
SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
Response.write ""
Response.write " | "
Response.Write "
"
rs.movenext
wend
end if
else
response.write "| 暂无相关信息 |
"
exit function
end if
Response.Write "