<%
sql = " select pictitle, b.showdate, picdes, picurl1, picurl2, a.picclassid, b.classurl, a.picshowtype "
sql = sql & " from tbl_pic a "
sql = sql & " inner join tbl_pic_class b on a.picclassid=b.picclassid and b.flag=1 "
sql = sql & " where 1=1 "
sql = sql & " and a.languageid=1 "
sql = sql & " and a.flag=1 "
sql = sql & " and picid=" & pid
set rs = conn.execute (sql)
if not rs.eof then
strrelatenews = ""
if isnull(rs(6)) or rs(6) = "" then
else
strrelatenews = "
"
strrelatenews = strrelatenews & "相关新闻 "
end if
if rs(7) = 1 then
strshowsize = " width=""150"""
else
strshowsize = " width=""188"""
end if
%>
<%=rs(0)%>
<%=rs(1)%>
<%=rs(2)%>
/> |
<%=strrelatenews%>
|
<%
sql = " select name, showdate, picclassid "
sql = sql & " from tbl_pic_class "
sql = sql & " where 1=1 "
sql = sql & " and languageid=1 "
sql = sql & " and flag=1 "
sql = sql & " and picclassid in (select distinct picclassid from tbl_pic where flag=1 and picid<>" & pid & ") "
sql = sql & " and picclassid=" & rs(5)
set rs = conn.execute (sql)
do while not rs.eof
%>
<%=rs(1)%> |
<%
response.write showpic2(pid)
%>
<%
rs.movenext
loop
response.write "
返回
"
' response.write showpicclsbypicid(rs("picid"))
end if
function showpic2(pid)
dim rs
sql = " select * "
sql = sql & " from tbl_pic "
sql = sql & " where 1=1 "
sql = sql & " and languageid=1 "
sql = sql & " and flag=1 "
sql = sql & " and picid<>" & pid
sql = sql & " and picclassid=(select picclassid from tbl_pic "
sql = sql & " where picid=" & pid
sql = sql & " )"
set rs = conn.execute (sql)
do while not rs.eof
if rs("picshowtype") = 1 then
strshowsize = " width=""97"""
else
strshowsize = " width=""138"""
end if
%>
">" alt="Thumbnail" border="0"<%=strshowsize%> /> |
<%=rs("pictitle")%> |
|
<%
rs.movenext
loop
end function
%>