% option explicit %> <% photoid = format_image_num(request("photoid")) Dim objRegExpr Set objRegExpr = New regexp objRegExpr.Pattern = "^\d{1,5}$" if photoid = "" or photoid = null then photoid = "0" end if if objRegExpr.Test(photoid) <> true then photoid = "0" end if 'checking to see if it's a photo If (Request("productTypeID") <> 2 and Request("productTypeID") <> 3 and Request("productTypeID") <> 4 and Request("productTypeID") <> 5) Then Dim nullCheck, rsphoto, rsrights, rsrights2, i, photoid, err_msg err_msg = "" set rsphoto = server.createobject("ADODB.recordset") 'checking if the photo has the web-publishing right and is approved rsphoto.open("select * from photo,photorightsLK,photostatusLK where " & _ "photo.photoid=" & photoid & " and photorightsLK.photoID=photo.photoID " & _ "and photostatusLK.photoid=photo.photoID and photorightsLK.photorightID=3 " & _ "and photostatuslk.photostatusid=3"), conn if (rsphoto.eof) then dim original_photoid original_photoid = photoid photoid = -1 ' invalid; show messages else 'updating the viewed column i = rsphoto("viewed") conn.execute("update photo set viewed=" & i+1 & " where photoid=" & photoid) end if End If Set rsphoto = nothing %>
![]() |
<%
'if it's a photo then hit the db
If (Request("productTypeID") <> 2 and Request("productTypeID") <> 3 and Request("productTypeID") <> 4 and Request("productTypeID") <> 5) Then
if photoid = 7673 then 'WE CAN ONLY SELL THE BOOK AS OF 10/16/02
dim sellrights
set sellrights = conn.execute("select * from photostatusLK where photostatusID=6 and photoid=" & photoid)
If (not sellrights.eof) then ' available for sale
set rsrights2 = server.createobject("ADODB.recordset")
rsrights2.open("select * from photorightsLK where photorightID=1 and " & _
" photoid=" & photoid), conn
If (not rsrights2.eof) then ' available for sale
%>
![]() |
<%
If session("WTCCart") = "" Then
Response.Write "" ' "Your shopping bag is empty" message can go here
else
%>
![]() |
>![]() ![]() |
<%
if not isViewpoint.eof then
if request.querystring("advanced") <> "advanced viewing" then
response.write "![]() ![]() ![]() ![]() ![]() |
<%
'if it's a photo then hit the db
If (Request("productTypeID") <> 2 and Request("productTypeID") <> 3 and Request("productTypeID") <> 4 and Request("productTypeID") <> 5) Then
set rsrights = server.createobject("ADODB.recordset")
rsrights.open("select * from photostatusLK where photostatusID=6 and " & _
" photoid=" & original_photoid), conn
If not (rsrights.eof) then ' available for sale
%>
We do not have the right to display this image but you may order it.