菜鸟求助大侠们啊.分行列显示图片,不会啊.有部分代码,(分行列的)就是不知道怎么显示出图片啊''' 在下面这段代码加上几句数据库操作的代码就型了 俺就是不会啊 图片是有分类的..定义的是::class=1(图片总类) nclass=11,12,13,14......(各种类型的图片如美女,风景,动物 ,卡通) <% Dim ss,const_txl_HomeUrl,errstr,a,page set rs=server.createobject("adodb.recordset")
sql="select * from photo where Isok=1 order by dateandtime desc,id desc" rs.open sql,conn,1,1 dim RecordCount2,LinkFile,displaypagenum,PageSize2,k,PageCount2 page=Request.QueryString("page") if page="" or (not isnumeric(page)) Then page=1 end if page=Cint(page) RecordCount2=rs.recordcount LinkFile="?" displaypagenum=12 pagesize2=12 rs.pagesize=PageSize2 PageCount2=rs.pagecount If not rs.eof then rs.absolutepage=page end if a=0 %>
<% dim trflag,trflag2,clos clos=3 k=0 ss=RecordCount2 if ss>0 then Response.Write"<table width=""100%"" align=""center"" border=""1"" cellspacing=""0"" cellpadding=""0"" style=""border-collapse:collapse;text-align:center;font-family:Verdana;"">" while k<ss and a<pagesize2 and not rs.eof a=a+1 trflag=false trflag2=false if k mod 3=0 then trflag=true if trflag then Response.Write("<tr>") Response.Write("<td width=149>") %> <% Response.Write("</td>") rs.movenext k=k+1 if k mod clos=0 then trflag2=true if trflag2 then Response.Write("</tr>") wend if ss mod clos<>0 then for k=1 to (clos-ss mod clos) Response.Write("<td> </td>") next Response.Write("</tr>") end if Response.Write("</table>") end if rs.close set rs=nothing %>
<% i=i+1 if i>=index_perpage then exit do rs.movenext loop %>