% ''''''''''' (C) Stefan Holmberg 1999 ''''''''''' Free to use if these sourcecode lines is not deleted ''''''''''' Contact me at webmaster@sqlexperts.com ''''''''''' http://www.sqlexperts.com ''''''''''' AdMentor homepage at http://www.create-a-webshop.com ' Script modified by Michael Cleland ' michael@activeenzymes.com.au ' http://www.activeenzymes.com.au/postcard nameto = Request("nameto") nameto = Replace(nameto, " ", "%20") namefrom = Request("namefrom") namefrom = Replace(namefrom, " ", "%20") emailfrom = Request("emailfrom") emailfrom = Replace(emailfrom, " ", "%20") emailto = Request("emailto") emailto = Replace(emailto, " ", "%20") sPostcardToFriend = server.HTMLencode("nameto=" & nameto & "&emailto=" & emailto & "&namefrom=" & namefrom & "&emailfrom=" & emailfrom) sPostcardToFriend = Replace(sPostcardToFriend, " ", "%20") Dim nPageNo, nCatId, nLastPage nPageNo = Request.QueryString("pageno") If nPageNo = "" Then nPageNo = 1 End If nCatId = Request.QueryString("cat_fldAuto") If nCatId = "" Then nCatId = Request.Form("cat_fldAuto") End If If nCatId = "" Then Response.Redirect "../" End If Dim oRS Set oRS = Server.CreateObject("ADODB.Recordset") Set oRS.ActiveConnection = PostCard_GetDatabaseConn() oRS.CursorLocation = adUseClient oRS.PageSize=12 oRS.Open "select fldAuto, gifurl, gifurlsmall from card where catid=" & nCatId,,3,1 If oRS.EOF = False Then nLastPage=oRS.PageCount oRS.AbsolutePage = nPageNo End If Sub WriteOne( oRS ) If oRS.EOF Then Exit Sub End If Dim strRef, sName, sGifUrl, sGifUrlSmall sGifUrlSmall = oRS("GifUrlSmall").Value strRef = "step2.asp?fldAuto=" & oRS("fldAuto").Value & "&small=" & sGifUrlSmall & "&" & sPostcardToFriend sGifUrl = oRS("GifUrl").Value If sGifUrlSmall = "" Then sGifUrlSmall = sGifUrl End If Response.Write "
" oRS.MoveNext End Sub Sub WritePrev() ' If CInt(nPageNo) <> 1 Then Response.Write "Click on a thumbnail to select it as your postcard picture
or click on Preview to see a full size version