<% ' Show Picture Utility ' ASP Version ' Copyright 2002 WWWebLink, Inc. All Rights Reserved ' Created 7/6/2002 Last modified 7/6/2002 ' Created for Kurfew Entertainment www.kurfew.com ' Send PIF File location, picture number ' Program will automatically append the .txt for the data file ' PIF files must be in same directory as CGI program ' Send Format = http://www.kurfew.com/pif.cgi?PIFFILE,PICNUM,(ORIGREFER) ' Where PIFFILE = PIF file, and PICNUM = number of pic to be viewed ' and ORIGREFER (initially left blank) takes user back to originally referring page ' Sample format = http://www.kurfew.com/pif.cgi?000601,1 ' In above case, pif000601q.txt must contain picture url, tab character, comment, tab character, email, B/BB/G/GG/P ' B=Boy BB=Boys G=Girl GG=Girls P=People ' Alternate format = http://www.kurfew.com/000605.jpg,Here_is_the_comment ' Above valid for single quotes. ' 7/9/00 Modified to use tab for field separation between file name and comment ' 7/9/00 Modified to allow spaces in comment descriptions (in addition to _ ) ' 7/31/00 Modified to work on www.kurfew.net (NT Server) Also added $lp (left print) ' and $rp (right print) ' 8/17/00 ADDS EMAIL CAPABILITY, program changes x to q in submitted filename for security purposes. ' 8/17/00 Adds another column to indicate boy, boys, girl, girls ' 11/14/01 Allows code Fxxx to be used in place of PICNUM, where xxx is the last 3 digits of the actual file number ' of the picture. Program will scan to calculate PICNUM on its own. ' 11/24/01 Displays next and previous picture icons ' 1/16/02 Recoded for ADAPTIVE ' 7/9/02 Rewritten as ASP Script for Adaptive ' 11/30/05 Comment out Line 504 because of Object required: 'dbConn' error - update copyrights - add HIV mini add ' 11/30/05 Removed most coding info - recreate email contact functionality with PayPal at later date %> <% ' Start.inc contains necessary includes and security handling functions ' Define our variables dim oUserRS, sContent, TempUserName, pTitle dim peepname, strQuery_String dim HoldText, strFirstText, strSecondText, StringArray dim pifurl Dim purl(250),pcomment(250),pemail(250),peeps(250),dpIID(250) ' *** Set up our database connection to see if Premium Membership exists... from now referred to as dbConn. ' * dim dbConn ' *set dbConn = server.createobject("adodb.connection") ' * dbConn.cursorLocation = adUseServer ' * dbConn.open "DSN=DB8617A;UID=8617;PWD=zipper55" picdir = "/pictures/" baseurl = "http://www.kurfewpics.com/pictures/" thumburl = "http://www.kurfewpics.com/pictures" aspurl = "http://www.kurfewpics.com/show.asp?" logo = "http://www.kurfewpics.com/images/logos/Kurfew_picpg.gif" peepname= Array("This Person","This Boy","These Boys","This Girl","These Girls","These People") randomize adnum = int(rnd*999) cubead = int(rnd*999) cma = "," ext = "html" title = "Kurfew Pictures" mailprog = "/usr/sbin/sendmail" Dim qs, nada nada = "" qstr=Request.QueryString if qstr<>nada then qs=split(qstr,",",5) qmax = UBound(qs) pifurl=qs(0) if Left(pifurl,3)<>"pem" then Response.Write("Security violation. Your IP address has been logged and this attempt has been flagged.") Response.End end if if qmax then picnum=qs(1) If Left(picnum,1)="f" or Left(picnum,1)="F" Then fpicflag = "F" fpicnum = Cint(mid(picnum,2,3)) ' Response.Write("fpicnum = " & fpicnum) ' *** DEBUG *** end if end if ' Response.Write("FPICNUM = *** " & fpicnum & " PIfurl = " & pifurl & "
") ' *** DEBUG *** if qmax>1 then referurl = qs(2) else referurl = Request.ServerVariables("HTTP_REFERER") end if end if ispic = 0 if InStr(1,pifurl,".jpg",1) or InStr(1,pifurl,".jpeg",1) or InStr(1,pifurl,".gif",1) or InStr(1,pifurl,".bmp",1) Then ispic = 1 end if ' get data fullpif = aspurl & pifurl ' Response.Write("Here's the FULLPIF = " & fullpif & "
") pif = picdir & pifurl & ".txt" ' *DEBUG* Response.Write("Original pif =" & pif & "

