<% Dim sConnection Dim oConnection Dim oRS Dim ser Dim dname Dim username Dim password Dim sql_string Dim class_sql Dim sail_sql Dim dvalue Dim tvalue Dim i Dim l Dim t DIM search_sail_no search_sail_no = Request.QueryString("search_sail_no") DIM search_class search_class = Request.QueryString("search_class") DIM search_event search_event = Request.QueryString("search_event") DIM left_class left_class = Request.QueryString("left_class") DIM right_class right_class = Request.QueryString("right_class") DIM left_event left_event = Request.QueryString("left_event") DIM right_event right_event = Request.QueryString("right_event") DIM time_stamp time_stamp = Request.QueryString("time_stamp") Dim Filename FileName = Request.QueryString("Filename") Dim Order Order = Request.QueryString("Order") ser = "10.168.1.47" dname = "againstt1_images" username = "againstt1_select" password = "select" sConnection = "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=" & ser & "; database=" & dname & "; uid=" & username & ";pwd=" & password & ";" Set oConnection = Server.CreateObject("ADODB.Connection") oConnection.Open(sConnection) %>
Against The Elements logo
Professional photographers of outdoor adventure sports
© Against The Elements   About us
Facebook link
Twitter link
Email link
<% If order = "" Then %>



<% End if %> <% DIM search_no search_no = 0 If search_class = "None selected" or search_class = "" Then else IF search_no = 0 then sql_string = "Where class = """ & search_class & """" search_no = 1 else sql_string = sql_string & " AND class = """ & search_class & """" end if End If If search_event = "None selected" or search_event = "" Then else IF search_no = 0 then sql_string = "Where Event = """ & search_event & """" search_no = 1 else sql_string = sql_string & " AND Event = """ & search_event & """" end if End If If search_sail_no = "None selected" or search_sail_no = "" Then else IF search_no = 0 then sql_string = "Where sail_no = """ & search_sail_no & """" search_no = 1 else sql_string = sql_string & " AND sail_no = """ & search_sail_no & """" end if End If If search_no = 0 then sql_string = "SELECT * FROM images WHERE class = ""me""" else sql_string = "SELECT * FROM images " & sql_string End if If Filename = "" Then else sql_string = "" a=Split(Filename,", ") for each x in a sql_string = sql_string & " OR Filename = """ & x & """" next a=len(sql_string) sql_string="SELECT * FROM images Where " & right(sql_string,a-3) end if If left_class=1 Then sql_string = "SELECT * FROM (SELECT * FROM images WHERE class = """ & search_class & """ AND Time_stamp <= '" & time_stamp & "' ORDER BY Time_stamp DESC LIMIT 8) AS TSQL ORDER BY Time_stamp ASC" end if If right_class=1 Then sql_string = "SELECT * FROM (SELECT * FROM images WHERE class = """ & search_class & """ AND Time_stamp >= '" & time_stamp & "' ORDER BY Time_stamp ASC LIMIT 8) AS TSQL ORDER BY Time_stamp ASC" end if If left_event=1 Then sql_string = "SELECT * FROM (SELECT * FROM images WHERE Event = """ & search_event & """ AND Time_stamp <= '" & time_stamp & "' ORDER BY Time_stamp DESC LIMIT 8) AS TSQL ORDER BY Time_stamp ASC" end if If right_event=1 Then sql_string = "SELECT * FROM (SELECT * FROM images WHERE Event = """ & search_event & """ AND Time_stamp >= '" & time_stamp & "' ORDER BY Time_stamp ASC LIMIT 8) AS TSQL ORDER BY Time_stamp ASC" end if Set oRS = oConnection.Execute(sql_string) response.write "
Please make a selection from the drop down lists above. You can then select/order individual images or just browse online.
" If oRS.EOF = True Then If search_no = 1 then response.write "
We have no images under that selection. Please make a new selection.
" end if Else response.write "
" response.write "
" Dim image_no image_no = 1 While Not oRS.EOF response.write "
" response.write "
" response.write "
" response.write "" response.write "
" response.write "
" response.write "" response.write "

" If Order = "" Then d = oRS.fields("Time_stamp") dvalue = DatePart("yyyy",d) & "-" & DatePart("m",d) & "-" & DatePart("d",d) & " " & DatePart("h",d) & ":" & DatePart("n",d) & ":" & DatePart("s",d) if oRS.fields("Event") = "NULL" Then Else response.write "Event: " response.write " " & oRS.fields("Event") & " " response.write " " end if response.write "
" if oRS.fields("class") = "NULL" Then Else response.write "Class: " response.write " " & oRS.fields("class") & " " response.write " " End if response.write "
" If oRS.fields("sail_no") = "NULL" then response.write "
" Else response.write "Sail no.: " response.write " " & oRS.fields("sail_no") & " " response.write " " End if response.write "

" response.write "
" & dvalue & "            " If Filename = "" Then response.write "Select   
" else response.write "Select
" end if Else response.write "

" response.write "
" & oRS.fields("FileName") & "
" End if response.write "
" image_no = image_no + 1 oRS.MoveNext Wend response.write "" If order="" then response.write "
" response.write "" response.write "
" response.write "
" response.write "" response.write "
" response.write "
" response.write "" response.write "
" if filename = "" then else response.write "
" response.write "" response.write "
" response.write "
" response.write "" response.write "
" end if Else response.write "
" response.write "You have selected the following images. If you click on the submit button this will generate an email which will allow us to process your order." response.write "
" response.write "" response.write "
" response.write "
" response.write "" response.write "
" End If End If response.write "" %> <% function curPageURL() dim s, protocol, port if Request.ServerVariables("HTTPS") = "on" then s = "s" else s = "" end if protocol = strleft(LCase(Request.ServerVariables("SERVER_PROTOCOL")), "/") & s if Request.ServerVariables("SERVER_PORT") = "80" then port = "" else port = ":" & Request.ServerVariables("SERVER_PORT") end if curPageURL = protocol & "://" & Request.ServerVariables("SERVER_NAME") &_ port & Request.ServerVariables("SCRIPT_NAME") end function function strLeft(str1,str2) strLeft = Left(str1,InStr(str1,str2)-1) end function %> <% oConnection.Close %>