<% hor=2 vert=3 perp=hor*vert %> <% theID=request.querystring("id") sql="select * from foto order by id" set DB=Server.CreateObject("ADODB.Connection") db.Open "wheels_db" set rs=Server.CreateObject("ADODB.Recordset") rs.Open sql,DB,3,1 %> ITO - литые алюминиевые диски фирмы момо - momo - italy - wheels


<% for i = 2 to theid rs.movenext next response.write "

" & rs("comment") & "

" rs.movefirst%>
<% for i = 2 to theid rs.movenext next response.write " " & rs("name") & "1024x768 " rs.movefirst%>
<% response.write "" tt=0 response.write "" recordcount=0 while not rs.eof recordcount=recordcount+1 rs.movenext wend rs.movelast page1=CInt(Request("page")) if page1<1 then page1=1 tt1=recordcount-(page1-1)*perp if recordcount-page1*perp<0 then tt1=12+(recordcount-page1*perp) rs.absoluteposition=tt1 while ((tt1>recordcount-(page1)*perp) and (tt1>0)) response.write "" tt=tt+1 if tt=hor then response.write "" tt=0 end if tt1=tt1-1 rs.moveprevious wend select case tt case 1 response.write "" response.write "" response.write "" case 2 response.write "" response.write "" case 3 response.write "" end select response.write "

      
" %> страницы: <% For i = 1 To recordcount/perp+1 response.write " " & i & "" & "   " Next %>

 
<% rs.close set rs = nothing db.close set db = nothing %>