") pif = Replace(pif, "pem", "pqq") strPath = Server.MapPath(pif) Set fs=Server.CreateObject("SoftArtisans.FileManager") Const ForReading = 1 ' Response.Write("Filename = " & pif & "
") Set f=fs.OpenTextFile(Server.MapPath(pif), ForReading) pif = Replace(pif, "pqq", "pem") num = -1 dpAID=nada do while f.AtEndOfStream = false num = num + 1 HoldText=f.ReadLine ' Response.Write("Splitting this: " & HoldText & "
") ' *** DEBUG *** 'Split using TAB as a delimiter StringArray = Split(HoldText, chr(9)) SAMax = UBound(StringArray) ' Response.Write("Here's the String Array: " & StringArray(0) & "
") ' *** DEBUG *** purl(num) = StringArray(0) if SAMax > 0 then pcomment(num) = StringArray(1) end if if SAMax > 1 then pemail(num) = StringArray(2) end if if SAMax > 2 then peeps(num) = StringArray(3) end if if SAMax > 3 then dpIID(num) = StringArray(4) end if if SAMax > 4 then if StringArray(5)<>nada then dpAID = StringArray(5) end if end if testit = purl(num) test001 = mid(testit,13,3) ' Response.Write("test001 = " & test001 & " fpicnum = " & fpicnum & "
") ' *** DEBUG *** if (int(fpicnum) = int(test001)) and (fpicflag="F") then ' Response.Write("PicFlag TEST ***") picnum = num ' Response.Write("******** MATCH Num = " & num & "
") '*** DEBUG *** end if loop f.Close Set f=Nothing Set fs=Nothing lastnum = num ' Response.Write("Lastnum = " & lastnum & "
") ' *** DEBUG ** if (ispic=1) then pcomment2 = picnum else ' Response.Write(picnum) ' *** DEBUG *** pcomment2 = pcomment(picnum) pemail2 = pemail(picnum) peeps2 = peeps(picnum) dpIID2 = dpIID(picnum) end if ' email code here purl2 = baseurl & purl(picnum) if picnum > 0 then back = aspurl & purl(picnum - 1) else back = nada end if thumbprev = baseurl & thumbprev thumbnext = baseurl & thumbnext ' Response.Write("picnum = " & picnum & " lastnum = " & lastnum & "
") ' *** DEBUG *** if (Cint(picnum) < Cint(lastnum)) then nxt = aspurl & purl(picnum + 1) ' Response.Write("Assigning NXT = " & nxt & "
") ' *** DEBUG *** else nxt = nada end if ' replace _ in comment with spaces pcomment2 = replace(pcomment2, "_", " ") %> Kurfew Picture Page



<%=pcomment2%>
<% ' show menu control bar if (ispic=1) then lp="Back to Previous Page" else If (back<>nada) then lphref="" lp = lphref + "" ' lp="" thumbprev = purl(picnum-1) thumbprev=replace(thumbprev,"/","/s/") thumbprev=baseurl & thumbprev else thumbprev=nada lp="Back to Pic Menu" end if end if if (nxt<>nada) then rphref="" rp=rphref + "" ' rp="" thumbnext=purl(picnum + 1) thumbnext=replace(thumbnext,"/","/s/") thumbnext=baseurl & thumbnext else thumbnext=nada rp="
Back to Pic Menu
" end if ' show picture %>
<% ' print center pic if (ispic=1) then Response.Write "" else Response.Write "" end if %>

<% ' print left thumbnail tempstr = lp if (thumbprev<>nada) then tempstr = lphref & "
" & lp end if Response.Write tempstr ' adjust center to right %>







<% ' print right thumbnail tempstr = rp if (thumbnext<>nada) then tempstr= "
" & rphref & "
" & rp end if Response.Write tempstr %>


<% if (dpAID<>nada) then %>


<% ' if (peeps2<>nada) then Response.Write ".gif" & chr(34) & " width =""140"" height=""22"">" %>


<% end if ' if (pemail2<>nada) then ' Response.Write "
" ' Response.Write "Feature coming soon...
" 'peepname2 = Replace(peepname(peeps2),"_"," ") 'Response.Write "" 'end if %>



Copyright ©1997 - 2005 WWWebLink, Inc.  All Rights Reserved. Unauthorized reproduction prohibited. Kurfew is a registered trademark.
Note: appearance in a photo on this web site does not imply sexual orientation.