<%@ Language=VBScript %> <% on error resume next dim t t=Request.QueryString("Photo") '*** Make next image ***' set fso=server.CreateObject("Scripting.FileSystemObject") rtxt=right(t,6) 'Get Number,and .jpg ex: 05.jpg fname=left(t,len(t)-6) 'Get Filename ex: inspiredbyfulghum rnum=left(rtxt,2) 'get number alone ex: 5 fnum=rnum+1 'Increment to next pic bnum=rnum-1 'Decrement to prev pic if len(fnum)=1 then fnumtxt="0" & fnum else fnumtxt=fnum if len(bnum)=1 then bnumtxt="0" & bnum else bnumtxt=bnum mappath1=Server.MapPath("photos/") Fpath=fso.BuildPath(mappath1,fname & fnumtxt & ".jpg") Bpath=fso.BuildPath(mappath1,fname & bnumtxt & ".jpg") 'Response.Write fpath & "
" & bpath fexist=fso.FileExists(Fpath) bexist=fso.FileExists(Bpath) %> Staff 2008: Profiles in porridge
Return to
<% if bexist then Response.Write "Previous Image" else Response.Write "" %> Back to photos <% if fexist then Response.Write "Next Image" else Response.Write ""%>
Back to home