Come Home
Come Home
Curiosity
Contents
Contact Us
 
Communities
Curators
Colleagues
.............................
Choices
.............................
Calendar
Currents
Climate
.............................
Cams
Cinema
Cards
.............................
Communiqués
Coalition
Contacts
.............................
Choo-Choo
County Fairs
Curios
.............................
Coming Up
.............................
Credits,
Copyrights
& Conditions
.............................



<% Const DSN = "Provider=sqloledb;Data Source=qtw9.registeredsite.com;Initial Catalog=californiacountrysidecom;User Id=user888030;Password=ay2kb43ipm" Dim sErrorMsg sSQLDelete = "EXEC spDeleteExpiredPackages" Set rsDelete = Server.CreateObject("ADODB.Recordset") rsDelete.Open sSQLDelete, DSN sMode = LCase(Trim(Request("Mode"))) sSearchText = Trim(Request("SearchText")) sRegionID = Trim(Request("RegionID")) sCountyID = Trim(Request("County")) Select Case sMode Case "text", "county" If ValidateForm() Then SubmitForm() Else ShowForm() End If Case Else 'First time to page ShowForm() End Select Sub ShowForm() If sErrorMsg <> "" Then Response.Write "" & sErrorMsg & "

" End If Response.Write "Looking for visitor value? We have plenty of great choices " & _ "you'll find here. Each represents a savings of at least 20%." %>
<% Response.Write "You can search for one by keyword or look at offers by member location.

" & _ "" & _ "
Search by Keyword

" 'Set rs = Server.CreateObject("ADODB.Recordset") 'sSQL = "EXEC spRegions" 'rs.Open sSQL, DSN 'While Not rs.EOF 'sRegionID = Trim(rs("RegionID")) 'sDescription = Trim(rs("Description")) 'Response.Write "" & sDescription & "

" 'Set rs2 = Server.CreateObject("ADODB.Recordset") 'sSQL = "EXEC spCountiesByRegion @RegionID = " & SQLQuotes(sRegionID) 'rs2.Open sSQL, DSN 'While Not rs2.EOF 'sCountyID = Trim(rs2("CountyID")) 'sDescription = Trim(rs2("Description")) 'sLocationString = sLocationString & "" & sDescription & "" & " | " 'rs2.MoveNext 'Wend 'sLocationString = Left(sLocationString, Len(sLocationString) - 3) 'Response.Write sLocationString & "

" 'sLocationString = "" 'rs.MoveNext 'Wend %>


Search by County

*Note: If you are looking for a specific city or town and it does not produce a search result, it would mean either (a) no Choices are currently for that place or (b) that destination is not yet a member of California Countryside™. Go to Communities page to see a list of member destinations. You can then click one to reach its feature section, which then links you to its official tourism site that may have additional offers listed.

<% End Sub Sub SubmitForm() Set rs = Server.CreateObject("ADODB.Recordset") sSQL = "EXEC spPackageSearch @RegionID = " & SQLQuotes(sRegionID) & ", " & _ "@CountyID = " & SQLQuotes(sCountyID) & ", " & _ "@SearchText = " & SQLQuotes(sSearchText) rs.Open sSQL, DSN Response.Write "Search Results

" If rs.EOF Then Response.Write "At the moment there are no special savings listed for this county, but new values are being added all the time, so do check back often.*" Exit Sub End If %>
<% While Not rs.EOF sBusinessName = Trim(rs("BusinessName")) sAddress = Trim(rs("Address")) sAddress2 = Trim(rs("Address2")) sCity = Trim(rs("City")) sZIP = Trim(rs("ZIP")) sWebsite = Trim(rs("Website")) sAreaCode = Trim(rs("AreaCode")) sPhone = Trim(rs("Phone")) sPackageName = Trim(rs("PackageName")) sDescription = Trim(rs("Description")) sRate = Trim(rs("Rate")) sValidityStart = Trim(rs("ValidityStart")) sValidityEnd = Trim(rs("ValidityEnd")) %> <% rs.MoveNext Wend %>
Offered By
Package
Price
Validity
<%=sBusinessName%>
<%=sAddress%>
<%=IIF(sAddress2 <> "", sAddress2 & "
", "")%> <%=sCity%>, CA <%=sZIP%>
<%=sWebsite%>
<%="(" & sAreaCode & ") " & sPhone%>
<%=sPackageName%>
<%=sDescription%>
$<%=sRate%> From: <%=sValidityStart%>
To: <%=sValidityEnd%>

 

<% End Sub Function ValidateForm() bResult = True If sRegionID = "" And sCountyID = "" Then If sSearchText = "" Then sErrorMsg = "
  • You must enter a value to search by.
  • " bResult = False End If End If ValidateForm = bResult End Function Function SQLQuotes(sData) 'Remove apostrophes to prepare for insertion to SQL 'Example usage: newstring = SQLQuotes("Mike's SQL string") If IsNull(sData) or sData = "" or len(sData)=0 or VarType(sData) = 0 Then SQLQuotes = "NULL" Else SQLQuotes = "'" & Replace(sData,"'","''") & "'" End If End Function Function IIF(condition,valuetrue,valuefalse) 'Author: Eric Koske Date: 07/19/1999 'Date Modified: 'If/Then logic wrapped up into a function for convenience's sake. 'Example usage: A = IIF(B=C,"Yes, they're equal","No, they're not equal") If condition then IIF = valuetrue Else IIF = valuefalse End IF End Function %>