<%@LANGUAGE="VBSCRIPT"%> <% set rsCategory = Server.CreateObject("ADODB.Recordset") rsCategory.ActiveConnection = strConn rsCategory.Source = "SELECT tblAds.cCategory, Count(tblAds.cCategory) AS CountOfcCategory, tblAds.cSubCategory, Count(tblAds.cSubCategory) AS CountOfcSubCategory FROM tblAds " if Request.QueryString("Region") <> "" then rsCategory.Source=rsCategory.Source & " WHERE tblAds.cCategory LIKE '" & Request.QueryString("Region") & "'" end if rsCategory.Source=rsCategory.Source & " GROUP BY tblAds.cCategory, tblAds.cSubCategory ;" '"SELECT tblCategory.nCategoryID, tblCategory.cCategory, tblSubCategory.cSubCategory, Sum(tblSubCategory.nPostings) AS SumOfnPostings FROM tblCategory INNER JOIN tblSubCategory ON tblCategory.nCategoryID = tblSubCategory.nCategoryID GROUP BY tblCategory.nCategoryID, tblCategory.cCategory, tblSubCategory.cSubCategory, tblSubCategory.nSubCategoryID ORDER BY tblCategory.nCategoryID;" rsCategory.CursorType = 0 rsCategory.CursorLocation = 2 rsCategory.LockType = 3 rsCategory.Open rsCategory_numRows1 = 0 rsCategory_numRows1a = 0 rsCategory_numRows2 = 0 %> <% Dim Repeat1__numRows, Repeat2__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 rsCategory_numRows1 = rsCategory_numRows1 + Repeat1__numRows Repeat1a__numRows = 2 Dim Repeat1a__index Repeat1a__index = 0 rsCategory_numRows1a = rsCategory_numRows1a + Repeat1a__numRows Repeat2__numRows = -1 Dim Repeat2__index Repeat2__index = 0 rsCategory_numRows2 = rsCategory_numRows2 + Repeat2__numRows %> Default

Canadian Pony Club Classified Ads

This classified ads service is for the benefit of Pony Club members and volunteers. All purchases and offerings are the responsibility of the buyer and seller. We reserve the right to refuse or remove ads.
<% if Request.QueryString("Region") <> "" then%> Current Ads for the <% =Request.QueryString("Region") %> Region
Click the "Pick Region" link below to see ads for all regions <% else %> Current Ads by Region and Category
Regions not listed have no current ads and will show up when ads are posted for that region. <% end if %>
<% While ((Repeat1__numRows <> 0) AND (NOT rsCategory.EOF)) strCategory = (rsCategory.Fields.Item("cCategory").Value) strCategory1 = (rsCategory.Fields.Item("cCategory").Value) %> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 Wend %>
  &selectSubCategory=ALL&Operator=Contains"><%=(rsCategory.Fields.Item("cCategory").Value)%>
<% 'loop for sub-Category While ((Repeat2__numRows <> 0) AND (strCategory = strCategory1)) AND (NOT rsCategory.EOF) strSubCategory=rsCategory.Fields.Item("cSubCategory").Value strSubCategory=Replace(strSubCategory," ","+") %> &selectSubCategory=<%=strSubCategory%>&Operator=Contains"> <%=(rsCategory.Fields.Item("cSubCategory").Value)%> (<%=(rsCategory.Fields.Item("CountOfcSubCategory").Value)%>) <% Repeat2__index=Repeat2__index+1 Repeat2__numRows=Repeat2__numRows-1 rsCategory.MoveNext() if NOT rsCategory.eof then strCategory1 = (rsCategory.Fields.Item("cCategory").Value) Wend %>
   
 

 

<% rsCategory.Close Set rsCategory = Nothing Dim rsExpiredAds, objConn, intNoOfRecords Set objConn = Server.CreateObject("ADODB.Command") objConn.ActiveConnection = strConn objConn.CommandText = " DELETE * FROM tblAds WHERE ((([dPostingDate]+[dExpiryDate]) + 1 < Now() ));" objConn.CommandType = adCmdText objConn.Execute Set objConn = Nothing strConn.Close Set strConn=Nothing %>