<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim rsSafariIntro Dim rsSafariIntro_numRows Set rsSafariIntro = Server.CreateObject("ADODB.Recordset") rsSafariIntro.ActiveConnection = MM_connBundu_STRING rsSafariIntro.Source = "SELECT * FROM bundu_db1.tbl_safari_intro" rsSafariIntro.CursorType = 0 rsSafariIntro.CursorLocation = 2 rsSafariIntro.LockType = 1 rsSafariIntro.Open() rsSafariIntro_numRows = 0 %> <% Dim rsCountSafariRandomThumbs__MMColParam rsCountSafariRandomThumbs__MMColParam = "safarirandom" If (Request("MM_EmptyValue") <> "") Then rsCountSafariRandomThumbs__MMColParam = Request("MM_EmptyValue") End If %> <% Dim rsCountSafariRandomThumbs Dim rsCountSafariRandomThumbs_numRows Set rsCountSafariRandomThumbs = Server.CreateObject("ADODB.Recordset") rsCountSafariRandomThumbs.ActiveConnection = MM_connBundu_STRING rsCountSafariRandomThumbs.Source = "SELECT COUNT(*) FROM bundu_db1.tbl_images WHERE IMAGE_PREFIX = '" + Replace(rsCountSafariRandomThumbs__MMColParam, "'", "''") + "'" 'Response.Redirect("inc/q.asp?val=" & rsCountSafariRandomThumbs.Source) rsCountSafariRandomThumbs.CursorType = 0 rsCountSafariRandomThumbs.CursorLocation = 2 rsCountSafariRandomThumbs.LockType = 1 rsCountSafariRandomThumbs.Open() rsCountSafariRandomThumbs_numRows = 0 %> Bundu Expeditions - Safaris :::: <% 'Response.Redirect("suspend.htm") Dim rsSafari Dim rsSafari_numRows Set rsSafari = Server.CreateObject("ADODB.Recordset") rsSafari.ActiveConnection = MM_connBundu_STRING rsSafari.Source = "SELECT SAF_ID, SAF_RANKID, SAF_SHORTNAME, SAF_BLURB FROM bundu_db1.tbl_safari ORDER BY SAF_RANKID ASC" rsSafari.CursorType = 0 rsSafari.CursorLocation = 2 rsSafari.LockType = 1 rsSafari.Open() rsSafari_numRows = 0 %> <% Dim rsDaytrips Dim rsDaytrips_numRows Set rsDaytrips = Server.CreateObject("ADODB.Recordset") rsDaytrips.ActiveConnection = MM_connBundu_STRING rsDaytrips.Source = "SELECT * FROM bundu_db1.tbl_daytrips ORDER BY DAY_RANKID ASC" rsDaytrips.CursorType = 0 rsDaytrips.CursorLocation = 2 rsDaytrips.LockType = 1 rsDaytrips.Open() rsDaytrips_numRows = 0 %> <% Dim rsTestimonials Dim rsTestimonials_numRows Set rsTestimonials = Server.CreateObject("ADODB.Recordset") rsTestimonials.ActiveConnection = MM_connBundu_STRING rsTestimonials.CursorType = 0 rsTestimonials.CursorLocation = 2 rsTestimonials.LockType = 1 rsTestimonials_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 rsSafari_numRows = rsSafari_numRows + Repeat1__numRows %> <% Dim Repeat2__numRows Dim Repeat2__index Repeat2__numRows = -1 Repeat2__index = 0 rsDaytrips_numRows = rsDaytrips_numRows + Repeat2__numRows %> <% 'fileupload code - safaris Dim sDirectory, strRoot, strID, strURL strID = Request.QueryString("id") Request.ServerVariables("URL") strURL = "images/uploads/thumbs/safari_thumb" strRoot = Server.MapPath("/") & "/images/uploads/thumbs/" sDirectory = strRoot & "safari_thumb" & strID Dim oFM, oFolder, oSubFolders, oSubFolder, oFiles, oFile ' set stuff for files Set oFM = Server.CreateObject( "Scripting.FileSystemObject" ) %> <% 'fileupload code - daytrips Dim dDirectory, strRootD, strIDD, strURLD strURLD = "images/uploads/thumbs/daytrip_thumb" strRootD = Server.MapPath("/") & "/images/uploads/thumbs/" Dim oFMD, oFolderD, oSubFoldersD, oSubFolderD, oFilesD, oFileD ' set stuff for files Set oFMD = Server.CreateObject( "Scripting.FileSystemObject" ) %> <% Dim rsImage Dim rsImage_numRows rsImagePrefix = 0 rsImageID = 0 If Request.QueryString("id") <> "" Then rsImageID = Request.QueryString("id") End If If Request.QueryString("prefix") <> "" Then rsImagePrefix = Request.QueryString("prefix") End If Set rsImage = Server.CreateObject("ADODB.Recordset") rsImage.ActiveConnection = MM_connBundu_STRING rsImage.CursorType = 0 rsImage.CursorLocation = 2 rsImage.LockType = 1 rsImage_numRows = 0 %> <% Dim rsImages__MMColParam rsImages__MMColParam = "safarirandom" If (Request("MM_EmptyValue") <> "") Then rsImages__MMColParam = Request("MM_EmptyValue") End If %> <% Dim rsImages Dim rsImages_numRows Set rsImages = Server.CreateObject("ADODB.Recordset") rsImages.ActiveConnection = MM_connBundu_STRING rsImages.Source = "SELECT IMAGE_FILENAME FROM bundu_db1.tbl_images WHERE IMAGE_PREFIX = '" + Replace(rsImages__MMColParam, "'", "''") + "'" rsImages.CursorType = 0 rsImages.CursorLocation = 2 rsImages.LockType = 1 rsImages.Open() rsImages_numRows = 0 %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim rsImages_total Dim rsImages_first Dim rsImages_last ' set the record count rsImages_total = rsImages.RecordCount ' set the number of rows displayed on this page If (rsImages_numRows < 0) Then rsImages_numRows = rsImages_total Elseif (rsImages_numRows = 0) Then rsImages_numRows = 1 End If ' set the first and last displayed record rsImages_first = 1 rsImages_last = rsImages_first + rsImages_numRows - 1 ' if we have the correct record count, check the other stats If (rsImages_total <> -1) Then If (rsImages_first > rsImages_total) Then rsImages_first = rsImages_total End If If (rsImages_last > rsImages_total) Then rsImages_last = rsImages_total End If If (rsImages_numRows > rsImages_total) Then rsImages_numRows = rsImages_total End If End If %> <% 'Random Image Generator 'fileupload code Dim strRanRoot, sRanDirectory, oRanFolder, oRanSubFolders, oRanFiles Set oFMran = Server.CreateObject( "Scripting.FileSystemObject" ) sRanDirectory = strRanRoot 'Read images in folder and determine images count strDisplayRandomImageTable = "no" 'Put the images in an array Dim fileArray() ReDim fileArray(rsCountSafariRandomThumbs.Fields.Item("COUNT(*)").Value) 'Response.Redirect("asd.asd?val=" & rsImages_total) Dim strCounter strCounter = 1 While Not rsImages.EOF strDisplayRandomImageTable = "yes" fileArray(strCounter) = rsImages.Fields.Item("IMAGE_FILENAME") strCounter = strCounter + 1 rsImages.MoveNext() Wend 'Create a random integer RANDOMIZE Small = 1 High = CInt(rsCountSafariRandomThumbs.Fields.Item("COUNT(*)").Value) RandomNumber = CINT((High-Small)*Rnd+Small) %>
 
