<% '--------------------------- 'Variables and Class Instantiation '--------------------------- dim link_strLinkTruncated dim link_search_id Set CLASS_cCategory = new CCategory Set CLASS_cLink = new CLink set CLASS_cEmailTemplate = new CEmailtemplate set CLASS_cEmailTemplateB = new CEmailtemplate CLASS_cEmailTemplate.LoadFromTemplateName("Broken Link") CLASS_cEmailTemplateB.LoadFromTemplateName("Tell Friend") '--------------------------- 'Order / Sort - Overide default sort order if new sort information exists '--------------------------- 'Order By - Changed based on PARAM settings If NOT PARAM.OrderField = "" Then CLASS_cLink.dsOrderBy = PARAM.OrderField&" "&PARAM.OrderDirection '--------------------------- 'Load Collection / Data '--------------------------- link_search_id = CLASS_cCast.cast(request("searchcategoryid"),"lng","") If NOT PARAM.SearchValue = "" Then CLASS_cLink.LoadCollectionSearch "SearchActiveAndApproved",PARAM.SearchValue,link_search_id Else CLASS_cLink.LoadCollectionFromIDParent "ActiveAndApproved",PARAM.SearchCategoryID End If 'Record Count Total PARAM.CollectionCountTotal = CLASS_cLink.dsCollectionRecordCount '--------------------------- 'Pagination - Move to correct page '--------------------------- If NOT CLASS_cLink.dsCollection.eof Then CLASS_cLink.dsCollection.move(((PARAM.PageNumber-1)*PARAM.PageResultsPerPage)) '--------------------------- 'MAIN '--------------------------- %>
<%If CONFIG.Setting("AllowTopCategoryLinks") = "True" or CONFIG.Setting("AllowTopCategoryLinks") = "1" or PARAM.SearchCategoryID > 0 or NOT PARAM.SearchValue = "" then %> <% If CONFIG.Setting("AD_Google") = True Then %>
<%End If%> <%If (CLASS_cLink.dsCollectionRecordCount = 0 AND PARAM.SearchCategoryID = 0) AND (PARAM.SearchValue = "") then 'Show Nothing Else%>
<%If NOT PARAM.SearchValue = "" then %> Search Results for: <%=PARAM.SearchValue%> <%Else%> Favorite <%=CONFIG.Setting("META_SiteTitle")%> restaurants are indicated with a: /images/featured.gif" width="20" height="15" alt="Favorite" title="Favorite" /> <%End If%> Sort By: " title="Sort by Date">Date " title="Sort by Name">Name " title="Sort by Rating">Rating " title="Sort by Favorite">Favorite
<%If CLASS_cLink.dsCollectionRecordCount > 0 then %> <%set CLASS_cPagebar = new cPagebar%> <%=CLASS_cPagebar.getHTMLPagebar()%> <%set CLASS_cPagebar = nothing%>
<%End If%> <% If CLASS_cLink.dsCollectionRecordCount = 0 then %>
No Restaurants Found
<% Else %> <% Do until CLASS_cLink.dsCollection.eof OR CLASS_cLink.dsCollectionCounter = PARAM.PageResultsPerPage %> <% CLASS_cLink.dsCollectionCounter = CLASS_cLink.dsCollectionCounter + 1 CLASS_cLink.dsCollection.movenext Loop End If If CLASS_cLink.dsCollectionRecordCount > 0 then %> <%set CLASS_cPagebar = new cPagebar%> <%=CLASS_cPagebar.getHTMLPagebar()%> <%set CLASS_cPagebar = nothing%> <% End If End If End If '--------------------------- 'Clean Up '--------------------------- Set CLASS_cCategory = nothing Set CLASS_cLink = nothing Set CLASS_cEmailTemplate = nothing %>