set rec=server.createobject("ADODB.recordset")
if trim(request("userid"))<>"" then
strsql="select img from images where uid='" & trim(request("userid")) & "'"
else
strsql="select img from images where uid='" & trim(session("userid")) & "'"
end if
rec.open strsql,connGraph,1,1
if not rec.eof then
Response.ContentType = "image/gif"
Response.BinaryWrite rec("img").getChunk(7500000)
rec.close
set rec=nothing
set connGraph=nothing
else
rec.close
set rec=nothing
set connGraph=nothing
if trim(session("userid"))=trim(request("userid")) then
response.redirect "images/noimg.bmp"
else
response.redirect "images/notupload.jpg"
end if
end if
%>