% Local_Script = LCase(Request.ServerVariables("SCRIPT_NAME")) Referer = Trim(Request.ServerVariables("HTTP_REFERER") & " ") dim Conn dim oEPI dim rs dim ConnOpen Sub OpenConn if not ConnOpen then Set oEPI = Server.CreateObject("colEndlessPools.cEndlessPools") ConnectString = oEPI.BuildConnStr(Application("EPIDSN")) Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open(ConnectString) ConnOpen = true end if End Sub Sub BuildFavorites dim var dim temp(50) on error resume next ii = 0 for each var in session.contents if left(var, 2) = "fv" then temp(ii) = var ii = ii + 1 end if next do while ii > 0 ii = ii - 1 session.contents.remove(temp(ii)) loop FavoriteCount = 0 FavoritePicNo = 0 OpenConn set rs = Conn.execute("GetFavorites '" & session("sMachineID") & "'") if not rs.eof then FavoritePicNo = 1 do while not rs.eof FavoriteCount = FavoriteCount + 1 session("fv" & FavoriteCount) = rs("FavoriteID") & " " & rs("FavoriteFilename") rs.movenext loop end if session("FavoriteCount") = FavoriteCount session("FavoritePicNo") = FavoritePicNo End Sub Function GetFavoriteCount() FavoriteCount = session("FavoriteCount") if FavoriteCount = "" then BuildFavorites FavoriteCount = session("FavoriteCount") end if GetFavoriteCount = FavoriteCount End Function Function CheckFavorite(ID, filename) FavoriteCount = GetFavoriteCount() Favorite = false if ID <> "" and FavoriteCount > 0 then if isnumeric(ID) then ID = CInt(ID) for ii = 1 to FavoriteCount photo = session("fv" & ii) jj = instr(photo, " ") temp = left(photo, jj - 1) if CInt(temp) = ID then Favorite = true exit for end if next end if end if if Favorite then box = "
" else box = "" end if CheckFavorite = box End Function Function LinkToFavorites(fill) if GetFavoriteCount() > 0 then link = "View My Favorites" & sql & "
" Set rs = Conn.Execute(sql) end if if attempted then dim var dim temp(50) on error resume next i = 0 for each var in session.contents if left(var, 2) = "cs" then temp(i) = var i = i + 1 end if next do while i > 0 i = i - 1 session.contents.remove(temp(i)) loop CustomSearchCount = 0 CustomSearchPicNo = 0 if rs.eof then message = "No pictures matching your criteria found." else CustomSearchPicNo = 1 do while not rs.eof CustomSearchCount = CustomSearchCount + 1 session("cs" & CustomSearchCount) = rs("PhotoID") & " " & rs("PhotoFilename") rs.movenext loop end if session("CustomSearchCount") = CustomSearchCount session("CustomSearchPicNo") = CustomSearchPicNo if CustomSearchCount = 1 then response.redirect("fullsize.html") end if if CustomSearchCount > 1 then response.redirect("thumbnail.html") end if end if %>
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
©2010 Endless Pools, Inc. All Rights Reserved.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||