Home
About Us
Safaris
Day Trips
Tailor-made Safaris
What They Say
Bookings
Contact Us
Admin
Currency Converter
 
Unit Converter
 
 
<% If strDisplayRandomImageTable = "yes" Then %>
<% End If %>

<%=(rsSafariIntro.Fields.Item("SAFINTRO_CONTENT").Value)%>

 
<% If rsSafari.EOF And rsSafari.BOF Then %>
Watch this space for new safaris!
<% End If ' end rsSafari.EOF And rsSafari.BOF %> <% While ((Repeat1__numRows <> 0) AND (NOT rsSafari.EOF)) strID = rsSafari.Fields.Item("SAF_ID").Value rsImage.Source = "SELECT IMAGE_ID FROM bundu_db1.tbl_images WHERE IMAGE_PREFIX = 'safarithumb' AND REF_ID = " & strID rsImage.Open() %> <% sDirectory = strRoot & "safari_thumb" & strID If Not rsImage.EOF Then %> <%=vbCrLf%> <% Else %> <% End If %> <% rsImage.Close() rsImage.Source = "SELECT IMAGE_ID FROM bundu_db1.tbl_images WHERE IMAGE_PREFIX = 'safarislide' AND REF_ID = " & strID rsImage.Open() rsTestimonials.Source = "SELECT DISTINCT TEST_ID FROM bundu_db1.tbl_testimonials WHERE TEST_TRIP LIKE '" + Replace(rsSafari.Fields.Item("SAF_SHORTNAME").Value, "'", "''") + "'" rsTestimonials.Open() %> <% rsTestimonials.Close() %>
   
 

