<% dim iWidth, iheight sub ImgDimension(img) dim myImg, fs Set fs= CreateObject("Scripting.FileSystemObject") if not fs.fileExists(img) then exit sub set myImg = loadpicture(img) iWidth = round(myImg.width / 26.4583) iheight = round(myImg.height / 26.4583) set myImg = nothing end sub set rs=objConn.execute("select * from intros where introid=1") if not rs.eof then intro=rs("intro") end if set rs2=objConn.execute("select * from cats where catid=" & request.querystring("id")) if not rs2.eof then category=rs2("category") else category="error" end if ' records per page recordsonpage = 1 ' count all records allrecords = 0 set rs3 = objconn.Execute("SELECT * FROM qyPhotos where catid=" & request.querystring("id") & " order by photoid") do until rs3.EOF allrecords = allrecords + 1 rs3.movenext loop ' if offset is zero then the first page will be loaded offset = request.querystring("photo") if offset = 0 OR offset = "" then requestrecords = 0 else requestrecords = requestrecords + offset end if ' opens database set rs3 = objconn.Execute("SELECT * FROM qyphotos where catid=" & request.querystring("id") & " ORDER BY photoid") ' reads first records (offset) without showing them (can't find another solution!) hiddenrecords = requestrecords do until hiddenrecords = 0 OR rs3.EOF hiddenrecords = hiddenrecords - 1 rs3.movenext if rs3.EOF then lastrecord = 1 end if loop %>
 
<%=intro%>

.....
Sculpture Photos > "><%=rs2("category")%>





.......Japanese symbol for "ice"


.

 

<% ' prints records in the table showrecords = recordsonpage recordcounter = requestrecords do until showrecords = 0 OR rs3.EOF recordcounter = recordcounter + 1 %> <% ImgDimension(Server.MapPath(rs3("catdir") & "/" & rs3("photoImage"))) if iWidth > 400 then %> <%else%> <%end if%>
/<% = rs3("photoimage") %>" <%=ImageResize(Server.MapPath(rs2("catDir") & "/" & rs3("photoImage")), 400, 1000)%>>
/<% = rs3("photoimage") %>">
<% showrecords = showrecords - 1 rs3.movenext if rs3.EOF then lastrecord = 1 end if loop %>

<% if requestrecords <> 0 then %>&photo=<% = requestrecords - recordsonpage %>" style="text-decoration:none"><< Previous<% else %>Prev Page<% end if %>    <% if lastrecord <> 1 then %> &photo=<% = requestrecords + recordsonpage %>" style="text-decoration:none">Next >><% else %>Next Page<% end if %>
<% ' Closes connection rs3.close objConn.close %>

 

 
(210) 666 1301 • 4727 Cotton Belt • Email Us ...


© Signature Ice. All Rights Reserved.