Prodigy Customs - Custom and Muscle Car Restoration

Bruce's Firebird


 

<% dim pgCat pgCat="bruce" %> <% 'Photo Catalog Application by Ning Zhou 'Use and Customize Freely as You Wish 'Please Link to www.ningzhou.com 'Enjoy! %> <% dim intCurrentPageNum, strSortBy, strCategory, count, strSearchText, intDaysOld 'intCurrentPageNum=Int(request.querystring("Page")) 'if intCurrentPageNum < 1 then intCurrentPageNum = 1 'end if 'strSortBy=request.querystring("SortBy") 'if strSortBy = "" then strSortBy = "fileName" 'end if 'strCategory=request.querystring("Cat") 'if strCategory = "" then ' strCategory = "All" 'end if strCategory=pgCat strCategory = Replace(strCategory, "%20", " ") strCategory = Replace(strCategory, "+", " ") 'strSearchText=request.querystring("searchText") 'if strSearchText = "" then strSearchText = "" 'end if 'intDaysOld=request.querystring("daysOld") 'if IsNumeric(intDaysOld) then ' if Int(intDaysOld) <1 then intDaysOld = -1 ' end if 'else ' intDaysOld = -1 'end if dim conn dim rs dim strID dim strconn, strSQL 'set a local variable to my DSN-less connection String strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath(dbPath) 'Create the Connection object set conn = server.createobject("adodb.connection") conn.open strconn strSQL = "select * from photographs" dim condition condition=false if strCategory <> "All" and strCategory <> "" then strSQL = strSQL + " where Category = '" & strCategory & "'" condition = true end if if strSearchText <>"" then if condition then strSQL = strSQL & " and Name like '%" & strSearchText & "%'" else strSQL = strSQL & " where Name like '%" & strSearchText & "%'" condition = true end if end if if intDaysOld > 0 then if condition then strSQL = strSQL & " and DATEDIFF('d', CDate(DateModified), now()) <" & intDaysOld else strSQL = strSQL & " where DATEDIFF('d', CDate(DateModified), now()) <" & intDaysOld condition = true end if end if strSQL = strSQL & " order by " & strSortBy if UCase(strSortBy) <> "FILENAME" then strSQL = strSQL + ", fileName" end if 'Create the recordset object set rs = server.createobject("adodb.recordset") rs.CursorType = 3 rs.open strSQL, conn If not rs.EOF Then rs.PageSize=intColPerPage * 40 'intRowPerPage rs.AbsolutePage=intCurrentPageNum count = 1 %>
Photo Gallery .: <%=rs.RecordCount%> Photos
<% dim colCount if Not IsEmpty(intColOvr) then intColPerPage = intColOvr end if colCount=0 Do While not rs.EOF and count <=rs.PageSize If colCount mod Int(intColPerPage) = 0 Then %> <%End If%> <%If ((colCount mod Int(intColPerPage)) = (Int(intColPerPage)-1)) Then%> <%End If%> <% count = count + 1 colCount = colCount + 1 rs.movenext Loop 'objItem Else%> <% End If set rs = nothing %>
<%=rs("filename")%>&Cat=<%=strCategory%>" onClick="if (typeof(oPhotoWindow) != 'undefined') oPhotoWindow.close(); oPhotoWindow = window.open(this.href,'Photo','resizable=yes,scrollbars=yes,top=10,left=10,height=<%=rs("height")+300 %>,width=<%=rs("width")+300 %>');return false"> <%=rs("thumbName")%>" border=0>
No Photos Found, Please Revise Your Search Criteria