<% response.buffer=true %> <% mySQL="SELECT * FROM RecipesTB WHERE (RecipeID='" & Request.QueryString("id") & "')" Set query=Server.CreateObject("ADODB.Recordset") query.Open mySQL, Connect, adOpenStatic, adLockOptimistic %> <% ' PAGE VARIABLES title=query("Name") & " : Lake Magazine" prefix="/" bg="" ad="none" %> <%= title %> onLoad="window.open('/promo_subscribe.asp','test','height=285,width=500,titlebar=no,status=no,toolbar=no,menubar=no,location=no');"<% end if %>>
<% varInstructions=query("Instructions") varInstructions= replace(varInstructions, chr(13), "
") varSourceType=query("SourceType") varRecipeID=query("RecipeID") varSource=query("Source") varSource = replace ( varSource ,"'","''") %> <% 'MAKE HALF TITLE BOLD varTitle=query("Name") %>
<%= UCASE(varTitle) %>
<% if varSource<>"" then %>
Source: <%= varSource %>

<% end if %>

<% if query("Description")<>"" then %><%= query("Description") %>

<% end if %> <%= varInstructions %>

<% mySQL="SELECT * FROM RecipesTB WHERE (Status='Publish' OR Status='Featured') AND (Category='" & query("Category") &"' OR Source='" & varSource & "') AND (SourceType='" & query("SourceType") & "')" Set query=Server.CreateObject("ADODB.Recordset") query.Open mySQL, Connect, adOpenStatic, adLockOptimistic %> <% if NOT query.EOF then %>
Related Recipes
Here are some related recipes for your enjoyment. <% do until query.EOF or y=5 %>
><%= query("Name") %>
Source: <%= query("Source") %>
<% query.MoveNext if x=0 then x=1 else x=0 end if y=y+1 %> <% loop %>
<% end if %>

<% if varSourceType="Exclusive" then mySQL="SELECT * FROM ListingTB WHERE (Name='" & varSource & "')" Set listquery=Server.CreateObject("ADODB.Recordset") listquery.Open mySQL, Connect, adOpenStatic, adLockOptimistic if NOT listquery.EOF then %> <%= listquery("Name") %>
<% if listquery("Address1")<>"" then %><%= listquery("Address1") %>
<% end if %> <% if listquery("Address2")<>"" then %><%= listquery("Address2") %>
<% end if %> <%= listquery("City") %>, <%= listquery("State") %> <%= listquery("Zipcode") %>
<% if listquery("Telephone")<>"" then %><%= listquery("Telephone") %>
<% end if %> <% if listquery("Email")<>"" then %>><%= listquery("Email") %>
<% end if %> <% if listquery("Website")<>"" then %> target=new><%= listquery("Website") %>
<% end if %>
Did you like this recipe? View more of our recipes online
<% end if %> <% end if %>
target=new>Print Recipe target=new class=gray>Print Recipe
<% mySQL="SELECT TOP 1 * FROM ads WHERE adZone = 2 AND adEndDate > GETDATE() ORDER BY NEWID()" Set query=Server.CreateObject("ADODB.Recordset") query.Open mySQL, Connect, adOpenStatic, adLockOptimistic if NOT query.EOF then %> " target="_blank">" border="0"> <% updateSQL="UPDATE ads SET adViews=adViews+1 WHERE adID = "&query("adID") Connect.Execute(updateSQL) end if%>