No image available...

 
  <%=(rsSafari.Fields.Item("SAF_BLURB").Value)%>  
  <% strSlidePathSafari = Server.MapPath("/") & "/images/uploads/slides/safari_slides" & rsSafari.Fields.Item("SAF_ID").Value & "/" Set sFM = Server.CreateObject("Scripting.FileSystemObject") strSafSlide = "no" If sFM.FolderExists(strSlidePathSafari) Then Set sFolder = sFM.GetFolder(strSlidePathSafari) 'Return a collection of all files and info in strFolder Set sFiles = sFolder.Files 'If there are any files in strFolder, display the slideshow icon If sFiles.Count > 0 Then strSafSlide = "yes" Else strSafSlide = "no" End If End If %> <% ' Set source and action for safari slide icons strSAFID = rsSafari.Fields.Item("SAF_ID").Value If strSafSlide = "yes" Then strImgSrcS = "images/utility/slide_safari.gif" strAltS = "View slide show" strJScriptS = "onClick=""MM_openBrWindow('slide.asp?id=" & strSAFID & "&prefix=safari','slide','status=yes,scrollbars=yes,resizable=yes,width=600,height=400')""" Else strImgSrcS = "images/utility/slide_safari2.gif" strAltS = "No slide show available" strJScriptS = "" End If ' Set source and action for safari testimonials icon strSAFsn = rsSafari.Fields.Item("SAF_SHORTNAME").value If Not rsTestimonials.EOF Or Not rsTestimonials.BOF Then strImgSrcST = "images/utility/say_safari.gif" strAltST = "What they say..." strJScriptST = "onClick=""MM_openBrWindow('whattheysay.asp?sn=" & strSAFsn & "','say','status=yes,scrollbars=yes,resizable=yes,width=600,height=400')""" Else strImgSrcST = "images/utility/say_safari2.gif" strAltST = "No testimonials available" strJScriptST = "" End If %>
alt=<%=strAltS%> title="<%=strAltS%>" width="33" height="24" border="0" class="cursorHand" <%=strJScriptS%>> alt=<%=strAltST%> title="<%=strAltST%>" width="18" height="24" class="cursorHand" <%=strJScriptST%>> ">Book this safari
 
<% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsSafari.MoveNext() rsImage.Close() Wend %>
<% If rsDaytrips.EOF And rsDaytrips.BOF Then %>
Watch this space for new daytrips!
<% End If ' end rsDaytrips.EOF And rsDaytrips.BOF %> <% While ((Repeat2__numRows <> 0) AND (NOT rsDaytrips.EOF)) strIDD = rsDaytrips.Fields.Item("DAY_ID").Value rsImage.Source = "SELECT IMAGE_ID FROM bundu_db1.tbl_images WHERE IMAGE_PREFIX = 'daytripthumb' AND REF_ID = " & strIDD rsImage.Open() %> <% dDirectory = strRootD & "daytrip_thumb" & strIDD If Not rsImage.EOF Then %> <%=vbCrLf%> <% Else %> <% End If %> <% rsTestimonials.Source = "SELECT DISTINCT TEST_ID FROM bundu_db1.tbl_testimonials WHERE TEST_TRIP LIKE '" + Replace(rsDaytrips.Fields.Item("DAY_SHORTNAME").Value, "'", "''") + "'" rsTestimonials.Open() %>
   
 

No image available...

 
  <%=(rsDaytrips.Fields.Item("DAY_BLURB").Value)%>  
  <% strSlidePathDaytrip = Server.MapPath("/") & "/images/uploads/slides/daytrip_slides" & rsDaytrips.Fields.Item("DAY_ID").Value & "/" Set dFM = Server.CreateObject("Scripting.FileSystemObject") strDaySlide = "no" If dFM.FolderExists(strSlidePathDaytrip) Then Set dFolder = dFM.GetFolder(strSlidePathDaytrip) 'Return a collection of all files and info in strFolder Set dFiles = dFolder.Files 'If there are any files in strFolder, display the slideshow icon If dFiles.Count > 0 Then strDaySlide = "yes" Else strDaySlide = "no" End If End If %> <% ' Set source and action for daytrip slide icons strDayID = rsDaytrips.Fields.Item("DAY_ID").Value If strDaySlide = "yes" Then strImgSrcD = "images/utility/slide_daytrip.gif" strAltD = "View slide show" strJScriptD = "onClick=""MM_openBrWindow('slide.asp?id=" & strDayID & "&prefix=daytrip','slide','status=yes,scrollbars=yes,resizable=yes,width=600,height=400')""" Else strImgSrcD = "images/utility/slide_daytrip2.gif" strAltD = "No slide show available" strJScriptD = "" End If ' Set source and action for daytrip testimonials icon strDAYsn = rsDaytrips.Fields.Item("DAY_SHORTNAME").value If Not rsTestimonials.EOF Or Not rsTestimonials.BOF Then strImgSrcDT = "images/utility/say_daytrip.gif" strAltDT = "What they say..." strJScriptDT = "onClick=""MM_openBrWindow('whattheysay.asp?sn=" & strDAYsn & "','say','status=yes,scrollbars=yes,resizable=yes,width=600,height=400')""" Else strImgSrcDT = "images/utility/say_daytrip2.gif" strAltDT = "No testimonials available" strJScriptDT = "" End If %>
alt=<%=strAltD%> title="<%=strAltD%>" width="33" height="24" border="0" class="cursorHand" <%=strJScriptD%>> alt=<%=strAltDT%> title="<%=strAltDT%>" width="18" height="24" border="0" class="cursorHand" <%=strJScriptDT%>> ">Book this daytrip
 
 
<% rsTestimonials.Close() %> <% Repeat2__index=Repeat2__index+1 Repeat2__numRows=Repeat2__numRows-1 rsDaytrips.MoveNext() rsImage.Close() Wend %>
 
 
About Us | Safaris | Day Trips | Tailor-made Trips | What They Say | Bookings | Contact Us | Terms & Conditions | Disclaimer
Copyright © 2004 - 2009 Bundu Expeditions
site by Dumel
   
<% rsSafari.Close() Set rsSafari = Nothing %> <% rsDaytrips.Close() Set rsDaytrips = Nothing %> <% Set rsTestimonials = Nothing %> <% rsSafariIntro.Close() Set rsSafariIntro = Nothing %> <% rsCountSafariRandomThumbs.Close() Set rsCountSafariRandomThumbs = Nothing %>