(3293,1,'2020-10-21 20:44:06','2020-10-21 20:44:06','','Bistro Menus','','publish','closed','closed','','bistro-menus','','','2020-10-21 20:44:06','2020-10-21 20:44:06','',0,'https://www.bistrowinelist.com/?p=3293',1,'nav_menu_item','',0),(3285,1,'2020-07-24 21:41:59','2020-07-24 21:41:59','[xyz-ips snippet=\"ContinuousDisplayPHP-8\"]','ContinuousDisplay2','','inherit','closed','closed','','2979-autosave-v1','','','2020-07-24 21:41:59','2020-07-24 21:41:59','',2979,'http://www.bistrowinelist.com/2979-autosave-v1/',0,'revision','',0),(3294,1,'2020-10-22 17:53:55','2020-10-22 17:53:55','<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n 	 	 	 	 	 	 	 	 	 	 	 	 	<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-bar w3-black\">\n<button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Menus\')\">BISTRO MENUS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Profile\')\">PROFILE</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Varietal\')\">VARIETAL</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Country\')\">COUNTRY</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Glass\')\">BY GLASS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Beer\')\">BEER</button></div>\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"Profile\" class=\"w3-container menu\">\n<div class=\"byProfile\">\n<ul>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\">Sparkling &amp; Champagne</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rose\">Rosé</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\">Dessert Wines &amp; Port</a></b></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\">Whites</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sweeter Whites\"> Sweeter</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Light and Fruity Whites\"> Light and Fruity</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Crisp, Light-Bodied Dry Whites\"> Crisp, Light-Bodied Dry</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dry, Mineral, Elegant Whites\"> Dry, Mineral, Elegant Whites</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rich, Medium to Full-Bodied Whites\"> Rich, Medium to Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\"> All Whites</a></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\">Reds</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Fruity, Light-Bodied Reds\"> Fruity, Light-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Supple, Balanced, Medium-Bodied Reds\"> Supple, Balanced, Medium-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Big and Spicy Reds\"> Big and Spicy</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Bold, Full-Bodied Reds\"> Bold, Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Hard to Classify Reds\"> Hard to Classify</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\"> All Reds</a></li>\n</ul>\n</div>\n</div>\n<div id=\"Varietal\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"SelectDistinctVarietals\"]</div>\n<div id=\"Country\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"SelectDistinctCountries\"]</div>\n<div id=\"Glass\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"Beer\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byBeer\"]</div>','Tabbed Front Page','','publish','closed','closed','','tabbed-front-page','','','2020-10-22 21:14:50','2020-10-22 21:14:50','',0,'https://www.bistrowinelist.com/?page_id=3294',0,'page','',0),(3308,1,'2020-10-22 19:21:17','2020-10-22 19:21:17','<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n 	 	 	 	 	 	 	 	 	 	 	<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-bar w3-black\">\n<button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Menus\')\">BISTRO MENUS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Profile\')\">PROFILE</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Varietal\')\">VARIETAL</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Country\')\">COUNTRY</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Glass\')\">BY GLASS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Beer\')\">BEER</button></div>\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"Profile\" class=\"w3-container menu\">\n<div class=\"byProfile\">\n<ul>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\">Sparkling &amp; Champagne</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rose\">Rosé</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\">Dessert Wines &amp; Port</a></b></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\">Whites</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sweeter Whites\"> Sweeter</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Light and Fruity Whites\"> Light and Fruity</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Crisp, Light-Bodied Dry Whites\"> Crisp, Light-Bodied Dry</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dry, Mineral, Elegant Whites\"> Dry, Mineral, Elegant Whites</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rich, Medium to Full-Bodied Whites\"> Rich, Medium to Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\"> All Whites</a></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\">Reds</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Fruity, Light-Bodied Reds\"> Fruity, Light-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Supple, Balanced, Medium-Bodied Reds\"> Supple, Balanced, Medium-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Big and Spicy Reds\"> Big and Spicy</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Bold, Full-Bodied Reds\"> Bold, Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Hard to Classify Reds\"> Hard to Classify</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\"> All Reds</a></li>\n<b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b></ul>\n<b>\n</b>\n\n</div>\n<b><script><br />\n// Set timeout variables.<br />\nvar timoutWarning = 30000; // Display warning in 14 Mins.<br />\nvar timoutNow = 300000; // Timeout in 5 mins.<br />\nvar logoutUrl = \'http://bistrowinelist.com/byglass/\'; // URL to logout page.<br />\nvar warningTimer;<br />\nvar timeoutTimer;<br />\n// Start timers.<br />\nfunction StartTimers() {<br />\n    timeoutTimer = setTimeout(\"IdleTimeout()\", timoutNow);<br />\n}<br />\n// Reset timers.<br />\nfunction ResetTimers() {<br />\n    clearTimeout(timeoutTimer);<br />\n    StartTimers();<br />\n    $(\"#timeout\").dialog(\'close\');<br />\n}<br />\n// Show idle timeout warning dialog.<br />\nfunction IdleWarning() {<br />\n    $(\"#timeout\").dialog({<br />\n        modal: true<br />\n    });<br />\n}<br />\n// Logout the user.<br />\nfunction IdleTimeout() {<br />\n    window.location = logoutUrl;<br />\n}<br />\n</script></b>\n\n<b>\n</b><b></b>\n\n</div>\n<div id=\"Varietal\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"SelectDistinctVarietals\"]</div>\n<div id=\"Country\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"SelectDistinctCountries\"]</div>\n<div id=\"Glass\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"Beer\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byBeer\"]</div>','Tabbed Front Page','','inherit','closed','closed','','3294-revision-v1','','','2020-10-22 19:21:17','2020-10-22 19:21:17','',3294,'https://www.bistrowinelist.com/3294-revision-v1/',0,'revision','',0),(3305,1,'2020-10-22 18:53:00','2020-10-22 18:53:00','<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n 	<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-bar w3-black\">\n<button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Menus\')\">BISTRO MENUS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Profile\')\">PROFILE</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Varietal\')\">VARIETAL</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Country\')\">COUNTRY</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Glass\')\">BY GLASS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Beer\')\">BEER</button></div>\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"Profile\" class=\"w3-container menu\">[xyz-ips snippet=\"byProfile\"]</div>\n<div id=\"Varietal\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byVarietal\"]</div>\n<div id=\"Country\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byCountry\"]</div>\n<div id=\"Glass\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"Beer\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byBeer\"]</div>','Tabbed Front Page','','inherit','closed','closed','','3294-revision-v1','','','2020-10-22 18:53:00','2020-10-22 18:53:00','',3294,'https://www.bistrowinelist.com/3294-revision-v1/',0,'revision','',0),(3307,1,'2020-10-22 19:20:18','2020-10-22 19:20:18','<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n 	 	 	 	 	 	 	 	 	<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-bar w3-black\">\n<button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Menus\')\">BISTRO MENUS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Profile\')\">PROFILE</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Varietal\')\">VARIETAL</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Country\')\">COUNTRY</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Glass\')\">BY GLASS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Beer\')\">BEER</button></div>\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"Profile\" class=\"w3-container menu\">\n<div class=\"byProfile\">\n<ul>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\">Sparkling &amp; Champagne</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rose\">Rosé</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\">Dessert Wines &amp; Port</a></b></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\">Whites</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sweeter Whites\"> Sweeter</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Light and Fruity Whites\"> Light and Fruity</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Crisp, Light-Bodied Dry Whites\"> Crisp, Light-Bodied Dry</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dry, Mineral, Elegant Whites\"> Dry, Mineral, Elegant Whites</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rich, Medium to Full-Bodied Whites\"> Rich, Medium to Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\"> All Whites</a></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\">Reds</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Fruity, Light-Bodied Reds\"> Fruity, Light-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Supple, Balanced, Medium-Bodied Reds\"> Supple, Balanced, Medium-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Big and Spicy Reds\"> Big and Spicy</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Bold, Full-Bodied Reds\"> Bold, Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Hard to Classify Reds\"> Hard to Classify</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\"> All Reds</a></li>\n<b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b></ul>\n<b>\n</b>\n\n</div>\n<b><script><br />\n// Set timeout variables.<br />\nvar timoutWarning = 30000; // Display warning in 14 Mins.<br />\nvar timoutNow = 300000; // Timeout in 5 mins.<br />\nvar logoutUrl = \'http://bistrowinelist.com/byglass/\'; // URL to logout page.<br />\nvar warningTimer;<br />\nvar timeoutTimer;<br />\n// Start timers.<br />\nfunction StartTimers() {<br />\n    timeoutTimer = setTimeout(\"IdleTimeout()\", timoutNow);<br />\n}<br />\n// Reset timers.<br />\nfunction ResetTimers() {<br />\n    clearTimeout(timeoutTimer);<br />\n    StartTimers();<br />\n    $(\"#timeout\").dialog(\'close\');<br />\n}<br />\n// Show idle timeout warning dialog.<br />\nfunction IdleWarning() {<br />\n    $(\"#timeout\").dialog({<br />\n        modal: true<br />\n    });<br />\n}<br />\n// Logout the user.<br />\nfunction IdleTimeout() {<br />\n    window.location = logoutUrl;<br />\n}<br />\n</script></b>\n\n<b>\n</b><b></b>\n\n</div>\n<div id=\"Varietal\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"SelectDistinctVarietals\"]</div>\n<div id=\"Country\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"SelectDistinctCountries\"]</div>\n<div id=\"Glass\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"Beer\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byVarietal\"]</div>','Tabbed Front Page','','inherit','closed','closed','','3294-revision-v1','','','2020-10-22 19:20:18','2020-10-22 19:20:18','',3294,'https://www.bistrowinelist.com/3294-revision-v1/',0,'revision','',0),(3310,1,'2020-10-22 21:19:39','2020-10-22 21:19:39','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<button id=\"menu2\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">PROFILE</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"color:#000000; background-color:#DCDCDC;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">VARIETAL</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">COUNTRY</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">BY GLASS</button><button id=\"menu6\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab6\',\'menu6\')\">BEER</button><button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Breakfast</button><button id=\"menu8\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab8\',\'menu8\')\">Lunch &amp; Dinner</button><button id=\"menu9\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab9\',\'menu9\')\">Drinks</button><button id=\"menu10\" class=\"w3-bar-item w3-button\" style=\"visibility: hidden; width: 0px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab10\',\'menu10\')\">HH</button><button id=\"menu11\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab11\',\'menu11\')\">Cocktails</button><button id=\"menu12\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab12\',\'menu12\')\">Bistro To Go</button><button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"float:right; background-color:\" #000000\";\"=\"\" onclick=\"openMenu(\'menuTab1\', \'menu1\')\">BISTRO MENUS</button>\n\n</div>\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none;\">\n<div class=\"byProfile\" style=\"padding-top:10px;\">\n<ul>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\">Sparkling &amp; Champagne</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rose\">Rosé</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\">Dessert Wines &amp; Port</a></b></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\">Whites</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sweeter Whites\"> Sweeter</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Light and Fruity Whites\"> Light and Fruity</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Crisp, Light-Bodied Dry Whites\"> Crisp, Light-Bodied Dry</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dry, Mineral, Elegant Whites\"> Dry, Mineral, Elegant Whites</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rich, Medium to Full-Bodied Whites\"> Rich, Medium to Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\"> All Whites</a></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\">Reds</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Fruity, Light-Bodied Reds\"> Fruity, Light-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Supple, Balanced, Medium-Bodied Reds\"> Supple, Balanced, Medium-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Big and Spicy Reds\"> Big and Spicy</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Bold, Full-Bodied Reds\"> Bold, Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Hard to Classify Reds\"> Hard to Classify</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\"> All Reds</a></li>\n</ul>\n</div>\n</div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctVarietals\"]</div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctCountries\"]</div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none; padding-top:10px; overflow:hidden;\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"menuTab6\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"byBeer\"]</div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab8\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"Wine\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"menuTab9\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab10\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab11\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab12\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','byCountry-Tabbed','','publish','closed','closed','','bycountry-tabbed','','','2020-12-28 22:15:42','2020-12-28 22:15:42','',0,'https://www.bistrowinelist.com/?page_id=3310',0,'page','',0),(3309,1,'2020-10-22 21:14:47','2020-10-22 21:14:47','<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n 	 	 	 	 	 	 	 	 	 	 	 	 	<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-bar w3-black\">\n<button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Menus\')\">BISTRO MENUS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Profile\')\">PROFILE</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Varietal\')\">VARIETAL</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Country\')\">COUNTRY</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Glass\')\">BY GLASS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Beer\')\">BEER</button></div>\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"Profile\" class=\"w3-container menu\">\n<div class=\"byProfile\">\n<ul>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\">Sparkling &amp; Champagne</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rose\">Rosé</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\">Dessert Wines &amp; Port</a></b></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\">Whites</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sweeter Whites\"> Sweeter</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Light and Fruity Whites\"> Light and Fruity</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Crisp, Light-Bodied Dry Whites\"> Crisp, Light-Bodied Dry</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dry, Mineral, Elegant Whites\"> Dry, Mineral, Elegant Whites</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rich, Medium to Full-Bodied Whites\"> Rich, Medium to Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\"> All Whites</a></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\">Reds</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Fruity, Light-Bodied Reds\"> Fruity, Light-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Supple, Balanced, Medium-Bodied Reds\"> Supple, Balanced, Medium-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Big and Spicy Reds\"> Big and Spicy</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Bold, Full-Bodied Reds\"> Bold, Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Hard to Classify Reds\"> Hard to Classify</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\"> All Reds</a></li>\n</ul>\n</div>\n</div>\n<div id=\"Varietal\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"SelectDistinctVarietals\"]</div>\n<div id=\"Country\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"SelectDistinctCountries\"]</div>\n<div id=\"Glass\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"Beer\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byBeer\"]</div>','Tabbed Front Page','','inherit','closed','closed','','3294-revision-v1','','','2020-10-22 21:14:47','2020-10-22 21:14:47','',3294,'https://www.bistrowinelist.com/3294-revision-v1/',0,'revision','',0),(3306,1,'2020-10-22 18:56:42','2020-10-22 18:56:42','<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n 	 	 	 	 	<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-bar w3-black\">\n<button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Menus\')\">BISTRO MENUS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Profile\')\">PROFILE</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Varietal\')\">VARIETAL</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Country\')\">COUNTRY</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Glass\')\">BY GLASS</button><button class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'Beer\')\">BEER</button></div>\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"Profile\" class=\"w3-container menu\">\n<div class=\"byProfile\">\n<ul>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\">Sparkling &amp; Champagne</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rose\">Rosé</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\">Dessert Wines &amp; Port</a></b></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\">Whites</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sweeter Whites\"> Sweeter</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Light and Fruity Whites\"> Light and Fruity</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Crisp, Light-Bodied Dry Whites\"> Crisp, Light-Bodied Dry</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dry, Mineral, Elegant Whites\"> Dry, Mineral, Elegant Whites</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rich, Medium to Full-Bodied Whites\"> Rich, Medium to Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\"> All Whites</a></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\">Reds</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Fruity, Light-Bodied Reds\"> Fruity, Light-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Supple, Balanced, Medium-Bodied Reds\"> Supple, Balanced, Medium-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Big and Spicy Reds\"> Big and Spicy</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Bold, Full-Bodied Reds\"> Bold, Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Hard to Classify Reds\"> Hard to Classify</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\"> All Reds</a></li>\n<b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b><b></b></ul>\n<b>\n</b>\n\n</div>\n<b><script><br />\n// Set timeout variables.<br />\nvar timoutWarning = 30000; // Display warning in 14 Mins.<br />\nvar timoutNow = 300000; // Timeout in 5 mins.<br />\nvar logoutUrl = \'http://bistrowinelist.com/byglass/\'; // URL to logout page.<br />\nvar warningTimer;<br />\nvar timeoutTimer;<br />\n// Start timers.<br />\nfunction StartTimers() {<br />\n    timeoutTimer = setTimeout(\"IdleTimeout()\", timoutNow);<br />\n}<br />\n// Reset timers.<br />\nfunction ResetTimers() {<br />\n    clearTimeout(timeoutTimer);<br />\n    StartTimers();<br />\n    $(\"#timeout\").dialog(\'close\');<br />\n}<br />\n// Show idle timeout warning dialog.<br />\nfunction IdleWarning() {<br />\n    $(\"#timeout\").dialog({<br />\n        modal: true<br />\n    });<br />\n}<br />\n// Logout the user.<br />\nfunction IdleTimeout() {<br />\n    window.location = logoutUrl;<br />\n}<br />\n</script></b>\n\n<b>\n</b><b></b>\n\n</div>\n<div id=\"Varietal\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"SelectDistinctVarietals\"]</div>\n<div id=\"Country\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"SelectDistinctCountries\"]</div>\n<div id=\"Glass\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"Beer\" class=\"w3-container menu\" style=\"display:none\">[xyz-ips snippet=\"byBeer\"]</div>','Tabbed Front Page','','inherit','closed','closed','','3294-revision-v1','','','2020-10-22 18:56:42','2020-10-22 18:56:42','',3294,'https://www.bistrowinelist.com/3294-revision-v1/',0,'revision','',0),(3400,1,'2020-12-28 22:16:41','2020-12-28 22:16:41','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab1\',\'menu1\')\">Breakfast</button><button id=\"menu2\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">Lunch &amp; Dinner</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">Drinks</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" style=\"display: block; width: 100px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">HH</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">Cocktails</button><button id=\"menu6\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab6\',\'menu6\')\">Wine List</button><button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Bistro To Go</button></div>\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<div id=\"menuTab1\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','tabbed','','publish','closed','closed','','tabbed','','','2020-12-28 23:37:11','2020-12-28 23:37:11','',0,'https://www.bistrowinelist.com/?page_id=3400',0,'page','',0),(3397,1,'2020-12-28 22:11:08','2020-12-28 22:11:08','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<button id=\"menu2\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">PROFILE</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"color:#000000; background-color:#DCDCDC;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">VARIETAL</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">COUNTRY</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">BY GLASS</button><button id=\"menu6\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab6\',\'menu6\')\">BEER</button><button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Breakfast</button><button id=\"menu8\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab8\',\'menu8\')\">Lunch &amp; Dinner</button><button id=\"menu9\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab9\',\'menu9\')\">Drinks</button><button id=\"menu10\" class=\"w3-bar-item w3-button\" style=\"visibility: hidden; width: 0px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab10\',\'menu10\')\">HH</button><button id=\"menu11\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab11\',\'menu11\')\">Cocktails</button><button id=\"menu12\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab12\',\'menu12\')\">Bistro To Go</button><button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"float:right; background-color:\" #000000\";\"=\"\" onclick=\"openMenu(\'menuTab1\', \'menu1\')\">BISTRO MENUS</button>\n\n</div>\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none;\">\n<div class=\"byProfile\" style=\"padding-top:10px;\">\n<ul>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\">Sparkling &amp; Champagne</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rose\">Rosé</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\">Dessert Wines &amp; Port</a></b></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\">Whites</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sweeter Whites\"> Sweeter</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Light and Fruity Whites\"> Light and Fruity</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Crisp, Light-Bodied Dry Whites\"> Crisp, Light-Bodied Dry</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dry, Mineral, Elegant Whites\"> Dry, Mineral, Elegant Whites</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rich, Medium to Full-Bodied Whites\"> Rich, Medium to Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\"> All Whites</a></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\">Reds</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Fruity, Light-Bodied Reds\"> Fruity, Light-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Supple, Balanced, Medium-Bodied Reds\"> Supple, Balanced, Medium-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Big and Spicy Reds\"> Big and Spicy</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Bold, Full-Bodied Reds\"> Bold, Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Hard to Classify Reds\"> Hard to Classify</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\"> All Reds</a></li>\n</ul>\n</div>\n</div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctVarietals\"]</div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctCountries\"]</div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none; padding-top:10px; overflow:hidden;\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"menuTab6\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"byBeer\"]</div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab8\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"Wine\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"menuTab9\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab10\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab11\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab12\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','byCountry-Tabbed','','inherit','closed','closed','','3310-revision-v1','','','2020-12-28 22:11:08','2020-12-28 22:11:08','',3310,'https://www.bistrowinelist.com/3310-revision-v1/',0,'revision','',0),(3395,1,'2020-12-28 22:09:06','2020-12-28 22:09:06','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<button id=\"menu2\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">PROFILE</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"color:#000000; background-color:#DCDCDC;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">VARIETAL</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">COUNTRY</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">BY GLASS</button><button id=\"menu6\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab6\',\'menu6\')\">BEER</button><button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Breakfast</button><button id=\"menu8\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab8\',\'menu8\')\">Lunch &amp; Dinner</button><button id=\"menu9\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab9\',\'menu9\')\">Drinks</button><button id=\"menu10\" class=\"w3-bar-item w3-button\" style=\"visibility: hidden; width: 0px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab10\',\'menu10\')\">HH</button><button id=\"menu11\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab11\',\'menu11\')\">Cocktails</button><button id=\"menu12\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab12\',\'menu12\')\">Bistro To Go</button><button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"float:right; background-color:\" #000000\";\"=\"\" onclick=\"openMenu(\'menuTab1\', \'menu1\')\">BISTRO MENUS</button></div>\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none;\">\n<div class=\"navbar\">\n  <a href=\"#home\">Home</a>\n<a href=\"#news\">News</a>\n<div class=\"dropdown\">\n    <button class=\"dropbtn\">Dropdown\n<i class=\"fa fa-caret-down\"></i>\n</button>\n<div class=\"dropdown-content\">\n      <a href=\"#\">Link 1</a>\n<a href=\"#\">Link 2</a>\n<a href=\"#\">Link 3</a></div>\n</div>\n</div>\n<div class=\"byProfile\" style=\"padding-top:10px;\">\n<ul>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\">Sparkling &amp; Champagne</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rose\">Rosé</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\">Dessert Wines &amp; Port</a></b></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\">Whites</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sweeter Whites\"> Sweeter</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Light and Fruity Whites\"> Light and Fruity</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Crisp, Light-Bodied Dry Whites\"> Crisp, Light-Bodied Dry</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dry, Mineral, Elegant Whites\"> Dry, Mineral, Elegant Whites</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rich, Medium to Full-Bodied Whites\"> Rich, Medium to Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\"> All Whites</a></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\">Reds</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Fruity, Light-Bodied Reds\"> Fruity, Light-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Supple, Balanced, Medium-Bodied Reds\"> Supple, Balanced, Medium-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Big and Spicy Reds\"> Big and Spicy</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Bold, Full-Bodied Reds\"> Bold, Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Hard to Classify Reds\"> Hard to Classify</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\"> All Reds</a></li>\n</ul>\n</div>\n</div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctVarietals\"]</div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctCountries\"]</div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none; padding-top:10px; overflow:hidden;\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"menuTab6\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"byBeer\"]</div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab8\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"Wine\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"menuTab9\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab10\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab11\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab12\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','byCountry-Tabbed','','inherit','closed','closed','','3310-revision-v1','','','2020-12-28 22:09:06','2020-12-28 22:09:06','',3310,'https://www.bistrowinelist.com/3310-revision-v1/',0,'revision','',0),(3322,1,'2020-10-29 14:38:22','2020-10-29 14:38:22','<meta name=\"”apple-mobile-web-app-capable”\" content=\"”yes”\">\n[table id=1 responsive=scroll  convert_line_breaks=false /]\n<script><br />\n// Set timeout variables.<br />\nvar timoutWarning = 30000; // Display warning in 14 Mins.<br />\nvar timoutNow = 300000; // Timeout in 5 mins.<br />\nvar logoutUrl = \'http://bistrowinelist.com/byglass/\'; // URL to logout page.<br />\nvar warningTimer;<br />\nvar timeoutTimer;<br />\n// Start timers.<br />\nfunction StartTimers() {<br />\n    timeoutTimer = setTimeout(\"IdleTimeout()\", timoutNow);<br />\n}<br />\n// Reset timers.<br />\nfunction ResetTimers() {<br />\n    clearTimeout(timeoutTimer);<br />\n    StartTimers();<br />\n    $(\"#timeout\").dialog(\'close\');<br />\n}<br />\n// Show idle timeout warning dialog.<br />\nfunction IdleWarning() {<br />\n    $(\"#timeout\").dialog({<br />\n        modal: true<br />\n    });<br />\n}<br />\n// Logout the user.<br />\nfunction IdleTimeout() {<br />\n    window.location = logoutUrl;<br />\n}<br />\n</script>','NewFront','','inherit','closed','closed','','1692-revision-v1','','','2020-10-29 14:38:22','2020-10-29 14:38:22','',1692,'https://www.bistrowinelist.com/1692-revision-v1/',0,'revision','',0),(3439,1,'2020-12-28 23:35:33','2020-12-28 23:35:33','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab1\',\'menu1\')\">Breakfast</button><button id=\"menu2\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">Lunch &amp; Dinner</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">Drinks</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" style=\"display: block; width: 100px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">HH</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">Cocktails</button><button id=\"menu6\" class=\"w3-bar-item dropdown\" style=\"display:block;\">Wine List</button>\n<button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Bistro To Go</button></div>\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<div id=\"menuTab1\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','tabbed','','inherit','closed','closed','','3400-revision-v1','','','2020-12-28 23:35:33','2020-12-28 23:35:33','',3400,'https://www.bistrowinelist.com/3400-revision-v1/',0,'revision','',0),(3399,1,'2020-12-28 22:15:39','2020-12-28 22:15:39','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<button id=\"menu2\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">PROFILE</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"color:#000000; background-color:#DCDCDC;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">VARIETAL</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">COUNTRY</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">BY GLASS</button><button id=\"menu6\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab6\',\'menu6\')\">BEER</button><button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Breakfast</button><button id=\"menu8\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab8\',\'menu8\')\">Lunch &amp; Dinner</button><button id=\"menu9\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab9\',\'menu9\')\">Drinks</button><button id=\"menu10\" class=\"w3-bar-item w3-button\" style=\"visibility: hidden; width: 0px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab10\',\'menu10\')\">HH</button><button id=\"menu11\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab11\',\'menu11\')\">Cocktails</button><button id=\"menu12\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab12\',\'menu12\')\">Bistro To Go</button><button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"float:right; background-color:\" #000000\";\"=\"\" onclick=\"openMenu(\'menuTab1\', \'menu1\')\">BISTRO MENUS</button>\n\n</div>\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none;\">\n<div class=\"byProfile\" style=\"padding-top:10px;\">\n<ul>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\">Sparkling &amp; Champagne</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rose\">Rosé</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\">Dessert Wines &amp; Port</a></b></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\">Whites</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sweeter Whites\"> Sweeter</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Light and Fruity Whites\"> Light and Fruity</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Crisp, Light-Bodied Dry Whites\"> Crisp, Light-Bodied Dry</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dry, Mineral, Elegant Whites\"> Dry, Mineral, Elegant Whites</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rich, Medium to Full-Bodied Whites\"> Rich, Medium to Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\"> All Whites</a></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\">Reds</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Fruity, Light-Bodied Reds\"> Fruity, Light-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Supple, Balanced, Medium-Bodied Reds\"> Supple, Balanced, Medium-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Big and Spicy Reds\"> Big and Spicy</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Bold, Full-Bodied Reds\"> Bold, Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Hard to Classify Reds\"> Hard to Classify</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\"> All Reds</a></li>\n</ul>\n</div>\n</div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctVarietals\"]</div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctCountries\"]</div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none; padding-top:10px; overflow:hidden;\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"menuTab6\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"byBeer\"]</div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab8\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"Wine\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"menuTab9\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab10\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab11\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab12\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','byCountry-Tabbed','','inherit','closed','closed','','3310-revision-v1','','','2020-12-28 22:15:39','2020-12-28 22:15:39','',3310,'https://www.bistrowinelist.com/3310-revision-v1/',0,'revision','',0),(3398,1,'2020-12-28 22:13:51','2020-12-28 22:13:51','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<button id=\"menu2\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">PROFILE</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"color:#000000; background-color:#DCDCDC;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">VARIETAL</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">COUNTRY</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">BY GLASS</button><button id=\"menu6\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab6\',\'menu6\')\">BEER</button><button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Breakfast</button><button id=\"menu8\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab8\',\'menu8\')\">Lunch &amp; Dinner</button><button id=\"menu9\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab9\',\'menu9\')\">Drinks</button><button id=\"menu10\" class=\"w3-bar-item w3-button\" style=\"visibility: hidden; width: 0px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab10\',\'menu10\')\">HH</button><button id=\"menu11\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab11\',\'menu11\')\">Cocktails</button><button id=\"menu12\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab12\',\'menu12\')\">Bistro To Go</button><button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"float:right; background-color:\" #000000\";\"=\"\" onclick=\"openMenu(\'menuTab1\', \'menu1\')\">BISTRO MENUS</button>\n\n</div>\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<ul>\n 	<li><a href=\"#home\">Home</a></li>\n 	<li><a href=\"#news\">News</a></li>\n 	<li class=\"dropdown\">\n    <a href=\"javascript:void(0)\" class=\"dropbtn\">Dropdown</a>\n<div class=\"dropdown-content\">\n      <a href=\"#\">Link 1</a>\n<a href=\"#\">Link 2</a>\n<a href=\"#\">Link 3</a></div></li>\n</ul>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none;\">\n<div class=\"byProfile\" style=\"padding-top:10px;\">\n<ul>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\">Sparkling &amp; Champagne</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rose\">Rosé</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\">Dessert Wines &amp; Port</a></b></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\">Whites</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sweeter Whites\"> Sweeter</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Light and Fruity Whites\"> Light and Fruity</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Crisp, Light-Bodied Dry Whites\"> Crisp, Light-Bodied Dry</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dry, Mineral, Elegant Whites\"> Dry, Mineral, Elegant Whites</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rich, Medium to Full-Bodied Whites\"> Rich, Medium to Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\"> All Whites</a></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\">Reds</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Fruity, Light-Bodied Reds\"> Fruity, Light-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Supple, Balanced, Medium-Bodied Reds\"> Supple, Balanced, Medium-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Big and Spicy Reds\"> Big and Spicy</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Bold, Full-Bodied Reds\"> Bold, Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Hard to Classify Reds\"> Hard to Classify</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\"> All Reds</a></li>\n</ul>\n</div>\n</div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctVarietals\"]</div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctCountries\"]</div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none; padding-top:10px; overflow:hidden;\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"menuTab6\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"byBeer\"]</div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab8\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"Wine\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"menuTab9\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab10\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab11\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab12\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','byCountry-Tabbed','','inherit','closed','closed','','3310-revision-v1','','','2020-12-28 22:13:51','2020-12-28 22:13:51','',3310,'https://www.bistrowinelist.com/3310-revision-v1/',0,'revision','',0),(3396,1,'2020-12-28 22:10:42','2020-12-28 22:10:42','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<div class=\"navbar\">\n  <a href=\"#home\">Home</a>\n<a href=\"#news\">News</a>\n<div class=\"dropdown\">\n    <button class=\"dropbtn\">Dropdown\n<i class=\"fa fa-caret-down\"></i>\n</button>\n<div class=\"dropdown-content\">\n      <a href=\"#\">Link 1</a>\n<a href=\"#\">Link 2</a>\n<a href=\"#\">Link 3</a></div>\n</div>\n</div>\n<button id=\"menu2\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">PROFILE</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"color:#000000; background-color:#DCDCDC;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">VARIETAL</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">COUNTRY</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">BY GLASS</button><button id=\"menu6\" class=\"w3-bar-item w3-button\" onclick=\"openMenu(\'menuTab6\',\'menu6\')\">BEER</button><button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Breakfast</button><button id=\"menu8\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab8\',\'menu8\')\">Lunch &amp; Dinner</button><button id=\"menu9\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab9\',\'menu9\')\">Drinks</button><button id=\"menu10\" class=\"w3-bar-item w3-button\" style=\"visibility: hidden; width: 0px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab10\',\'menu10\')\">HH</button><button id=\"menu11\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab11\',\'menu11\')\">Cocktails</button><button id=\"menu12\" class=\"w3-bar-item w3-button\" style=\"display:none;\" onclick=\"openMenu(\'menuTab12\',\'menu12\')\">Bistro To Go</button><button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"float:right; background-color:\" #000000\";\"=\"\" onclick=\"openMenu(\'menuTab1\', \'menu1\')\">BISTRO MENUS</button>\n\n</div>\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none;\">\n<div class=\"byProfile\" style=\"padding-top:10px;\">\n<ul>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\">Sparkling &amp; Champagne</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rose\">Rosé</a></b></li>\n 	<li><b><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\">Dessert Wines &amp; Port</a></b></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\">Whites</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Sweeter Whites\"> Sweeter</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Light and Fruity Whites\"> Light and Fruity</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Crisp, Light-Bodied Dry Whites\"> Crisp, Light-Bodied Dry</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Dry, Mineral, Elegant Whites\"> Dry, Mineral, Elegant Whites</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Rich, Medium to Full-Bodied Whites\"> Rich, Medium to Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\"> All Whites</a></li>\n 	<li><b><a class=\"byProfile\" href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\">Reds</a></b></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Fruity, Light-Bodied Reds\"> Fruity, Light-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Supple, Balanced, Medium-Bodied Reds\"> Supple, Balanced, Medium-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Big and Spicy Reds\"> Big and Spicy</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Bold, Full-Bodied Reds\"> Bold, Full-Bodied</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=Hard to Classify Reds\"> Hard to Classify</a></li>\n 	<li><a href=\"http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\"> All Reds</a></li>\n</ul>\n</div>\n</div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctVarietals\"]</div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"SelectDistinctCountries\"]</div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none; padding-top:10px; overflow:hidden;\">[xyz-ips snippet=\"byGlassPHP-expanded3\"]</div>\n<div id=\"menuTab6\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">[xyz-ips snippet=\"byBeer\"]</div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab8\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"Wine\" class=\"w3-container menu\" style=\"display:none\"></div>\n<div id=\"menuTab9\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab10\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab11\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab12\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','byCountry-Tabbed','','inherit','closed','closed','','3310-revision-v1','','','2020-12-28 22:10:42','2020-12-28 22:10:42','',3310,'https://www.bistrowinelist.com/3310-revision-v1/',0,'revision','',0),(3440,1,'2020-12-28 23:36:07','2020-12-28 23:36:07','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab1\',\'menu1\')\">Breakfast</button><button id=\"menu2\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">Lunch &amp; Dinner</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">Drinks</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" style=\"display: block; width: 100px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">HH</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">Cocktails</button><button id=\"menu6\" class=\"w3-bar-item w3-button\" style=\"display:block;\">Wine List</button><button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Bistro To Go</button></div>\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<div id=\"menuTab1\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','tabbed','','inherit','closed','closed','','3400-revision-v1','','','2020-12-28 23:36:07','2020-12-28 23:36:07','',3400,'https://www.bistrowinelist.com/3400-revision-v1/',0,'revision','',0),(3438,1,'2020-12-28 23:34:59','2020-12-28 23:34:59','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab1\',\'menu1\')\">Breakfast</button><button id=\"menu2\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">Lunch &amp; Dinner</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">Drinks</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" style=\"display: block; width: 100px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">HH</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">Cocktails</button><button id=\"menu6\" class=\"w3-bar-item dropdown\" style=\"display:block;\">Wine List</button></div>\n<button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Bistro To Go</button>\n\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<div id=\"menuTab1\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','tabbed','','inherit','closed','closed','','3400-revision-v1','','','2020-12-28 23:34:59','2020-12-28 23:34:59','',3400,'https://www.bistrowinelist.com/3400-revision-v1/',0,'revision','',0),(3437,1,'2020-12-28 23:34:20','2020-12-28 23:34:20','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab1\',\'menu1\')\">Breakfast</button><button id=\"menu2\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">Lunch &amp; Dinner</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">Drinks</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" style=\"display: block; width: 100px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">HH</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">Cocktails</button><button id=\"menu6\" class=\"w3-bar-item dropdown\" style=\"display:block;\">Wine List\n<div class=\"dropdown-content\"></div>\n</button><button id=\"menu6a\" class=\"w3-bar-item dropdown\">Profile\n<div class=\"dropdown-content\">\n      <a href=\"#\">Link 1</a>\n<a href=\"#\">Link 2</a>\n<a href=\"#\">Link 3</a></div>\n</button></div>\n<button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Bistro To Go</button>\n\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<div id=\"menuTab1\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','tabbed','','inherit','closed','closed','','3400-revision-v1','','','2020-12-28 23:34:20','2020-12-28 23:34:20','',3400,'https://www.bistrowinelist.com/3400-revision-v1/',0,'revision','',0),(3441,1,'2020-12-28 23:37:09','2020-12-28 23:37:09','<link rel=\"stylesheet\" href=\"https://www.w3schools.com/w3css/4/w3.css\">\n<div class=\"w3-top\">\n<div class=\"w3-bar w3-black\">\n<button id=\"menu1\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab1\',\'menu1\')\">Breakfast</button><button id=\"menu2\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab2\',\'menu2\')\">Lunch &amp; Dinner</button><button id=\"menu3\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab3\',\'menu3\')\">Drinks</button><button id=\"menu4\" class=\"w3-bar-item w3-button\" style=\"display: block; width: 100px; height: auto; padding-left: 0px; padding-right: 0px;\" onclick=\"openMenu(\'menuTab4\',\'menu4\')\">HH</button><button id=\"menu5\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab5\',\'menu5\')\">Cocktails</button><button id=\"menu6\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab6\',\'menu6\')\">Wine List</button><button id=\"menu7\" class=\"w3-bar-item w3-button\" style=\"display:block;\" onclick=\"openMenu(\'menuTab7\',\'menu7\')\">Bistro To Go</button></div>\n</div>\n<br class=\"blank\">\n<div id=\"Menus\" class=\"w3-container menu\" style=\"display:none;\"></div>\n<div id=\"menuTab1\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-32\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-32\"></script></div>\n<div id=\"menuTab2\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">\n<script id=\"ym-2w\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-2w\"></script></div>\n<div id=\"menuTab3\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-35\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-35\"></script></div>\n<div id=\"menuTab5\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-33\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-33\"></script></div>\n<div id=\"menuTab4\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-3a\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-3a\"></script></div>\n<div id=\"menuTab7\" class=\"w3-container menu\" style=\"display:none;  padding-top:10px;\">\n<script id=\"ym-36\" type=\"text/javascript\" src=\"https://imenupro.com/!ym-36\"></script></div>\n<div id=\"menuTabResultsList\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results List Page</div>\n<div id=\"menuTabResultsGallery\" class=\"w3-container menu\" style=\"display:none; padding-top:10px;\">Results Gallery Page</div>','tabbed','','inherit','closed','closed','','3400-revision-v1','','','2020-12-28 23:37:09','2020-12-28 23:37:09','',3400,'https://www.bistrowinelist.com/3400-revision-v1/',0,'revision','',0),(3443,1,'2021-03-16 14:29:45','2021-03-16 14:29:45','<style>\np.small {<br />\n    line-height: 0.7;<br />\n}</p>\n<p>p.big {<br />\n    line-height: 1.8;<br />\n}<br />\n</style>[wonderplugin_cond deviceinclude=\"Windows, Mac\" deviceexclude=\"iPhone, iPad, Android\"]\n\n<style>\n<p>.site-content .wrap {<br />\n    margin-top: -60px!important;<br />\n}</p>\n<p>div.fixedPrev{<br />\n    position: fixed;<br />\n    top: 25%;<br />\n    left: 2%;<br />\n    width: 20px;<br />\n}<br />\ndiv.fixedNext{<br />\n    position: fixed;<br />\n    top: 25%;<br />\n    right: 2%;<br />\n    width: 20px;<br />\n}<br />\ndiv.fixedBackButton{<br />\n     position: fixed;<br />\n    top: 95%;<br />\n    left: 6.5%;<br />\n    width: 20px;<br />\n}<br />\ndiv.fixedPrice{<br />\n    position: fixed;<br />\n    top: 25%;<br />\n    left: 8.25%;<br />\n    width: 50px;<br />\n}<br />\nimg.fixedBottle{<br />\n    position: fixed;<br />\ntop: 28.5%;<br />\nleft: 2%;<br />\nheight: 65vh;<br />\nwidth: 15vw;<br />\nobject-fit: contain;<br />\n}</p>\n</style>[/wonderplugin_cond]\n\n[wonderplugin_cond deviceinclude=\"iPhone\" deviceexclude=\"iPad, Windows, Mac\"]\n\n<style>\n.site-content .wrap {<br />\n    margin-top: -60px!important;<br />\n}<br />\ndiv.fixedPrev{<br />\n    position: fixed;<br />\n    top: 25%;<br />\n    left: 2%;<br />\n    width: 20px;<br />\n}<br />\ndiv.fixedNext{<br />\n    position: fixed;<br />\n    top: 25%;<br />\n    right: 2%;<br />\n    width: 20px;<br />\n}<br />\ndiv.fixedBackButton{<br />\n     position: fixed;<br />\n    top: 92%;<br />\n    right: 6.5%;<br />\n    width: 20px;<br />\n}<br />\ndiv.fixedPrice{<br />\n    position: fixed;<br />\n    top: 18%;<br />\n    left: 12%;<br />\n    width: 50px;<br />\n}<br />\nimg.fixedBottle{<br />\n    position: fixed;<br />\ntop: 23%;<br />\nleft: 5%;<br />\nheight: 60vh; </p>\n<p>object-fit: contain;<br />\n}<br />\ndiv.fixedBack{<br />\n    position: fixed;<br />\n    top: 20%;<br />\n    right: 5%;<br />\n    width: 80px;<br />\n}</p>\n</style>[/wonderplugin_cond]\n\n[wonderplugin_cond deviceinclude=\"iPad\" deviceexclude=\"Windows, Mac, Android, iPhone\"]\n\n<style>\n.site-content .wrap {<br />\n    margin-top: -200px!important;<br />\n}</p>\n<p>div.fixedPrev{<br />\n    position: fixed;<br />\n    top: 35%;<br />\n    left: 2%;<br />\n    width: 20px;<br />\n}<br />\ndiv.fixedNext{<br />\n    position: fixed;<br />\n    top: 35%;<br />\n    right: 2%;<br />\n    width: 20px;<br />\n}<br />\ndiv.fixedBackButton{<br />\n     position: fixed;<br />\n    top: 95%;<br />\n    left: 6.5%;<br />\n    width: 20px;<br />\n}<br />\ndiv.fixedPrice{<br />\n    position: fixed;<br />\n    top: 25%;<br />\n    left: 10.5%;<br />\n    width: 50px;<br />\n}</p>\n<p>td{<br />\n   vertical-align: top;<br />\n}</p>\n</style>[/wonderplugin_cond]\n\n[xyz-ips snippet=\"byGlassPHP-expanded3\"]','byGlass-Expanded','','inherit','closed','closed','','1924-autosave-v1','','','2021-03-16 14:29:45','2021-03-16 14:29:45','',1924,'https://www.bistrowinelist.com/?p=3443',0,'revision','',0),(3445,1,'2021-05-10 23:02:33','2021-05-10 23:02:33','<center>\n<div class=\"parent\">\n 	<li id=\"colorful\">This is Section 1</li>\n 	<li>This is Section 2</li>\n 	<li id=\"colorful\">This is Section 3</li>\n 	<li>This is Section 4</li>\n 	<li id=\"colorful\">This is Section 5</li>\n 	<li>This is Section 6</li>\n 	<li id=\"colorful\">This is Section 7</li>\n--&gt;\n\n</div>\n</center>','Test Snap Scroll','','publish','closed','closed','','test-snap-scroll','','','2021-05-10 23:02:37','2021-05-10 23:02:37','',0,'https://www.bistrowinelist.com/?page_id=3445',0,'page','',0),(3448,1,'2021-05-10 23:00:06','2021-05-10 23:00:06','<center>\n<div class=\"parent\">\n 	<li id=\"colorful\">This is Section 1</li>\n 	<li>This is Section 2</li>\n 	<li id=\"colorful\">This is Section 3</li>\n 	<li>This is Section 4</li>\n 	<li id=\"colorful\">This is Section 5</li>\n 	<li>This is Section 6</li>\n 	<li id=\"colorful\">This is Section 7</li>\n--&gt;\n\n</div>\n</center>','Test Snap Scroll','','inherit','closed','closed','','3445-revision-v1','','','2021-05-10 23:00:06','2021-05-10 23:00:06','',3445,'https://www.bistrowinelist.com/?p=3448',0,'revision','',0),(3447,1,'2021-05-10 21:49:28','2021-05-10 21:49:28','<center>\n<div class=\"wrapper\">\n<div class=\"parent\">\n 	<li id=\"colorful\">This is Section 1</li>\n 	<li>This is Section 2</li>\n 	<li id=\"colorful\" class=\"stop\">This is Section 3</li>\n 	<li>This is Section 4</li>\n 	<li id=\"colorful\">This is Section 5</li>\n 	<li>This is Section 6</li>\n 	<li id=\"colorful\">This is Section 7</li>\n</div>\n</div>\n</center>','Test Snap Scroll','','inherit','closed','closed','','3445-revision-v1','','','2021-05-10 21:49:28','2021-05-10 21:49:28','',3445,'https://www.bistrowinelist.com/?p=3447',0,'revision','',0),(3446,1,'2021-05-10 21:40:09','2021-05-10 21:40:09','<meta charset=\"utf-8\">\n<title>CSS Scroll snapping - TESTING</title>\n		 	<link rel=\"stylesheet\" href=\"/test/csssnapscrolling.css\">\n<div class=\"docScroller\">\n<div class=\"page one\">\n<div class=\"inside\">\n			  Slide 1</div>\n</div>\n<div class=\"page two\">\n<div class=\"inside\">\n			  Slide two</div>\n</div>\n<div class=\"page three\">\n<div class=\"inside\">\n			  Slide three</div>\n</div>\n<div class=\"page four\">\n<div class=\"inside\">\n			  Slide four</div>\n</div>\n</div>\n<script><br />\n		</script>','Test Snap Scroll','','inherit','closed','closed','','3445-revision-v1','','','2021-05-10 21:40:09','2021-05-10 21:40:09','',3445,'https://www.bistrowinelist.com/?p=3446',0,'revision','',0),(3449,1,'2021-05-10 23:07:53','2021-05-10 23:07:53','<center>\n<div class=\"parent\">\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$150</div>\n<div class=\"item2\">1 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"https://www.bistrowinelist.com/WineListImages/BottleImage7-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage14-1.jpg\" alt=\"\" height=\"1000\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage16-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage19-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage18-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage17-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n</div>\n</center>','Test Snap Scroll','','publish','closed','closed','','test-snap-scroll-2','','','2021-05-13 23:49:20','2021-05-13 23:49:20','',0,'https://www.bistrowinelist.com/?page_id=3449',0,'page','',0),(3472,1,'2021-05-11 20:25:25','2021-05-11 20:25:25','','AllanScottPN','','inherit','open','closed','','allanscottpn','','','2021-05-11 20:25:25','2021-05-11 20:25:25','',3449,'https://www.bistrowinelist.com/wp-content/uploads/2021/05/AllanScottPN.png',0,'attachment','image/png',0),(3470,1,'2021-05-11 20:24:43','2021-05-11 20:24:43','','1448','','inherit','open','closed','','1448','','','2021-05-11 20:24:43','2021-05-11 20:24:43','',3449,'https://www.bistrowinelist.com/wp-content/uploads/2021/05/1448.jpg',0,'attachment','image/jpeg',0),(3482,1,'2021-05-11 21:02:17','2021-05-11 21:02:17','','BigEasyErnieEls','','inherit','open','closed','','bigeasyernieels','','','2021-05-11 21:02:17','2021-05-11 21:02:17','',0,'https://www.bistrowinelist.com/wp-content/uploads/2021/05/BigEasyErnieEls.png',0,'attachment','image/png',0),(3483,1,'2021-05-11 21:02:56','2021-05-11 21:02:56','','StHillaire','','inherit','open','closed','','sthillaire','','','2021-05-11 21:02:56','2021-05-11 21:02:56','',0,'https://www.bistrowinelist.com/wp-content/uploads/2021/05/StHillaire.png',0,'attachment','image/png',0),(3517,1,'2021-05-13 23:48:12','2021-05-13 23:48:12','<center>\n<div class=\"parent\">\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$150</div>\n<div class=\"item2\">1 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"https://www.bistrowinelist.com/WineListImages/BottleImage7-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage14-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage16-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage19-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage18-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage17-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n</div>\n</center>','Test Snap Scroll','','inherit','closed','closed','','3449-revision-v1','','','2021-05-13 23:48:12','2021-05-13 23:48:12','',3449,'https://www.bistrowinelist.com/?p=3517',0,'revision','',0),(3497,1,'2021-05-11 23:17:46','2021-05-11 23:17:46','','BigEasyErnieEls1','','inherit','open','closed','','bigeasyernieels1','','','2021-05-11 23:17:46','2021-05-11 23:17:46','',0,'https://www.bistrowinelist.com/wp-content/uploads/2021/05/BigEasyErnieEls1.png',0,'attachment','image/png',0),(3501,1,'2021-05-11 23:20:53','2021-05-11 23:20:53','','BigEasyErnieEls2','','inherit','open','closed','','bigeasyernieels2','','','2021-05-11 23:20:53','2021-05-11 23:20:53','',0,'https://www.bistrowinelist.com/wp-content/uploads/2021/05/BigEasyErnieEls2.png',0,'attachment','image/png',0),(3515,1,'2021-05-13 23:46:36','2021-05-13 23:46:36','<center>\n<div class=\"parent\">\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$150</div>\n<div class=\"item2\">1 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"https://www.bistrowinelist.com/WineListImages/BottleImage7-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage14-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage16-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage19-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage18-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage17-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n</div>\n</center>','Test Snap Scroll','','inherit','closed','closed','','3449-revision-v1','','','2021-05-13 23:46:36','2021-05-13 23:46:36','',3449,'https://www.bistrowinelist.com/?p=3515',0,'revision','',0),(3519,1,'2021-05-13 23:49:17','2021-05-13 23:49:17','<center>\n<div class=\"parent\">\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$150</div>\n<div class=\"item2\">1 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"https://www.bistrowinelist.com/WineListImages/BottleImage7-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage14-1.jpg\" alt=\"\" height=\"1000\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage16-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage19-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage18-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage17-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n</div>\n</center>','Test Snap Scroll','','inherit','closed','closed','','3449-revision-v1','','','2021-05-13 23:49:17','2021-05-13 23:49:17','',3449,'https://www.bistrowinelist.com/?p=3519',0,'revision','',0),(3518,1,'2021-05-13 23:48:38','2021-05-13 23:48:38','<center>\n<div class=\"parent\">\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$150</div>\n<div class=\"item2\">1 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"https://www.bistrowinelist.com/WineListImages/BottleImage7-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage14-1.jpg\" alt=\"\" height=\"850\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage16-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage19-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage18-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage17-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n</div>\n</center>','Test Snap Scroll','','inherit','closed','closed','','3449-revision-v1','','','2021-05-13 23:48:38','2021-05-13 23:48:38','',3449,'https://www.bistrowinelist.com/?p=3518',0,'revision','',0),(3516,1,'2021-05-13 23:47:46','2021-05-13 23:47:46','<center>\n<div class=\"parent\">\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$150</div>\n<div class=\"item2\">1 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"https://www.bistrowinelist.com/WineListImages/BottleImage7-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage14-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage16-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage19-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage18-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n 	<li class=\"snap\">\n<div class=\"grid-container\">\n<div class=\"item1\">$120</div>\n<div class=\"item2\">2 of 20 Australian Wines</div>\n<div class=\"item3\"><img src=\"http://www.bistrowinelist.com/WineListImages/BottleImage17-1.jpg\" alt=\"\" height=\"650\"></div>\n<div class=\"item4\">The Lucky Country Chardonnay  2011\nAustralia&gt;South Australia&gt; Barossa&gt; Barossa Valley\n\nEyes:  Pale Yellow\nNose:  Bright Fruit, Citrus, Melon\nMouth:  Citrusy, round, soft\nRatings:  87 pts Wine Spectator\n\nFrom the Winemaker:  Light golden straw. A lifted bouquet of lemon zest, melon, sherbet, pineapple, peach and musk. The palate starts out quite creamy with a lovely mouth-watering appeal. The soft acid is bountiful and gives the palate a lovely citrus lemon burst that powers the fruit effortlessly to a nice round and soft finish.\n\nAll prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1\nL-018\n\n</div>\n</div></li>\n</div>\n</center>','Test Snap Scroll','','inherit','closed','closed','','3449-revision-v1','','','2021-05-13 23:47:46','2021-05-13 23:47:46','',3449,'https://www.bistrowinelist.com/?p=3516',0,'revision','',0),(3522,1,'2021-06-08 22:04:36','0000-00-00 00:00:00','[xyz-ips snippet=\"SelectDistinctCountries\"]\r\n<head>\r\n<script>\r\n// Set timeout variables.\r\nvar timoutWarning = 30000; // Display warning in 14 Mins.\r\nvar timoutNow = 300000; // Timeout in 5 mins.\r\nvar logoutUrl = \'http://bistrowinelist.com/byglass/\'; // URL to logout page.\r\nvar warningTimer;\r\nvar timeoutTimer;\r\n// Start timers.\r\nfunction StartTimers() {\r\n    timeoutTimer = setTimeout(\"IdleTimeout()\", timoutNow);\r\n}\r\n// Reset timers.\r\nfunction ResetTimers() {\r\n    clearTimeout(timeoutTimer);\r\n    StartTimers();\r\n    $(\"#timeout\").dialog(\'close\');\r\n}\r\n// Show idle timeout warning dialog.\r\nfunction IdleWarning() {\r\n    $(\"#timeout\").dialog({\r\n        modal: true\r\n    });\r\n}\r\n// Logout the user.\r\nfunction IdleTimeout() {\r\n    window.location = logoutUrl;\r\n}\r\n</script>\r\n</head>\r\n<body onload=\"StartTimers();\" onmousemove=\"ResetTimers();\">','Country','','draft','closed','closed','','','','','2021-06-08 22:04:36','0000-00-00 00:00:00','',0,'https://www.bistrowinelist.com/?page_id=3522',0,'page','',0),(3526,1,'2021-06-08 22:13:07','2021-06-08 22:13:07','[xyz-ips snippet=\"SelectDistinctCountry\"]','Country2','','publish','closed','closed','','country2','','','2021-06-08 22:13:58','2021-06-08 22:13:58','',0,'https://www.bistrowinelist.com/?page_id=3526',0,'page','',0),(3527,1,'2021-06-08 22:13:07','2021-06-08 22:13:07','[xyz-ips snippet=\"SelectDistinctCountry\"]','Country2','','inherit','closed','closed','','3526-revision-v1','','','2021-06-08 22:13:07','2021-06-08 22:13:07','',3526,'https://www.bistrowinelist.com/?p=3527',0,'revision','',0),(3529,1,'2021-06-08 22:13:51','2021-06-08 22:13:51','[xyz-ips snippet=\"SelectDistinctCountry\"]','Country2','','inherit','closed','closed','','3526-revision-v1','','','2021-06-08 22:13:51','2021-06-08 22:13:51','',3526,'https://www.bistrowinelist.com/?p=3529',0,'revision','',0),(3528,1,'2021-06-08 22:13:32','2021-06-08 22:13:32','[xyz-ips snippet=\"SelectDistinctCountries\"]','Country2','','inherit','closed','closed','','3526-revision-v1','','','2021-06-08 22:13:32','2021-06-08 22:13:32','',3526,'https://www.bistrowinelist.com/?p=3528',0,'revision','',0),(3530,1,'2021-11-18 17:32:10','0000-00-00 00:00:00','','Auto Draft','','auto-draft','open','open','','','','','2021-11-18 17:32:10','0000-00-00 00:00:00','',0,'https://www.mgv.dke.mybluehost.me/bistrowinelist/?p=3530',0,'post','',0);

--
-- Table structure for table `wp_figa_term_relationships`
--

CREATE TABLE `wp_figa_term_relationships` (
  `object_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `term_taxonomy_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `term_order` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`object_id`,`term_taxonomy_id`),
  KEY `term_taxonomy_id` (`term_taxonomy_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_figa_term_relationships`
--

INSERT INTO `wp_figa_term_relationships` VALUES (1,1,0),(165,2,0),(1472,1,0),(1473,4,0),(1476,4,0),(1477,4,0),(1990,4,0),(3065,4,0),(3293,4,0);

--
-- Table structure for table `wp_figa_term_taxonomy`
--

CREATE TABLE `wp_figa_term_taxonomy` (
  `term_taxonomy_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `term_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `taxonomy` varchar(32) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `description` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `parent` bigint(20) unsigned NOT NULL DEFAULT '0',
  `count` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`term_taxonomy_id`),
  UNIQUE KEY `term_id_taxonomy` (`term_id`,`taxonomy`),
  KEY `taxonomy` (`taxonomy`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_figa_term_taxonomy`
--

INSERT INTO `wp_figa_term_taxonomy` VALUES (1,1,'category','',0,2),(2,2,'category','',0,0),(6,6,'nav_menu','',0,0),(4,4,'nav_menu','',0,6);

--
-- Table structure for table `wp_figa_termmeta`
--

CREATE TABLE `wp_figa_termmeta` (
  `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `term_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_value` longtext COLLATE utf8mb4_unicode_520_ci,
  PRIMARY KEY (`meta_id`),
  KEY `term_id` (`term_id`),
  KEY `meta_key` (`meta_key`(191))
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_figa_termmeta`
--


--
-- Table structure for table `wp_figa_terms`
--

CREATE TABLE `wp_figa_terms` (
  `term_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `slug` varchar(200) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `term_group` bigint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`term_id`),
  KEY `slug` (`slug`(191)),
  KEY `name` (`name`(191))
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_figa_terms`
--

INSERT INTO `wp_figa_terms` VALUES (1,'Uncategorized','uncategorized',0),(2,'SingleItem','singleitem',0),(6,'None','none',0),(4,'Wine List Submenu','wine-list-submenu',0);

--
-- Table structure for table `wp_figa_usermeta`
--

CREATE TABLE `wp_figa_usermeta` (
  `umeta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  `meta_value` longtext COLLATE utf8mb4_unicode_520_ci,
  PRIMARY KEY (`umeta_id`),
  KEY `user_id` (`user_id`),
  KEY `meta_key` (`meta_key`(191))
) ENGINE=MyISAM AUTO_INCREMENT=76 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_figa_usermeta`
--

INSERT INTO `wp_figa_usermeta` VALUES (1,1,'nickname','elarsonlee@gmail.com'),(2,1,'first_name',''),(3,1,'last_name',''),(4,1,'description',''),(5,1,'rich_editing','true'),(6,1,'syntax_highlighting','true'),(7,1,'comment_shortcuts','false'),(8,1,'admin_color','fresh'),(9,1,'use_ssl','0'),(10,1,'show_admin_bar_front','true'),(11,1,'locale',''),(12,1,'wp_figa_capabilities','a:1:{s:13:\"administrator\";b:1;}'),(13,1,'wp_figa_user_level','10'),(14,1,'dismissed_wp_pointers','wp496_privacy,omapi_please_connect_notice,theme_editor_notice,plugin_editor_notice,tp09_edit_drag_drop_sort,om-welcome-pointer'),(15,1,'show_welcome_panel','1'),(17,1,'jpo_tracks_anon_id','jpo:UkXj9s+xucyr0Re8/3Vcft4n'),(18,1,'wp_figa_dashboard_quick_press_last_post_id','3530'),(19,2,'nickname','john@mayabeachhotel.com'),(20,2,'first_name',''),(21,2,'last_name',''),(22,2,'description',''),(23,2,'rich_editing','true'),(24,2,'syntax_highlighting','true'),(25,2,'comment_shortcuts','false'),(26,2,'admin_color','fresh'),(27,2,'use_ssl','0'),(28,2,'show_admin_bar_front','true'),(29,2,'locale',''),(30,2,'wp_figa_capabilities','a:1:{s:10:\"subscriber\";b:1;}'),(31,2,'wp_figa_user_level','0'),(32,2,'dismissed_wp_pointers','wp496_privacy'),(33,1,'maxbuttons_review_notice','off'),(34,1,'nav_menu_recently_edited','4'),(35,1,'managenav-menuscolumnshidden','a:5:{i:0;s:11:\"link-target\";i:1;s:11:\"css-classes\";i:2;s:3:\"xfn\";i:3;s:11:\"description\";i:4;s:15:\"title-attribute\";}'),(36,1,'metaboxhidden_nav-menus','a:2:{i:0;s:12:\"add-post_tag\";i:1;s:21:\"add-wbcr-snippet-tags\";}'),(37,1,'wp_figa_user-settings','libraryContent=browse&urlbutton=custom&imgsize=medium&editor=tinymce&siteorigin_panels_setting_tab=general&advImgDetails=show&align=center&mfold=o&uploader=1'),(38,1,'wp_figa_user-settings-time','1637256725'),(39,1,'community-events-location','a:1:{s:2:\"ip\";s:11:\"190.197.4.0\";}'),(40,1,'closedpostboxes_page','a:0:{}'),(41,1,'metaboxhidden_page','a:0:{}'),(42,1,'metaboxhidden_dashboard','a:1:{i:0;s:18:\"jetpack-onboarding\";}'),(60,1,'wp_figa_tablepress_user_options','{\"user_options_db_version\":43,\"admin_menu_parent_page\":\"middle\",\"message_first_visit\":true}'),(61,1,'managetablepress_listcolumnshidden','a:1:{i:0;s:22:\"table_last_modified_by\";}'),(43,1,'facebook',''),(44,1,'twitter',''),(45,1,'instagram',''),(46,1,'pinterest',''),(47,1,'bloglovin',''),(48,1,'google_plus',''),(49,1,'tumblr',''),(50,1,'youtube',''),(51,1,'vine',''),(52,1,'flickr',''),(53,1,'linkedin',''),(54,1,'behance',''),(55,1,'soundcloud',''),(56,1,'vimeo',''),(57,1,'rss',''),(58,1,'dribbble',''),(59,1,'envelope',''),(62,1,'current_sns_tab','s0'),(64,1,'jetpack_tracks_anon_id','jetpack:gvg8cCfnQrse3+afgj9zP1rJ'),(74,1,'meta-box-order_page','a:3:{s:6:\"normal\";s:18:\"shfs_all_post_meta\";s:4:\"side\";s:59:\"wptr-hide-title,custom-header-image,wp_featherlight_options\";s:8:\"advanced\";s:0:\"\";}');

--
-- Table structure for table `wp_figa_users`
--

CREATE TABLE `wp_figa_users` (
  `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_login` varchar(60) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `user_pass` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `user_nicename` varchar(50) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `user_email` varchar(100) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `user_url` varchar(100) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `user_registered` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `user_activation_key` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `user_status` int(11) NOT NULL DEFAULT '0',
  `display_name` varchar(250) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`ID`),
  KEY `user_login_key` (`user_login`),
  KEY `user_nicename` (`user_nicename`),
  KEY `user_email` (`user_email`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_figa_users`
--

INSERT INTO `wp_figa_users` VALUES (1,'elarsonlee@gmail.com','$P$BjKmeR4C7ZnxeNKJN1bQk56KwAIcsQ.','elarsonleegmail-com','elarsonlee@gmail.com','','2018-09-16 13:22:32','',0,'elarsonlee@gmail.com'),(2,'john@mayabeachhotel.com','$P$BjNqP9zPFvADj5za14UCs44TfW2bhe1','johnmayabeachhotel-com','john@mayabeachhotel.com','','2018-09-16 14:12:30','',0,'john@mayabeachhotel.com');

--
-- Table structure for table `wp_figa_wpforms_tasks_meta`
--

CREATE TABLE `wp_figa_wpforms_tasks_meta` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `action` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `data` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `date` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=70 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_figa_wpforms_tasks_meta`
--

INSERT INTO `wp_figa_wpforms_tasks_meta` VALUES (1,'wpforms_process_entry_emails_meta_cleanup','Wzg2NDAwXQ==','2020-03-06 16:39:00'),(2,'wpforms_admin_notifications_update','W10=','2020-05-15 14:17:11'),(3,'wpforms_admin_notifications_update','W10=','2020-06-27 15:18:44'),(4,'wpforms_admin_notifications_update','W10=','2020-07-03 22:43:01'),(5,'wpforms_admin_notifications_update','W10=','2020-07-03 22:44:13'),(6,'wpforms_admin_notifications_update','W10=','2020-07-05 23:06:08'),(7,'wpforms_admin_notifications_update','W10=','2020-07-09 21:31:34'),(8,'wpforms_admin_notifications_update','W10=','2020-07-22 14:10:32'),(9,'wpforms_admin_notifications_update','W10=','2020-07-24 20:54:26'),(10,'wpforms_admin_notifications_update','W10=','2020-07-24 20:55:14'),(11,'wpforms_admin_notifications_update','W10=','2020-07-26 00:16:56'),(12,'wpforms_admin_notifications_update','W10=','2020-07-28 00:40:13'),(13,'wpforms_admin_notifications_update','W10=','2020-07-29 18:23:21'),(14,'wpforms_admin_notifications_update','W10=','2020-07-29 18:23:54'),(15,'wpforms_process_entry_emails_meta_cleanup','Wzg2NDAwXQ==','2020-07-29 19:00:09'),(16,'wpforms_admin_notifications_update','W10=','2020-08-27 19:03:36'),(17,'wpforms_admin_notifications_update','W10=','2020-08-29 13:02:21'),(18,'wpforms_admin_notifications_update','W10=','2020-09-12 14:22:40'),(19,'wpforms_admin_notifications_update','W10=','2020-09-13 15:14:08'),(20,'wpforms_admin_notifications_update','W10=','2020-09-17 21:01:51'),(21,'wpforms_admin_notifications_update','W10=','2020-09-18 22:15:22'),(22,'wpforms_admin_notifications_update','W10=','2020-10-21 19:42:39'),(23,'wpforms_admin_notifications_update','W10=','2020-10-22 21:08:18'),(24,'wpforms_admin_notifications_update','W10=','2020-10-29 14:29:38'),(25,'wpforms_admin_notifications_update','W10=','2020-10-30 18:32:12'),(26,'wpforms_admin_notifications_update','W10=','2020-11-08 23:47:45'),(27,'wpforms_admin_notifications_update','W10=','2020-11-10 22:30:55'),(28,'wpforms_admin_notifications_update','W10=','2020-11-14 20:23:40'),(29,'wpforms_admin_notifications_update','W10=','2020-11-29 22:37:30'),(30,'wpforms_admin_notifications_update','W10=','2020-12-26 22:45:12'),(31,'wpforms_admin_notifications_update','W10=','2020-12-26 22:45:40'),(32,'wpforms_admin_notifications_update','W10=','2020-12-27 22:47:32'),(33,'wpforms_admin_notifications_update','W10=','2020-12-28 23:07:22'),(34,'wpforms_admin_notifications_update','W10=','2021-02-15 13:27:13'),(35,'wpforms_admin_notifications_update','W10=','2021-02-16 21:48:17'),(36,'wpforms_admin_notifications_update','W10=','2021-02-23 20:13:00'),(37,'wpforms_admin_notifications_update','W10=','2021-03-13 20:47:57'),(38,'wpforms_admin_notifications_update','W10=','2021-03-16 13:56:17'),(39,'wpforms_admin_notifications_update','W10=','2021-03-16 13:56:53'),(40,'wpforms_admin_notifications_update','W10=','2021-03-17 14:36:14'),(41,'wpforms_admin_addons_cache_update','W10=','2021-04-10 08:18:17'),(42,'wpforms_admin_notifications_update','W10=','2021-04-19 17:08:43'),(43,'wpforms_admin_notifications_update','W10=','2021-05-06 17:02:51'),(44,'wpforms_admin_notifications_update','W10=','2021-05-10 21:38:41'),(45,'wpforms_admin_notifications_update','W10=','2021-05-11 23:12:08'),(46,'wpforms_admin_notifications_update','W10=','2021-05-13 23:07:30'),(47,'wpforms_admin_notifications_update','W10=','2021-05-19 17:25:04'),(48,'wpforms_admin_notifications_update','W10=','2021-05-19 17:25:20'),(49,'wpforms_admin_notifications_update','W10=','2021-05-23 17:51:36'),(50,'wpforms_admin_notifications_update','W10=','2021-05-25 00:08:55'),(51,'wpforms_admin_notifications_update','W10=','2021-05-26 13:13:08'),(52,'wpforms_admin_notifications_update','W10=','2021-05-30 14:38:20'),(53,'wpforms_admin_notifications_update','W10=','2021-05-31 16:51:23'),(54,'wpforms_admin_notifications_update','W10=','2021-06-02 23:18:42'),(55,'wpforms_admin_notifications_update','W10=','2021-06-08 22:01:40'),(56,'wpforms_admin_notifications_update','W10=','2021-06-16 01:00:46'),(57,'wpforms_admin_notifications_update','W10=','2021-06-17 14:39:07'),(58,'wpforms_admin_notifications_update','W10=','2021-06-18 16:23:18'),(59,'wpforms_admin_notifications_update','W10=','2021-06-19 19:50:17'),(60,'wpforms_admin_notifications_update','W10=','2021-06-20 21:04:30'),(61,'wpforms_admin_notifications_update','W10=','2021-06-21 23:45:53'),(62,'wpforms_admin_notifications_update','W10=','2021-06-23 17:14:11'),(63,'wpforms_admin_notifications_update','W10=','2021-07-11 18:51:13'),(64,'wpforms_admin_notifications_update','W10=','2021-07-11 18:51:33'),(65,'wpforms_admin_builder_templates_cache_update','W10=','2021-07-17 15:51:28'),(66,'wpforms_admin_notifications_update','W10=','2021-08-07 18:39:04'),(67,'wpforms_admin_notifications_update','W10=','2021-08-21 16:39:00'),(68,'wpforms_admin_notifications_update','W10=','2021-08-23 01:02:07'),(69,'wpforms_admin_notifications_update','W10=','2021-11-18 17:32:10');

--
-- Table structure for table `wp_figa_xyz_ips_short_code`
--

CREATE TABLE `wp_figa_xyz_ips_short_code` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(1000) COLLATE utf8_unicode_ci NOT NULL,
  `content` longtext COLLATE utf8_unicode_ci NOT NULL,
  `short_code` varchar(2000) COLLATE utf8_unicode_ci NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `wp_figa_xyz_ips_short_code`
--

INSERT INTO `wp_figa_xyz_ips_short_code` VALUES (1,'SelectDistinctCountries','<?php\r\n$tableName=\"Wines2\";\r\n    $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\n$countryCount=0;\r\n$sql=\"SELECT DISTINCT WineCountry FROM \".$tableName.\" WHERE WineType != \'Beer\' AND OutOfStock = 0 AND Archived = 0 AND LeaveOffMenu = 0 AND  ((QtyInStock > 0 AND WineType!=\'Glass\' AND WineType!=\'Beer\') OR (QtyInStock >= 0 AND SoldAs = 1 AND WineType2 = 6) OR (QtyInStock = -9999 And WineType2 = 6))\";\r\n$records = mysqli_query($con, $sql);\r\nwhile($wine=mysqli_fetch_assoc($records)){\r\nif($wine[\'WineCountry\']!=\"\"){\r\n$countryCount=$countryCount+1;\r\n\r\n}\r\n//echo $wine[\'WineCountry\'].\"<br>\";\r\n}\r\n\r\n$sql=\"SELECT * FROM \".$tableName.\" WHERE WineType != \'Beer\' AND OutOfStock = 0 AND Archived = 0 AND LeaveOffMenu = 0 AND ((QtyInStock > 0 AND SoldAs = 0) OR (QtyInStock >= 0 AND SoldAs = 1 AND WineType2 = 6) OR (QtyInStock = -9999 And WineType2 = 6) OR (QtyInStock > 0 AND WineProfile1 = \'Dessert Wines and Port\'))\";\r\n$records = mysqli_query($con, $sql); \r\n\r\n$redCount = 0;\r\n$whiteCount = 0;\r\n$roseCount=0;\r\n$sparklingCount=0;\r\n$dessertCount=0;\r\n\r\nwhile($wine=mysqli_fetch_assoc($records)){\r\n\r\nif($wine[\'WineType\']==\'Red\'){\r\n$redCount++;\r\n//echo $redCount.\" \".$wine[\'WineName\'].\"<br>\";\r\n}\r\nelseif($wine[\'WineType\']==\'White\'){\r\n$whiteCount++;\r\n}\r\nelseif($wine[\'WineType\']==\'Rose\'){\r\n$roseCount++;\r\n}\r\n\r\nelseif($wine[\'WineType\']==\'Sparkling\'){\r\n$sparklingCount++;\r\n}\r\n\r\nelseif($wine[\'WineType\']==\'Dessert\'){\r\n$dessertCount=$dessertCount+1;\r\n}\r\nelseif($wine[\'WineType\']==\'Port\'){\r\n$dessertCount=$dessertCount+1;\r\n}\r\n\r\n}\r\n\r\nif($wine[\'WineProfile1\']==\'Dessert Wines and Port\'){\r\n$dessertCount=$dessertCount+1;\r\n}\r\n\r\nif($wine[\'WineProfile2\']==\'Dessert Wines and Port\'){\r\n$dessertCount=$dessertCount+1;\r\n}\r\n\r\n\r\n\r\n$wineTotal = $redCount+$whiteCount+$roseCount+$sparklingCount+$dessertCount;\r\n\r\n$sql=\"SELECT DISTINCT WineCountry FROM \".$tableName.\" WHERE WineType <> \'Beer\' AND OutOfStock = 0 AND Archived = 0 AND LeaveOffMenu = 0 AND ((QtyInStock > 0 AND SoldAs = 0) OR (QtyInStock >= 0 AND SoldAs = 1 AND WineType2 = 6) OR (QtyInStock = -9999 And WineType2 = 6)) ORDER BY WineCountry\"; \r\n\r\n\r\n$records = mysqli_query($con, $sql); \r\n\r\n$linecount=1;\r\n\r\necho \"<table style=\'width: 70%; margin-left: 15%; margin-right: 15%; font-size: 1.5em;\'>\";\r\n\r\n   \r\necho \"<colgroup>\";\r\n       echo \"<col span=\'1\' style=\'width: 20em;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 2em;\'>\";\r\n       echo \"<col span=\'1\' style=\'width: 20em;\'>\";\r\n      echo \"</colgroup>\";\r\n\r\necho \"<div style=\'text-align: center; font-size: 1.5em;\'>Choose from our current selection of \".$wineTotal.\" wines from \".$countryCount.\" countries</div><br>\";\r\necho \"<div style=\'text-align: center; font-size: 1.25em;\'><a href=\'/byprofile/?Listing=RedPrice\'>\".$redCount.\" Reds</a>, <a href=\'/byprofile/?Listing=WhitePrice\'>\".$whiteCount.\" Whites</a>, <a href=\'/byprofile/?Listing=Sparkling\'>\".$sparklingCount.\" Sparkling</a>, <a href=\'/byprofile/?Listing=Rose\'>\".$roseCount.\" Rosés</a> and <a href=\'m/byprofile/?Listing=Dessert Wines and Port\'>\".$dessertCount.\" Dessert Wines</a></div><br>\";\r\n\r\nwhile($wine=mysqli_fetch_assoc($records)){\r\nif(!empty($wine[\'WineCountry\'])){\r\n\r\n    $countryCount = 0;\r\n    $sql = \"SELECT * FROM \".$tableName.\" WHERE OutOfStock = 0 AND Archived = 0 AND LeaveOffMenu = 0 AND WineType!=\'Beer\' AND WineType!=\'Glass\' AND ((QtyInStock > 0 AND SoldAs = 0) OR (QtyInStock >= 0 AND SoldAs = 1 AND WineType2 = 6)  OR (QtyInStock = -9999 And WineType2 = 6)) AND WineCountry = \'\".$wine[\'WineCountry\'].\"\'\";\r\n\r\n    $records1 =  mysqli_query($con, $sql);\r\n\r\n    //echo $sql;\r\n\r\n    while($wine2=mysqli_fetch_assoc($records1)){\r\n        $countryCount = $countryCount + 1;\r\n    }\r\n\r\n\r\n\r\nif(1==1){\r\nif(wonderplugin_is_device(\'iPhone,Android,iPad,Windows,Mac\')){\r\n\r\n  	if($linecount==1){\r\n    	echo \"<tr><td style=\'font-size=1.5em;  text-align: right;\'><a href=\'/byCountry/?Listing=\".$wine[\'WineCountry\'].\"\'>\".$wine[\'WineCountry\'].\" (\".$countryCount.\")</a></td><td></td>\";  	\r\n    }\r\n	else{\r\n	echo \"<td style=\'font-size=1.5em; text-align: left;\'><a href=\'/byCountry/?Listing=\".$wine[\'WineCountry\'].\"\'>\".$wine[\'WineCountry\'].\" (\".$countryCount.\")</a></td></tr>\";\r\n  	}\r\n  	if($linecount==1){\r\n    	$linecount=2;\r\n        }\r\n  	else{\r\n    	$linecount=1;\r\n              \r\n    }\r\n\r\n}\r\nelse{\r\n\r\n     echo \"<tr><td style=\'font-size=1.5em; text-align: left;\'><a href=\'/byCountry/?Listing=\".$wine[\'WineCountry\'].\"\'>\".$wine[\'WineCountry\'].\" (\".$countryCount.\")</a></td></tr>\";\r\n\r\n\r\n      }\r\n\r\n}\r\n}\r\n}\r\nif($linecount==2){\r\n  echo \"<td></td></tr>\"; \r\n}\r\n\r\necho \"</table>\";','[xyz-ips snippet=\"SelectDistinctCountries\"]',1),(2,'SelectDistinctVarietals','<?php\r\n\r\n$tableName = \"Wines2\";\r\n$con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n    if (mysqli_connect_errno()) {\r\n        echo\"\r\n            Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n        }\r\n        else{\r\n\r\n\r\n}\r\n \r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n// mysqli_select_db(\'WineList\'); \r\n\r\n$redWineCount=0;\r\n$whiteWineCount=0;\r\n$sql=\"SELECT * FROM \".$tableName.\" WHERE OutOfStock = 0 AND QtyInStock > 0 AND LeaveOffMenu = 0 AND Archived = 0 AND WineType != \'Glass\'\";\r\n$records2 = mysqli_query($con, $sql);\r\nwhile($wines=mysqli_fetch_assoc($records2)){\r\n\r\nif($wines[\'WineType\']==\'Red\'){\r\n$redWineCount=$redWineCount+1;\r\n}\r\nelseif($wines[\'WineType\']==\'White\'){\r\n$whiteWineCount=$whiteWineCount+1;\r\n}\r\n\r\n}\r\n\r\n$linecount = 1;\r\n$reds = array();\r\n$whites = array();\r\n$redCount=0;\r\n$whiteCount=0;\r\n\r\n\r\n\r\n$sql=\"SELECT DISTINCT Category FROM \".$tableName.\" WHERE OutOfStock = 0 AND QtyInStock > 0 AND LeaveOffMenu = 0 AND Archived = 0 AND WineType = \'Red\' ORDER BY Category\";\r\n$records = mysqli_query($con, $sql); \r\n\r\n\r\n\r\nwhile($wine=mysqli_fetch_assoc($records)){\r\n     if(!empty($wine[\'Category\'])){\r\n          $redCount++;\r\n          $reds[$redCount] = $wine[\'Category\'];\r\n        \r\n    }\r\n}\r\n\r\nfor ($i = 2; $i <= 6; $i++){\r\n    $category = \"Category\".$i;\r\n    $sql=\"SELECT DISTINCT \".$category.\" FROM \".$tableName.\" WHERE OutOfStock = 0 AND QtyInStock > 0 AND LeaveOffMenu = 0 AND Archived = 0 AND WineType = \'Red\' ORDER BY \".$category;\r\n    \r\n    $records = mysqli_query($con, $sql); \r\n    while($wine=mysqli_fetch_assoc($records)){\r\n        if(!empty($wine[$category])){\r\n            $wineFound = 0;\r\n            for ($x = 1; $x <= $redCount; $x++) {\r\n                    if($reds[$x] == $wine[$category]){\r\n                    \r\n                            $wineFound = 1;\r\n                    }\r\n            }\r\n            if($wineFound == 0){\r\n                $redCount++;\r\n                $reds[$redCount] = $wine[$category];\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\nsort($reds);\r\n\r\n\r\n\r\n\r\n\r\n\r\n$sql=\"SELECT DISTINCT Category FROM \".$tableName.\" WHERE OutOfStock = 0 AND QtyInStock > 0 AND LeaveOffMenu = 0 AND Archived = 0 AND WineType = \'White\' ORDER BY Category\";\r\n \r\n$records = mysqli_query($con, $sql); \r\n\r\nwhile($wine=mysqli_fetch_assoc($records)){\r\n    if(!empty($wine[\'Category\'])){\r\n          $whiteCount++;\r\n          $whites[$whiteCount] = $wine[\'Category\'];\r\n         //  echo $whites[$whiteCount];\r\n      }\r\n}\r\n\r\nfor ($i = 2; $i <= 6; $i++){\r\n    $category = \"Category\".$i;\r\n    $sql=\"SELECT DISTINCT \".$category.\" FROM \".$tableName.\" WHERE OutOfStock = 0 AND QtyInStock > 0 AND LeaveOffMenu = 0 AND Archived = 0 AND WineType = \'White\' ORDER BY \".$category;\r\n    \r\n    $records = mysqli_query($con, $sql); \r\n    while($wine=mysqli_fetch_assoc($records)){\r\n        if(!empty($wine[\'Category2\'])){\r\n            $wineFound = 0;\r\n            for ($x = 1; $x <= $whiteCount; $x++) {\r\n                    if($whites[$x] == $wine[\'Category2\']){\r\n                    \r\n                            $wineFound = 1;\r\n                    }\r\n            }\r\n            if($wineFound == 0){\r\n                $whiteCount++;\r\n                $whites[$whiteCount] = $wine[\'Category2\'];\r\n            }\r\n            //  echo $whites[$whiteCount];\r\n        }\r\n    }\r\n}\r\n\r\nsort($whites);\r\n\r\n\r\n\r\n\r\nif($whiteCount > $redCount){\r\n   $listItems = $whiteCount;\r\n}\r\nelse{\r\n   $listItems = $redCount;\r\n}\r\necho \"<div style=\'text-align: center; font-size: 1.5em;\'>Choose from our current selection of \".$whiteWineCount.\" Whites and \".$redWineCount.\" Reds</div><br>\";\r\necho \"<div style=\'text-align: center; font-size: 1.25em;\'>Plus <a href=\'/byprofile/?Listing=Sparkling\'>Champagne/Sparkling Wines</a>, <a href=\'/byprofile/?Listing=Rose\'>Rosés</a> and <a href=\'/byprofile/?Listing=Dessert Wines and Port\'>Dessert Wines</a></div><br>\";\r\n\r\necho \"<body><table style=\'width: 97%; margin-left: 2%; margin-right: 2%;\'>\";\r\n       \r\n     echo \"<colgroup>\";\r\n     echo \"<col span=\'1\' style=\'width: 20em;\'>\";\r\n    echo \"<col span=\'1\' style=\'width: 1em;\'>\";\r\n     echo \"<col span=\'1\' style=\'width: 20em;\'>\";\r\n     echo \"</colgroup>\";\r\n\r\necho \"<tr><td style=\'font-size: 1.5em; text-align: right;\'><b><a href=\'/byprofile/?Listing=WhitePrice\'>Whites</a></b></td><td></td><td style=\'font-size: 1.5em; text-align: left;\'><b><a href=\'/byprofile/?Listing=RedPrice\'>Reds</a></b></td></tr>\";\r\n\r\n      for($x = 0; $x <= $listItems-1; $x++){\r\n             \r\n             if($x <= $redCount){\r\n                   $redx = str_replace(\"\'\",\"%27\",$reds[$x]);\r\n                   $redx = str_replace(\"&\",\"%26\",$redx); \r\n                   $redstr = \"<td style=\'font-size: 1.5em; text-align: left;\'><a href=\'/byVarietal/?Listing=\".$redx.\"\'>\".$reds[$x].\"</a></td>\";\r\n             }\r\n             else{\r\n              $redstr = \"<td></td>\";\r\n             }\r\n             \r\n             if($x <= $whiteCount){\r\n            	$whitex = str_replace(\"\'\",\"%27\",$whites[$x]);\r\n                   $whitex = str_replace(\"&\",\"%26\",$whitex);\r\n                   $whitestr = \"<td style=\'font-size: 1.5em; text-align: right;\'><a href=\'/byVarietal/?Listing=\".$whitex.\"\'>\".$whites[$x].\"</a></td>\";\r\n             }\r\n             else{\r\n              $whitestr = \"<td></td>\";\r\n             }\r\n\r\n             echo \"<tr>\";\r\n             echo $whitestr;\r\n             echo \"<td></td>\";\r\n             echo $redstr;\r\n             echo \"<tr>\";\r\n             \r\n\r\n      }\r\n\r\necho \"</table>\";\r\necho \"</body>\";\r\n?>','[xyz-ips snippet=\"SelectDistinctVarietals\"]',1),(3,'byCountry','<?php\r\n$variable = $_GET[\'Listing\'];\r\n$tableName = \"Wines2\";\r\n\r\n  $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n$variable = str_replace(\'%20\',\' \', $variable);\r\n \r\nif (wonderplugin_is_device(\'Windows, Mac, Linux\')){\r\n$leftPad = 40; \r\n$rightPad = 40; \r\n}\r\nelseif(wonderplugin_is_device(\'iPad\')){\r\n$leftPad=20;\r\n$rightPad = 20;\r\n}\r\nelse{\r\n$leftPad = 0; \r\n$rightPad = 0;\r\n}\r\n\r\n\r\n//$leftPad=20;\r\n//$rightPad = 20;\r\n//$singlePage=\"single-item/\";\r\n\r\n\r\necho\"<style> .listView {width: 100%; max-width: 800px; text-align: left; padding-right: \".$rightPad.\"px; padding-left: \".$leftPad.\"px; padding-top: 0px; padding-bottom: 0px; margin: auto; }</style>\";\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n     echo \"<body>\";\r\n      echo \"<p class=\'listView\'><span style=\' padding-top: 0px; display: inline-block; font-weight: bold; text-align: left; width:85%; line-height: 150%; font-size: 200%\'>\".$variable.\"</span></p>\";\r\n       $wineTypes = array();\r\n       $wineTypes[1] = \"Sparkling\";\r\n       $wineTypes[2] = \"White\";\r\n       $wineTypes[3] = \"Rose\";\r\n       $wineTypes[4] = \"Red\";\r\n       $wineTypes[5] = \"Dessert\";\r\n       $wineTypes[6] = \"Port\";\r\n       $wineCount=0;\r\n        for ($x = 1; $x <= 6; $x++) {\r\n	\r\n\r\n     	$sql=\"SELECT * FROM \".$tableName.\" WHERE OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 AND (QtyInStock>0 OR SoldAs = 1) AND WineCountry=\'\".$variable.\"\' AND WineType =\'\".$wineTypes[$x].\"\' ORDER BY WinePrice\";\r\n      	$records1=mysqli_query($con, $sql);\r\n \r\n      	$recordcount=1;\r\n        \r\n      	while($wines=mysqli_fetch_assoc($records1)){\r\n              $wineCount=$wineCount+1;\r\n               if($recordcount == 1){\r\n               \r\n              if($wineTypes[$x]==\"Rose\"){\r\n                 $wineType2=\"Rosé\";\r\n               }\r\n               elseif($wineTypes[$x]==\"Sparkling\"){\r\n               $wineType2=\"Sparkling and Champagne\";\r\n                }\r\n                elseif($wineTypes[$x]==\"Dessert\"){\r\n               $wineType2=\"Dessert Wines, Port & Liqueurs\"; \r\n                }\r\n               else{\r\n               $wineType2=$wineTypes[$x];\r\n               }\r\n\r\n                 echo \"<b><p class=\'listView\'><span style=\'font-size: 1.5em; text-align: left; width:85%; line-height: 150%; padding-top: 0px; display: inline-block;\'>\".$wineType2.\"</span></p></b>\";  \r\n\r\n	       $recordcount = 2;\r\n               }\r\n          //echo \"<div style=\'line-height: 100%;\'>\";\r\n          if($wines[\'WineVintage\']==0){\r\n          	\r\n            $vintage=NULL;	\r\n          }\r\n          else{\r\n          	$vintage=$wines[\'WineVintage\'];\r\n          }\r\n         if($wines[\'QtyInStock\'] < 3 AND $wines[\'WineType\']!=\'Glass\' AND $wines[\'WineType\']!=\'Dessert\' AND $wines[\'QtyInStock\'] !=0 ){  \r\n          $lowStock = \"* \";\r\n          }\r\n          else{\r\n          $lowStock = \"\";\r\n           }\r\n\r\n           if($wines[\'WineSize\']<750 AND $wines[\'WineSize\']!=0){\r\n           if($wines[\'WineSize\']==375){\r\n           $sizeinfo=\"&nbsp (half bottle)\";\r\n           }\r\n           else{\r\n           $sizeinfo=\"&nbsp (small bottle)\";\r\n            }\r\n            }\r\n            else{\r\n            $sizeinfo=\"\";\r\n             }\r\n\r\n\r\n   if(is_null($wines[\'WhosFavorite\'])){\r\n         	$favorite=\"\";\r\n          	}   \r\n          else{\r\n          $favorite=\"<a href=\'/byperson/?Listing=\".$wines[\'WhosFavorite\'].\"&listType=byCountry&identifier=\".$variable.\"\'>\".$wines[\'FavoriteImage\'].\"</a>\";\r\n          	}\r\n\r\n\r\n              if (wonderplugin_is_device(\'Windows,Mac,Linux,iPad\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"singleitem-smallscreen/\";\r\n}\r\n\r\n\r\n           $wineID=\"<b><a href=\'/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byCountry&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"&emsp;\".$favorite.\"</a></b>\";\r\n\r\n            \r\n            \r\n     //echo \"<div style=\'line-height: 140%;\'>\";\r\n            echo \"<p class=\'listView\'><span style=\'display: inline-block; font-size: 1.25em; text-align: left; width:85%;\'>\".$wineID.\"</span>\";\r\n             echo \"<a class=\'anchor\' id=\'wine\".$wineCount.\"\'></a>\"; \r\n                $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b>\";\r\n                echo \"<span style=\'display: inline-block; font-size: 1.25em; text-align: right; width:15%;\'>\".$winePrice.\"</span></p>\"; \r\n             \r\n                \r\n               if(!empty($wines[\'WineRegion\'])){\r\n                  $wineCountry = $wines[\'WineRegion\'];\r\n                  if(!empty($wines[\'WineSubRegion\'])){\r\n                  $wineCountry = $wineCountry.\">\".$wines[\'WineSubRegion\']; \r\n                  }\r\n                }\r\n\r\n               if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                      \r\n                      echo \"<p  class = \'listView\' style = \'font-size:1.1em; padding-top: 0px; line-height: 120%\'>\".$wineVarietal.\"</p>\";\r\n\r\n                  }\r\n\r\n		echo \"<p class = \'listView\' style = \'font-size:1.1em; padding-top: 0px; padding-bottom: 15px;  line-height: 120%\'>\".$wineCountry.\"</p>\"; \r\n                \r\n                \r\n               //echo \"<br>\";\r\n                        	\r\n      	  //echo \"</div>\";\r\n        }\r\n      \r\n  \r\n}\r\necho \"<br><p class = \'listView\' style=\'line-spacing: 90%; font-size: .8em; padding-top: 0px; padding-bottom: 0px;\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax).  BZ$2 = US$1</p>\";\r\necho \"<p class = \'listView\' style=\'line-spacing: 90%; font-size: .8em; padding-top: 0px; padding-bottom: 0px;\'>* Limited Quantities Available</p>\";\r\necho \"</body>\";','[xyz-ips snippet=\"byCountry\"]',1),(4,'SingleItemPHP','<?php\r\n$variable = $_GET[\'WineID\'];\r\n$listType = $_GET[\'listType\'];\r\n$listName = $_GET[\'listName\'];\r\n$linkCount = $_GET[\'linkCount\'];\r\n$food1 = trim($_GET[\'food1\']);\r\n$food2 = trim($_GET[\'food2\']);\r\n$food3 = trim($_GET[\'food3\']);\r\n$food4 = trim($_GET[\'food4\']);\r\n\r\nif($food1!=\"\"){\r\n$xfood1=substr($food1, (strlen($food1)-2)*-1);\r\n}\r\nif($food2!=\"\"){\r\n$xfood2=substr($food2, (strlen($food2)-2)*-1);\r\n}\r\nif($food3!=\"\"){\r\n$xfood3=substr($food3, (strlen($food3)-2)*-1);\r\n}\r\nif($food4!=\"\"){\r\n$xfood4=substr($food4, (strlen($food4)-2)*-1);\r\n}\r\n\r\n\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\nif (wonderplugin_is_device(\'iPhone\')){\r\n$singlePage=\"singleitem-smallscreen/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n// mysql_select_db(\'WineList\'); \r\n// mysqli_set_charset($con, $connection, \'utf8\');\r\n\r\nif($listType==\"byVarietal\"){\r\n      $sql=\"SELECT * FROM Wines WHERE (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE WineCountry = \'\".$listName.\"\' AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY CASE \r\n               WHEN WineType = \'Sparkling\' THEN 1\r\n               WHEN WineType = \'White\' THEN 2\r\n               WHEN WineType = \'Rose\' THEN 3\r\n               WHEN WineType = \'Red\' THEN 4\r\n               ELSE 5\r\n         END,  WinePrice\";\r\n          \r\n\r\n}\r\nelseif($listType==\"byProfile\"){\r\n\r\n      if($listName==\"WhitesAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock>0 ORDER BY WineName\";\r\n            $showName=\"All Whites A - Z\";\r\n            $listTypeName=\"White\";\r\n      }\r\n       elseif($listName==\"WhitePrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock>0 ORDER BY WinePrice\";\r\n            $showName=\"All Whites by Price\";\r\n            $listTypeName=\"White\";\r\n      }\r\n      elseif($listName==\"RedsAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock>0 ORDER BY WineName\";\r\n            $showName=\"All Reds A - Z\";\r\n            $listTypeName=\"Red\";\r\n      }\r\n      elseif($listName==\"RedPrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock>0 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red\";\r\n      }    \r\n      \r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byGlass\"){\r\n\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n     \r\n}\r\nelseif($listType==\"byFood\"){\r\n\r\n$foodList = \"(\'\".$food1.\"\', \'\".$food2.\"\', \'\".$food3.\"\', \'\".$food4.\"\')\";\r\n\r\n$sql=\"SELECT * FROM Wines WHERE WineType != \'Glass\' AND QtyInStock >0 AND (FoodPairing1 IN \".$foodList.\" OR FoodPairing2 IN \".$foodList.\" OR FoodPairing3 IN \".$foodList.\" OR FoodPairing4 IN \".$foodList.\" OR FoodPairing5 IN \".$foodList.\" OR FoodPairing6 IN \".$foodList.\" OR FoodPairing7 IN \".$foodList.\")\";\r\n\r\n$showName=\"Food Pairings\";\r\n$listTypeName=\"Food Matches\";\r\n}\r\n\r\n\r\n\r\n// Now read all the wines using $sql and determine which is the previous and which is the next. These will be the url for the prev and \r\n// next buttons. Also need to add the listType and listName variables to the url so that this page can know how and what to display.\r\n       $IDarray=array();\r\n       $wineCount=0;\r\n      \r\n       // echo $sql;\r\n       $records1=mysqli_query($con, $sql);\r\n       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n            \r\n             $wineCount = $wineCount+1;\r\n             $IDarray[$wineCount]=$row1[\'ID\'];\r\n                  if($IDarray[$wineCount]==$variable){\r\n                          $offset= $wineCount;        // need to know how many to go back in browser history\r\n                  }\r\n             // echo $IDarray[$wineCount].\", \".$variable.\"<br>\";\r\n             \r\n\r\n       }\r\n       $offset=-1*($wineCount-$offset);\r\n\r\n     // echo $wineCount;\r\n       \r\n      for ($x = 1; $x <= $wineCount; $x++) {\r\n\r\n         if($IDarray[$x] == $variable){\r\n		if($x == 1){\r\n	\r\n		$prevID=0;\r\n		$currentID=$array[$x];\r\n		$nextID=$IDarray[$x+1];\r\n		}\r\n		elseif($x == $winecount){\r\n	\r\n		$prevID=$IDarray[$x-1];\r\n		$currentID=$array[$x];\r\n		$nextID=0;\r\n		}\r\n		else{\r\n		$prevID=$IDarray[$x-1];\r\n		$currentID=$array[$x];\r\n		$nextID=$IDarray[$x+1];\r\n	\r\n		}\r\n	}\r\n\r\n      }\r\n    \r\n\r\n      \r\n            // *disabled for now*  the first time this page is called we load all the urls for every wine in this profile, varietal or country\r\n            // into the browser history then jump to the page for the selected wine\r\n            // this allows the slider to scroll through all pages.\r\n            // the first page in the history will be the listing page that called this so you can swipe back to that.\r\n\r\n             //for ($x = 1; $x <= $wineCount; $x++) {\r\n               \r\n              //     $url=\"http://www.bistrowinelist.com/single-item?WineID=\".$IDarray[$x].\"&listType=\".$listType.\"&listName=\".$listName.\"&linkCount=2\";\r\n               //    echo \"<script>push(\'\".$url.\"\'); </script>\";\r\n                //  echo $url.\"<br>\";\r\n            // }\r\n  \r\n       \r\n \r\n// code here to assign $prevID and $nextID to the prev and next buttons\r\n\r\n\r\n\r\n\r\n   \r\n      if($prevID !=0){\r\n           if($listType != \'byFood\'){      \r\n                   $prevWine = \"[maxbutton name=\'Previous\' url=\'http://www.bistrowinelist.com/\".$singlePage.\"? WineID=\".$prevID.\"&listType=\".$listType.\"&listName=\".$listName.\"\']\";\r\n           }\r\n           else{\r\n                  $prevWine = \"[maxbutton name=\'Previous\' url=\'http://www.bistrowinelist.com/\".$singlePage.\"? WineID=\".$prevID.\"&listType=byFood&listName=Food&food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\']\";\r\n\r\n\r\n           }\r\n      }\r\n      else{\r\n             $prevWine=\"[maxbutton name=\'EmptyButton\']\";\r\n       }\r\n      \r\n      // $homeWine = \"[maxbutton id=\'3\' url=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\']\";\r\n     \r\n      if($linkCount==1){\r\n          $homeWine = \"[maxbutton name=\'back\']\";\r\n       }\r\n       else{\r\n\r\n          $homeWine = \"[maxbutton name=\'back\' url=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\']\";\r\n       }\r\n\r\n      if($nextID !=0){\r\n            if($listType != \'byFood\'){    \r\n                   $nextWine = \"[maxbutton name=\'Next\' url=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$nextID.\"&listType=\".$listType.\"&listName=\".$listName.\"\']\";     \r\n             }\r\n              else{\r\n                   $nextWine = \"[maxbutton name=\'Next\' url=\'http://www.bistrowinelist.com/\".$singlePage.\"? WineID=\".$nextID.\"&listType=byFood&listName=Food&food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\']\";\r\n\r\n             }\r\n      }\r\n      else{\r\n      $nextWine=\"[maxbutton name=\'EmptyButton\']\";\r\n      }\r\n\r\n\r\n	$sql=\"SELECT * FROM Wines WHERE ID=\'\".$variable.\"\'\"; \r\n	$records=mysqli_query($con, $sql);\r\n\r\n    \r\n\r\nwhile ($row = mysqli_fetch_assoc($records)) {\r\n\r\n         if($listType==\"byCountry\"){\r\n\r\n               $listTypeName=$row[\'WineNationality\'];\r\n          \r\n\r\n         }\r\n         elseif($listType==\"byProfile\" AND $listTypeName!=\"\"){\r\n\r\n          // $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byProfile\" AND $listTypeName==\"\"){\r\n\r\n          $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byVarietal\"){\r\n          $listTypeName=$listName;\r\n        }\r\n\r\n\r\n//set to 500 now so it does not change - effectively disabling\r\n\r\n        if(strlen($row[\'WineName\'].\"&emsp\".$row[\'WineVintage\'])>500){\r\n         $nameFont=\"1.1em\";\r\n         }\r\n        else{\r\n        $nameFont=\"1.35em\";\r\n        }\r\n\r\n\r\n       if($listType==\'byCountry\'){\r\n\r\n           if($linkCount==1){\r\n              $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n           }\r\n           else{\r\n            $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n            }\r\n           \r\n             if($row[\'WineType\']==\'Rose\'){\r\n             $showName=$listName.\"&nbsp;(Rosé)\";\r\n             }\r\n             else{\r\n             $showName=$listName.\"&nbsp;(\".$row[\'WineType\']. \" Wines)\";\r\n             }\r\n        }\r\n        elseif($listType==\'byVarietal\'){\r\n                  $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n                 // $browsing=$wineCount+$offset.\" of \".$wineCount.\" \".$listTypeName;\r\n                  $showName=$listName;\r\n         }\r\n         elseif($listType==\'byProfile\' AND $showName==\"\"){\r\n            $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" </b></a>\";\r\n          //  $browsing=$wineCount+$offset.\" of \".$wineCount.\" \".$listTypeName;\r\n            $showName=$listName;\r\n         }\r\n         elseif($listType==\"byGlass\"){\r\n         $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b> Wines By The Glass</b></a>\";\r\n         // $browsing=$wineCount+$offset.\" of \".$wineCount.\" Wines By The Glass\";\r\n         }\r\n         \r\n         elseif($listType==\"byFood\"){\r\n\r\n           $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/foodmatches/?food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\'><b> Food Matches</b></a>\";\r\n           \r\n\r\n          }\r\n\r\nif($browsing==\"\"){\r\n          $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n          // $browsing=$wineCount+$offset.\" of \".$wineCount.\" \".$listTypeName.\" Wines\";\r\n}\r\n        \r\n        echo \"<body>\";\r\n// display: flex; justify-content: center; align-items: center;\r\n \r\n// echo \"<span style=\' display: flex;  font-size: 0.8em; font-weight: normal; justify-content: center; align-items: center; padding-top: 0px;\'>\".$browsing.\" </span>\";\r\n\r\n\r\n        if (wonderplugin_is_device(\'Windows, Mac\')){\r\n        $bodytext=\"justify\";\r\n      \r\n       echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 84%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr>\";\r\n\r\n }\r\n      \r\n      \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"<br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; fonr-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"<br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n        else if(wonderplugin_is_device(\'iPad\')){\r\n\r\n  $bodytext=\"left\";\r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 30%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 69%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: normal;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr>\";\r\n\r\n }\r\n      \r\n      \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"</b><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"</b><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n      else if(wonderplugin_is_device(\'iPhone, Android\')){\r\n\r\n   $bodytext=\"left\";\r\n      \r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n\r\n//on small screen, spread the $browsing text and buttons across the whole screen , the price lines up with the first row on the description\r\n\r\n echo \"<table>\";\r\n\r\necho \"<tr><td style=\'display:block-inline; text-align: center; font-size: 1.1em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<table><tr><td style=\'display:block; text-align: center; font-size: 1.1em;  font-weight: bold; \'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n }\r\n      \r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 35%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 64%;\'>\";\r\n        echo \"</colgroup>\";  \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center; font-size: 1.25em;\'><b>\".$winePrice.\"</b><br><br><img style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"</b><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"</b><br>\";\r\n         }\r\n\r\n\r\n        }\r\n         \r\n\r\n         //  ///Common Code Here\r\n        \r\n\r\n         \r\n  	if($listType==\"byFood\"){\r\n\r\n $foodarray = array($row[\'FoodPairing1\'], $row[\'FoodPairing2\'], $row[\'FoodPairing3\'], $row[\'FoodPairing4\'], $row[\'FoodPairing5\'], $row[\'FoodPairing6\'], $row[\'FoodPairing7\'], );\r\n         $goodfoods = \"\";\r\n         $badfoods = \"\";\r\n\r\n          if(in_array($food1, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood1;\r\n           }\r\n           elseif($food1!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood1;\r\n            }\r\n\r\n           if(in_array($food2, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n           }\r\n           elseif($food2!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood2;\r\n            }\r\n\r\n   if(in_array($food3, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood4;\r\n            }\r\n            \r\n        if($goodfoods!=\"\"){\r\n        $goodfoods=substr($goodfoods, (strlen($goodfoods)-2)*-1);\r\n         echo \"<font size=\'+1\'><b>We suggest with: </b>\".$goodfoods.\"<br><font>\";\r\n        }\r\n\r\n//alternate good food list - show all food listed as pairing with this wine\r\n      \r\n\r\n\r\n\r\n\r\n\r\n        if($badfoods!=\"\"){\r\n        $badfoods=substr($badfoods, (strlen($badfoods)-2)*-1);\r\n // leave off for now    echo \"<font size=\'+1\'><b>Mabye not so good with: </b>\".$badfoods.\"<br><font>\";\r\n        }\r\n\r\n\r\n          \r\n\r\n         }\r\n         if (strpos($row[\'WineName\'], $row[\'WineVarietal\']) !== false){\r\n              $varietalText=\"\";\r\n        }\r\n        else{\r\n               $varietalText=$row[\'WineVarietal\'];\r\n         }\r\n\r\n         if($varietalText!=\"\"){\r\n         echo \"</b>\".$varietalText;\r\n               echo \"<br>\";\r\n         }\r\n         else{\r\n        // echo \"<td style=\'vertical-align: top; padding-top: 0px; text-align: \".$bodytext.\"; padding-right: 5em; line-height: 1.75em\'>\";\r\n         }\r\n   \r\n    \r\n       echo \"<font size=\'+1\'><b>\".$row[\'WineCountry\'].\">\".$row[\'WineRegion\'].\"</b></font><br><br>\";\r\n    \r\nif($row[\'WineType\']!=\'Glass\'){   \r\n echo \"<font size=\'+1\'><b>In our Cellar: &nbsp;</b>\".$row[\'QtyInStock\'].\"<br><font>\";\r\n}\r\n\r\n    if (!empty($row[\'Eyes\'])) {\r\n       echo \"<font size=\'+1\'><b>Eyes: &nbsp;</b>\".$row[\'Eyes\'].\"</b><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($row[\'Nose\'])) {\r\n       echo \"<font size=\'+1\'><b>Nose: &nbsp;</b>\".$row[\'Nose\'].\"</b><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($row[\'Mouth\'])) {\r\n       echo \"<font size=\'+1\'><b>Mouth: &nbsp;</b>\".$row[\'Mouth\'].\"</b><br><font>\";\r\n      }\r\n   \r\n      if (!empty($row[\'AlcoholContent\']) AND $row[\'AlcoholContent\']!=0) {\r\n       echo \"<font size=\'+1\'><b>Alcohol Content: &nbsp;</b>\".$row[\'AlcoholContent\'].\"%</b><br><font>\";\r\n      }\r\n  	if (!empty($row[\'Desc3\'])) {\r\n       echo \"<font size=\'+1\'><b>Ratings: &nbsp;</b>\".$row[\'Desc3\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'Desc2\'])) {\r\n       echo \"<font size=\'+1\'><text align=\'justify\'><b>Why we like it: &nbsp;</b>\".$row[\'Desc2\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'PairingSuggestion\'])) {\r\n       echo \"<br><font size=\'+1\'><b>Pairs with: &nbsp;</b>\".$row[\'PairingSuggestion\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'Desc1\'])) {\r\n       echo \"<br><font size=\'+1\'><b>From the Winemaker: &nbsp;</b>\".$row[\'Desc1\'].\"</b><br><font>\";\r\n      }\r\n      echo \"<br><font size=\'-1\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1<font>\";\r\n    \r\n    echo \"</td>\";\r\n\r\n    // echo \"<td valign=\'top\' align=\'left\'>\";\r\n    // echo do_shortcode($nextWine);\r\n    // echo \"</td>\";\r\n\r\n  	echo \"</tr>\";\r\n	echo \"</table>\";\r\n    \r\n}\r\necho \"</body>\";','[xyz-ips snippet=\"SingleItemPHP\"]',1),(5,'byVarietal','<?php\r\n$variable = $_GET[\'Listing\'];\r\n$variable1 = str_replace(\"&\",\"%26\",$variable); \r\n\r\n$tableName=\"Wines2\";\r\n\r\n$con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n \r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\nif(wonderplugin_is_device(\'Windows, Mac, Linux\')){\r\n$leftPad = 40; \r\n$rightPad = 40;\r\n}\r\n\r\nelseif(wonderplugin_is_device(\'iPad\')){\r\n$leftPad = 20; \r\n$rightPad = 20;\r\n}\r\nelse{\r\n$leftPad = 0; \r\n$rightPad = 0;\r\n}\r\n//echo $leftPad;\r\n\r\n//$leftPad = 20; \r\n//$rightPad = 20;\r\n//$singlePage=\"single-item/\";\r\n\r\necho\"<style> .listView {width: 100%; max-width: 800px; text-align: left; padding-right: \".$rightPad.\"px; padding-left: \".$leftPad.\"px; padding-top: 0px; padding-bottom: 0px; margin: auto; }</style>\";\r\n\r\n\r\n 	echo \"<body>\";\r\n        echo \"<p class=\'listView\'><span style=\' padding-top: 0px; padding-bottom: 10px; display: inline-block; font-weight: bold; text-align: left; width:85%; line-height: 150%; font-size: 200%\'>\".$variable.\"</span></p>\";\r\n\r\n     	$sql=\"SELECT * FROM \".$tableName.\" WHERE OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 AND QtyInStock > 0 AND (Category =\'\".$variable.\"\' OR Category2 = \'\".$variable.\"\' OR Category3 =\'\".$variable.\"\' OR Category4 =\'\".$variable.\"\' OR Category5 = \'\".$variable.\"\' OR Category6 =\'\".$variable.\"\') AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n      	$records1=mysqli_query($con, $sql);\r\n      	\r\n    \r\n        $wineCount = 0;\r\n      	while($wines=mysqli_fetch_assoc($records1)){\r\n       \r\n if(is_null($wines[\'WhosFavorite\'])){\r\n         	$favorite=\"\";\r\n          	}   \r\n          else{\r\n          $favorite=\"<a href=\'/byperson/?Listing=\".$wines[\'WhosFavorite\'].\"&listType=byVarietal&identifier=\".$variable.\"\'>\".$wines[\'FavoriteImage\'].\"</a>\";\r\n          	}\r\n          $wineCount=$wineCount+1;	          \r\n          if($wines[\'WineVintage\']==0){\r\n          	\r\n            $vintage=NULL;	\r\n          }\r\n          else{\r\n          	$vintage=$wines[\'WineVintage\'];\r\n          }\r\n            if($wines[\'QtyInStock\'] < 3){  \r\n          $lowStock = \"* \";\r\n          }\r\n          else{\r\n          $lowStock = \"\";\r\n           }  \r\n\r\n          if($wines[\'WineSize\']<750 AND $wines[\'WineSize\']!=0){\r\n          if($wines[\'WineSize\']==375){                \r\n                $sizeinfo=\"&nbsp;(half bottle)\";\r\n             }\r\n             else{\r\n              $sizeinfo=\"&nbsp;(small bottle)\";\r\n               }          \r\n           }\r\n          else{\r\n               $sizeinfo=\"\";\r\n          }\r\n\r\n  if (wonderplugin_is_device(\'Windows,Mac,Linux,iPad\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"singleitem-smallscreen/\";\r\n}\r\n        \r\n\r\n           $wineID=\"<b><a href=\'/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byVarietal&listName=\".$variable1.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"&emsp;\".$favorite.\"</a></b>\";\r\n\r\n\r\n// echo \"<div style=\'line-height: 140%;\'>\";\r\n             echo \"<p class=\'listView\'><span style=\'display: inline-block; font-size: 1.25em; text-align: left; width:85%;\'>\".$wineID.\"</span>\";\r\n             echo \"<a class=\'anchor\' id=\'wine\".$wineCount.\"\'></a>\"; \r\n                $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b>\";\r\n                echo \"<span style=\'display: inline-block; font-size: 1.25em; text-align: right; width:15%;\'>\".$winePrice.\"</span></p>\"; \r\n             \r\n               \r\n               $wineCountry=$wines[\'WineCountry\'];\r\n               if(!empty($wines[\'WineRegion\'])){\r\n                  $wineCountry = $wineCountry.\">\".$wines[\'WineRegion\'];\r\n                  if(!empty($wines[\'WineSubRegion\'])){\r\n                  $wineCountry = $wineCountry.\">\".$wines[\'WineSubRegion\']; \r\n                  }\r\n                }\r\n               \r\n\r\n               if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                      \r\n                      echo \"<p  class = \'listView\' style = \'font-size:1.1em; padding-top: 0px; line-height: 120%\'>\".$wineVarietal.\"</p>\";\r\n\r\n                  }\r\n\r\n		echo \"<p class = \'listView\' style = \'font-size:1.1em; padding-top: 0px; padding-bottom: 15px;  line-height: 120%\'>\".$wineCountry.\"</p>\"; \r\n                \r\n                \r\n              // echo \"<br>\";\r\n                        	\r\n      	//  echo \"</div>\";\r\n}\r\n\r\necho \"<br><p class = \'listView\' style=\'line-spacing: 90%; font-size: .8em; padding-top: 0px; padding-bottom: 0px;\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax).  BZ$2 = US$1</p>\";\r\necho \"<p class = \'listView\' style=\'line-spacing: 90%; font-size: .8em; padding-top: 0px; padding-bottom: 0px;\'>* Limited Quantities Available</p>\";\r\necho \"</body>\";','[xyz-ips snippet=\"byVarietal\"]',1),(6,'byProfile2','<?php\r\n\r\n$variable = $_GET[\'Listing\'];\r\n\r\n  $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n \r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\n$sortButton=\"\";\r\n\r\n      if($variable==\"WhitePrice\" || $variable==\"RedPrice\" ||  $variable==\"WhitesAZ\" ||  $variable==\"RedsAZ\" ){\r\n\r\n           if($variable==\"WhitePrice\"){\r\n                 $winetype=\"White\";\r\n                 $sorttype=\"WinePrice\";\r\n                 $winetitle=\"White Wines (by price)&emsp;<a href=\'http://www.bistrowinelist.com/byProfile/?Listing=WhitesAZ\'>Sort A-Z</a>\";\r\n                 //$sortButton=\"[maxbutton id=\'5\' url=\'http://www.bistrowinelist.com/byProfile/?Listing=WhitesAZ\']\";\r\n                 $newvariable = \"WhitePrice\";\r\n           }\r\n           elseif($variable==\"RedPrice\"){\r\n                $winetype=\"Red\";\r\n                $sorttype = \"WinePrice\";\r\n               $winetitle=\"Red Wines (by price)&emsp;<a href=\'http://www.bistrowinelist.com/byProfile/?Listing=RedsAZ\'>Sort A-Z</a>\";\r\n               //$sortButton=\"[maxbutton id=\'5\' url=\'http://www.bistrowinelist.com/byProfile/?Listing=RedsAZ\']\";\r\n               $newvariable = \"RedPrice\";\r\n           } \r\n           elseif($variable==\"WhitesAZ\"){\r\n                $winetype=\"White\";\r\n                $sorttype=\"WineName\";\r\n               $winetitle=\"White Wines (A - Z)&emsp;<a href=\'http://www.bistrowinelist.com/byProfile/?Listing=WhitePrice\'>Sort by Price</a>\";\r\n               //$sortButton=\"[maxbutton id=\'4\' url=\'http://www.bistrowinelist.com/byProfile/?Listing=WhitePrice\']\";\r\n               $newvariable = \"WhitesAZ\";\r\n           }\r\n           elseif($variable==\"RedsAZ\"){\r\n                $winetype=\"Red\";\r\n                $sorttype=\"WineName\";\r\n               $winetitle=\"Red Wines (A - Z)&emsp;<a href=\'http://www.bistrowinelist.com/byProfile/?Listing=RedPrice\'>Sort by Price</a>\";\r\n               //$sortButton=\"[maxbutton id=\'4\' url=\'http://www.bistrowinelist.com/byProfile/?Listing=RedPrice\']\";\r\n               $newvariable = \"RedsAZ\";\r\n           }\r\n           \r\n           echo \"<p><b><font size=\'+2\'>\".$winetitle.\"</font></b>\";\r\n            \r\n            \r\n\r\n            //if(!empty($sortButton)){          \r\n            //echo \"&emsp;\";\r\n            //echo do_shortcode($sortButton);\r\n            //}           \r\n            echo \"</p>\";\r\n\r\n           \r\n           $sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1 AND QtyInStock>0 AND WineType = \'\".$winetype.\"\' ORDER BY \".$sorttype;\r\n      	   $records=mysqli_query($con, $sql);\r\n      	   $wineCount = 0;\r\n      	   while($wines=mysqli_fetch_assoc($records)){\r\n           $wineCount=$wineCount+1;\r\n        	\r\n          \r\n          if($wines[\'WineVintage\']==0){\r\n          	\r\n            $vintage=NULL;	\r\n\r\n          }\r\n          else{\r\n          	$vintage=$wines[\'WineVintage\'];\r\n              \r\n          }\r\n         if($wines[\'QtyInStock\'] < 3 AND $wines[\'WineType\']!=\'Glass\'){\r\n          $lowStock = \"* \";\r\n          }\r\n          else{\r\n          $lowStock = \"\";\r\n           }\r\n\r\n            if($wines[\'WineSize\']<750 AND $wines[\'WineSize\']!=0){\r\n            if($wines[\'WineSize\']==375){    \r\n                $sizeinfo=\"&nbsp;(half bottle)\";\r\n            }\r\n            else{\r\n                  $sizeinfo=\"&nbsp;(small bottle)\";\r\n          }\r\n          }\r\n          elseif($wines[\'ServingSize\'] != 0 AND $wines[\'ServingSize\'] !=5){\r\n            \r\n               $sizeinfo=\" (\".$wines[\'ServingSize\'].\" oz)\";\r\n            }\r\n          else{\r\n               $sizeinfo=\"\";\r\n          }\r\n\r\n\r\n         \r\n\r\n$singlePage=\"single-item/\";\r\nif (wonderplugin_is_device(\'Windows,Mac,Linux,iPad\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n     \r\n\r\n           $wineID=\"<b><a href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$newvariable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></b>\";\r\n\r\n         \r\n             echo \"<span style=\'font-size: 1.25em; text-align: left; width:85%; line-height: 150%; display: inline-block;\'>\".$wineID.\"</span>\";\r\n             echo \"<a class=\'anchor\' id=\'wine\".$wineCount.\"\'></a>\";\r\n\r\n                $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b><br>\";\r\n                echo \"<span style=\'font-size: 1.25em; text-align: right; width:15%; line-height: 150%; display: inline-block;\'>\".$winePrice.\"</span><br>\"; \r\n               if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'].\"<br>\";\r\n                       echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineVarietal.\"</span><br>\";\r\n\r\n                  }\r\n               $wineCountry=$wines[\'WineCountry\'].\">\".$wines[\'WineRegion\'];\r\n               \r\n                if(substr($wineCountry, strlen($wineCountry)-1,1)==\">\"){\r\n\r\n                       $wineCountry=substr($wineCountry, 0, strlen($wineCountry)-1);\r\n                }\r\n                      $wineCountry=$wineCountry.\"<br>\";\r\n\r\n		echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineCountry.\"</span><br>\";\r\n             \r\n              \r\n               echo \"<br>\";\r\n\r\n         }\r\n \r\n\r\n          \r\n             \r\n\r\n         \r\n\r\n}\r\nelseif($variable==\"Glass\"){\r\n\r\n$sql=\"SELECT * FROM Wines WHERE WineType=\'Glass\' ORDER BY WinePrice\";\r\n      	$records1=mysqli_query($con, $sql);\r\n\r\n      	 echo \"<p><b><font size=\'+2\'>\".$variable.\"</font></b></p>\";\r\n         $wineCount=0;\r\n         while($wines=mysqli_fetch_assoc($records1)){\r\n        $wineCount=$wineCount+1;\r\n        	\r\n          \r\n          if($wines[\'WineVintage\']==0){\r\n          	\r\n            $vintage=NULL;	\r\n          }\r\n          else{\r\n          	$vintage=$wines[\'WineVintage\'];\r\n          }\r\n            if($wines[\'QtyInStock\'] < 3 AND $wines[\'WineType\']!=\'Glass\'){\r\n          $lowStock = \"* \";\r\n          }\r\n          else{\r\n          $lowStock = \"\";\r\n           }\r\n          if($wines[\'WineSize\']<750 AND $wines[\'WineSize\']!=0){\r\n                \r\n          if($wines[\'WineSize\']==375){  \r\n            $sizeinfo=\"&nbsp;(half bottle)\";\r\n           }\r\n           else{\r\n             $sizeinfo=\"&nbsp;(small bottle)\";\r\n          }\r\n          }\r\n          else{\r\n               $sizeinfo=\"\";\r\n          }	\r\n\r\nif (wonderplugin_is_device(\'Windows, Mac, Linux, iPad\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n     \r\n\r\n           $wineID=\"<b><a href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></b>\";\r\n\r\n   echo \"<span style=\'font-size: 1.25em; text-align: left; width:85%; line-height: 150%; display: inline-block;\'>\".$wineID.\"</span>\";\r\n	        \r\n                 $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b><br>\";\r\n                 echo \"<span style=\'font-size: 1.25em; text-align: right; width:15%; line-height: 150%; display: inline-block;\'>\".$winePrice.\"</span><br>\"; \r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'].\"<br>\";\r\n                       echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineVarietal.\"</span><br>\";\r\n\r\n                  }\r\n	\r\n  		$wineCountry=$wines[\'WineCountry\'].\">\".$wines[\'WineRegion\'];\r\n             \r\n                 if(substr($wineCountry, strlen($wineCountry)-1,1)==\">\"){\r\n\r\n                       $wineCountry=substr($wineCountry, 0, strlen($wineCountry)-1);\r\n                }\r\n                      $wineCountry=$wineCountry.\"<br>\";\r\n\r\n		echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineCountry.\"</span><br>\";\r\n                        \r\n             \r\n                  echo \"<br>\"; \r\n    \r\n                  \r\n\r\n        }\r\n\r\n}\r\n\r\n\r\nelse{\r\n\r\n      \r\n\r\n     	$sql=\"SELECT * FROM Wines WHERE (WineProfile1=\'\".$variable.\"\' OR WineProfile2=\'\".$variable.\"\') AND QtyInStock>-1 AND WineType!=\'Glass\' AND AvailableForSale = -1 ORDER BY WinePrice\";\r\n$printBottleHeader = False;\r\n      	$records1=mysqli_query($con, $sql);\r\n\r\n         if($variable==\'Rose\'){\r\n            $winetitle = \"Rosé\";\r\n          }\r\n         elseif($variable==\'Sparkling\'){\r\n          $winetitle = \"Sparkling & Champagne\";\r\n         }\r\n         else{\r\n          $winetitle = $variable;\r\n         }\r\n      	 echo \"<p><b><font size=\'+2\'>\".$winetitle.\"</font></b></p>\";\r\n        $wineCount = 0;\r\n        $headerPrinted = False;\r\n\r\n      	while($wines=mysqli_fetch_assoc($records1)){\r\n        $wineCount=$wineCount+1;\r\n        	\r\n          \r\n          if($wines[\'WineVintage\']==0){\r\n          	\r\n            $vintage=NULL;	\r\n          }\r\n          else{\r\n          	$vintage=$wines[\'WineVintage\'];\r\n          }\r\n            if($wines[\'QtyInStock\'] < 3 AND $wines[\'WineType\']!=\'Glass\' AND $wines[\'QtyInStock\'] !=0){\r\n          $lowStock = \"* \";\r\n          }\r\n          else{\r\n          $lowStock = \"\";\r\n           }\r\n           if($wines[\'WineSize\']<750 AND $wines[\'WineSize\']!=0){\r\n           if($wines[\'WineSize\']==375){ \r\n                $sizeinfo=\"&nbsp;(half bottle)\";\r\n           }\r\n           else{\r\n                 $sizeinfo=\"&nbsp;(small bottle)\";\r\n          }\r\n          }\r\n           elseif($wines[\'ServingSize\'] != 0 AND $wines[\'ServingSize\'] !=5){\r\n            \r\n               $sizeinfo=\" (\".$wines[\'ServingSize\'].\" oz)\";\r\n            }\r\n          else{\r\n               $sizeinfo=\"\";\r\n          }	\r\n\r\nif (wonderplugin_is_device(\'Windows, Mac, Linux, iPad\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\nif($headerPrinted==False AND $wines[\'SoldAs\'] == 1){\r\n$printBottleHeader = True;\r\n$headerPrinted=True;\r\necho \"<span style=\'font-size: 1.5em; text-align: left; font-weight: bold; width:85%; line-height: 150%; display: inline-block;\'>By The Glass</span>\";\r\n}\r\nelseif($wines[\'SoldAs\'] == 0 AND $printBottleHeader==True){\r\n$printBottleHeader=False;\r\necho \"<span style=\'font-size: 1.5em; text-align: left; font-weight: bold; width:85%; line-height: 150%; display: inline-block;\'>By The Bottle</span>\";\r\n}\r\n           $wineID=\"<b><a href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></b>\";\r\n\r\n   echo \"<span style=\'font-size: 1.25em; text-align: left; width:85%; line-height: 150%; display: inline-block;\'>\".$wineID.\"</span>\";\r\n   \r\necho \"<a class=\'anchor\' id=\'wine\".$wineCount.\"\'></a>\";\r\n        \r\n                 $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b><br>\";\r\n                 echo \"<span style=\'font-size: 1.25em; text-align: right; width:15%; line-height: 150%; display: inline-block;\'>\".$winePrice.\"</span><br>\"; \r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'].\"<br>\";\r\n                       echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineVarietal.\"</span><br>\";\r\n\r\n                  }\r\n	\r\n  		$wineCountry=$wines[\'WineCountry\'].\">\".$wines[\'WineRegion\'];\r\n             \r\n                 if(substr($wineCountry, strlen($wineCountry)-1,1)==\">\"){\r\n\r\n                       $wineCountry=substr($wineCountry, 0, strlen($wineCountry)-1);\r\n                }\r\n                      $wineCountry=$wineCountry.\"<br>\";\r\n\r\n		echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineCountry.\"</span><br>\";\r\n                        \r\n             \r\n                  echo \"<br>\"; \r\n    \r\n                  \r\n\r\n        }\r\n    \r\n  }\r\necho \"<br><font size=\'-1\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax).&nbsp;BZ$2 = US$1<font>\";\r\necho \"<br><font size=\'-1\'>* Limited Quantities Available<font>\";','[xyz-ips snippet=\"byProfile2\"]',1),(7,'CountriesSingleColumn','<?php\r\n\r\n    $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\n\r\n\r\n\r\n$sql=\"SELECT DISTINCT WineCountry FROM Wines2 WHERE QtyInStock <> -1 AND OutOfStock = 0 AND Archived=0 AND LeaveOffMenu=0 AND WineType <> \'Beer\' ORDER BY WineCountry\"; \r\n$records = mysqli_query($con, $sql); \r\n\r\n\r\n\r\n\r\necho \"<table style=\'text-align: center; font-size: 1.5em;\'>\";\r\n\r\n    \r\n//echo \"<colgroup>\";\r\n //      echo \"<col span=\'1\' style=\'width: 20em;\'>\";\r\n  //      echo \"<col span=\'1\' style=\'width: 2em;\'>\";\r\n   //    echo \"<col span=\'1\' style=\'width: 20em;\'>\";\r\n    //  echo \"</colgroup>\";\r\n\r\n\r\nwhile($wine=mysqli_fetch_assoc($records)){\r\nif(!empty($wine[\'WineCountry\'])){\r\n\r\n    	echo \"<tr><td style=\'font-size=1.5em;  text-align: left;\'><a href=\'http://bistrowinelist.com/byCountry/?Listing=\".$wine[\'WineCountry\'].\"\'>\".$wine[\'WineCountry\'].\"</a></td><td></td>\";  	\r\n    }\r\n\r\n  	\r\n\r\n\r\n}\r\n\r\n\r\necho \"</table>\";','[xyz-ips snippet=\"CountriesSingleColumn\"]',1),(8,'byGlassPHP','<?php\r\n\r\n\r\n$variable = \'Glass\';\r\n\r\n  $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n \r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\n$sortButton=\"\";\r\n$wineCount=0;\r\nfor($x=1; $x<=1; $x++){ \r\n\r\n$wineCount1=0;\r\nif($x==1){\r\n$sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1 AND WineType=\'Glass\' AND AvailableToday = -1 AND AvailableOnRequest = 0 AND AvailablePremium = 0 ORDER BY  WineType2, WinePrice\";\r\n      	$records1=mysqli_query($con, $sql);\r\n\r\n}\r\nelseif($x==2){\r\n\r\n$sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1 AND WineType=\'Glass\' AND AvailableToday = 0 AND AvailableOnRequest = 0 AND AvailablePremium = -1 ORDER BY WineType2, WinePrice\";\r\n      	$records1=mysqli_query($con, $sql);\r\n}\r\nelse{\r\n$sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1 AND WineType=\'Glass\' AND AvailableToday = 0 AND AvailableOnRequest = -1 AND AvailablePremium = 0 ORDER BY WineType2, WinePrice\";\r\n      	$records1=mysqli_query($con, $sql);\r\n\r\n}\r\n\r\nwhile($wines=mysqli_fetch_assoc($records1)){\r\n        if($wines[\'WineName\']!=\'Mimosa\'){\r\n        $wineCount=$wineCount+1;\r\n        $wineCount1=$wineCount1+1;\r\n}\r\n        if($wineCount1 == 1){\r\n            if($x==1){\r\n                      echo \"<p><span style=\'opacity: 1.0; font-weight: bold; font-size: 1.75em;\'>Today\'s Wine By the Glass (5 oz pour)</span></p>\";\r\n                    $opacity = 1.0;\r\n             }\r\n             elseif($x==2){\r\n                       echo \"<p><span style=\'opacity: 1.0; font-weight: bold; font-size: 1.75em;\'>Premium Wines By the Glass</span></p>\";\r\n                     $opacity = 1.0;\r\n             }\r\n             else{\r\n                     echo \"<p><span style=\'opacity: 0.5; font-weight: bold; font-size: 1.75em;\'>By the Glass (on request - 2 glass minimum)</span></p>\";\r\n                     $opacity = 0.5;\r\n              }\r\n         } 	\r\n          \r\n          if($wines[\'WineVintage\']==0){\r\n          	\r\n            $vintage=NULL;	\r\n          }\r\n          else{\r\n          	$vintage=$wines[\'WineVintage\'];\r\n          }\r\n            if($wines[\'QtyInStock\'] < 3 AND $wines[\'WineType\']!=\'Glass\'){\r\n          $lowStock = \"* \";\r\n          }\r\n          else{\r\n          $lowStock = \"\";\r\n           }\r\n          if($wines[\'WineSize\']<750 AND $wines[\'WineSize\']!=0){\r\n                $sizeinfo=\"&nbsp;(small bottle)\";\r\n          }\r\n          else{\r\n               $sizeinfo=\"\";\r\n          }	\r\n\r\nif ( wonderplugin_is_device(\'Windows,Mac,Linux,iPad\' )){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"singleitem-smallscreen/\";\r\n}\r\n \r\n\r\n           $wineID=\"<b><span style= \'opacity: \".$opacity.\";\'><a  href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byGlass&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></span></b>\";\r\n\r\n   echo \"<span style=\'font-size: 1.25em; text-align: left; width:85%; line-height: 150%; display: inline-block;\'>\".$wineID.\"</span>\";\r\n	        \r\n                 $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b><br>\";\r\n                 echo \"<span style=\'font-size: 1.25em; text-align: right; width:15%; line-height: 150%; display: inline-block;\'>\".$winePrice.\"</span><br>\"; \r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'].\"<br>\";\r\n                       echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineVarietal.\"</span><br>\";\r\n\r\n                  }\r\n	\r\n  		$wineCountry=$wines[\'WineCountry\'].\">\".$wines[\'WineRegion\'];\r\n             \r\n                 if(substr($wineCountry, strlen($wineCountry)-1,1)==\">\"){\r\n\r\n                       $wineCountry=substr($wineCountry, 0, strlen($wineCountry)-1);\r\n                }\r\n                      $wineCountry=$wineCountry.\"<br>\";\r\n\r\n		echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineCountry.\"</span><br>\";\r\n                        \r\n             \r\n                  echo \"<br>\"; \r\n    \r\n                \r\n        }\r\n        echo \"<br>\";\r\n}\r\n\r\n\r\necho \"<br><font size=\'-1\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). <br>BZ$2 = US$1<font>\";','[xyz-ips snippet=\"byGlassPHP\"]',1),(9,'VarietalsSingleColumn','<?php\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n \r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n// mysqli_select_db(\'WineList\'); \r\n$sql=\"SELECT DISTINCT Category FROM Wines2 WHERE QtyInStock > 0 AND OutOfStock = 0 AND Archived=0 AND LeaveOffMenu=0 AND WineType = \'Red\' ORDER BY Category\";\r\n \r\n$records = mysqli_query($con, $sql); \r\n\r\n$linecount = 1;\r\n$reds = array();\r\n$whites = array();\r\n$redCount=0;\r\n$whiteCount=0;\r\n\r\nwhile($wine=mysqli_fetch_assoc($records)){\r\n     if(!empty($wine[\'Category\'])){\r\n          $redCount = $redCount + 1;\r\n          $reds[$redCount] = $wine[\'Category\'];\r\n        \r\n    }\r\n}\r\n\r\n$sql=\"SELECT DISTINCT Category2 FROM Wines2 WHERE QtyInStock > 0 AND OutOfStock = 0 AND Archived = 0 AND LeaveOffMenu=0 AND WineType = \'Red\' ORDER BY Category2\";\r\n \r\n$records = mysqli_query($con, $sql); \r\nwhile($wine=mysqli_fetch_assoc($records)){\r\n     if(!empty($wine[\'Category2\'])){\r\n          $wineFound = 0;\r\n           for ($x = 1; $x <= $redCount; $x++) {\r\n                 if($reds[$x] == $wine[\'Category2\']){\r\n                  \r\n                        $wineFound = 1;\r\n                  }\r\n           }\r\n           if($wineFound == 0){\r\n              $redCount = $redCount + 1;\r\n              $reds[$redCount] = $wine[\'Category2\'];\r\n          }\r\n    }\r\n}\r\n\r\nsort($reds);\r\n\r\n\r\n\r\n\r\n\r\n\r\n$sql=\"SELECT DISTINCT Category FROM Wines2 WHERE QtyInStock > 0 AND OutOfStock = 0 AND Archived = 0 AND LeaveOffMenu=0  AND WineType = \'White\' ORDER BY Category\";\r\n \r\n$records = mysqli_query($con, $sql); \r\n\r\nwhile($wine=mysqli_fetch_assoc($records)){\r\n    if(!empty($wine[\'Category\'])){\r\n          $whiteCount = $whiteCount + 1;\r\n          $whites[$whiteCount] = $wine[\'Category\'];\r\n         //  echo $whites[$whiteCount];\r\n      }\r\n}\r\n\r\n$sql=\"SELECT DISTINCT Category2 FROM Wines2 WHERE QtyInStock > 0 AND OutOfStock = 0 AND Archived = 0 AND LeaveOffMenu=0  AND WineType = \'White\' ORDER BY Category2\";\r\n \r\n$records = mysqli_query($con, $sql); \r\nwhile($wine=mysqli_fetch_assoc($records)){\r\n     if(!empty($wine[\'Category2\'])){\r\n          $wineFound = 0;\r\n           for ($x = 1; $x <= $whiteCount; $x++) {\r\n                 if($whites[$x] == $wine[\'Category2\']){\r\n                  \r\n                        $wineFound = 1;\r\n                  }\r\n           }\r\n           if($wineFound == 0){\r\n              $whiteCount = $whiteCount + 1;\r\n              $whites[$whiteCount] = $wine[\'Category2\'];\r\n          }\r\n         //  echo $whites[$whiteCount];\r\n    }\r\n}\r\n\r\nsort($whites);\r\n\r\n\r\n\r\n\r\nif($whiteCount > $redCount){\r\n   $listItems = $whiteCount;\r\n}\r\nelse{\r\n   $listItems = $redCount;\r\n}\r\n\r\necho \"<body><table style=\'width: 97%; margin-left: 2%; margin-right: 2%;\'>\";\r\n       \r\n   //  echo \"<colgroup>\";\r\n   //  echo \"<col span=\'1\' style=\'width: 20em;\'>\";\r\n   // echo \"<col span=\'1\' style=\'width: 1em;\'>\";\r\n    // echo \"<col span=\'1\' style=\'width: 20em;\'>\";\r\n    // echo \"</colgroup>\";\r\n\r\necho \"<tr><td style=\'font-family: Open Sans; font-weight: 600; font-size: 1.5em; text-align: left;\'><a href=\'http:www.bistrowinelist.com/byprofile/?Listing=WhitePrice\'>Whites</a></td></tr>\";\r\n\r\n      for($x = 0; $x <= $whiteCount-1; $x++){\r\n                  \r\n           $whitestr = \"<td style=\'font-size: 1.5em; text-align: left;\'><a href=\'http://www.bistrowinelist.com/byVarietal/?Listing=\".$whites[$x].\"\'>\".$whites[$x].\"</a></td>\";\r\n           \r\n\r\n\r\n             echo \"<tr>\";\r\n             echo $whitestr;\r\n             echo \"</tr>\";\r\n             \r\n             \r\n\r\n      }\r\necho \"<tr></tr>\";\r\necho \"<tr><td style=\'font-family: Open Sans; font-weight: 600; font-size: 1.5em; text-align: left;\'><a href=\'http:www.bistrowinelist.com/byprofile/?Listing=RedPrice\'>Reds</a></td></tr>\";\r\n      for($x = 0; $x <= $redCount-1; $x++){\r\n       $redstr = \"<td style=\'font-size: 1.5em; text-align: left;\'><a href=\'http://www.bistrowinelist.com/byVarietal/?Listing=\".$reds[$x].\"\'>\".$reds[$x].\"</a></td>\";\r\necho \"<tr>\";\r\n\r\n             echo $redstr;\r\n             echo \"</tr>\";\r\n}\r\n\r\n\r\necho \"</table>\";\r\necho \"</body>\";','[xyz-ips snippet=\"VarietalsSingleColumn\"]',1),(10,'SelectDistinctFoods','<?php\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n \r\n$buttonset = False;\r\n$foods = array();\r\n$lunch = array();\r\n$dinner = array();\r\n$smallplates = array();\r\n$happyhour = array();\r\n$dessert = array();\r\n$breakfast = array();\r\n$lunchCount=0;\r\n$dinnerCount=0;\r\n$smallplateCount=0;\r\n$happyhourCount=0;\r\n$dessertCount=0;\r\n$breakfastCount=0;\r\n\r\n$foodCount = 0;\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n// mysqli_select_db(\'WineList\'); \r\n$sql=\"SELECT DISTINCT FoodPairing1 from Wines\";\r\n \r\n$records = mysqli_query($con, $sql); \r\n\r\nwhile($wine=mysqli_fetch_assoc($records)){\r\n    if(!empty($wine[\'FoodPairing1\'])){\r\n         $foodCount = $foodCount + 1;\r\n         $foods[$foodCount] = $wine[\'FoodPairing1\'];\r\n    }\r\n}\r\n$foodFound = False;\r\nfor ($x = 1; $x <= 7; $x++) {\r\n    $foodPairingNo =  \"FoodPairing\".$x;\r\n    $sql=\"SELECT DISTINCT \".$foodPairingNo.\" from Wines\";\r\n    $records = mysqli_query($con, $sql); \r\n    while($wine=mysqli_fetch_assoc($records)){\r\n        if(!empty($wine[$foodPairingNo])){\r\n              \r\n                for ($y = 1; $y <= $foodCount; $y++) {\r\n\r\n                       if($foods[$y]==$wine[$foodPairingNo]){\r\n                           $foodFound=True;\r\n                       }\r\n\r\n               }   \r\n              if($foodFound==False){\r\n                   $foodCount = $foodCount + 1; \r\n                    $foods[$foodCount] = $wine[$foodPairingNo];\r\n                    \r\n              }\r\n              $foodFound=False;\r\n\r\n       }\r\n    }\r\n}\r\n\r\n\r\n// echo $foodCount;\r\n\r\n\r\n\r\n$smallplatesCount = 1;\r\n\r\nfor ($x = 1; $x <= $foodCount; $x++) {\r\n\r\n    if(substr($foods[$x],0,2)==\"D:\"){\r\n    $dinnerCount = $dinnerCount + 1;\r\n    $dinner[$dinnerCount] = substr($foods[$x],-(strlen($foods[$x])-2));\r\n   }\r\n   else if(substr($foods[$x],0,2)==\"L:\"){\r\n         $lunchCount = $lunchCount + 1;\r\n        $lunch[$lunchCount] = substr($foods[$x],-(strlen($foods[$x])-2));\r\n   }\r\n   else if(substr($foods[$x],0,2)==\"Z:\"){\r\n         $dessertCount = $dessertCount + 1;\r\n        $dessert[$dessertCount] = substr($foods[$x],-(strlen($foods[$x])-2));\r\n   }\r\n   else if(substr($foods[$x],0,2)==\"S:\"){\r\n         $smallplateCount = $smallplateCount + 1;\r\n        $smallplates[$smallplateCount] = substr($foods[$x],-(strlen($foods[$x])-2));\r\n   }\r\n   else if(substr($foods[$x],0,2)==\"H:\"){\r\n         $happyhourCount = $happyhourCount + 1;\r\n        $happyhour[$happyhourCount] = substr($foods[$x],-(strlen($foods[$x])-2));\r\n   }\r\n else if(substr($foods[$x],0,2)==\"B:\"){\r\n         $breakfastCount = $breakfastCount + 1;\r\n        $breakfast[$breakfastCount] = substr($foods[$x],-(strlen($foods[$x])-2));\r\n   }\r\n\r\n}\r\nsort($lunch);\r\nsort($dinner);\r\nsort($happyhour);\r\nsort($smallplates);\r\nsort($dessert);\r\n\r\n//echo \"Lunch: \".$lunchCount.\"<br>\";\r\n//echo \"Dinner: \".$dinnerCount.\"<br>\";\r\n//echo \"Small Plates: \".$smallplateCount.\"<br>\";\r\n//echo \"Happy Hour: \".$happyhourCount.\"<br>\";\r\n//echo \"Dessert: \".$dessertCount.\"<br>\";\r\n\r\n$lineCount = max($lunchCount, $dinnerCount, $smallplateCount, $happyhourCount, $dessertCount);\r\n\r\n// echo $lineCount.\"<br>\";\r\n$lineCount1=0;\r\nif(wonderplugin_is_device(\'Windows\')){\r\n$extraColumn=\"<th></th>\";\r\n}\r\nelse{\r\n$extraColumn=\"\";\r\n}\r\necho \"<table style=\'margin-left: auto; margin-right: auto;\'>\";\r\necho \"<tr><th style=\'text-align: left; padding-left: 3em; font-size: 1.25em;\'>Lunch</th><th  style=\'text-align: left;  padding-left: 3em; font-size: 1.25em;\'>Small Plates</th>\".$extraColumn.\"<th  style=\'text-align: left;  padding-left: 3em; font-size: 1.25em;\'>Dinner</th></tr>\";\r\nfor ($x = 0; $x <= $lineCount-1; $x++) {\r\necho \"<tr>\";\r\n\r\n\r\nif($lunch[$x]!=\"\"){\r\n$lineCount1 = $lineCount1 + 1;\r\n$checkname = \"check\";  //.$lineCount1;\r\necho \"<td style = \'font-size: 1.2em;\'><input class=\'messageCheckbox\' type=\'checkbox\' value=\'L:\".$lunch[$x].\"\' name=\'check\'>&nbsp;\".$lunch[$x].\"</td>\";\r\n}\r\nelse{\r\necho \"<td></td>\";\r\n}\r\n\r\n\r\nif($smallplates[$smallplatesCount]!=\"\"){\r\n$lineCount1 = $lineCount1 + 1;\r\n\r\n$checkname = \"check\"; //.$lineCount1;\r\necho \"<td style = \'font-size: 1.2em;\'><input class=\'messageCheckbox\' type=\'checkbox\' value=\'S:\".$smallplates[$smallplatesCount].\"\' \r\nname=\'check\'>&nbsp;\".$smallplates[$smallplatesCount].\"</td>\";\r\n$smallplatesCount = $smallplatesCount + 1;\r\n}\r\nelse{\r\necho \"<td></td>\";\r\n}\r\n\r\nif(wonderplugin_is_device(\'Windows\')){\r\nif($smallplates[$smallplatesCount]!=\"\"){\r\necho \"<td style = \'font-size: 1.2em;\'><input class=\'messageCheckbox\' type=\'checkbox\' value=\'S:\".$smallplates[$smallplatesCount].\"\' name=\'check\'>&nbsp;\".$smallplates[$smallplatesCount].\"</td>\";\r\n$smallplatesCount = $smallplatesCount + 1;\r\n}\r\nelse{\r\necho \"<td></td>\";\r\n}\r\n}\r\n\r\nif($dinner[$x]!=\"\"){\r\n$lineCount1 = $lineCount1 + 1;\r\n$checkname = \"check\"; //.$lineCount1;\r\necho \"<td style = \'font-size: 1.2em;\'><input class=\'messageCheckbox\' type=\'checkbox\' value=\'D:\".$dinner[$x].\"\' name=\'check\'>&nbsp;\".$dinner[$x].\"</td>\";\r\n}\r\nelseif($buttonset==False){\r\necho \"<td style=\'text-align: center;\'><button onclick=\'test()\'>Find Wines</button></td>\";\r\n$buttonset=True;\r\n}\r\n\r\n\r\n\r\n// if($happyhour[$x]!=\"\"){\r\n// echo \"<td><input type=\'checkbox\' name=\'\".$happyhour[$x]. \" value=\'\".$happyhour[$x].\"\'>&nbsp;\".$happyhour[$x].\"</td>\";\r\n// }\r\n// else{\r\n// echo \"<td></td>\";\r\n// }\r\n\r\necho \"</tr>\";\r\n\r\n}\r\necho \"<tr><td></td><td>\";\r\n// echo \"<tr><td></td><td style=\'text-align: center;\'><button onclick=\'test()\'>Find Wines</button></td><td></td></tr>\";\r\n//$temp = \"[maxbutton name=\'ChooseWine\']\";\r\n//echo do_shortcode($temp);\r\necho \"</td><td></td></tr>\";\r\n\r\necho \"</table>\";','[xyz-ips snippet=\"SelectDistinctFoods\"]',1),(11,'DisplayFoodMatchPHP','<?php\r\n$food1 = $_GET[\'food1\'];\r\n$food2 = $_GET[\'food2\'];\r\n$food3 = $_GET[\'food3\'];\r\n$food4 = $_GET[\'food4\'];\r\n\r\n$food1 = str_replace(\"%20\",\" \",$food1);\r\n$food2 = str_replace(\"%20\",\" \",$food2);\r\n$food3 = str_replace(\"%20\",\" \",$food3);\r\n$food4 = str_replace(\"%20\",\" \",$food4);\r\n\r\n\r\n\r\n\r\n$score5 = \"[wpfa5s icon=\'fa-grin-stars\']\";\r\n$score4 = \"[wpfa5s icon=\'fa-grin-alt\']\";\r\n$score3 = \"[wpfa5r icon=\'fa-smile\']\";\r\n$score2 = \"[wpfa5r icon=\'fa-meh\']\";\r\n$score1 = \"[wpfa5s icon=\'fa-solid\']\";\r\n\r\n//$score5 = \"[icon name=\'heart\']\";\r\n//$score4 = \"[icon name=\'star\']\";\r\n//$score3 = \"[icon name=\'check-circle\']\";\r\n\r\n$score5color = \"#06cc27\";\r\n$score4color = \"#08d1d1\";\r\n$score3color = \"#04a3f2\";\r\n$score2color = \"#000000\";\r\n$score1color = \"#000000\";\r\n\r\n//$nocheck = \"[icon name=\'minus-circle\']\";\r\n$nocheck = \"[icon name=\'fa-fw\']\";\r\n\r\n\r\n//echo $food1.\"<br>\";\r\n//echo $food2.\"<br>\";\r\n//echo $food3.\"<br>\";\r\n//echo $food4.\"<br>\";\r\n\r\n\r\n  $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n \r\n//$food1 = \"D: Cocoa Pork\";\r\n//$food2 = \"S: Fish Cakes\";\r\n//$food3 = \"D: Grilled Fish Spicy Veg\";\r\n//$food4 = \"S: Churros\";\r\n\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\n\r\n$sql=\"SELECT * FROM Wines WHERE 1 = 1 \";\r\n\r\n$food1Wines = array();\r\n$food2Wines = array();\r\n$food3Wines = array();\r\n$food4Wines = array();\r\n$foodWines = array();      //two dimensional array 1= name, 2 = food1, 3 = food2, 4 = food3, 5 = food4, 6 = score, 7 = country, 8 = varietal, 9 = btl or glass, 10 = WineID, 11 = Price, 12 = food1 score, 13 = food2 score, 14 = food3 score, 15 = food4 score\r\n$winescore = array();\r\n$wineCountry = array();\r\n$wineVarietal = array();\r\n$wineType = array();\r\n\r\n\r\n$sql=\"SELECT * FROM Wines WHERE (WineType != \'Glass\' AND QtyInStock > 0) OR (WineType = \'Glass\' AND AvailableToday = -1)\";\r\n\r\n$records=mysqli_query($con, $sql);\r\n$wineCount = 0;\r\n\r\nwhile($wines=mysqli_fetch_assoc($records)){\r\n\r\n$wineCount = $wineCount + 1;\r\n$foodWines[$wineCount][1] = $wines[\'WineName\'];\r\n\r\n$foodWines[$wineCount][7]  = $wines[\'WineCountry\'];\r\n$foodWines[$wineCount][8] = $wines[\'WineVarietal\'];\r\n$foodWines[$wineCount][10] = $wines[\'ID\'];\r\n$foodWines[$wineCount][11] = $wines[\'WinePrice\'];\r\n\r\nif($wines[\'WineType\'] == \"Glass\"){\r\n$foodWines[$wineCount][6] = 100;\r\n$foodWines[$wineCount][9] = 0;\r\n}\r\nelse{\r\n$foodWines[$wineCount][6] = 0;\r\n$foodWines[$wineCount][9] = 1;\r\n}\r\n\r\n\r\n\r\nfor($x = 1; $x <= 15; $x++){\r\n\r\nif($food1!=\"\"){\r\n         if($wines[\'FoodPairing\'.$x]==$food1){\r\n          \r\n          $foodWines[$wineCount][12] = $wines[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][12]==6){\r\n           $foodWines[$wineCount][12]=5;\r\n          } \r\n          if($foodWines[$wineCount][12]==0 OR is_null($foodWines[$wineCount][12])){\r\n             $foodWines[$wineCount][12]=5; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][12];\r\n         }   \r\n}\r\n\r\nif($food2!=\"\"){\r\n         if($wines[\'FoodPairing\'.$x]==$food2){\r\n         $foodWines[$wineCount][13] = $wines[\'PairingValue\'.$x] * -1 + 6; \r\n         if($foodWines[$wineCount][13]==6){\r\n           $foodWines[$wineCount][13]=5;\r\n          } \r\n         if($foodWines[$wineCount][13]==0 OR is_null($foodWines[$wineCount][13])){\r\n             $foodWines[$wineCount][13]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][13];\r\n         }   \r\n}\r\n\r\nif($food3!=\"\"){\r\n         if($wines[\'FoodPairing\'.$x]==$food3){\r\n         $foodWines[$wineCount][14] = $wines[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][14]==6){\r\n           $foodWines[$wineCount][14]=5;\r\n          } \r\n         if($foodWines[$wineCount][14]==0 OR is_null($foodWines[$wineCount][14])){\r\n             $foodWines[$wineCount][14]=1; \r\n          }\r\n        $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][14];\r\n         }   \r\n}\r\nif($food4!=\"\"){\r\n         if($wines[\'FoodPairing\'.$x]==$food4){\r\n         $foodWines[$wineCount][15] = $wines[\'PairingValue\'.$x] * -1 + 6;\r\n          if($foodWines[$wineCount][15]==6){\r\n           $foodWines[$wineCount][15]=5;\r\n          } \r\n          if($foodWines[$wineCount][15]==0 OR is_null($foodWines[$wineCount][15])){\r\n             $foodWines[$wineCount][15]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][15];\r\n         }   \r\n   }   \r\n }\r\n  \r\n}\r\n\r\n if($foodWines[$wineCount][12] <3  AND  $foodWines[$wineCount][13] < 3 AND $foodWines[$wineCount][14] < 3 AND $foodWines[$wineCount][15] < 3){\r\n$wineCount=$wineCount - 1;\r\n}\r\n\r\nif($food1!=\"\"){\r\n$xfood1=substr($food1, (strlen($food1)-2)*-1);\r\n}\r\nif($food2!=\"\"){\r\n$xfood2=substr($food2, (strlen($food2)-2)*-1);\r\n}\r\nif($food3!=\"\"){\r\n$xfood3=substr($food3, (strlen($food3)-2)*-1);\r\n}\r\nif($food4!=\"\"){\r\n$xfood4=substr($food4, (strlen($food4)-2)*-1);\r\n}\r\n\r\n// sort($foodWines);\r\n//array_multisort($foodWines[6], SORT_DESC);\r\n\r\n//array_multisort($foodWines[6], SORT_DESC, SORT_NUMERIC, $foodWines[1], SORT_STRING, SORT_ASC);\r\n//var_dump($ar);\r\n\r\n\r\n// $winepos = array();\r\n//foreach ($foodWines as $foodWines) {\r\n//    $winepos[] = $foodWines[6];\r\n//}\r\n\r\n//array_multisort($winepos, SORT_DESC, $foodWines);\r\n\r\n//usort($foodWines, function ($a, $b) {\r\n//                  return strcmp($b[6], $a[6]);\r\n//              });\r\n\r\n\r\n\r\nforeach ($foodWines as $key => $row) {\r\n    $score[$key]  = $row[6];\r\n    $winePrice[$key] = $row[11];\r\n}\r\n\r\n// With the use of the column keys you can now sort entire array by these columns and keep the row index value intact if they are non-numeric. This is good if your using some kind of hashed index.\r\n\r\n\r\narray_multisort($score, SORT_DESC, $winePrice, SORT_DESC, $foodWines);\r\n\r\n// print_r($foodWines); //array dump. You will see that $data was resorted in the correct manner.\r\n\r\n\r\n\r\n\r\n\r\necho \"<table><tr><th style=\'text-align: left; font-size: 1.25em;\'></th>\";\r\n\r\nif($food1 != \"none\" AND $food1 != \"\"){\r\necho \"<th style=\'text-align: center;  font-size: 1.25em;\'>\".$xfood1.\"</th>\";\r\n}\r\n\r\nif($food2 != \"none\" AND $food2 != \"\"){\r\necho \"<th style=\'text-align: center;  font-size: 1.25em;\'>\".$xfood2.\"</th>\";\r\n}\r\n\r\nif($food3 != \"none\" AND $food3 != \"\"){\r\necho \"<th style=\'text-align: center;  font-size: 1.25em;\'>\".$xfood3.\"</th>\";\r\n}\r\n\r\nif($food4 != \"none\" AND $food4 != \"\"){\r\necho \"<th style=\'text-align: center;  font-size: 1.25em;\'>\".$xfood4.\"</th>\";\r\n}\r\n\r\n\r\necho \"</tr>\";\r\n\r\n\r\n\r\n\r\nif (wonderplugin_is_device(\'Windows,Mac,Linux,iPad\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n$GlassTitle = False;\r\n$BottleTitle = False;\r\n\r\n$food1 = str_replace(\"&\",\"%26\",$food1);\r\n$food2 = str_replace(\"&\",\"%26\",$food2);\r\n$food3 = str_replace(\"&\",\"%26\",$food3);\r\n$food4 = str_replace(\"&\",\"%26\",$food4);\r\n\r\n$wineNumber=0;\r\nfor($x = 0; $x <= $wineCount-1; $x++){\r\n\r\nif($x==0 AND $foodWines[$x][6] >100 AND $GlassTitle == False){\r\necho \"<tr><td style=\'text-align: left; font-size: 1.25em; font-weight: 700;\' >By the Glass</td></tr>\";\r\n$GlassTitle = True;\r\n}\r\nelseif($x!=0 AND $GlassTitle == True AND $BottleTitle == False AND $foodWines[$x][9] == 1){\r\n\r\necho \"<tr><td></td></tr><tr><td style=\'text-align: left; font-size: 1.25em; font-weight: 700;\' >By the Bottle</td></tr>\";\r\n$BottleTitle = True;\r\n}\r\n\r\nif(($foodWines[$x][6] < 100 AND $foodWines[$x][6] >=3) OR $foodWines[$x][6] >=103){\r\n   if($foodWines[$x][9] == 0){\r\n       $winePrice = \"$\".$foodWines[$x][11].\"/Glass\";\r\n    }\r\n    else{\r\n       $winePrice = \"$\".$foodWines[$x][11];\r\n     }    \r\n$wineNumber=$wineNumber+1;      \r\n           $wineID=\"<b><a href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$foodWines[$x][10].\"&listType=byFood&listName=Food&linkCount=1&food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"#wine\".$wineNumber.\"\'>\".$foodWines[$x][1].\"&emsp;\".$winePrice.\"</a></b>\";\r\n\r\n\r\necho \"<tr><td style=\'text-align: left; font-size: 1.2em;\' >\".$wineID.\"<br><font = \'-1\'>\".$foodWines[$x][7].\" / \".$foodWines[$x][8].\"</font></td>\";\r\n\r\nif($food1 != \"none\" AND $food1 != \"\"){\r\nif($foodWines[$x][12]==5){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score5color.\";\'>\".do_shortcode($score5).\"</td>\";\r\n}\r\nelseif($foodWines[$x][12]==4){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score4color.\";\'>\".do_shortcode($score4).\"</td>\";\r\n}\r\nelseif($foodWines[$x][12]==3){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score3color.\";\'>\".do_shortcode($score3).\"</td>\";\r\n}\r\nelse{\r\necho \"<td></td>\";\r\n}\r\n}\r\n\r\nif($food2 != \"none\" AND $food2 != \"\"){\r\nif($foodWines[$x][13]==5){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score5color.\";\'>\".do_shortcode($score5).\"</td>\";\r\n}\r\nelseif($foodWines[$x][13]==4){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score4color.\";\'>\".do_shortcode($score4).\"</td>\";\r\n}\r\nelseif($foodWines[$x][13]==3){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score3color.\";\'>\".do_shortcode($score3).\"</td>\";\r\n}\r\nelse{\r\necho \"<td></td>\";\r\n}\r\n}\r\n\r\n\r\nif($food3 != \"none\" AND $food3 != \"\"){\r\nif($foodWines[$x][14]==5){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score5color.\";\'>\".do_shortcode($score5).\"</td>\";\r\n}\r\nelseif($foodWines[$x][14]==4){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score4color.\";\'>\".do_shortcode($score4).\"</td>\";\r\n}\r\nelseif($foodWines[$x][14]==3){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score3color.\";\'>\".do_shortcode($score3).\"</td>\";\r\n}\r\nelse{\r\necho \"<td></td>\";\r\n}\r\n}\r\n\r\nif($food4 != \"none\" AND $food4 != \"\"){\r\nif($foodWines[$x][15]==5){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score5color.\";\'>\".do_shortcode($score5).\"</td>\";\r\n}\r\nelseif($foodWines[$x][15]==4){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score4color.\";\'>\".do_shortcode($score4).\"</td>\";\r\n}\r\nelseif($foodWines[$x][15]==3){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score3color.\";\'>\".do_shortcode($score3).\"</td>\";\r\n}\r\nelse{\r\necho \"<td></td>\";\r\n}\r\n}\r\n\r\n// echo \"<td style=\'text-align: center;  font-size: 1.5em;\'>\".$winescore[$x].\"</td>\";\r\n\r\necho \"</tr>\";\r\n\r\n}\r\n}\r\necho \"</table>\";','[xyz-ips snippet=\"DisplayFoodMatchPHP\"]',1),(12,'SingleItemFoodPHP','<?php\r\n$variable = $_GET[\'WineID\'];\r\n$listType = $_GET[\'listType\'];\r\n$linkCount = $_GET[\'linkCount\'];\r\n$food1 = $_GET[\'food1\'];\r\n$food2 = $_GET[\'food2\'];\r\n$food3 = $_GET[\'food3\'];\r\n$food4 = $_GET[\'food4\'];\r\n\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\nif (wonderplugin_is_device(\'iPhone\')){\r\n$singlePage=\"singleitem-smallscreen/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n// mysql_select_db(\'WineList\'); \r\n// mysqli_set_charset($con, $connection, \'utf8\');\r\n\r\nif($listType==\"byVarietal\"){\r\n      $sql=\"SELECT * FROM Wines WHERE (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE WineCountry = \'\".$listName.\"\' AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY CASE \r\n               WHEN WineType = \'Sparkling\' THEN 1\r\n               WHEN WineType = \'White\' THEN 2\r\n               WHEN WineType = \'Rose\' THEN 3\r\n               WHEN WineType = \'Red\' THEN 4\r\n               ELSE 5\r\n         END,  WinePrice\";\r\n          \r\n\r\n}\r\nelseif($listType==\"byProfile\"){\r\n\r\n      if($listName==\"WhitesAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock>0 ORDER BY WineName\";\r\n            $showName=\"All Whites A - Z\";\r\n            $listTypeName=\"White\";\r\n      }\r\n       elseif($listName==\"WhitePrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock>0 ORDER BY WinePrice\";\r\n            $showName=\"All Whites by Price\";\r\n            $listTypeName=\"White\";\r\n      }\r\n      elseif($listName==\"RedsAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock>0 ORDER BY WineName\";\r\n            $showName=\"All Reds A - Z\";\r\n            $listTypeName=\"Red\";\r\n      }\r\n      elseif($listName==\"RedPrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock>0 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red\";\r\n      }    \r\n      \r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byGlass\"){\r\n\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n     \r\n}\r\n\r\n// Now read all the wines using $sql and determine which is the previous and which is the next. These will be the url for the prev and \r\n// next buttons. Also need to add the listType and listName variables to the url so that this page can know how and what to display.\r\n       $IDarray=array();\r\n       $wineCount=0;\r\n      \r\n       // echo $sql;\r\n       $records1=mysqli_query($con, $sql);\r\n       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n            \r\n             $wineCount = $wineCount+1;\r\n             $IDarray[$wineCount]=$row1[\'ID\'];\r\n                  if($IDarray[$wineCount]==$variable){\r\n                          $offset= $wineCount;        // need to know how many to go back in browser history\r\n                  }\r\n             // echo $IDarray[$wineCount].\", \".$variable.\"<br>\";\r\n             \r\n\r\n       }\r\n       $offset=-1*($wineCount-$offset);\r\n\r\n     // echo $wineCount;\r\n       \r\n      for ($x = 1; $x <= $wineCount; $x++) {\r\n\r\n         if($IDarray[$x] == $variable){\r\n		if($x == 1){\r\n	\r\n		$prevID=0;\r\n		$currentID=$array[$x];\r\n		$nextID=$IDarray[$x+1];\r\n		}\r\n		elseif($x == $winecount){\r\n	\r\n		$prevID=$IDarray[$x-1];\r\n		$currentID=$array[$x];\r\n		$nextID=0;\r\n		}\r\n		else{\r\n		$prevID=$IDarray[$x-1];\r\n		$currentID=$array[$x];\r\n		$nextID=$IDarray[$x+1];\r\n	\r\n		}\r\n	}\r\n\r\n      }\r\n    \r\n\r\n      \r\n            // *disabled for now*  the first time this page is called we load all the urls for every wine in this profile, varietal or country\r\n            // into the browser history then jump to the page for the selected wine\r\n            // this allows the slider to scroll through all pages.\r\n            // the first page in the history will be the listing page that called this so you can swipe back to that.\r\n\r\n             //for ($x = 1; $x <= $wineCount; $x++) {\r\n               \r\n              //     $url=\"http://www.bistrowinelist.com/single-item?WineID=\".$IDarray[$x].\"&listType=\".$listType.\"&listName=\".$listName.\"&linkCount=2\";\r\n               //    echo \"<script>push(\'\".$url.\"\'); </script>\";\r\n                //  echo $url.\"<br>\";\r\n            // }\r\n  \r\n       \r\n \r\n// code here to assign $prevID and $nextID to the prev and next buttons\r\n\r\n\r\n\r\n\r\n   \r\n      if($prevID !=0){\r\n      $prevWine = \"[maxbutton name=\'Previous\' url=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$prevID.\"&listType=\".$listType.\"&listName=\".$listName.\"\']\";\r\n      }\r\n      else{\r\n             $prevWine=\"\";\r\n       }\r\n      \r\n      // $homeWine = \"[maxbutton id=\'3\' url=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\']\";\r\n     \r\n      if($linkCount==1){\r\n          $homeWine = \"[maxbutton name=\'back\']\";\r\n       }\r\n       else{\r\n\r\n          $homeWine = \"[maxbutton name=\'back\' url=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\']\";\r\n       }\r\n\r\n      if($nextID !=0){\r\n      $nextWine = \"[maxbutton name=\'Next\' url=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$nextID.\"&listType=\".$listType.\"&listName=\".$listName.\"\']\";\r\n            \r\n      }\r\n      else{\r\n      $nextWine=\"\";\r\n      }\r\n\r\n\r\n	$sql=\"SELECT * FROM Wines WHERE ID=\'\".$variable.\"\'\"; \r\n	$records=mysqli_query($con, $sql);\r\n\r\n    \r\n\r\nwhile ($row = mysqli_fetch_assoc($records)) {\r\n\r\n         if($listType==\"byCountry\"){\r\n\r\n               $listTypeName=$row[\'WineNationality\'];\r\n          \r\n\r\n         }\r\n         elseif($listType==\"byProfile\" AND $listTypeName!=\"\"){\r\n\r\n          // $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byProfile\" AND $listTypeName==\"\"){\r\n\r\n          $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byVarietal\"){\r\n          $listTypeName=$listName;\r\n        }\r\n\r\n\r\n//set to 500 now so it does not change - effectively disabling\r\n\r\n        if(strlen($row[\'WineName\'].\"&emsp\".$row[\'WineVintage\'])>500){\r\n         $nameFont=\"1.1em\";\r\n         }\r\n        else{\r\n        $nameFont=\"1.35em\";\r\n        }\r\n\r\n\r\n       if($listType==\'byCountry\'){\r\n\r\n           if($linkCount==1){\r\n              $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n           }\r\n           else{\r\n            $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n            }\r\n           \r\n             if($row[\'WineType\']==\'Rose\'){\r\n             $showName=$listName.\"&nbsp;(Rosé)\";\r\n             }\r\n             else{\r\n             $showName=$listName.\"&nbsp;(\".$row[\'WineType\']. \" Wines)\";\r\n             }\r\n        }\r\n        elseif($listType==\'byVarietal\'){\r\n                  $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n                 // $browsing=$wineCount+$offset.\" of \".$wineCount.\" \".$listTypeName;\r\n                  $showName=$listName;\r\n         }\r\n         elseif($listType==\'byProfile\' AND $showName==\"\"){\r\n            $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" </b></a>\";\r\n          //  $browsing=$wineCount+$offset.\" of \".$wineCount.\" \".$listTypeName;\r\n            $showName=$listName;\r\n         }\r\n         elseif($listType==\"byGlass\"){\r\n         $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b> Wines By The Glass</b></a>\";\r\n         // $browsing=$wineCount+$offset.\" of \".$wineCount.\" Wines By The Glass\";\r\n}\r\nif($browsing==\"\"){\r\n          $browsing=$wineCount+$offset.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n          // $browsing=$wineCount+$offset.\" of \".$wineCount.\" \".$listTypeName.\" Wines\";\r\n}\r\n        \r\n        echo \"<body>\";\r\n// display: flex; justify-content: center; align-items: center;\r\n \r\n// echo \"<span style=\' display: flex;  font-size: 0.8em; font-weight: normal; justify-content: center; align-items: center; padding-top: 0px;\'>\".$browsing.\" </span>\";\r\n\r\n\r\n        if (wonderplugin_is_device(\'Windows, Mac\')){\r\n        $bodytext=\"justify\";\r\n      \r\n       echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 84%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr>\";\r\n\r\n }\r\n      \r\n      \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"<br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; fonr-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"<br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n        else if(wonderplugin_is_device(\'iPad\')){\r\n\r\n  $bodytext=\"left\";\r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 30%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 69%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: normal;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr>\";\r\n\r\n }\r\n      \r\n      \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"</b><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"</b><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n      else if(wonderplugin_is_device(\'iPhone, Android\')){\r\n\r\n   $bodytext=\"left\";\r\n      \r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n\r\n//on small screen, spread the $browsing text and buttons across the whole screen , the price lines up with the first row on the description\r\n\r\n echo \"<table>\";\r\n\r\necho \"<tr><td style=\'display:block-inline; text-align: center; font-size: 1.1em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<table><tr><td style=\'display:block; text-align: center; font-size: 1.1em;  font-weight: bold; \'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n }\r\n      \r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 35%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 64%;\'>\";\r\n        echo \"</colgroup>\";  \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center; font-size: 1.25em;\'><b>\".$winePrice.\"</b><br><br><img style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"</b><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"</b><br>\";\r\n         }\r\n\r\n\r\n        }\r\n         \r\n\r\n         //  ///Common Code Here\r\n  	\r\n         if (strpos($row[\'WineName\'], $row[\'WineVarietal\']) !== false){\r\n              $varietalText=\"\";\r\n        }\r\n        else{\r\n               $varietalText=$row[\'WineVarietal\'];\r\n         }\r\n\r\n         if($varietalText!=\"\"){\r\n         echo \"</b>\".$varietalText;\r\n               echo \"<br>\";\r\n         }\r\n         else{\r\n        // echo \"<td style=\'vertical-align: top; padding-top: 0px; text-align: \".$bodytext.\"; padding-right: 5em; line-height: 1.75em\'>\";\r\n         }\r\n   \r\n    \r\n       echo \"<font size=\'+1\'><b>\".$row[\'WineCountry\'].\">\".$row[\'WineRegion\'].\"</b></font><br><br>\";\r\n    \r\nif($row[\'WineType\']!=\'Glass\'){   \r\n echo \"<font size=\'+1\'><b>In our Cellar: &nbsp;</b>\".$row[\'QtyInStock\'].\"<br><font>\";\r\n}\r\n\r\n    if (!empty($row[\'Eyes\'])) {\r\n       echo \"<font size=\'+1\'><b>Eyes: &nbsp;</b>\".$row[\'Eyes\'].\"</b><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($row[\'Nose\'])) {\r\n       echo \"<font size=\'+1\'><b>Nose: &nbsp;</b>\".$row[\'Nose\'].\"</b><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($row[\'Mouth\'])) {\r\n       echo \"<font size=\'+1\'><b>Mouth: &nbsp;</b>\".$row[\'Mouth\'].\"</b><br><font>\";\r\n      }\r\n   \r\n      if (!empty($row[\'AlcoholContent\']) AND $row[\'AlcoholContent\']!=0) {\r\n       echo \"<font size=\'+1\'><b>Alcohol Content: &nbsp;</b>\".$row[\'AlcoholContent\'].\"%</b><br><font>\";\r\n      }\r\n  	if (!empty($row[\'Desc3\'])) {\r\n       echo \"<font size=\'+1\'><b>Ratings: &nbsp;</b>\".$row[\'Desc3\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'Desc2\'])) {\r\n       echo \"<font size=\'+1\'><text align=\'justify\'><b>Why we like it: &nbsp;</b>\".$row[\'Desc2\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'PairingSuggestion\'])) {\r\n       echo \"<br><font size=\'+1\'><b>Pairs with: &nbsp;</b>\".$row[\'PairingSuggestion\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'Desc1\'])) {\r\n       echo \"<br><font size=\'+1\'><b>From the Winemaker: &nbsp;</b>\".$row[\'Desc1\'].\"</b><br><font>\";\r\n      }\r\n      echo \"<br><font size=\'-1\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1<font>\";\r\n    \r\n    echo \"</td>\";\r\n\r\n    // echo \"<td valign=\'top\' align=\'left\'>\";\r\n    // echo do_shortcode($nextWine);\r\n    // echo \"</td>\";\r\n\r\n  	echo \"</tr>\";\r\n	echo \"</table>\";\r\n    \r\n}\r\necho \"</body>\";','[xyz-ips snippet=\"SingleItemFoodPHP\"]',1),(13,'ContinuousDisplayPHP','<?php\r\n$variable = $_GET[\'WineID\'];\r\n$listType = $_GET[\'listType\'];\r\n$listName = $_GET[\'listName\'];\r\n$linkCount = $_GET[\'linkCount\'];\r\n$food1 = trim($_GET[\'food1\']);\r\n$food2 = trim($_GET[\'food2\']);\r\n$food3 = trim($_GET[\'food3\']);\r\n$food4 = trim($_GET[\'food4\']);\r\n$wineNumber = 0;\r\n\r\nif($food1!=\"\"){\r\n$xfood1=substr($food1, (strlen($food1)-2)*-1);\r\n}\r\nif($food2!=\"\"){\r\n$xfood2=substr($food2, (strlen($food2)-2)*-1);\r\n}\r\nif($food3!=\"\"){\r\n$xfood3=substr($food3, (strlen($food3)-2)*-1);\r\n}\r\nif($food4!=\"\"){\r\n$xfood4=substr($food4, (strlen($food4)-2)*-1);\r\n}\r\n\r\n\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\nif (wonderplugin_is_device(\'iPhone\')){\r\n$singlePage=\"singleitem-smallscreen/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n// mysql_select_db(\'WineList\'); \r\n// mysqli_set_charset($con, $connection, \'utf8\');\r\n\r\nif($listType==\"byVarietal\"){\r\n      $sql=\"SELECT * FROM Wines WHERE (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE WineCountry = \'\".$listName.\"\' AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY CASE \r\n               WHEN WineType = \'Sparkling\' THEN 1\r\n               WHEN WineType = \'White\' THEN 2\r\n               WHEN WineType = \'Rose\' THEN 3\r\n               WHEN WineType = \'Red\' THEN 4\r\n               ELSE 5\r\n         END,  WinePrice\";\r\n          \r\n\r\n}\r\nelseif($listType==\"byProfile\"){\r\n\r\n      if($listName==\"WhitesAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock>0 ORDER BY WineName\";\r\n            $showName=\"All Whites A - Z\";\r\n            $listTypeName=\"White\";\r\n      }\r\n       elseif($listName==\"WhitePrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock>0 ORDER BY WinePrice\";\r\n            $showName=\"All Whites by Price\";\r\n            $listTypeName=\"White\";\r\n      }\r\n      elseif($listName==\"RedsAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock>0 ORDER BY WineName\";\r\n            $showName=\"All Reds A - Z\";\r\n            $listTypeName=\"Red\";\r\n      }\r\n      elseif($listName==\"RedPrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock>0 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red\";\r\n      }    \r\n      \r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byGlass\"){\r\n\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n     \r\n}\r\nelseif($listType==\"byFood\"){\r\n\r\n$foodList = \"(\'\".$food1.\"\', \'\".$food2.\"\', \'\".$food3.\"\', \'\".$food4.\"\')\";\r\n\r\n$sql=\"SELECT * FROM Wines WHERE ((WineType != \'Glass\' AND QtyInStock >0) OR (WineType = \'Glass\' AND AvailableToday = -1))  AND (FoodPairing1 IN \".$foodList.\" OR FoodPairing2 IN \".$foodList.\" OR FoodPairing3 IN \".$foodList.\" OR FoodPairing4 IN \".$foodList.\" OR FoodPairing5 IN \".$foodList.\" OR FoodPairing6 IN \".$foodList.\" OR FoodPairing7 IN \".$foodList.\" OR FoodPairing8 IN \".$foodList.\" OR FoodPairing9 IN \".$foodList.\" OR FoodPairing10 IN \".$foodList.\"  OR FoodPairing11 IN \".$foodList.\"  OR FoodPairing12 IN \".$foodList.\"  OR FoodPairing13 IN \".$foodList.\"  OR FoodPairing14 IN \".$foodList.\"  OR FoodPairing15 IN \".$foodList.\")\";\r\n\r\n$showName=\"Food Pairings\";\r\n$listTypeName=\"Food Matches\";\r\n}\r\n\r\n\r\n\r\n// Read all wines to determine length of list.\r\n// Need to sort items based on match score (desc) then price (asc). Wines by the glass will appear first as they have 6 added\r\n// to the base score whereas other wines start at 0\r\n\r\n       $IDarray=array();\r\n       $wineCount=0;\r\n      $foodWines = array();      //two dimensional array 1= name, 2 = food1, 3 = food2, 4 = food3, 5 = food4, 6 = score, 7 = country, 8 = varietal, 9 = btl or glass, 10 = WineID, 11 = Price. 12 = Desc1, 13 = Desc2, 14= Desc3, 15 = Desc 4, 16 = Image1, 17= Image2, 18 = QtyInStock, 19 = Eyes, 20 = Nose, 21 = Mouth, 22 = Vintage, 23 = Alcohol Content, 24 = Pairing Suggestion \r\n\r\n\r\n       $records1=mysqli_query($con, $sql);\r\n       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n            \r\n      $wineCount = $wineCount+1;\r\n     if($listType==\"byFood\"){\r\n      $foodWines[$wineCount][1] = $wines[\'WineName\'];\r\n      $foodWines[$wineCount][6] = 0;\r\n      $foodWines[$wineCount][7]  = $wines[\'WineCountry\'];\r\n      $foodWines[$wineCount][8] = $wines[\'WineVarietal\'];\r\n      $foodWines[$wineCount][10] = $wines[\'ID\'];\r\n      $foodWines[$wineCount][11] = $wines[\'WinePrice\'];\r\n     \r\n      if($wines[\'WineType\'] == \"Glass\"){\r\n          $foodWines[$wineCount][6] = 6;\r\n          $foodWines[$wineCount][9] = 0;\r\n          }\r\n      else{\r\n            $foodWines[$wineCount][9] = 1;\r\n      }\r\n\r\nif($food1!=\"\"){\r\nif($wines[\'FoodPairing1\']==$food1 OR $wines[\'FoodPairing2\']==$food1 OR $wines[\'FoodPairing3\']==$food1 OR $wines[\'FoodPairing4\']==$food1 OR $wines[\'FoodPairing5\']==$food1 OR $wines[\'FoodPairing6\']==$food1 OR $wines[\'FoodPairing7\']==$food1 OR $wines[\'FoodPairing8\']==$food1 OR $wines[\'FoodPairing9\']==$food1 OR $wines[\'FoodPairing10\']==$food1 OR $wines[\'FoodPairing11\']==$food1 OR $wines[\'FoodPairing12\']==$food1 OR $wines[\'FoodPairing13\']==$food1 OR $wines[\'FoodPairing14\']==$food1 OR $wines[\'FoodPairing15\']==$food1){\r\n\r\n$foodWines[$wineCount][2] = \'Yes\';\r\n$foodWines[$wineCount][6] =$foodWines[$wineCount][6]+1;\r\n} \r\nelse{\r\n$foodWines[$wineCount][2] = \'No\';\r\n}\r\n}\r\n\r\nif($food2!=\"\"){\r\nif($wines[\'FoodPairing1\']==$food2 OR $wines[\'FoodPairing2\']==$food2 OR $wines[\'FoodPairing3\']==$food2 OR $wines[\'FoodPairing4\']==$food2 OR $wines[\'FoodPairing5\']==$food2 OR $wines[\'FoodPairing6\']==$food2 OR $wines[\'FoodPairing7\']==$food2 OR $wines[\'FoodPairing8\']==$food2 OR $wines[\'FoodPairing9\']==$food2 OR $wines[\'FoodPairing10\']==$food2 OR $wines[\'FoodPairing11\']==$food2 OR $wines[\'FoodPairing12\']==$food2 OR $wines[\'FoodPairing13\']==$food2 OR $wines[\'FoodPairing14\']==$food2 OR $wines[\'FoodPairing15\']==$food2){\r\n\r\n$foodWines[$wineCount][3] = \'Yes\';\r\n$foodWines[$wineCount][6] =$foodWines[$wineCount][6]+1;\r\n} \r\nelse{\r\n$foodWines[$wineCount][3] = \'No\';\r\n}\r\n}\r\n\r\nif($food3!=\"\"){\r\nif($wines[\'FoodPairing1\']==$food3 OR $wines[\'FoodPairing2\']==$food3 OR $wines[\'FoodPairing3\']==$food3 OR $wines[\'FoodPairing4\']==$food3 OR $wines[\'FoodPairing5\']==$food3 OR $wines[\'FoodPairing6\']==$food3 OR $wines[\'FoodPairing7\']==$food3 OR $wines[\'FoodPairing8\']==$food3 OR $wines[\'FoodPairing9\']==$food3 OR $wines[\'FoodPairing10\']==$food3 OR $wines[\'FoodPairing11\']==$food3 OR $wines[\'FoodPairing12\']==$food3 OR $wines[\'FoodPairing13\']==$food3 OR $wines[\'FoodPairing14\']==$food3 OR $wines[\'FoodPairing15\']==$food3){\r\n\r\n$foodWines[$wineCount][4] = \'Yes\';\r\n$foodWines[$wineCount][6] =$foodWines[$wineCount][6]+1;\r\n} \r\nelse{\r\n$foodWines[$wineCount][4] = \'No\';\r\n}\r\n}\r\n\r\nif($food4!=\"\"){\r\nif($wines[\'FoodPairing1\']==$food4 OR $wines[\'FoodPairing2\']==$food4 OR $wines[\'FoodPairing3\']==$food4 OR $wines[\'FoodPairing4\']==$food4 OR $wines[\'FoodPairing5\']==$food4 OR $wines[\'FoodPairing6\']==$food4 OR $wines[\'FoodPairing7\']==$food4 OR $wines[\'FoodPairing8\']==$food4 OR $wines[\'FoodPairing9\']==$food4 OR $wines[\'FoodPairing10\']==$food4 OR $wines[\'FoodPairing11\']==$food4 OR $wines[\'FoodPairing12\']==$food4 OR $wines[\'FoodPairing13\']==$food4 OR $wines[\'FoodPairing14\']==$food4 OR $wines[\'FoodPairing15\']==$food4){\r\n\r\n$foodWines[$wineCount][5] = \'Yes\';\r\n$foodWines[$wineCount][6] =$foodWines[$wineCount][6]+1;\r\n} \r\nelse{\r\n$foodWines[$wineCount][5] = \'No\';\r\n}\r\n}\r\n       \r\n//sort Array\r\n\r\nforeach ($foodWines as $key => $row) {\r\n    $score[$key]  = $row[6];\r\n    $winePrice[$key] = $row[11];\r\n}\r\n\r\n// With the use of the column keys you can now sort entire array by these columns and keep the row index value intact if they are non-numeric. This is good if your using some kind of hashed index.\r\n\r\narray_multisort($score, SORT_DESC, $winePrice, SORT_DESC, $foodWines);\r\n\r\n    \r\n       }\r\n\r\n}\r\n     // echo $wineCount;\r\n       \r\n\r\nif($listType!=\'byFood\'){\r\n\r\n\r\n   \r\n	$records=mysqli_query($con, $sql);\r\n\r\n         while ($row = mysqli_fetch_assoc($records)) {\r\n         $wineNumber=$wineNumber + 1;\r\n\r\n         if($listType==\"byCountry\"){\r\n\r\n               $listTypeName=$row[\'WineNationality\'];\r\n          \r\n\r\n         }\r\n         elseif($listType==\"byProfile\" AND $listTypeName!=\"\"){\r\n\r\n\r\n         }\r\n        elseif($listType==\"byProfile\" AND $listTypeName==\"\"){\r\n\r\n          $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byVarietal\"){\r\n          $listTypeName=$listName;\r\n        }\r\n\r\n\r\n       if($listType==\'byCountry\'){\r\n\r\n           if($linkCount==1){\r\n              $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n           }\r\n           else{\r\n            $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n            }\r\n           \r\n             if($row[\'WineType\']==\'Rose\'){\r\n             $showName=$listName.\"&nbsp;(Rosé)\";\r\n             }\r\n             else{\r\n             $showName=$listName.\"&nbsp;(\".$row[\'WineType\']. \" Wines)\";\r\n             }\r\n        }\r\n        elseif($listType==\'byVarietal\'){\r\n                  $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n\r\n                  $showName=$listName;\r\n         }\r\n         elseif($listType==\'byProfile\'){\r\n            $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" </b></a>\";\r\n\r\n            $showName=$listName;\r\n         }\r\n         elseif($listType==\"byGlass\"){\r\n         $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b> Wines By The Glass</b></a>\";\r\n\r\n         }\r\n         \r\n         elseif($listType==\"byFood\"){\r\n\r\n           $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/foodmatches/?food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\'><b> Food Matches</b></a>\";\r\n           \r\n          }\r\n\r\nif($browsing==\"\"){\r\n\r\n        // $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n        echo \"<body>\";\r\n\r\n\r\necho \"<a class=\'anchor\' id=\'wine\".$wineNumber.\"\'></a>\";\r\n\r\n//set to 500 now so it does not change - effectively disabling\r\n\r\n        if(strlen($row[\'WineName\'].\"&emsp\".$row[\'WineVintage\'])>500){\r\n         $nameFont=\"1.1em\";\r\n         }\r\n        else{\r\n        $nameFont=\"1.35em\";\r\n        }\r\n        \r\nif (wonderplugin_is_device(\'Windows, Mac\')){\r\n        $bodytext=\"justify\";\r\n     \r\n       echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 84%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n }\r\n      \r\n      \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"<br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; fonr-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"<br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n        else if(wonderplugin_is_device(\'iPad\')){\r\n\r\n  $bodytext=\"left\";\r\n      echo \"<table>\";\r\n\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 30%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 69%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: normal;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n }\r\n      \r\n      \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"</b><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"</b><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n      else if(wonderplugin_is_device(\'iPhone, Android\')){\r\n\r\n   $bodytext=\"left\";\r\n      \r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n\r\n//on small screen, spread the $browsing text and buttons across the whole screen , the price lines up with the first row on the description\r\n\r\n echo \"<table>\";\r\n\r\necho \"<tr><td style=\'display:block-inline; text-align: center; font-size: 1.1em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<table><tr><td style=\'display:block; text-align: center; font-size: 1.1em;  font-weight: bold; \'>\".$browsing.\"</td></tr></table>\";\r\n\r\n }\r\n      \r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 35%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 64%;\'>\";\r\n        echo \"</colgroup>\";  \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center; font-size: 1.25em;\'><b>\".$winePrice.\"</b><br><br><img style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"</b><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"</b><br>\";\r\n         }\r\n\r\n\r\n        }\r\n         \r\n\r\n         //  ///Common Code Here\r\n        \r\n\r\n         \r\n  	if($listType==\"byFood\"){\r\n\r\n $foodarray = array($row[\'FoodPairing1\'], $row[\'FoodPairing2\'], $row[\'FoodPairing3\'], $row[\'FoodPairing4\'], $row[\'FoodPairing5\'], $row[\'FoodPairing6\'], $row[\'FoodPairing7\'], );\r\n         $goodfoods = \"\";\r\n         $badfoods = \"\";\r\n\r\n          if(in_array($food1, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood1;\r\n           }\r\n           elseif($food1!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood1;\r\n            }\r\n\r\n           if(in_array($food2, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n           }\r\n           elseif($food2!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood2;\r\n            }\r\n\r\n   if(in_array($food3, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood4;\r\n            }\r\n            \r\n        if($goodfoods!=\"\"){\r\n        $goodfoods=substr($goodfoods, (strlen($goodfoods)-2)*-1);\r\n         echo \"<font size=\'+1\'><b>We suggest with: </b>\".$goodfoods.\"<br><font>\";\r\n        }\r\n\r\n//alternate good food list - show all food listed as pairing with this wine\r\n      \r\n\r\n\r\n\r\n\r\n\r\n        if($badfoods!=\"\"){\r\n        $badfoods=substr($badfoods, (strlen($badfoods)-2)*-1);\r\n // leave off for now    echo \"<font size=\'+1\'><b>Mabye not so good with: </b>\".$badfoods.\"<br><font>\";\r\n        }\r\n\r\n\r\n          \r\n\r\n         }\r\n         if (strpos($row[\'WineName\'], $row[\'WineVarietal\']) !== false){\r\n              $varietalText=\"\";\r\n        }\r\n        else{\r\n               $varietalText=$row[\'WineVarietal\'];\r\n         }\r\n\r\n         if($varietalText!=\"\"){\r\n         echo \"</b>\".$varietalText;\r\n               echo \"<br>\";\r\n         }\r\n         else{\r\n        // echo \"<td style=\'vertical-align: top; padding-top: 0px; text-align: \".$bodytext.\"; padding-right: 5em; line-height: 1.75em\'>\";\r\n         }\r\n   \r\n    \r\n       echo \"<font size=\'+1\'><b>\".$row[\'WineCountry\'].\">\".$row[\'WineRegion\'].\"</b></font><br><br>\";\r\n    \r\nif($row[\'WineType\']!=\'Glass\'){   \r\n echo \"<font size=\'+1\'><b>In our Cellar: &nbsp;</b>\".$row[\'QtyInStock\'].\"<br><font>\";\r\n}\r\n\r\n    if (!empty($row[\'Eyes\'])) {\r\n       echo \"<font size=\'+1\'><b>Eyes: &nbsp;</b>\".$row[\'Eyes\'].\"</b><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($row[\'Nose\'])) {\r\n       echo \"<font size=\'+1\'><b>Nose: &nbsp;</b>\".$row[\'Nose\'].\"</b><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($row[\'Mouth\'])) {\r\n       echo \"<font size=\'+1\'><b>Mouth: &nbsp;</b>\".$row[\'Mouth\'].\"</b><br><font>\";\r\n      }\r\n   \r\n      if (!empty($row[\'AlcoholContent\']) AND $row[\'AlcoholContent\']!=0) {\r\n       echo \"<font size=\'+1\'><b>Alcohol Content: &nbsp;</b>\".$row[\'AlcoholContent\'].\"%</b><br><font>\";\r\n      }\r\n  	if (!empty($row[\'Desc3\'])) {\r\n       echo \"<font size=\'+1\'><b>Ratings: &nbsp;</b>\".$row[\'Desc3\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'Desc2\'])) {\r\n       echo \"<font size=\'+1\'><text align=\'justify\'><b>Why we like it: &nbsp;</b>\".$row[\'Desc2\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'PairingSuggestion\'])) {\r\n       echo \"<br><font size=\'+1\'><b>Pairs with: &nbsp;</b>\".$row[\'PairingSuggestion\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'Desc1\'])) {\r\n       echo \"<br><font size=\'+1\'><b>From the Winemaker: &nbsp;</b>\".$row[\'Desc1\'].\"</b><br><font>\";\r\n      }\r\n      echo \"<br><font size=\'-1\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1<font>\";\r\n    \r\n    echo \"</td>\";\r\n\r\n    // echo \"<td valign=\'top\' align=\'left\'>\";\r\n    // echo do_shortcode($nextWine);\r\n    // echo \"</td>\";\r\n\r\n  	echo \"</tr>\";\r\n	echo \"</table>\";\r\n     echo \"<br><br><br><br>\";\r\n}\r\necho \"</body>\";\r\n\r\n}\r\nelse{\r\necho \"FOOD TEST\";\r\n}','[xyz-ips snippet=\"ContinuousDisplayPHP\"]',1),(14,'ContinuousDisplayPHP-1','<?php\r\n$variable = $_GET[\'WineID\'];\r\n$listType = $_GET[\'listType\'];\r\n$listName = $_GET[\'listName\'];\r\n$linkCount = $_GET[\'linkCount\'];\r\n$food1 = trim($_GET[\'food1\']);\r\n$food2 = trim($_GET[\'food2\']);\r\n$food3 = trim($_GET[\'food3\']);\r\n$food4 = trim($_GET[\'food4\']);\r\n$wineNumber = 0;\r\n\r\nif($food1!=\"\"){\r\n$xfood1=substr($food1, (strlen($food1)-2)*-1);\r\n}\r\nif($food2!=\"\"){\r\n$xfood2=substr($food2, (strlen($food2)-2)*-1);\r\n}\r\nif($food3!=\"\"){\r\n$xfood3=substr($food3, (strlen($food3)-2)*-1);\r\n}\r\nif($food4!=\"\"){\r\n$xfood4=substr($food4, (strlen($food4)-2)*-1);\r\n}\r\n\r\n\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\nif (wonderplugin_is_device(\'iPhone\')){\r\n$singlePage=\"singleitem-smallscreen/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n// mysql_select_db(\'WineList\'); \r\n// mysqli_set_charset($con, $connection, \'utf8\');\r\n\r\nif($listType==\"byVarietal\"){\r\n      $sql=\"SELECT * FROM Wines WHERE (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE WineCountry = \'\".$listName.\"\' AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY CASE \r\n               WHEN WineType = \'Sparkling\' THEN 1\r\n               WHEN WineType = \'White\' THEN 2\r\n               WHEN WineType = \'Rose\' THEN 3\r\n               WHEN WineType = \'Red\' THEN 4\r\n               ELSE 5\r\n         END,  WinePrice\";\r\n          \r\n\r\n}\r\nelseif($listType==\"byProfile\"){\r\n\r\n      if($listName==\"WhitesAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock>0 ORDER BY WineName\";\r\n            $showName=\"All Whites A - Z\";\r\n            $listTypeName=\"White\";\r\n      }\r\n       elseif($listName==\"WhitePrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock>0 ORDER BY WinePrice\";\r\n            $showName=\"All Whites by Price\";\r\n            $listTypeName=\"White\";\r\n      }\r\n      elseif($listName==\"RedsAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock>0 ORDER BY WineName\";\r\n            $showName=\"All Reds A - Z\";\r\n            $listTypeName=\"Red\";\r\n      }\r\n      elseif($listName==\"RedPrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock>0 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red\";\r\n      }    \r\n      \r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byGlass\"){\r\n\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n     \r\n}\r\nelseif($listType==\"byFood\"){\r\n\r\n$foodList = \"(\'\".$food1.\"\', \'\".$food2.\"\', \'\".$food3.\"\', \'\".$food4.\"\')\";\r\n\r\n$sql=\"SELECT * FROM Wines WHERE ((WineType != \'Glass\' AND QtyInStock >0) OR (WineType = \'Glass\' AND AvailableToday = -1))  AND (FoodPairing1 IN \".$foodList.\" OR FoodPairing2 IN \".$foodList.\" OR FoodPairing3 IN \".$foodList.\" OR FoodPairing4 IN \".$foodList.\" OR FoodPairing5 IN \".$foodList.\" OR FoodPairing6 IN \".$foodList.\" OR FoodPairing7 IN \".$foodList.\" OR FoodPairing8 IN \".$foodList.\" OR FoodPairing9 IN \".$foodList.\" OR FoodPairing10 IN \".$foodList.\"  OR FoodPairing11 IN \".$foodList.\"  OR FoodPairing12 IN \".$foodList.\"  OR FoodPairing13 IN \".$foodList.\"  OR FoodPairing14 IN \".$foodList.\"  OR FoodPairing15 IN \".$foodList.\")\";\r\n\r\n$showName=\"Food Pairings\";\r\n$listTypeName=\"Food Matches\";\r\n}\r\n\r\n\r\n\r\n// Read all wines to determine length of list.\r\n// Need to sort items based on match score (desc) then price (asc). Wines by the glass will appear first as they have 6 added\r\n// to the base score whereas other wines start at 0\r\n\r\n       $IDarray=array();\r\n       $wineCount=0;\r\n      $foodWines = array();      //two dimensional array 1= name, 2 = food1, 3 = food2, 4 = food3, 5 = food4, 6 = score, 7 = country, 8 = varietal, 9 = btl or glass, 10 = WineID, 11 = Price. 12 = Desc1, 13 = Desc2, 14= Desc3, 15 = Desc 4, 16 = Image1, 17= Image2, 18 = QtyInStock, 19 = Eyes, 20 = Nose, 21 = Mouth, 22 = Vintage, 23 = Alcohol Content, 24 = Pairing Suggestion , 25=Cases Produced\r\n\r\n\r\n       $records1=mysqli_query($con, $sql);\r\n       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n            \r\n      $wineCount = $wineCount+1;\r\n\r\n      $foodWines[$wineCount][1] = $row1[\'WineName\'];\r\n      $foodWines[$wineCount][6] = 0;\r\n      $foodWines[$wineCount][7]  = $row1[\'WineCountry\'];\r\n      $foodWines[$wineCount][8] = $row1[\'WineVarietal\'];\r\n      $foodWines[$wineCount][10] = $row1[\'ID\'];\r\n      $foodWines[$wineCount][11] = $row1[\'WinePrice\'];\r\n      $foodWines[$wineCount][12] = $row1[\'Desc1\'];\r\n      $foodWines[$wineCount][13] = $row1[\'Desc2\'];\r\n      $foodWines[$wineCount][14] = $row1[\'Desc3\'];\r\n      $foodWines[$wineCount][15] = $row1[\'Desc4\'];\r\n      $foodWines[$wineCount][16] = $row1[\'Image1\'];\r\n      $foodWines[$wineCount][17] = $row1[\'Image2\'];\r\n      $foodWines[$wineCount][18] = $row1[\'QtyInStock\'];\r\n      $foodWines[$wineCount][19] = $row1[\'Eyes\'];\r\n      $foodWines[$wineCount][20] = $row1[\'Nose\'];\r\n      $foodWines[$wineCount][21] = $row1[\'Mouth\'];\r\n      $foodWines[$wineCount][22] = $row1[\'Vintage\'];\r\n      $foodWines[$wineCount][23] = $row1[\'AlcoholContent\'];\r\n      $foodWines[$wineCount][24] = $row1[\'PairingSuggestion\'];\r\n      $foodWines[$wineCount][25] = $row1[\'CasesProduced\'];\r\n      $foodWines[$wineCount][26] = $row1[\'WineRegion\'];\r\n      $foodWines[$wineCount][27] = $row1[\'WineSubregion\'];\r\n      $foodWines[$wineCount][28] = $row1[\'WineNationality\'];      \r\n \r\n      if($row1[\'WineType\'] == \"Glass\"){\r\n          $foodWines[$wineCount][6] = 6;\r\n          $foodWines[$wineCount][9] = 0;\r\n          }\r\n      else{\r\n            $foodWines[$wineCount][9] = 1;\r\n      }\r\n\r\nif($food1!=\"\"){\r\nif($row1[\'FoodPairing1\']==$food1 OR $row1[\'FoodPairing2\']==$food1 OR $row1[\'FoodPairing3\']==$food1 OR $row1[\'FoodPairing4\']==$food1 OR $row1[\'FoodPairing5\']==$food1 OR $row1[\'FoodPairing6\']==$food1 OR $row1[\'FoodPairing7\']==$food1 OR $row1[\'FoodPairing8\']==$food1 OR $row1[\'FoodPairing9\']==$food1 OR $row1[\'FoodPairing10\']==$food1 OR $row1[\'FoodPairing11\']==$food1 OR $row1[\'FoodPairing12\']==$food1 OR $row1[\'FoodPairing13\']==$food1 OR $row1[\'FoodPairing14\']==$food1 OR $row1[\'FoodPairing15\']==$food1){\r\n\r\n$foodWines[$wineCount][2] = \'Yes\';\r\n$foodWines[$wineCount][6] =$foodWines[$wineCount][6]+1;\r\n} \r\nelse{\r\n$foodWines[$wineCount][2] = \'No\';\r\n}\r\n}\r\n\r\nif($food2!=\"\"){\r\nif($row1[\'FoodPairing1\']==$food2 OR $row1[\'FoodPairing2\']==$food2 OR $row1[\'FoodPairing3\']==$food2 OR $row1[\'FoodPairing4\']==$food2 OR $row1[\'FoodPairing5\']==$food2 OR $row1[\'FoodPairing6\']==$food2 OR $wines[\'FoodPairing7\']==$food2 OR $wines[\'FoodPairing8\']==$food2 OR $row1[\'FoodPairing9\']==$food2 OR $row1[\'FoodPairing10\']==$food2 OR $row1[\'FoodPairing11\']==$food2 OR $row1[\'FoodPairing12\']==$food2 OR $row1[\'FoodPairing13\']==$food2 OR $row1[\'FoodPairing14\']==$food2 OR $row1[\'FoodPairing15\']==$food2){\r\n\r\n$foodWines[$wineCount][3] = \'Yes\';\r\n$foodWines[$wineCount][6] =$foodWines[$wineCount][6]+1;\r\n} \r\nelse{\r\n$foodWines[$wineCount][3] = \'No\';\r\n}\r\n}\r\n\r\nif($food3!=\"\"){\r\nif($row1[\'FoodPairing1\']==$food3 OR $row1[\'FoodPairing2\']==$food3 OR $row1[\'FoodPairing3\']==$food3 OR $row1[\'FoodPairing4\']==$food3 OR $row1[\'FoodPairing5\']==$food3 OR $row1[\'FoodPairing6\']==$food3 OR $row1[\'FoodPairing7\']==$food3 OR $row1[\'FoodPairing8\']==$food3 OR $row1[\'FoodPairing9\']==$food3 OR $row1[\'FoodPairing10\']==$food3 OR $row1[\'FoodPairing11\']==$food3 OR $row1[\'FoodPairing12\']==$food3 OR $row1[\'FoodPairing13\']==$food3 OR $row1[\'FoodPairing14\']==$food3 OR $row1[\'FoodPairing15\']==$food3){\r\n\r\n$foodWines[$wineCount][4] = \'Yes\';\r\n$foodWines[$wineCount][6] =$foodWines[$wineCount][6]+1;\r\n} \r\nelse{\r\n$foodWines[$wineCount][4] = \'No\';\r\n}\r\n}\r\n\r\nif($food4!=\"\"){\r\nif($row1[\'FoodPairing1\']==$food4 OR $row1[\'FoodPairing2\']==$food4 OR $row1[\'FoodPairing3\']==$food4 OR $row1[\'FoodPairing4\']==$food4 OR $row1[\'FoodPairing5\']==$food4 OR $row1[\'FoodPairing6\']==$food4 OR $row1[\'FoodPairing7\']==$food4 OR $row1[\'FoodPairing8\']==$food4 OR $row1[\'FoodPairing9\']==$food4 OR $row1[\'FoodPairing10\']==$food4 OR $row1[\'FoodPairing11\']==$food4 OR $row1[\'FoodPairing12\']==$food4 OR $row1[\'FoodPairing13\']==$food4 OR $row1[\'FoodPairing14\']==$food4 OR $row1[\'FoodPairing15\']==$food4){\r\n\r\n$foodWines[$wineCount][5] = \'Yes\';\r\n$foodWines[$wineCount][6] =$foodWines[$wineCount][6]+1;\r\n} \r\nelse{\r\n$foodWines[$wineCount][5] = \'No\';\r\n}\r\n}\r\n       \r\n//sort Array\r\n\r\nforeach ($foodWines as $key => $row) {\r\n    $score[$key]  = $row[6];\r\n    $winePrice[$key] = $row[11];\r\n}\r\n\r\n// With the use of the column keys you can now sort entire array by these columns and keep the row index value intact if they are non-numeric. This is good if your using some kind of hashed index.\r\n\r\narray_multisort($score, SORT_DESC, $winePrice, SORT_DESC, $foodWines);\r\n\r\n    \r\n       }\r\n\r\n\r\n     // echo $wineCount;\r\n       \r\n\r\nif($listType!=\'byFood\'){\r\n   \r\n	$records=mysqli_query($con, $sql);\r\n\r\n         while ($row = mysqli_fetch_assoc($records)) {\r\n         $wineNumber=$wineNumber + 1;\r\n\r\n         if($listType==\"byCountry\"){\r\n\r\n               $listTypeName=$row[\'WineNationality\'];\r\n          \r\n\r\n         }\r\n         elseif($listType==\"byProfile\" AND $listTypeName!=\"\"){\r\n\r\n\r\n         }\r\n        elseif($listType==\"byProfile\" AND $listTypeName==\"\"){\r\n\r\n          $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byVarietal\"){\r\n          $listTypeName=$listName;\r\n        }\r\n\r\n\r\n       if($listType==\'byCountry\'){\r\n\r\n           if($linkCount==1){\r\n              $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n           }\r\n           else{\r\n            $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n            }\r\n           \r\n             if($row[\'WineType\']==\'Rose\'){\r\n             $showName=$listName.\"&nbsp;(Rosé)\";\r\n             }\r\n             else{\r\n             $showName=$listName.\"&nbsp;(\".$row[\'WineType\']. \" Wines)\";\r\n             }\r\n        }\r\n        elseif($listType==\'byVarietal\'){\r\n                  $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n\r\n                  $showName=$listName;\r\n         }\r\n         elseif($listType==\'byProfile\'){\r\n            $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" </b></a>\";\r\n\r\n            $showName=$listName;\r\n         }\r\n         elseif($listType==\"byGlass\"){\r\n         $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b> Wines By The Glass</b></a>\";\r\n\r\n         }\r\n         \r\n         elseif($listType==\"byFood\"){\r\n\r\n           $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/foodmatches/?food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\'><b> Food Matches</b></a>\";\r\n           \r\n          }\r\n\r\nif($browsing==\"\"){\r\n\r\n        // $browsing=$wineNumber.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n        echo \"<body>\";\r\n\r\n\r\necho \"<a class=\'anchor\' id=\'wine\".$wineNumber.\"\'></a>\";\r\n\r\n//set to 500 now so it does not change - effectively disabling\r\n\r\n        if(strlen($row[\'WineName\'].\"&emsp\".$row[\'WineVintage\'])>500){\r\n         $nameFont=\"1.1em\";\r\n         }\r\n        else{\r\n        $nameFont=\"1.35em\";\r\n        }\r\n        \r\nif (wonderplugin_is_device(\'Windows, Mac\')){\r\n        $bodytext=\"justify\";\r\n     \r\n       echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 84%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n }\r\n      \r\n      \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"<br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; fonr-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"<br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n        else if(wonderplugin_is_device(\'iPad\')){\r\n\r\n  $bodytext=\"left\";\r\n      echo \"<table>\";\r\n\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 30%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 69%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: normal;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n }\r\n      \r\n      \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"</b><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"</b><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n      else if(wonderplugin_is_device(\'iPhone, Android\')){\r\n\r\n   $bodytext=\"left\";\r\n      \r\n\r\n\r\n        if($row[\'WineType\']==\"Glass\"){\r\n        $winePrice = \"<b>$\".$row[\'WinePrice\'].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$row[\'WinePrice\'].\"</b>\";\r\n        }\r\n\r\n       if($linkCount==1){\r\n\r\n\r\n//on small screen, spread the $browsing text and buttons across the whole screen , the price lines up with the first row on the description\r\n\r\n echo \"<table>\";\r\n\r\necho \"<tr><td style=\'display:block-inline; text-align: center; font-size: 1.1em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n }\r\nelse{\r\n\r\necho \"<table><tr><td style=\'display:block; text-align: center; font-size: 1.1em;  font-weight: bold; \'>\".$browsing.\"</td></tr></table>\";\r\n\r\n }\r\n      \r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 35%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 64%;\'>\";\r\n        echo \"</colgroup>\";  \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center; font-size: 1.25em;\'><b>\".$winePrice.\"</b><br><br><img style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$row[\'Image1\'].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"&emsp; \".$row[\'WineVintage\'].\"</b><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$row[\'WineName\'].\"</b><br>\";\r\n         }\r\n\r\n\r\n        }\r\n         \r\n\r\n         //  ///Common Code Here\r\n        \r\n\r\n         \r\n  	if($listType==\"byFood\"){\r\n\r\n $foodarray = array($row[\'FoodPairing1\'], $row[\'FoodPairing2\'], $row[\'FoodPairing3\'], $row[\'FoodPairing4\'], $row[\'FoodPairing5\'], $row[\'FoodPairing6\'], $row[\'FoodPairing7\'], );\r\n         $goodfoods = \"\";\r\n         $badfoods = \"\";\r\n\r\n          if(in_array($food1, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood1;\r\n           }\r\n           elseif($food1!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood1;\r\n            }\r\n\r\n           if(in_array($food2, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n           }\r\n           elseif($food2!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood2;\r\n            }\r\n\r\n   if(in_array($food3, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood4;\r\n            }\r\n            \r\n        if($goodfoods!=\"\"){\r\n        $goodfoods=substr($goodfoods, (strlen($goodfoods)-2)*-1);\r\n         echo \"<font size=\'+1\'><b>We suggest with: </b>\".$goodfoods.\"<br><font>\";\r\n        }\r\n\r\n//alternate good food list - show all food listed as pairing with this wine\r\n      \r\n\r\n\r\n\r\n\r\n\r\n        if($badfoods!=\"\"){\r\n        $badfoods=substr($badfoods, (strlen($badfoods)-2)*-1);\r\n // leave off for now    echo \"<font size=\'+1\'><b>Mabye not so good with: </b>\".$badfoods.\"<br><font>\";\r\n        }\r\n\r\n\r\n          \r\n\r\n         }\r\n         if (strpos($row[\'WineName\'], $row[\'WineVarietal\']) !== false){\r\n              $varietalText=\"\";\r\n        }\r\n        else{\r\n               $varietalText=$row[\'WineVarietal\'];\r\n         }\r\n\r\n         if($varietalText!=\"\"){\r\n         echo \"</b>\".$varietalText;\r\n               echo \"<br>\";\r\n         }\r\n         else{\r\n        // echo \"<td style=\'vertical-align: top; padding-top: 0px; text-align: \".$bodytext.\"; padding-right: 5em; line-height: 1.75em\'>\";\r\n         }\r\n   \r\n    \r\n       echo \"<font size=\'+1\'><b>\".$row[\'WineCountry\'].\">\".$row[\'WineRegion\'].\"</b></font><br><br>\";\r\n    \r\nif($row[\'WineType\']!=\'Glass\'){   \r\n echo \"<font size=\'+1\'><b>In our Cellar: &nbsp;</b>\".$row[\'QtyInStock\'].\"<br><font>\";\r\n}\r\n\r\n    if (!empty($row[\'Eyes\'])) {\r\n       echo \"<font size=\'+1\'><b>Eyes: &nbsp;</b>\".$row[\'Eyes\'].\"</b><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($row[\'Nose\'])) {\r\n       echo \"<font size=\'+1\'><b>Nose: &nbsp;</b>\".$row[\'Nose\'].\"</b><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($row[\'Mouth\'])) {\r\n       echo \"<font size=\'+1\'><b>Mouth: &nbsp;</b>\".$row[\'Mouth\'].\"</b><br><font>\";\r\n      }\r\n   \r\n      if (!empty($row[\'AlcoholContent\']) AND $row[\'AlcoholContent\']!=0) {\r\n       echo \"<font size=\'+1\'><b>Alcohol Content: &nbsp;</b>\".$row[\'AlcoholContent\'].\"%</b><br><font>\";\r\n      }\r\n  	if (!empty($row[\'Desc3\'])) {\r\n       echo \"<font size=\'+1\'><b>Ratings: &nbsp;</b>\".$row[\'Desc3\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'Desc2\'])) {\r\n       echo \"<font size=\'+1\'><text align=\'justify\'><b>Why we like it: &nbsp;</b>\".$row[\'Desc2\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'PairingSuggestion\'])) {\r\n       echo \"<br><font size=\'+1\'><b>Pairs with: &nbsp;</b>\".$row[\'PairingSuggestion\'].\"</b><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($row[\'Desc1\'])) {\r\n       echo \"<br><font size=\'+1\'><b>From the Winemaker: &nbsp;</b>\".$row[\'Desc1\'].\"</b><br><font>\";\r\n      }\r\n      echo \"<br><font size=\'-1\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1<font>\";\r\n    \r\n    echo \"</td>\";\r\n\r\n    // echo \"<td valign=\'top\' align=\'left\'>\";\r\n    // echo do_shortcode($nextWine);\r\n    // echo \"</td>\";\r\n\r\n  	echo \"</tr>\";\r\n	echo \"</table>\";\r\n     echo \"<br><br><br><br>\";\r\n}\r\necho \"</body>\";\r\n\r\n}\r\nelse{\r\n\r\n for($x = 0; $x <= $wineCount-1; $x++){\r\n        $y=$x+1;\r\n        if($listType==\"byCountry\"){\r\n\r\n               $listTypeName=$foodWines[$x][28];\r\n          \r\n\r\n         }\r\n         elseif($listType==\"byProfile\" AND $listTypeName!=\"\"){\r\n\r\n\r\n         }\r\n        elseif($listType==\"byProfile\" AND $listTypeName==\"\"){\r\n\r\n          $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byVarietal\"){\r\n          $listTypeName=$listName;\r\n        }\r\n\r\n\r\n       if($listType==\'byCountry\'){\r\n\r\n         \r\n              $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n           \r\n           \r\n             if($row[\'WineType\']==\'Rose\'){\r\n             $showName=$listName.\"&nbsp;(Rosé)\";\r\n             }\r\n             else{\r\n             $showName=$listName.\"&nbsp;(\".$row[\'WineType\']. \" Wines)\";\r\n             }\r\n        }\r\n        elseif($listType==\'byVarietal\'){\r\n                  $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n\r\n                  $showName=$listName;\r\n         }\r\n         elseif($listType==\'byProfile\'){\r\n            $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" </b></a>\";\r\n\r\n            $showName=$listName;\r\n         }\r\n         elseif($listType==\"byGlass\"){\r\n         $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b> Wines By The Glass</b></a>\";\r\n\r\n         }\r\n         \r\n         elseif($listType==\"byFood\"){\r\n\r\n           $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/foodmatches/?food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\'><b> Food Matches</b></a>\";\r\n           \r\n          }\r\n\r\nif($browsing==\"\"){\r\n\r\n        //$browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n        echo \"<body>\";\r\n\r\n\r\necho \"<a class=\'anchor\' id=\'wine\".$y.\"\'></a>\";\r\necho $foodWines[$x][1].\"<br>\";\r\necho $browsing.\"<br>\";\r\n}\r\n}','[xyz-ips snippet=\"ContinuousDisplayPHP-1\"]',1),(15,'ContinuousDisplayPHP-2','<?php\r\n$variable = $_GET[\'WineID\'];\r\n$listType = $_GET[\'listType\'];\r\n$listName = $_GET[\'listName\'];\r\n$linkCount = $_GET[\'linkCount\'];\r\n$food1 = trim($_GET[\'food1\']);\r\n$food2 = trim($_GET[\'food2\']);\r\n$food3 = trim($_GET[\'food3\']);\r\n$food4 = trim($_GET[\'food4\']);\r\n$wineNumber = 0;\r\n\r\nif($food1!=\"\"){\r\n$xfood1=substr($food1, (strlen($food1)-2)*-1);\r\n}\r\nif($food2!=\"\"){\r\n$xfood2=substr($food2, (strlen($food2)-2)*-1);\r\n}\r\nif($food3!=\"\"){\r\n$xfood3=substr($food3, (strlen($food3)-2)*-1);\r\n}\r\nif($food4!=\"\"){\r\n$xfood4=substr($food4, (strlen($food4)-2)*-1);\r\n}\r\n\r\n\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\nif (wonderplugin_is_device(\'iPhone\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\n\r\nif($listType==\"byVarietal\"){\r\n      $sql=\"SELECT * FROM Wines WHERE (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE WineCountry = \'\".$listName.\"\' AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY CASE \r\n               WHEN WineType = \'Sparkling\' THEN 1\r\n               WHEN WineType = \'White\' THEN 2\r\n               WHEN WineType = \'Rose\' THEN 3\r\n               WHEN WineType = \'Red\' THEN 4\r\n               ELSE 5\r\n         END,  WinePrice\";\r\n          \r\n\r\n}\r\nelseif($listType==\"byProfile\"){\r\n\r\n      if($listName==\"WhitesAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock>0 ORDER BY WineName\";\r\n            $showName=\"All Whites A - Z\";\r\n            $listTypeName=\"White\";\r\n      }\r\n       elseif($listName==\"WhitePrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock>0 ORDER BY WinePrice\";\r\n            $showName=\"All Whites by Price\";\r\n            $listTypeName=\"White\";\r\n      }\r\n      elseif($listName==\"RedsAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock>0 ORDER BY WineName\";\r\n            $showName=\"All Reds A - Z\";\r\n            $listTypeName=\"Red\";\r\n      }\r\n      elseif($listName==\"RedPrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock>0 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red\";\r\n      }    \r\n      \r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND QtyInStock>0 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byGlass\"){\r\n\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n     \r\n}\r\nelseif($listType==\"byFood\"){\r\n\r\n$foodList = \"(\'\".$food1.\"\', \'\".$food2.\"\', \'\".$food3.\"\', \'\".$food4.\"\')\";\r\n\r\n$sql=\"SELECT * FROM Wines WHERE ((WineType != \'Glass\' AND QtyInStock >0) OR (WineType = \'Glass\' AND AvailableToday = -1))  AND (FoodPairing1 IN \".$foodList.\" OR FoodPairing2 IN \".$foodList.\" OR FoodPairing3 IN \".$foodList.\" OR FoodPairing4 IN \".$foodList.\" OR FoodPairing5 IN \".$foodList.\" OR FoodPairing6 IN \".$foodList.\" OR FoodPairing7 IN \".$foodList.\" OR FoodPairing8 IN \".$foodList.\" OR FoodPairing9 IN \".$foodList.\" OR FoodPairing10 IN \".$foodList.\"  OR FoodPairing11 IN \".$foodList.\"  OR FoodPairing12 IN \".$foodList.\"  OR FoodPairing13 IN \".$foodList.\"  OR FoodPairing14 IN \".$foodList.\"  OR FoodPairing15 IN \".$foodList.\")\";\r\n\r\n$showName=\"Food Pairings\";\r\n$listTypeName=\"Food Matches\";\r\n}\r\n\r\n\r\n\r\n// Read all wines to determine length of list.\r\n// Need to sort items based on match score (desc) then price (asc). Wines by the glass will appear first as they have 6 added\r\n// to the base score whereas other wines start at 0\r\n\r\n       $IDarray=array();\r\n       $wineCount=0;\r\n      $foodWines = array();      //two dimensional array 1= name, 2 = food1, 3 = food2, 4 = food3, 5 = food4, 6 = score, 7 = country, 8 = varietal, 9 = btl or glass, 10 = WineID, 11 = Price. 12 = Desc1, 13 = Desc2, 14= Desc3, 15 = Desc 4, 16 = Image1, 17= Image2, 18 = QtyInStock, 19 = Eyes, 20 = Nose, 21 = Mouth, 22 = Vintage, 23 = Alcohol Content, 24 = Pairing Suggestion , 25=Cases Produced, 26 = WineRegion, 27 = Wine Subregion, 28 = Nationality\r\n\r\n\r\n       $records1=mysqli_query($con, $sql);\r\n       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n            \r\n      $wineCount = $wineCount+1;\r\n\r\n      $foodWines[$wineCount][1] = $row1[\'WineName\'];\r\n      $foodWines[$wineCount][6] = 0;\r\n      $foodWines[$wineCount][7]  = $row1[\'WineCountry\'];\r\n      $foodWines[$wineCount][8] = $row1[\'WineVarietal\'];\r\n      $foodWines[$wineCount][10] = $row1[\'ID\'];\r\n      $foodWines[$wineCount][11] = $row1[\'WinePrice\'];\r\n      $foodWines[$wineCount][12] = $row1[\'Desc1\'];\r\n      $foodWines[$wineCount][13] = $row1[\'Desc2\'];\r\n      $foodWines[$wineCount][14] = $row1[\'Desc3\'];\r\n      $foodWines[$wineCount][15] = $row1[\'Desc4\'];\r\n      $foodWines[$wineCount][16] = $row1[\'Image1\'];\r\n      $foodWines[$wineCount][17] = $row1[\'Image2\'];\r\n      $foodWines[$wineCount][18] = $row1[\'QtyInStock\'];\r\n      $foodWines[$wineCount][19] = $row1[\'Eyes\'];\r\n      $foodWines[$wineCount][20] = $row1[\'Nose\'];\r\n      $foodWines[$wineCount][21] = $row1[\'Mouth\'];\r\n      $foodWines[$wineCount][22] = $row1[\'Vintage\'];\r\n      $foodWines[$wineCount][23] = $row1[\'AlcoholContent\'];\r\n      $foodWines[$wineCount][24] = $row1[\'PairingSuggestion\'];\r\n      $foodWines[$wineCount][25] = $row1[\'CasesProduced\'];\r\n      $foodWines[$wineCount][26] = $row1[\'WineRegion\'];\r\n      $foodWines[$wineCount][27] = $row1[\'WineSubregion\'];\r\n      $foodWines[$wineCount][28] = $row1[\'WineNationality\'];  \r\n      $foodWines[$wineCount][29] = $row1[\'WineType\'];    \r\n \r\n      if( $foodWines[$wineCount][29] == \"Glass\"){\r\n          $foodWines[$wineCount][6] = 6;\r\n          $foodWines[$wineCount][9] = 0;\r\n          }\r\n      else{\r\n            $foodWines[$wineCount][9] = 1;\r\n      }\r\nif($listType == \'byFood\'){\r\n\r\n// only sort the array if this is a food match selection\r\n\r\n$minPairing = 0;\r\n\r\n\r\n       \r\n//sort Array\r\n\r\n\r\n\r\nforeach ($foodWines as $key => $row) {\r\n    $score[$key]  = $row[6];\r\n    $winePrice[$key] = $row[11];\r\n}\r\n\r\n// With the use of the column keys you can now sort entire array by these columns and keep the row index value intact if they are non-numeric. This is good if your using some kind of hashed index.\r\n\r\narray_multisort($score, SORT_DESC, $winePrice, SORT_DESC, $foodWines);\r\n\r\n    \r\n       }\r\n}\r\n\r\n     // echo $wineCount;\r\n       \r\nif($listType == \'byFood\'){\r\n$xstart = 0;\r\n$totalWines = $wineCount-1;\r\n}\r\nelse{\r\n$xstart = 1;\r\n$totalWines = $wineCount;\r\n\r\n}\r\n\r\n\r\n\r\n for($x = $xstart; $x <= $totalWines; $x++){\r\n\r\nif($listType == \'byFood\'){\r\n$y=$x+1;\r\n}\r\nelse{\r\n$y=$x;\r\n}       \r\n\r\n   if($listType==\"byCountry\"){\r\n\r\n               $listTypeName=$foodWines[$x][28];\r\n          \r\n\r\n         }\r\n         elseif($listType==\"byProfile\" AND $listTypeName!=\"\"){\r\n\r\n\r\n         }\r\n        elseif($listType==\"byProfile\" AND $listTypeName==\"\"){\r\n\r\n          $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byVarietal\"){\r\n          $listTypeName=$listName;\r\n        }\r\n\r\n\r\n       if($listType==\'byCountry\'){\r\n\r\n              $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n\r\n\r\n           \r\n             if($foodWines[$x][29]==\'Rose\'){\r\n             $showName=$listName.\"&nbsp;(Rosé)\";\r\n             }\r\n             else{\r\n             $showName=$listName.\"&nbsp;(\".$foodWines[$x][29]. \" Wines)\";\r\n             }\r\n        }\r\n        elseif($listType==\'byVarietal\'){\r\n                  $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n\r\n                  $showName=$listName;\r\n         }\r\n         elseif($listType==\'byProfile\'){\r\n            $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" </b></a>\";\r\n\r\n            $showName=$listName;\r\n         }\r\n         elseif($listType==\"byGlass\"){\r\n         $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b> Wines By The Glass</b></a>\";\r\n\r\n         }\r\n         \r\n         elseif($listType==\"byFood\"){\r\n\r\n           $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/foodmatches/?food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\'><b> Food Matches</b></a>\";\r\n           \r\n          }\r\n\r\nif($browsing==\"\"){\r\n\r\n        $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n        echo \"<body>\";\r\n\r\n\r\necho \"<a class=\'anchor\' id=\'wine\".$y.\"\'></a>\";\r\n\r\n//set to 500 now so it does not change - effectively disabling\r\n\r\n        if(strlen($foodWines[$x][1].\"&emsp\".$foodWines[$x][22])>500){\r\n         $nameFont=\"1.1em\";\r\n         }\r\n        else{\r\n        $nameFont=\"1.35em\";\r\n        }\r\n\r\n  if($foodWines[$x][29] == \'Glass\'){\r\n        $winePrice = \"<b>$\".$foodWines[$x][11].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$foodWines[$x][11].\"</b>\";\r\n        }\r\n        \r\nif (wonderplugin_is_device(\'Windows, Mac\')){\r\n        $bodytext=\"justify\";\r\n     \r\n       echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 84%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n      \r\n\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n\r\n\r\n      \r\n      \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"<br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; fonr-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$foodWines[$x][1].\"<br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n        else if(wonderplugin_is_device(\'iPad\')){\r\n\r\n  $bodytext=\"left\";\r\n      echo \"<table>\";\r\n\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 30%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 69%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n  \r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: normal;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</b><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$foodWines[$x][1].\"</b><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n      else if(wonderplugin_is_device(\'iPhone, Android\')){\r\n\r\n   $bodytext=\"left\";\r\n      \r\n\r\n\r\n \r\n echo \"<table>\";\r\n\r\necho \"<tr><td style=\'display:block-inline; text-align: center; font-size: 1.1em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n \r\n      \r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 35%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 64%;\'>\";\r\n        echo \"</colgroup>\";  \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center; font-size: 1.25em;\'><b>\".$winePrice.\"</b><br><br><img style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($row[\'WineVintage\'] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</b><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size:\".$nameFont.\"\'><b>\".$foodWines[$x][1].\"</b><br>\";\r\n         }\r\n\r\n\r\n        }\r\n         \r\n\r\n         //  ///Common Code Here\r\n        \r\n\r\n         \r\n  	if($listType==\"byFood\"){\r\n\r\n $foodarray = array($row[\'FoodPairing1\'], $row[\'FoodPairing2\'], $row[\'FoodPairing3\'], $row[\'FoodPairing4\'], $row[\'FoodPairing5\'], $row[\'FoodPairing6\'], $row[\'FoodPairing7\'], );\r\n         $goodfoods = \"\";\r\n         $badfoods = \"\";\r\n\r\n          if(in_array($food1, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood1;\r\n           }\r\n           elseif($food1!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood1;\r\n            }\r\n\r\n           if(in_array($food2, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n           }\r\n           elseif($food2!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood2;\r\n            }\r\n\r\n   if(in_array($food3, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood4;\r\n            }\r\n            \r\n        if($goodfoods!=\"\"){\r\n        $goodfoods=substr($goodfoods, (strlen($goodfoods)-2)*-1);\r\n         echo \"<font size=\'+1\'><b>We suggest with: </b>\".$goodfoods.\"<br><font>\";\r\n        }\r\n\r\n//alternate good food list - show all food listed as pairing with this wine\r\n      \r\n\r\n\r\n\r\n\r\n\r\n        if($badfoods!=\"\"){\r\n        $badfoods=substr($badfoods, (strlen($badfoods)-2)*-1);\r\n // leave off for now    echo \"<font size=\'+1\'><b>Mabye not so good with: </b>\".$badfoods.\"<br><font>\";\r\n        }\r\n\r\n\r\n          \r\n\r\n         }\r\n         if (strpos($foodWines[$x][1], $foodWines[$x][8]) !== false){\r\n              $varietalText=\"\";\r\n        }\r\n        else{\r\n               $varietalText=$foodWines[$x][8];\r\n         }\r\n\r\n         if($varietalText!=\"\"){\r\n         echo \"</b>\".$varietalText;\r\n               echo \"<br>\";\r\n         }\r\n         else{\r\n        // echo \"<td style=\'vertical-align: top; padding-top: 0px; text-align: \".$bodytext.\"; padding-right: 5em; line-height: 1.75em\'>\";\r\n         }\r\n   \r\n    \r\n       echo \"<font size=\'+1\'><b>\".$foodWines[$x][7].\">\".$foodWines[$x][26].\"</b></font><br><br>\";\r\n    \r\nif($foodWines[$x][29]!=\'Glass\'){   \r\n echo \"<font size=\'+1\'><b>In our Cellar: &nbsp;</b>\".$foodWines[$x][18].\"<br><font>\";\r\n}\r\n\r\n    if (!empty($foodWines[$x][19])) {\r\n       echo \"<font size=\'+1\'><b>Eyes: &nbsp;</b>\".$foodWines[$x][19].\"<br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][20])) {\r\n       echo \"<font size=\'+1\'><b>Nose: &nbsp;</b>\".$foodWines[$x][20].\"<br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][21])) {\r\n       echo \"<font size=\'+1\'><b>Mouth: &nbsp;</b>\".$foodWines[$x][21].\"<br><font>\";\r\n      }\r\n   \r\n      if (!empty($foodWines[$x][23]) AND $foodWines[$x][23]!=0) {\r\n       echo \"<font size=\'+1\'><b>Alcohol Content: &nbsp;</b>\".$foodWines[$x][23].\"%<br><font>\";\r\n      }\r\n  	if (!empty($foodWines[$x][14])) {\r\n       echo \"<font size=\'+1\'><b>Ratings: &nbsp;</b>\".$foodWines[$x][14].\"<br><font>\";\r\n      }\r\n    \r\n  	if (!empty($foodWines[$x][13])) {\r\n       echo \"<font size=\'+1\'><text align=\'justify\'><b>Why we like it: &nbsp;</b>\".$foodWines[$x][13].\"<br><font>\";\r\n      }\r\n    \r\n  	if (!empty($foodWines[$x][24])) {\r\n       echo \"<br><font size=\'+1\'><b>Pairs with: &nbsp;</b>\".$foodWines[$x][24].\"<br><font>\";\r\n      }\r\n    \r\n  	if (!empty($foodWines[$x][12])) {\r\n       echo \"<br><font size=\'+1\'><b>From the Winemaker: &nbsp;</b>\".$foodWines[$x][12].\"<br><font>\";\r\n      }\r\n      echo \"<br><font size=\'-1\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1<font>\";\r\n    \r\n    echo \"</td>\";\r\n\r\n    // echo \"<td valign=\'top\' align=\'left\'>\";\r\n    // echo do_shortcode($nextWine);\r\n    // echo \"</td>\";\r\n\r\n  	echo \"</tr>\";\r\n	echo \"</table>\";\r\n     echo \"<br><br><br><br>\";\r\n}\r\necho \"</body>\";','[xyz-ips snippet=\"ContinuousDisplayPHP-2\"]',1),(16,'ContinuousDisplayPHP-3','<?php\r\n\r\n\r\n$variable = $_GET[\'WineID\'];\r\n$listType = $_GET[\'listType\'];\r\n$listName = $_GET[\'listName\'];\r\n$linkCount = $_GET[\'linkCount\'];\r\n$food1 = trim($_GET[\'food1\']);\r\n$food2 = trim($_GET[\'food2\']);\r\n$food3 = trim($_GET[\'food3\']);\r\n$food4 = trim($_GET[\'food4\']);\r\n$wineNumber = 0;\r\n$screenWidth = 1000;\r\n\r\n\r\n\r\nif(wonderplugin_is_device(\'iPhone\')){\r\n$screenWidth = 400;\r\n$device = \"iPhone\";\r\n}\r\nelseif(wonderplugin_is_device(\'Windows\')){\r\n$screenWidth = 1000;\r\n$device = \"Windows\";\r\n}\r\nelseif(wonderplugin_is_device(\'iPad\')){\r\n$screenWidth = 1000;\r\n$device = \"iPad\";\r\n}\r\nelseif(wonderplugin_is_device(\'Mac\')){\r\n$screenWidth = 1000;\r\n$device = \"Mac\";\r\n\r\n}\r\nelseif(wonderplugin_is_device(\'Android\')){\r\n$screenWidth = 1000;\r\n$device = \"Android\";\r\n}\r\n\r\n//echo \"Width \",$screenWidth;\r\n\r\n\r\nif($food1!=\"\"){\r\n$xfood1=substr($food1, (strlen($food1)-2)*-1);\r\n}\r\nif($food2!=\"\"){\r\n$xfood2=substr($food2, (strlen($food2)-2)*-1);\r\n}\r\nif($food3!=\"\"){\r\n$xfood3=substr($food3, (strlen($food3)-2)*-1);\r\n}\r\nif($food4!=\"\"){\r\n$xfood4=substr($food4, (strlen($food4)-2)*-1);\r\n}\r\n\r\n\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\nif (wonderplugin_is_device(\'iPhone\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\n\r\nif($listType==\"byVarietal\"){\r\n      $sql=\"SELECT * FROM Wines WHERE (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE WineCountry = \'\".$listName.\"\' AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY CASE \r\n               WHEN WineType = \'Sparkling\' THEN 1\r\n               WHEN WineType = \'White\' THEN 2\r\n               WHEN WineType = \'Rose\' THEN 3\r\n               WHEN WineType = \'Red\' THEN 4\r\n               ELSE 5\r\n         END,  WinePrice\";\r\n          \r\n\r\n}\r\nelseif($listType==\"byProfile\"){\r\n\r\n      if($listName==\"WhitesAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock!=-1 ORDER BY WineName\";\r\n            $showName=\"All Whites A - Z\";\r\n            $listTypeName=\"White Wines\";\r\n      }\r\n       elseif($listName==\"WhitePrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock!=-1 ORDER BY WinePrice\";\r\n            $showName=\"All Whites by Price\";\r\n            $listTypeName=\"White Wines\";\r\n      }\r\n      elseif($listName==\"RedsAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock!=-1 ORDER BY WineName\";\r\n            $showName=\"All Reds A - Z\";\r\n            $listTypeName=\"Red Wines\";\r\n      }\r\n      elseif($listName==\"RedPrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock!=-1 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red Wines\";\r\n      }    \r\n      \r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byGlass\"){\r\n\r\n $sql=\"SELECT * FROM Wines WHERE WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WineType2, WinePrice\";           \r\n\r\n//$sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND (AvailableToday = -1 OR AvailableOnRequest = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY AvailableToday, AvailablePremium, AvailableOnRequest DESC, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n     \r\n}\r\nelseif($listType==\"byFood\"){\r\n\r\n$foodList = \"(\'\".$food1.\"\', \'\".$food2.\"\', \'\".$food3.\"\', \'\".$food4.\"\')\";\r\n\r\n$sql=\"SELECT * FROM Wines WHERE ((WineType != \'Glass\' AND QtyInStock!=-1) OR (WineType = \'Glass\' AND AvailableToday = -1))  AND (FoodPairing1 IN \".$foodList.\" OR FoodPairing2 IN \".$foodList.\" OR FoodPairing3 IN \".$foodList.\" OR FoodPairing4 IN \".$foodList.\" OR FoodPairing5 IN \".$foodList.\" OR FoodPairing6 IN \".$foodList.\" OR FoodPairing7 IN \".$foodList.\" OR FoodPairing8 IN \".$foodList.\" OR FoodPairing9 IN \".$foodList.\" OR FoodPairing10 IN \".$foodList.\"  OR FoodPairing11 IN \".$foodList.\"  OR FoodPairing12 IN \".$foodList.\"  OR FoodPairing13 IN \".$foodList.\"  OR FoodPairing14 IN \".$foodList.\"  OR FoodPairing15 IN \".$foodList.\")\";\r\n\r\n$showName=\"Food Pairings\";\r\n$listTypeName=\"Food Matches\";\r\n}\r\n\r\n\r\n\r\n// Read all wines to determine length of list.\r\n// Need to sort items based on match score (desc) then price (asc). Wines by the glass will appear first as they have 6 added\r\n// to the base score whereas other wines start at 0\r\n\r\n       $IDarray=array();\r\n       $wineCount=0;\r\n      $foodWines = array();      //two dimensional array 1= name, 2 = food1, 3 = food2, 4 = food3, 5 = food4, 6 = score, 7 = country, 8 = varietal, 9 = btl or glass, 10 = WineID, 11 = Price. 12 = Desc1, 13 = Desc2, 14= Desc3, 15 = Desc 4, 16 = Image1, 17= Image2, 18 = QtyInStock, 19 = Eyes, 20 = Nose, 21 = Mouth, 22 = Vintage, 23 = Alcohol Content, 24 = Pairing Suggestion , 25=Cases Produced, 26 = WineRegion, 27 = Wine Subregion, 28 = Nationality\r\n\r\n\r\n       $records1=mysqli_query($con, $sql);\r\n       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n            \r\n      $wineCount = $wineCount+1;\r\n\r\n      $foodWines[$wineCount][1] = $row1[\'WineName\'];\r\n      $foodWines[$wineCount][6] = 0;\r\n      $foodWines[$wineCount][7]  = $row1[\'WineCountry\'];\r\n      $foodWines[$wineCount][8] = $row1[\'WineVarietal\'];\r\n      $foodWines[$wineCount][10] = $row1[\'ID\'];\r\n      $foodWines[$wineCount][11] = $row1[\'WinePrice\'];\r\n      //$foodWines[$wineCount][12] = $row1[\'PairingValue1\'];\r\n      //$foodWines[$wineCount][13] = $row1[\'PairingValue2\'];\r\n      //$foodWines[$wineCount][14] = $row1[\'PairingValue3\'];\r\n      //$foodWines[$wineCount][15] = $row1[\'PairingValue4\'];\r\n      $foodWines[$wineCount][32] = $row1[\'Desc1\'];\r\n      $foodWines[$wineCount][33] = $row1[\'Desc2\'];\r\n      $foodWines[$wineCount][34] = $row1[\'Desc3\'];\r\n      $foodWines[$wineCount][35] = $row1[\'Desc4\'];\r\n      $foodWines[$wineCount][16] = $row1[\'Image1\'];\r\n      $foodWines[$wineCount][17] = $row1[\'Image2\'];\r\n      $foodWines[$wineCount][18] = $row1[\'QtyInStock\'];\r\n      $foodWines[$wineCount][19] = $row1[\'Eyes\'];\r\n      $foodWines[$wineCount][20] = $row1[\'Nose\'];\r\n      $foodWines[$wineCount][21] = $row1[\'Mouth\'];\r\n      $foodWines[$wineCount][22] = $row1[\'WineVintage\'];\r\n      $foodWines[$wineCount][23] = $row1[\'AlcoholContent\'];\r\n      $foodWines[$wineCount][24] = $row1[\'PairingSuggestion\'];\r\n      $foodWines[$wineCount][25] = $row1[\'CasesProduced\'];\r\n      $foodWines[$wineCount][26] = $row1[\'WineRegion\'];\r\n      $foodWines[$wineCount][27] = $row1[\'WineSubregion\'];\r\n      $foodWines[$wineCount][28] = $row1[\'WineNationality\'];  \r\n      $foodWines[$wineCount][29] = $row1[\'WineType\']; \r\n      $foodWines[$wineCount][30] = $row1[\'WineSize\']; \r\n      $foodWines[$wineCount][36] = $row1[\'AvailableToday\'];\r\n      $foodWines[$wineCount][37] = $row1[\'AvailablePremium\'];\r\n      $foodWines[$wineCount][38] = $row1[\'AvailableOnRequest\'];  \r\n       $foodWines[$wineCount][39] = $row1[\'SoldAs\'];\r\n\r\n      if( $foodWines[$wineCount][29] == \"Glass\"){\r\n          $foodWines[$wineCount][6] = 100;\r\n          $foodWines[$wineCount][9] = 0;\r\n          }\r\n      else{\r\n            $foodWines[$wineCount][9] = 1;\r\n            $foodWines[$wineCount][6] = 0;\r\n      }\r\nif($listType == \'byFood\'){\r\n\r\n// only sort the array if this is a food match selection\r\n\r\n$minPairing = 0;\r\n\r\nfor($x = 1; $x <= 15; $x++){\r\n\r\nif($food1!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food1){\r\n          \r\n          $foodWines[$wineCount][12] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][12]==6){\r\n           $foodWines[$wineCount][12]=5;\r\n          } \r\n          if($foodWines[$wineCount][12]==0 OR is_null($foodWines[$wineCount][12])){\r\n             $foodWines[$wineCount][12]=5; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][12];\r\n         }   \r\n}\r\n\r\nif($food2!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food2){\r\n         $foodWines[$wineCount][13] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n         if($foodWines[$wineCount][13]==6){\r\n           $foodWines[$wineCount][13]=5;\r\n          } \r\n         if($foodWines[$wineCount][13]==0 OR is_null($foodWines[$wineCount][13])){\r\n             $foodWines[$wineCount][13]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][13];\r\n         }   \r\n}\r\n\r\nif($food3!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food3){\r\n         $foodWines[$wineCount][14] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][14]==6){\r\n           $foodWines[$wineCount][14]=5;\r\n          } \r\n         if($foodWines[$wineCount][14]==0 OR is_null($foodWines[$wineCount][14])){\r\n             $foodWines[$wineCount][14]=1; \r\n          }\r\n        $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][14];\r\n         }   \r\n}\r\nif($food4!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food4){\r\n         $foodWines[$wineCount][15] = $row1[\'PairingValue\'.$x] * -1 + 6;\r\n          if($foodWines[$wineCount][15]==6){\r\n           $foodWines[$wineCount][15]=5;\r\n          } \r\n          if($foodWines[$wineCount][15]==0 OR is_null($foodWines[$wineCount][15])){\r\n             $foodWines[$wineCount][15]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][15];\r\n         }   \r\n   }   \r\n\r\n}  \r\n\r\n//echo $foodWines[$wineCount][1].\" \".$foodWines[$wineCount][12].\" \".$foodWines[$wineCount][13].\" \".$foodWines[$wineCount][14].\" \".$foodWines[$wineCount][15].\"<br>\";\r\n\r\nif($foodWines[$wineCount][12] <3  AND  $foodWines[$wineCount][13] < 3 AND $foodWines[$wineCount][14] < 3 AND $foodWines[$wineCount][15] < 3){\r\n//echo \"Skipping\".$foodWines[$wineCount][1].\"<br>\";\r\n$wineCount=$wineCount - 1;\r\n\r\n}\r\n\r\n}\r\n       \r\n}\r\n\r\n//sort Array\r\nif($listType==\'byFood\'){\r\nforeach ($foodWines as $key => $row) {\r\n    $score[$key]  = $row[6];\r\n    $winePrice[$key] = $row[11];\r\n}\r\n\r\n// With the use of the column keys you can now sort entire array by these columns and keep the row index value intact if they are non-numeric. This is good if your using some kind of hashed index.\r\n\r\narray_multisort($score, SORT_DESC, $winePrice, SORT_DESC, $foodWines);\r\n}\r\n\r\n\r\n     // echo $wineCount;\r\n       \r\nif($listType == \'byFood\'){\r\n$xstart = 0;\r\n$totalWines = $wineCount-1;\r\n}\r\nelse{\r\n$xstart = 1;\r\n$totalWines = $wineCount;\r\n\r\n}\r\n\r\n\r\n\r\n for($x = $xstart; $x <= $totalWines; $x++){\r\n\r\nif($listType == \'byFood\'){\r\n$y=$x+1;\r\n}\r\nelse{\r\n$y=$x;\r\n}       \r\n\r\n   if($listType==\"byCountry\"){\r\n\r\n               $listTypeName=$foodWines[$x][28];\r\n          \r\n\r\n         }\r\n         elseif($listType==\"byProfile\" AND $listTypeName!=\"\"){\r\n\r\n\r\n         }\r\n        elseif($listType==\"byProfile\" AND $listTypeName==\"\"){\r\n\r\n          $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byVarietal\"){\r\n          $listTypeName=$listName;\r\n        }\r\n\r\n\r\n       if($listType==\'byCountry\'){\r\n\r\n              $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n\r\n\r\n           \r\n             if($foodWines[$x][29]==\'Rose\'){\r\n             $showName=$listName.\"&nbsp;(Rosé)\";\r\n             }\r\n             else{\r\n             $showName=$listName.\"&nbsp;(\".$foodWines[$x][29]. \" Wines)\";\r\n             }\r\n        }\r\n        elseif($listType==\'byVarietal\'){\r\n                  $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n\r\n                  $showName=$listName;\r\n         }\r\n         elseif($listType==\'byProfile\'){\r\n            $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" </b></a>\";\r\n\r\n            $showName=$listName;\r\n         }\r\n         elseif($listType==\"byGlass\"){\r\n         $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b> Wines By The Glass</b></a>\";\r\n\r\n         }\r\n         \r\n         elseif($listType==\"byFood\"){\r\n\r\n           $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/foodmatches/?food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\'><b> Food Matches</b></a>\";\r\n           \r\n          }\r\n\r\nif($browsing==\"\"){\r\n\r\n        $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n        echo \"<body>\";\r\n\r\n\r\necho \"<a class=\'anchor\' id=\'wine\".$y.\"\'></a>\";\r\n\r\n//set to 500 now so it does not change - effectively disabling\r\n\r\n        if(strlen($foodWines[$x][1].\"&emsp\".$foodWines[$x][22])>500){\r\n         $nameFont=\"1.1em\";\r\n         }\r\n        else{\r\n        $nameFont=\"1.35em\";\r\n        }\r\n\r\n  if($foodWines[$x][29] == \'Glass\' OR $foodWines[$x][39] == 1){\r\n        $winePrice = \"<b>$\".$foodWines[$x][11].\"/glass</b>\"; \r\n        }\r\n        else{\r\n        $winePrice= \"<b>$\".$foodWines[$x][11].\"</b>\";\r\n        }\r\n\r\n\r\n      \r\nif ($device == \'Windows\' OR $device == \'Mac\' OR $device == \'Linux\'){\r\n        $bodytext=\"justify\";\r\n        \r\n       echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 84%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n      \r\n\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\necho\"<tr>\";\r\n   \r\n echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\nelseif($device == \'iPad\' OR $device == \'Android\'){\r\n   \r\n  $bodytext=\"left\";\r\n\r\n      echo \"<table>\";\r\n\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 30%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 69%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n  \r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: normal;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n     if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n      elseif($device == \'iPhone\'){\r\n\r\n   $bodytext=\"left\";\r\n   \r\n\r\n\r\n \r\n echo \"<table>\";\r\n\r\necho \"<tr><td style=\'display:block-inline; text-align: center; font-size: 1.1em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n \r\n      \r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 35%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 64%;\'>\";\r\n        echo \"</colgroup>\";  \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center; font-size: 1.25em;\'><span style=\'font-weight:bold\'>\".$winePrice.\"</span><br><br><img style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n     if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n         \r\n\r\n         //  ///Common Code Here\r\n        \r\n\r\n         \r\n  	if($listType==\"byFood\"){\r\n\r\n $foodarray = array($row[\'FoodPairing1\'], $row[\'FoodPairing2\'], $row[\'FoodPairing3\'], $row[\'FoodPairing4\'], $row[\'FoodPairing5\'], $row[\'FoodPairing6\'], $row[\'FoodPairing7\'], );\r\n         $goodfoods = \"\";\r\n         $badfoods = \"\";\r\n\r\n          if(in_array($food1, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood1;\r\n           }\r\n           elseif($food1!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood1;\r\n            }\r\n\r\n           if(in_array($food2, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n           }\r\n           elseif($food2!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood2;\r\n            }\r\n\r\n   if(in_array($food3, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood4;\r\n            }\r\n            \r\n        if($goodfoods!=\"\"){\r\n        $goodfoods=substr($goodfoods, (strlen($goodfoods)-2)*-1);\r\n         echo \"<font size=\'+1\'><b>We suggest with: </b>\".$goodfoods.\"<br><font>\";\r\n        }\r\n\r\n//alternate good food list - show all food listed as pairing with this wine\r\n      \r\n\r\n\r\n\r\n\r\n\r\n        if($badfoods!=\"\"){\r\n        $badfoods=substr($badfoods, (strlen($badfoods)-2)*-1);\r\n // leave off for now    echo \"<font size=\'+1\'><b>Mabye not so good with: </b>\".$badfoods.\"<br><font>\";\r\n        }\r\n\r\n\r\n          \r\n\r\n         }\r\n       \r\n        \r\n        $varietalText=$foodWines[$x][8];\r\n        if ($varietalText != \"\"){\r\n            if (strpos($foodWines[$x][1], $varietalText) > 0){\r\n                $varietalText=\"\";\r\n            }\r\n        }\r\n\r\n            // echo $foodWines[$x][8].\"<br>\";\r\n\r\n         if($varietalText != \"\"){\r\n               echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$varietalText.\"</span>\";\r\n               echo \"<br>\";\r\n         }\r\n   \r\n    \r\n if($foodWines[$x][7] != \"\"){\r\n\r\n    if($foodWines[$x][26] != \"\"){\r\n        echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\">\".$foodWines[$x][26].\"</span><br><br>\";\r\n    }\r\n    else{\r\n        echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\"</span><br><br>\";\r\n    }\r\n}\r\nelse{\r\n    echo \"<br>\";\r\n}\r\n// echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\">\".$foodWines[$x][26].\"</span><br><br>\";\r\n    \r\n//if($foodWines[$x][29]!=\'Glass\' AND $foodWines[$x][18] > 0){   \r\n// echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>In our Cellar: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][18].\"</span><br><font>\";\r\n//}\r\n\r\n    if (!empty($foodWines[$x][19])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Eyes: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][19].\"</span><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][20])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Nose: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][20].\"</span><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][21])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Mouth: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][21].\"</span><br><font>\";\r\n      }\r\n   \r\n      if (!empty($foodWines[$x][23]) AND $foodWines[$x][23]!=0) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Alcohol Content: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][23].\"%</span><br><font>\";\r\n      }\r\n  	if (!empty($foodWines[$x][34])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Ratings: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][34].\"</span><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($foodWines[$x][33])) {\r\n       echo \"<font size=\'+1\'><text align=\'justify\'><span style=\'font-weight: bold\'>Why we like it: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][33].\"</span><br><font>\";\r\n      }\r\n   if($screenWidth > 500){     \r\n  	if (!empty($foodWines[$x][24])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Pairs with: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][24].\"</span><br><font>\";\r\n      }\r\n}\r\nif($screenWidth > 500){    \r\n  	if (!empty($foodWines[$x][32])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>From the Winemaker: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][32].\"</span><br><font>\";\r\n      }\r\n}\r\n      echo \"<br><font size=\'-1\'><span style=\'font-weight: normal\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1</span><font>\";\r\n    \r\n    echo \"</td>\";\r\n\r\n    // echo \"<td valign=\'top\' align=\'left\'>\";\r\n    // echo do_shortcode($nextWine);\r\n    // echo \"</td>\";\r\n\r\n  	echo \"</tr>\";\r\n	echo \"</table>\";\r\n     echo \"<br><br><br><br>\";\r\n}\r\necho \"</body>\";','[xyz-ips snippet=\"ContinuousDisplayPHP-3\"]',1),(17,'byGlassPHP-expanded','<?php\r\nif(!isset($_GET[\'screen_check\']))\r\n{\r\n /* This code will be executed if screen resolution has not been detected.*/\r\n echo \"<script language=\'JavaScript\'>\r\n <!-- \r\n document.location=\\\"$PHP_SELF?screen_check=done&Width=\\\"+screen.width+\\\"&Height=\\\"+screen.height;\r\n //-->\r\n </script>\";\r\n}\r\nelse \r\n{    \r\n /* This code will be executed after screen resolution is detected.*/\r\n    if(isset($_GET[\'Width\']) && isset($_GET[\'Height\'])) {\r\n // Resolution  detected\r\n //echo \"<h1>Your screen resolution is \".$_GET[\'Width\'].\" x \".$_GET[\'Height\'].\".</h1><br />\";\r\n //Display page as per resolution\r\n if(($_GET[\'Width\']>1024)&&($_GET[\'Height\']>768)) {\r\n //echo \"<b>This will be displayed when screen resolution is greater than 1024x768.</b>\";\r\n }\r\n else {\r\n //Display page as per resolution\r\n //echo \"<b>This will be displayed when screen resolution is either equal to or less than 1024x768.</b>\";\r\n }\r\n     }\r\n     else {\r\n               // Resolution not detected\r\n     }\r\n}\r\n\r\n\r\n$screenWidth = $_GET[\'Width\'];\r\n$screenHeight = $_GET[\'Height\'];\r\n//echo $screenWidth;\r\n//echo \"<br>\";\r\n//echo $screenHeight;\r\n//echo \"<br>\";\r\n\r\n\r\n\r\n$variable = \'Glass\';\r\n\r\n  $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n \r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\n$sortButton=\"\";\r\n$wineCount=0;\r\nfor($x=1; $x<=3; $x++){ \r\n\r\n$wineCount1=0;\r\nif($x==1){\r\n$sql=\"SELECT * FROM Wines WHERE WineType=\'Glass\' AND AvailableToday = -1 AND AvailableOnRequest = 0 AND AvailablePremium = 0 ORDER BY WineType2, WinePrice\";\r\n      	\r\n\r\n}\r\nelseif($x==2){\r\n\r\n$sql=\"SELECT * FROM Wines WHERE WineType=\'Glass\' AND AvailableToday = 0 AND AvailableOnRequest = 0 AND AvailablePremium = -1 ORDER BY WineType2, WinePrice\";\r\n\r\n}\r\nelseif($x==3){\r\n$sql=\"SELECT * FROM Wines WHERE WineSize >0 AND WineSize < 750  AND WineType!=\'Glass\' ORDER BY WineType2, WinePrice\";\r\n\r\n}\r\nelse{\r\n$sql=\"SELECT * FROM Wines WHERE WineType=\'Glass\' AND AvailableToday = 0 AND AvailableOnRequest = -1 AND AvailablePremium = 0 ORDER BY WineType2, WinePrice\";\r\n\r\n\r\n}\r\n\r\n$records1=mysqli_query($con, $sql);\r\nwhile($wines=mysqli_fetch_assoc($records1)){\r\n        $wineCount=$wineCount+1;\r\n        $wineCount1=$wineCount1+1;\r\n        if($wineCount1 == 1){\r\n            if($x==1){\r\n                      $prevType= 0;\r\n                      echo \"<p><span style=\'opacity: 1.0; font-weight: bold; font-size: 1.5em;\'>Today\'s Wine By the Glass (5 oz pour)</span></p>\";\r\n                    $opacity = 1.0;\r\n             }\r\n             elseif($x==2){\r\n                       $prevType= 0;\r\n                       echo \"<p><span style=\'opacity: 1.0; font-weight: bold; font-size: 1.5em;\'>Happy Hour ($12 while they last)</span></p>\";\r\n                     $opacity = 1.0;\r\n             }\r\n             elseif($x==3){\r\n                  $prevType= 0;\r\n                  echo \"<p><span style=\'opacity: 1.0; font-weight: bold; font-size: 1.5em;\'>Sparkling (small bottles)</span></p>\";\r\n                  $opacity = 1.0;\r\n\r\n             }\r\n\r\n              else{\r\n                    $prevType= 0;\r\n                    echo \"<p><span style=\'opacity: 0.5; font-weight: bold; font-size: 1.5em;\'>By the Glass (on request - 2 glass minimum)</span></p>\";\r\n                    $opacity = 0.5;\r\n              }\r\n         } 	\r\n          \r\n          if($wines[\'WineVintage\']==0){\r\n          	\r\n            $vintage=NULL;	\r\n          }\r\n          else{\r\n          	$vintage=$wines[\'WineVintage\'];\r\n          }\r\n            if($wines[\'QtyInStock\'] < 3 AND $wines[\'WineType\']!=\'Glass\'){\r\n          $lowStock = \"* \";\r\n          }\r\n          else{\r\n          $lowStock = \"\";\r\n           }\r\n          if($wines[\'WineSize\']<750 AND $wines[\'WineSize\']!=0){\r\n                 $sizeinfo=\"\";    //$sizeinfo=\"&nbsp;(small bottle)\";\r\n          }\r\n          else{\r\n               $sizeinfo=\"\";\r\n          }	\r\n\r\nif ( wonderplugin_is_device(\'Windows,Mac,Linux,iPad\' )){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"singleitem-smallscreen/\";\r\n}\r\n \r\n\r\n           $wineID=\"<b><span style= \'opacity: \".$opacity.\";\'><a  href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byGlass&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></span></b>\";\r\n   \r\n   if($prevID != $wines[\'WineType2\']){\r\n      $prevID = $wines[\'WineType2\'];\r\n      if($prevID == 1){\r\n         echo \"<span style=\'opacity: \".$opacity.\"; font-weight: bold; font-size: 1.25em; line-height: 50%;\'>White</span><br>\";\r\n       }\r\n       elseif($prevID == 2){\r\n        // echo \"<br>\";   \r\n         echo \"<br><span style=\'opacity: \".$opacity.\"; font-weight: bold; font-size: 1.25em;  line-height: 50%;\'>Red</span><br>\";\r\n       }\r\n       elseif($prevID == 3){\r\n          // echo \"<br>\";  \r\n          if($wines[\'WineSize\'] != 187){ \r\n          echo \"<br><span style=\'opacity:  \".$opacity.\"; font-weight: bold; font-size: 1.25em;  line-height: 50%;\'>Sparkling</span><br>\";\r\n       }\r\n       }\r\n       elseif($prevID == 4){\r\n            // echo \"<br>\";\r\n             echo \"<br><span style=\'opacity:  \".$opacity.\"; font-weight: bold; font-size: 1.25em;  line-height: 50%;\'>Rosé</span><br>\";\r\n       }\r\n    }\r\n\r\n   echo \"<span style=\'font-size: 1.25em; text-align: left; width:85%; line-height: 100%; display: inline-block;\'>\".$wineID.\"</span>\";\r\n	        \r\n                 $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b><br>\";\r\n                 echo \"<span style=\'font-size: 1.25em; text-align: right; width:15%; line-height: 150%; display: inline-block;\'>\".$winePrice.\"</span><br>\"; \r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'].\"<br>\";\r\n                       echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineVarietal.\"</span><br>\";\r\n\r\n                  }\r\n	\r\n  		$wineCountry=$wines[\'WineCountry\'].\">\".$wines[\'WineRegion\'];\r\n             \r\n                 if(substr($wineCountry, strlen($wineCountry)-1,1)==\">\"){\r\n\r\n                       $wineCountry=substr($wineCountry, 0, strlen($wineCountry)-1);\r\n                }\r\n                      $wineCountry=$wineCountry.\"<br>\";\r\n\r\n		echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineCountry.\"</span><br>\";\r\n                        \r\n             \r\n                  echo \"<br>\"; \r\n    \r\n                \r\n        }\r\n        echo \"<br>\";\r\n}\r\n\r\n\r\necho \"<br><font size=\'-1\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). <br>BZ$2 = US$1<font>\";','[xyz-ips snippet=\"byGlassPHP-expanded\"]',1),(18,'ResolutionTest','<?php\r\nrequire_once(\"TeraWurfl.php\");\r\n$wurflObj = new TeraWurfl();\r\n$wurflObj->GetDeviceCapabilitiesFromAgent();\r\n$browser_width = $wurflObj->capabilities[\'display\'][\'max_image_width\'];\r\n// You can also get the actual display resolution\r\n$display_width = $wurflObj->capabilities[\'display\'][\'resolution_width\'];','[xyz-ips snippet=\"ResolutionTest\"]',1),(19,'WineSearchPHP','<?php\r\n$variable = $_GET[\'subject\'];\r\n\r\necho $variable;','[xyz-ips snippet=\"WineSearchPHP\"]',1),(20,'ContinuousDisplayPHP-4','<?php\r\n\r\n$search = $_GET[\'search\'];\r\n\r\n\r\n$variable = $_GET[\'WineID\'];\r\n$listType = $_GET[\'listType\'];\r\n$listName = $_GET[\'listName\'];\r\n$linkCount = $_GET[\'linkCount\'];\r\n$food1 = trim($_GET[\'food1\']);\r\n$food2 = trim($_GET[\'food2\']);\r\n$food3 = trim($_GET[\'food3\']);\r\n$food4 = trim($_GET[\'food4\']);\r\n$wineNumber = 0;\r\n$screenWidth = 1000;\r\n\r\nif(!empty($search)){\r\n  $listType = \"bySearch\";\r\n}\r\n\r\n\r\n\r\nif(wonderplugin_is_device(\'iPhone\')){\r\n$screenWidth = 400;\r\n$device = \"iPhone\";\r\n}\r\nelseif(wonderplugin_is_device(\'Windows\')){\r\n$screenWidth = 1000;\r\n$device = \"Windows\";\r\n}\r\nelseif(wonderplugin_is_device(\'iPad\')){\r\n$screenWidth = 1000;\r\n$device = \"iPad\";\r\n}\r\nelseif(wonderplugin_is_device(\'Mac\')){\r\n$screenWidth = 1000;\r\n$device = \"Mac\";\r\n\r\n}\r\nelseif(wonderplugin_is_device(\'Android\')){\r\n$screenWidth = 1000;\r\n$device = \"Android\";\r\n}\r\n\r\n//echo \"Width \",$screenWidth;\r\n\r\n\r\nif($food1!=\"\"){\r\n$xfood1=substr($food1, (strlen($food1)-2)*-1);\r\n}\r\nif($food2!=\"\"){\r\n$xfood2=substr($food2, (strlen($food2)-2)*-1);\r\n}\r\nif($food3!=\"\"){\r\n$xfood3=substr($food3, (strlen($food3)-2)*-1);\r\n}\r\nif($food4!=\"\"){\r\n$xfood4=substr($food4, (strlen($food4)-2)*-1);\r\n}\r\n\r\n\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\nif (wonderplugin_is_device(\'iPhone\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\nif($listType==\"bySearch\"){\r\n\r\n     $sql=\"SELECT * FROM Wines WHERE (WineName Like \'%\".$search.\"%\' OR WineRegion Like \'%\".$search.\"%\' OR WineCountry Like \'%\".$search.\"%\' OR WineNationality Like \'%\".$search.\"%\' OR WineSubRegion Like \'%\".$search.\"%\' OR Category Like \'%\".$search.\"%\' OR Category2 Like \'%\".$search.\"%\' OR Category3 Like \'%\".$search.\"%\'  OR  Desc1 Like \'%\".$search.\"%\' OR  Desc2 Like \'%\".$search.\"%\' OR  Desc3 Like \'%\".$search.\"%\' OR  Desc4 Like \'%\".$search.\"%\' OR  Eyes Like \'%\".$search.\"%\' OR  Nose Like \'%\".$search.\"%\' OR  Mouth Like \'%\".$search.\"%\' OR  WineVarietal Like \'%\".$search.\"%\' OR  WineProfile1 Like \'%\".$search.\"%\' OR  WineProfile2 Like \'%\".$search.\"%\' OR  PairingSuggestion Like \'%\".$search.\"%\' OR  WineVintage Like \'%\".$search.\"%\') AND WineType != \'Glass\' AND QtyInStock <> -1 ORDER BY WinePrice\";\r\n\r\n// Does not include Desc1 \'From the Winemaker\'\r\n\r\n\r\n// echo $sql;\r\n//$records1=mysqli_query($con, $sql);\r\n//       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n//       echo $row1[\'WineName\'],\"<br>\";\r\n//}\r\n}\r\nelseif($listType==\"byVarietal\"){\r\n      $sql=\"SELECT * FROM Wines WHERE (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE WineCountry = \'\".$listName.\"\' AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY CASE \r\n               WHEN WineType = \'Sparkling\' THEN 1\r\n               WHEN WineType = \'White\' THEN 2\r\n               WHEN WineType = \'Rose\' THEN 3\r\n               WHEN WineType = \'Red\' THEN 4\r\n               ELSE 5\r\n         END,  WinePrice\";\r\n          \r\n\r\n}\r\nelseif($listType==\"byProfile\"){\r\n\r\n      if($listName==\"WhitesAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock!=-1 ORDER BY WineName\";\r\n            $showName=\"All Whites A - Z\";\r\n            $listTypeName=\"White Wines\";\r\n      }\r\n       elseif($listName==\"WhitePrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock!=-1 ORDER BY WinePrice\";\r\n            $showName=\"All Whites by Price\";\r\n            $listTypeName=\"White Wines\";\r\n      }\r\n      elseif($listName==\"RedsAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock!=-1 ORDER BY WineName\";\r\n            $showName=\"All Reds A - Z\";\r\n            $listTypeName=\"Red Wines\";\r\n      }\r\n      elseif($listName==\"RedPrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock!=-1 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red Wines\";\r\n      }    \r\n      \r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byGlass\"){\r\n\r\n // $sql=\"SELECT * FROM Wines WHERE WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WineType2, WinePrice\";           \r\n\r\n$sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND (AvailableToday = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY AvailableToday, AvailablePremium, WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n// $sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND (AvailableToday = -1 OR AvailableOnRequest = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n     \r\n}\r\nelseif($listType==\"byFood\"){\r\n\r\n$foodList = \"(\'\".$food1.\"\', \'\".$food2.\"\', \'\".$food3.\"\', \'\".$food4.\"\')\";\r\n\r\n$sql=\"SELECT * FROM Wines WHERE ((WineType != \'Glass\' AND QtyInStock!=-1) OR (WineType = \'Glass\' AND AvailableToday = -1))  AND (FoodPairing1 IN \".$foodList.\" OR FoodPairing2 IN \".$foodList.\" OR FoodPairing3 IN \".$foodList.\" OR FoodPairing4 IN \".$foodList.\" OR FoodPairing5 IN \".$foodList.\" OR FoodPairing6 IN \".$foodList.\" OR FoodPairing7 IN \".$foodList.\" OR FoodPairing8 IN \".$foodList.\" OR FoodPairing9 IN \".$foodList.\" OR FoodPairing10 IN \".$foodList.\"  OR FoodPairing11 IN \".$foodList.\"  OR FoodPairing12 IN \".$foodList.\"  OR FoodPairing13 IN \".$foodList.\"  OR FoodPairing14 IN \".$foodList.\"  OR FoodPairing15 IN \".$foodList.\")\";\r\n\r\n$showName=\"Food Pairings\";\r\n$listTypeName=\"Food Matches\";\r\n}\r\n\r\n\r\n\r\n// Read all wines to determine length of list.\r\n// Need to sort items based on match score (desc) then price (asc). Wines by the glass will appear first as they have 6 added\r\n// to the base score whereas other wines start at 0\r\n\r\n       $IDarray=array();\r\n       $wineCount=0;\r\n      $foodWines = array();      //two dimensional array 1= name, 2 = food1, 3 = food2, 4 = food3, 5 = food4, 6 = score, 7 = country, 8 = varietal, 9 = btl or glass, 10 = WineID, 11 = Price. 12 = Desc1, 13 = Desc2, 14= Desc3, 15 = Desc 4, 16 = Image1, 17= Image2, 18 = QtyInStock, 19 = Eyes, 20 = Nose, 21 = Mouth, 22 = Vintage, 23 = Alcohol Content, 24 = Pairing Suggestion , 25=Cases Produced, 26 = WineRegion, 27 = Wine Subregion, 28 = Nationality\r\n\r\n\r\n       $records1=mysqli_query($con, $sql);\r\n       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n            \r\n      $wineCount = $wineCount+1;\r\n\r\n      $foodWines[$wineCount][1] = $row1[\'WineName\'];\r\n      $foodWines[$wineCount][6] = 0;\r\n      $foodWines[$wineCount][7]  = $row1[\'WineCountry\'];\r\n      $foodWines[$wineCount][8] = $row1[\'WineVarietal\'];\r\n      $foodWines[$wineCount][10] = $row1[\'ID\'];\r\n      $foodWines[$wineCount][11] = $row1[\'WinePrice\'];\r\n      //$foodWines[$wineCount][12] = $row1[\'PairingValue1\'];\r\n      //$foodWines[$wineCount][13] = $row1[\'PairingValue2\'];\r\n      //$foodWines[$wineCount][14] = $row1[\'PairingValue3\'];\r\n      //$foodWines[$wineCount][15] = $row1[\'PairingValue4\'];\r\n      $foodWines[$wineCount][32] = $row1[\'Desc1\'];\r\n      $foodWines[$wineCount][33] = $row1[\'Desc2\'];\r\n      $foodWines[$wineCount][34] = $row1[\'Desc3\'];\r\n      $foodWines[$wineCount][35] = $row1[\'Desc4\'];\r\n      $foodWines[$wineCount][16] = $row1[\'Image1\'];\r\n      $foodWines[$wineCount][17] = $row1[\'Image2\'];\r\n      $foodWines[$wineCount][18] = $row1[\'QtyInStock\'];\r\n      $foodWines[$wineCount][19] = $row1[\'Eyes\'];\r\n      $foodWines[$wineCount][20] = $row1[\'Nose\'];\r\n      $foodWines[$wineCount][21] = $row1[\'Mouth\'];\r\n      $foodWines[$wineCount][22] = $row1[\'WineVintage\'];\r\n      $foodWines[$wineCount][23] = $row1[\'AlcoholContent\'];\r\n      $foodWines[$wineCount][24] = $row1[\'PairingSuggestion\'];\r\n      $foodWines[$wineCount][25] = $row1[\'CasesProduced\'];\r\n      $foodWines[$wineCount][26] = $row1[\'WineRegion\'];\r\n      $foodWines[$wineCount][27] = $row1[\'WineSubregion\'];\r\n      $foodWines[$wineCount][28] = $row1[\'WineNationality\'];  \r\n      $foodWines[$wineCount][29] = $row1[\'WineType\']; \r\n      $foodWines[$wineCount][30] = $row1[\'WineSize\']; \r\n      $foodWines[$wineCount][36] = $row1[\'AvailableToday\'];\r\n      $foodWines[$wineCount][37] = $row1[\'AvailablePremium\'];\r\n      $foodWines[$wineCount][38] = $row1[\'AvailableOnRequest\'];  \r\n       $foodWines[$wineCount][39] = $row1[\'SoldAs\'];\r\n      $foodWines[$wineCount][45] = $row1[\'ServingSize\'];\r\n\r\n      if( $foodWines[$wineCount][29] == \"Glass\"){\r\n          $foodWines[$wineCount][6] = 100;\r\n          $foodWines[$wineCount][9] = 0;\r\n          }\r\n      else{\r\n            $foodWines[$wineCount][9] = 1;\r\n            $foodWines[$wineCount][6] = 0;\r\n      }\r\nif($listType==\'bySearch\'){\r\nfor($x = 1; $x <= 40; $x++){\r\nif($x!=16 AND $x!=17){\r\n$foodWines[$wineCount][$x]= preg_replace(\"/\".$search.\"/i\", \"<span style=\'background-color: #FFFF00;\'>\\$0</span>\",$foodWines[$wineCount][$x]);\r\n}\r\n}\r\n}\r\n\r\n// preg_replace(\"/the/i\", \"<b>\\$0</b>\", $original);\r\n\r\n\r\n\r\n// $foodWines[$wineCount][1] = \"<span style=\"background-color: #FFFF00\">\".$foodWines[$wineCount][1].\"</span>\" \r\n\r\nif($listType == \'byFood\'){\r\n\r\n// only sort the array if this is a food match selection\r\n\r\n$minPairing = 0;\r\n\r\nfor($x = 1; $x <= 15; $x++){\r\n\r\nif($food1!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food1){\r\n          \r\n          $foodWines[$wineCount][12] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][12]==6){\r\n           $foodWines[$wineCount][12]=5;\r\n          } \r\n          if($foodWines[$wineCount][12]==0 OR is_null($foodWines[$wineCount][12])){\r\n             $foodWines[$wineCount][12]=5; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][12];\r\n         }   \r\n}\r\n\r\nif($food2!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food2){\r\n         $foodWines[$wineCount][13] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n         if($foodWines[$wineCount][13]==6){\r\n           $foodWines[$wineCount][13]=5;\r\n          } \r\n         if($foodWines[$wineCount][13]==0 OR is_null($foodWines[$wineCount][13])){\r\n             $foodWines[$wineCount][13]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][13];\r\n         }   \r\n}\r\n\r\nif($food3!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food3){\r\n         $foodWines[$wineCount][14] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][14]==6){\r\n           $foodWines[$wineCount][14]=5;\r\n          } \r\n         if($foodWines[$wineCount][14]==0 OR is_null($foodWines[$wineCount][14])){\r\n             $foodWines[$wineCount][14]=1; \r\n          }\r\n        $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][14];\r\n         }   \r\n}\r\nif($food4!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food4){\r\n         $foodWines[$wineCount][15] = $row1[\'PairingValue\'.$x] * -1 + 6;\r\n          if($foodWines[$wineCount][15]==6){\r\n           $foodWines[$wineCount][15]=5;\r\n          } \r\n          if($foodWines[$wineCount][15]==0 OR is_null($foodWines[$wineCount][15])){\r\n             $foodWines[$wineCount][15]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][15];\r\n         }   \r\n   }   \r\n\r\n}  \r\n\r\n//echo $foodWines[$wineCount][1].\" \".$foodWines[$wineCount][12].\" \".$foodWines[$wineCount][13].\" \".$foodWines[$wineCount][14].\" \".$foodWines[$wineCount][15].\"<br>\";\r\n\r\nif($foodWines[$wineCount][12] <3  AND  $foodWines[$wineCount][13] < 3 AND $foodWines[$wineCount][14] < 3 AND $foodWines[$wineCount][15] < 3){\r\n//echo \"Skipping\".$foodWines[$wineCount][1].\"<br>\";\r\n$wineCount=$wineCount - 1;\r\n\r\n}\r\n\r\n}\r\n       \r\n}\r\n\r\n//sort Array\r\nif($listType==\'byFood\'){\r\nforeach ($foodWines as $key => $row) {\r\n    $score[$key]  = $row[6];\r\n    $winePrice[$key] = $row[11];\r\n}\r\n\r\n// With the use of the column keys you can now sort entire array by these columns and keep the row index value intact if they are non-numeric. This is good if your using some kind of hashed index.\r\n\r\narray_multisort($score, SORT_DESC, $winePrice, SORT_DESC, $foodWines);\r\n}\r\n\r\n\r\n     // echo $wineCount;\r\n       \r\nif($listType == \'byFood\'){\r\n$xstart = 0;\r\n$totalWines = $wineCount-1;\r\n}\r\nelse{\r\n$xstart = 1;\r\n$totalWines = $wineCount;\r\n\r\n}\r\n\r\n\r\nif($totalWines!=0){\r\n for($x = $xstart; $x <= $totalWines; $x++){\r\n\r\nif($listType == \'byFood\'){\r\n$y=$x+1;\r\n}\r\nelse{\r\n$y=$x;\r\n}       \r\n\r\n   if($listType==\"byCountry\"){\r\n\r\n               $listTypeName=$foodWines[$x][28];\r\n          \r\n\r\n         }\r\n         elseif($listType==\"byProfile\" AND $listTypeName!=\"\"){\r\n\r\n\r\n         }\r\n        elseif($listType==\"byProfile\" AND $listTypeName==\"\"){\r\n\r\n          $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byVarietal\"){\r\n          $listTypeName=$listName;\r\n        }\r\n\r\n        if($listType==\'bySearch\'){\r\n        $browsing=$y.\" of \".$wineCount.\"&nbsp;<b>Results for \'\".ucwords($search).\"\'</b>\";\r\n       }\r\n       elseif($listType==\'byCountry\'){\r\n\r\n              $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n\r\n\r\n           \r\n             if($foodWines[$x][29]==\'Rose\'){\r\n             $showName=$listName.\"&nbsp;(Rosé)\";\r\n             }\r\n             else{\r\n             $showName=$listName.\"&nbsp;(\".$foodWines[$x][29]. \" Wines)\";\r\n             }\r\n        }\r\n        elseif($listType==\'byVarietal\'){\r\n                  $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n\r\n                  $showName=$listName;\r\n         }\r\n         elseif($listType==\'byProfile\'){\r\n            $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" </b></a>\";\r\n\r\n            $showName=$listName;\r\n         }\r\n         elseif($listType==\"byGlass\"){\r\n         $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b> Wines By The Glass</b></a>\";\r\n\r\n         }\r\n         \r\n         elseif($listType==\"byFood\"){\r\n\r\n           $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/foodmatches/?food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\'><b> Food Matches</b></a>\";\r\n           \r\n          }\r\n\r\nif($browsing==\"\"){\r\n\r\n        $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n        echo \"<body>\";\r\n\r\n\r\necho \"<a class=\'anchor\' id=\'wine\".$y.\"\'></a>\";\r\n\r\n//set to 500 now so it does not change - effectively disabling\r\n\r\n        if(strlen($foodWines[$x][1].\"&emsp\".$foodWines[$x][22])>500){\r\n         $nameFont=\"1.1em\";\r\n         }\r\n        else{\r\n        $nameFont=\"1.35em\";\r\n        }\r\n\r\n  if($foodWines[$x][29] == \'Glass\' OR $foodWines[$x][39] == 1){\r\n        \r\n          if($foodWines[$x][45] == 5 OR $foodWines[$x][45] == 0){\r\n         $winePrice = \"<b>$\".$foodWines[$x][11].\"/glass</b>\";  \r\n          }\r\n          else{\r\n           $winePrice = \"<b>$\".$foodWines[$x][11].\"/glass (\".$foodWines[$x][45].\"oz)</b>\";\r\n           }\r\n         }        \r\n        else{\r\n        $winePrice= \"<b>$\".$foodWines[$x][11].\"</b>\";\r\n        }\r\n\r\n\r\n      \r\nif ($device == \'Windows\' OR $device == \'Mac\' OR $device == \'Linux\'){\r\n        $bodytext=\"justify\";\r\n        \r\n       echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 84%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n      \r\n\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\necho\"<tr>\";\r\n   \r\n echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n         if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\nelseif($device == \'iPad\' OR $device == \'Android\'){\r\n   \r\n  $bodytext=\"left\";\r\n\r\n      echo \"<table>\";\r\n\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 30%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 69%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n  \r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: normal;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n     if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n      elseif($device == \'iPhone\'){\r\n\r\n   $bodytext=\"left\";\r\n   \r\n\r\n\r\n \r\n echo \"<table>\";\r\n\r\necho \"<tr><td style=\'display:block-inline; text-align: center; font-size: 1.1em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n \r\n      \r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 35%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 64%;\'>\";\r\n        echo \"</colgroup>\";  \r\n\r\n         echo\"<tr>\";\r\n   \r\n      echo \"<td style=\'vertical-align: top; text-align: center; font-size: 1.25em;\'><span style=\'font-weight:bold\'>\".$winePrice.\"</span><br><br><img style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n       \r\n         \r\n\r\n     if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n         \r\n\r\n         //  ///Common Code Here\r\n        \r\n\r\n         \r\n  	if($listType==\"byFood\"){\r\n\r\n $foodarray = array($row[\'FoodPairing1\'], $row[\'FoodPairing2\'], $row[\'FoodPairing3\'], $row[\'FoodPairing4\'], $row[\'FoodPairing5\'], $row[\'FoodPairing6\'], $row[\'FoodPairing7\'], );\r\n         $goodfoods = \"\";\r\n         $badfoods = \"\";\r\n\r\n          if(in_array($food1, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood1;\r\n           }\r\n           elseif($food1!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood1;\r\n            }\r\n\r\n           if(in_array($food2, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n           }\r\n           elseif($food2!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood2;\r\n            }\r\n\r\n   if(in_array($food3, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood4;\r\n            }\r\n            \r\n        if($goodfoods!=\"\"){\r\n        $goodfoods=substr($goodfoods, (strlen($goodfoods)-2)*-1);\r\n         echo \"<font size=\'+1\'><b>We suggest with: </b>\".$goodfoods.\"<br><font>\";\r\n        }\r\n\r\n//alternate good food list - show all food listed as pairing with this wine\r\n      \r\n\r\n\r\n\r\n\r\n\r\n        if($badfoods!=\"\"){\r\n        $badfoods=substr($badfoods, (strlen($badfoods)-2)*-1);\r\n // leave off for now    echo \"<font size=\'+1\'><b>Mabye not so good with: </b>\".$badfoods.\"<br><font>\";\r\n        }\r\n\r\n\r\n          \r\n\r\n         }\r\n       \r\n        \r\n        $varietalText=$foodWines[$x][8];\r\n        if ($varietalText != \"\"){\r\n            if (strpos($foodWines[$x][1], $varietalText) > 0){\r\n                $varietalText=\"\";\r\n            }\r\n        }\r\n\r\n            // echo $foodWines[$x][8].\"<br>\";\r\n\r\n         if($varietalText != \"\"){\r\n               echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$varietalText.\"</span>\";\r\n               echo \"<br>\";\r\n         }\r\n   \r\n    \r\n if($foodWines[$x][7] != \"\"){\r\n\r\n    if($foodWines[$x][26] != \"\"){\r\n        echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\">\".$foodWines[$x][26].\"</span><br><br>\";\r\n    }\r\n    else{\r\n        echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\"</span><br><br>\";\r\n    }\r\n}\r\nelse{\r\n    echo \"<br>\";\r\n}\r\n// echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\">\".$foodWines[$x][26].\"</span><br><br>\";\r\n    \r\n//if($foodWines[$x][29]!=\'Glass\' AND $foodWines[$x][18] > 0){   \r\n// echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>In our Cellar: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][18].\"</span><br><font>\";\r\n//}\r\n\r\n    if (!empty($foodWines[$x][19])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Eyes: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][19].\"</span><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][20])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Nose: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][20].\"</span><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][21])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Mouth: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][21].\"</span><br><font>\";\r\n      }\r\n   \r\n      if (!empty($foodWines[$x][23]) AND $foodWines[$x][23]!=0) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Alcohol Content: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][23].\"%</span><br><font>\";\r\n      }\r\n  	if (!empty($foodWines[$x][34])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Ratings: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][34].\"</span><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($foodWines[$x][33])) {\r\n       echo \"<font size=\'+1\'><text align=\'justify\'><span style=\'font-weight: bold\'>Why we like it: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][33].\"</span><br><font>\";\r\n      }\r\n   if($screenWidth > 500){     \r\n  	if (!empty($foodWines[$x][24])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Pairs with: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][24].\"</span><br><font>\";\r\n      }\r\n}\r\nif($screenWidth > 500){    \r\n  	if (!empty($foodWines[$x][32])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>From the Winemaker: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][32].\"</span><br><font>\";\r\n      }\r\n}\r\n      echo \"<br><font size=\'-1\'><span style=\'font-weight: normal\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1</span><font>\";\r\n    \r\n    echo \"</td>\";\r\n\r\n    // echo \"<td valign=\'top\' align=\'left\'>\";\r\n    // echo do_shortcode($nextWine);\r\n    // echo \"</td>\";\r\n\r\n  	echo \"</tr>\";\r\n	echo \"</table>\";\r\n     echo \"<br><br><br><br>\";\r\n}\r\necho \"</body>\";\r\n}\r\nelse{\r\necho \"<h5>No Matching Results for  \'\".$search.\"\'</h5>\";\r\n}','[xyz-ips snippet=\"ContinuousDisplayPHP-4\"]',1),(21,'FrontPagePHP','<?php\r\n$variable = $_GET[\'s\'];\r\n\r\nif($variable!=\"\"){\r\n\r\necho \"TEST\".$variable;\r\n}','[xyz-ips snippet=\"FrontPagePHP\"]',1),(22,'byGlassPHP-expanded2','<?php\r\nif(!isset($_GET[\'screen_check\']))\r\n{\r\n /* This code will be executed if screen resolution has not been detected.*/\r\n echo \"<script language=\'JavaScript\'>\r\n <!-- \r\n document.location=\\\"$PHP_SELF?screen_check=done&Width=\\\"+screen.width+\\\"&Height=\\\"+screen.height;\r\n //-->\r\n </script>\";\r\n}\r\nelse \r\n{    \r\n /* This code will be executed after screen resolution is detected.*/\r\n    if(isset($_GET[\'Width\']) && isset($_GET[\'Height\'])) {\r\n // Resolution  detected\r\n //echo \"<h1>Your screen resolution is \".$_GET[\'Width\'].\" x \".$_GET[\'Height\'].\".</h1><br />\";\r\n //Display page as per resolution\r\n if(($_GET[\'Width\']>1024)&&($_GET[\'Height\']>768)) {\r\n //echo \"<b>This will be displayed when screen resolution is greater than 1024x768.</b>\";\r\n }\r\n else {\r\n //Display page as per resolution\r\n //echo \"<b>This will be displayed when screen resolution is either equal to or less than 1024x768.</b>\";\r\n }\r\n     }\r\n     else {\r\n               // Resolution not detected\r\n     }\r\n}\r\n\r\necho \"<meta http-equiv=\'refresh\' content=\'30\'>\";\r\n$screenWidth = $_GET[\'Width\'];\r\n$screenHeight = $_GET[\'Height\'];\r\n//echo $screenWidth;\r\n//echo \"<br>\";\r\n//echo $screenHeight;\r\n//echo \"<br>\";\r\n\r\n\r\n\r\n$variable = \'Glass\';\r\n\r\n  $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n \r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\n$sortButton=\"\";\r\n$wineCount=0;\r\nfor($x=1; $x<=3; $x++){ \r\n\r\n$wineCount1=0;\r\nif($x==1){\r\n$sql=\"SELECT * FROM Wines WHERE WineType=\'Glass\' AND AvailableToday = -1 AND AvailableOnRequest = 0 AND AvailablePremium = 0 ORDER BY WineType2, WinePrice\";\r\n      	\r\n\r\n}\r\nelseif($x==2){\r\n\r\n$sql=\"SELECT * FROM Wines WHERE WineType=\'Glass\' AND AvailableToday = 0 AND AvailableOnRequest = 0 AND AvailablePremium = -1 ORDER BY WineType2, WinePrice\";\r\n\r\n}\r\nelseif($x==3){\r\n$sql=\"SELECT * FROM Wines WHERE WineSize >0 AND WineSize < 750  AND WineType!=\'Glass\' ORDER BY WineType2, WinePrice\";\r\n\r\n}\r\nelse{\r\n$sql=\"SELECT * FROM Wines WHERE WineType=\'Glass\' AND AvailableToday = 0 AND AvailableOnRequest = -1 AND AvailablePremium = 0 ORDER BY WineType2, WinePrice\";\r\n\r\n\r\n}\r\necho \"<div class=\'container\'>\";\r\n echo   \"<table id=\'table1\'>\";\r\n\r\n$records1=mysqli_query($con, $sql);\r\nwhile($wines=mysqli_fetch_assoc($records1)){\r\n        $wineCount=$wineCount+1;\r\n        $wineCount1=$wineCount1+1;\r\n        if($wineCount1 == 1){\r\n            if($x==1){\r\n                      $prevType= 0;\r\n                      echo \"<tr><td style=\'width: 90%; opacity: 1.0; font-weight: bold; font-size: 1.75em;\'>Today\'s Wine By the Glass (5 oz pour)</td><td></td></tr>\";\r\n                    $opacity = 1.0;\r\n             }\r\n             elseif($x==2){\r\n                       $prevType= 0;\r\n                        echo \"<tr><td style=\'width: 90%; opacity: 1.0; font-weight: bold; font-size: 1.75em;\'>Premium Wines By the Glass</td><td></td></tr>\";\r\n                     $opacity = 1.0;\r\n             }\r\n             elseif($x==3){\r\n                  $prevType= 0;\r\n                   //echo \"<tr><td style=\'width: 90%; opacity: 1.0; font-weight: bold; font-size: 1.75em;\'>Sparkling (small bottles)</td><td></td></tr>\";\r\n                   echo \"<tr><td style=\'width: 90%; opacity: 1.0; font-weight: bold; font-size: 1.75em;\'>Sparkling</td><td></td></tr>\";\r\n                  $opacity = 1.0;\r\n\r\n             }\r\n\r\n              else{\r\n                    $prevType= 0;\r\n                     echo \"<tr><td style=\'width: 90%; opacity: 1.0; font-weight: bold; font-size: 1.75em;\'>By the Glass - On Request (2 glass minimum)</td><td></td></tr>\";\r\n                    $opacity = 0.5;\r\n              }\r\n         } 	\r\n          \r\n\r\n\r\n\r\n\r\n          if($wines[\'WineVintage\']==0){\r\n          	\r\n            $vintage=NULL;	\r\n          }\r\n          else{\r\n          	$vintage=$wines[\'WineVintage\'];\r\n          }\r\n            if($wines[\'QtyInStock\'] < 3 AND $wines[\'WineType\']!=\'Glass\'){\r\n          $lowStock = \"* \";\r\n          }\r\n          else{\r\n          $lowStock = \"\";\r\n           }\r\n          if($wines[\'WineSize\']<750 AND $wines[\'WineSize\']!=0){\r\n                 $sizeinfo=\"\";    //$sizeinfo=\"&nbsp;(small bottle)\";\r\n          }\r\n          else{\r\n               $sizeinfo=\"\";\r\n          }	\r\n\r\nif ( wonderplugin_is_device(\'Windows,Mac,Linux,iPad\' )){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"singleitem-smallscreen/\";\r\n}\r\n \r\n\r\n           $wineID=\"<b><span style= \'opacity: \".$opacity.\";\'><a  href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byGlass&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></span></b>\";\r\n   \r\n   if($prevID != $wines[\'WineType2\']){\r\n      $prevID = $wines[\'WineType2\'];\r\n      if($prevID == 1){\r\n\r\n         echo \"<tr><td style=\'opacity: \".$opacity.\"; font-weight: bold; font-size: 1.25em; line-height: 50%;\'>White</td><td></td></tr>\";\r\n       }\r\n       elseif($prevID == 2){\r\n\r\n         echo \"<tr><td style=\'opacity: \".$opacity.\"; font-weight: bold; font-size: 1.25em; line-height: 50%;\'>Red</td><td></td></tr>\";\r\n       }\r\n       elseif($prevID == 3){\r\n\r\n           echo \"<tr><td style=\'opacity: \".$opacity.\"; font-weight: bold; font-size: 1.25em; line-height: 50%;\'>Sparkling</td><td></td></tr>\";\r\n       }\r\n       elseif($prevID == 4){\r\n\r\n              echo \"<tr><td style=\'opacity: \".$opacity.\"; font-weight: bold; font-size: 1.25em; line-height: 50%;\'>Rosé</td><td></td></tr>\";\r\n       }\r\n    }\r\necho \"</table></div>\";\r\n\r\n   echo \"<span style=\'font-size: 1.25em; text-align: left; width:85%; line-height: 100%; display: inline-block;\'>\".$wineID.\"</span>\";\r\n	        \r\n                 $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b><br>\";\r\n                 echo \"<span style=\'font-size: 1.25em; text-align: right; width:15%; line-height: 150%; display: inline-block;\'>\".$winePrice.\"</span><br>\"; \r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'].\"<br>\";\r\n                       echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineVarietal.\"</span><br>\";\r\n\r\n                  }\r\n	\r\n  		$wineCountry=$wines[\'WineCountry\'].\">\".$wines[\'WineRegion\'];\r\n             \r\n                 if(substr($wineCountry, strlen($wineCountry)-1,1)==\">\"){\r\n\r\n                       $wineCountry=substr($wineCountry, 0, strlen($wineCountry)-1);\r\n                }\r\n                      $wineCountry=$wineCountry.\"<br>\";\r\n\r\n		echo \"<span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineCountry.\"</span><br>\";\r\n                        \r\n             \r\n                  echo \"<br>\"; \r\n    \r\n                \r\n        }\r\n        echo \"<br>\";\r\n}\r\n\r\n\r\n\r\necho \"<br><font size=\'-1\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). <br>BZ$2 = US$1<font>\";','[xyz-ips snippet=\"byGlassPHP-expanded2\"]',1),(23,'DisplayFoodMatchPHP2','<?php\r\n$food1 = $_GET[\'food1\'];\r\n$food2 = $_GET[\'food2\'];\r\n$food3 = $_GET[\'food3\'];\r\n$food4 = $_GET[\'food4\'];\r\n\r\n$food1 = str_replace(\"%20\",\" \",$food1);\r\n$food2 = str_replace(\"%20\",\" \",$food2);\r\n$food3 = str_replace(\"%20\",\" \",$food3);\r\n$food4 = str_replace(\"%20\",\" \",$food4);\r\n\r\n\r\n\r\n\r\n$score5 = \"[wpfa5s icon=\'fa-grin-stars\']\";\r\n$score4 = \"[wpfa5s icon=\'fa-grin-alt\']\";\r\n$score3 = \"[wpfa5r icon=\'fa-smile\']\";\r\n$score2 = \"[wpfa5r icon=\'fa-meh\']\";\r\n$score1 = \"[wpfa5s icon=\'fa-solid\']\";\r\n\r\n$score5color = \"#06cc27\";\r\n$score4color = \"#08d1d1\";\r\n$score3color = \"#04a3f2\";\r\n$score2color = \"#000000\";\r\n$score1color = \"#000000\";\r\n\r\n$nocheck = \"[icon name=\'fa-fw\']\";\r\n\r\n\r\n$con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n \r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\n\r\n$sql=\"SELECT * FROM Wines WHERE 1 = 1 \";\r\n\r\n$food1Wines = array();\r\n$food2Wines = array();\r\n$food3Wines = array();\r\n$food4Wines = array();\r\n$foodWines = array();      //two dimensional array 1= name, 2 = food1, 3 = food2, 4 = food3, 5 = food4, 6 = score, 7 = country, 8 = varietal, 9 = btl or glass, 10 = WineID, 11 = Price, 12 = food1 score, 13 = food2 score, 14 = food3 score, 15 = food4 score\r\n$winescore = array();\r\n$wineCountry = array();\r\n$wineVarietal = array();\r\n$wineType = array();\r\n\r\n\r\n$sql=\"SELECT * FROM Wines WHERE (WineType != \'Glass\' AND QtyInStock > 0) OR (WineType = \'Glass\' AND AvailableToday = -1)\";\r\n\r\n$records=mysqli_query($con, $sql);\r\n$wineCount = 0;\r\n\r\nwhile($wines=mysqli_fetch_assoc($records)){\r\n\r\n$wineCount = $wineCount + 1;\r\n$foodWines[$wineCount][1] = $wines[\'WineName\'];\r\n\r\n$foodWines[$wineCount][7]  = $wines[\'WineCountry\'];\r\n$foodWines[$wineCount][8] = $wines[\'WineVarietal\'];\r\n$foodWines[$wineCount][10] = $wines[\'ID\'];\r\n$foodWines[$wineCount][11] = $wines[\'WinePrice\'];\r\n\r\nif($wines[\'WineType\'] == \"Glass\"){\r\n$foodWines[$wineCount][6] = 100;\r\n$foodWines[$wineCount][9] = 0;\r\n}\r\nelse{\r\n$foodWines[$wineCount][6] = 0;\r\n$foodWines[$wineCount][9] = 1;\r\n}\r\n\r\n\r\n\r\nfor($x = 1; $x <= 15; $x++){\r\n\r\nif($food1!=\"\"){\r\n         if($wines[\'FoodPairing\'.$x]==$food1){\r\n          \r\n          $foodWines[$wineCount][12] = $wines[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][12]==6){\r\n           $foodWines[$wineCount][12]=5;\r\n          } \r\n          if($foodWines[$wineCount][12]==0 OR is_null($foodWines[$wineCount][12])){\r\n             $foodWines[$wineCount][12]=5; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][12];\r\n         }   \r\n}\r\n\r\nif($food2!=\"\"){\r\n         if($wines[\'FoodPairing\'.$x]==$food2){\r\n         $foodWines[$wineCount][13] = $wines[\'PairingValue\'.$x] * -1 + 6; \r\n         if($foodWines[$wineCount][13]==6){\r\n           $foodWines[$wineCount][13]=5;\r\n          } \r\n         if($foodWines[$wineCount][13]==0 OR is_null($foodWines[$wineCount][13])){\r\n             $foodWines[$wineCount][13]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][13];\r\n         }   \r\n}\r\n\r\nif($food3!=\"\"){\r\n         if($wines[\'FoodPairing\'.$x]==$food3){\r\n         $foodWines[$wineCount][14] = $wines[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][14]==6){\r\n           $foodWines[$wineCount][14]=5;\r\n          } \r\n         if($foodWines[$wineCount][14]==0 OR is_null($foodWines[$wineCount][14])){\r\n             $foodWines[$wineCount][14]=1; \r\n          }\r\n        $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][14];\r\n         }   \r\n}\r\nif($food4!=\"\"){\r\n         if($wines[\'FoodPairing\'.$x]==$food4){\r\n         $foodWines[$wineCount][15] = $wines[\'PairingValue\'.$x] * -1 + 6;\r\n          if($foodWines[$wineCount][15]==6){\r\n           $foodWines[$wineCount][15]=5;\r\n          } \r\n          if($foodWines[$wineCount][15]==0 OR is_null($foodWines[$wineCount][15])){\r\n             $foodWines[$wineCount][15]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][15];\r\n         }   \r\n   }   \r\n }\r\n  \r\n}\r\n\r\n if($foodWines[$wineCount][12] <3  AND  $foodWines[$wineCount][13] < 3 AND $foodWines[$wineCount][14] < 3 AND $foodWines[$wineCount][15] < 3){\r\n$wineCount=$wineCount - 1;\r\n}\r\n\r\nif($food1!=\"\"){\r\n$xfood1=substr($food1, (strlen($food1)-2)*-1);\r\n}\r\nif($food2!=\"\"){\r\n$xfood2=substr($food2, (strlen($food2)-2)*-1);\r\n}\r\nif($food3!=\"\"){\r\n$xfood3=substr($food3, (strlen($food3)-2)*-1);\r\n}\r\nif($food4!=\"\"){\r\n$xfood4=substr($food4, (strlen($food4)-2)*-1);\r\n}\r\n\r\n\r\nforeach ($foodWines as $key => $row) {\r\n    $score[$key]  = $row[6];\r\n    $winePrice[$key] = $row[11];\r\n}\r\n\r\n// With the use of the column keys you can now sort entire array by these columns and keep the row index value intact if they are non-numeric. This is good if your using some kind of hashed index.\r\n\r\n\r\narray_multisort($score, SORT_DESC, $winePrice, SORT_DESC, $foodWines);\r\n\r\n// print_r($foodWines); //array dump. You will see that $data was resorted in the correct manner.\r\n\r\n echo  \"<table width=100%>\";\r\necho \"<colgroup>\";\r\necho \"<col style=\'width:52%\'>\";\r\necho \"<col style=\'width:12%\'>\";\r\necho \"<col style=\'width:12%\'>\";\r\necho \"<col style=\'width:12%\'>\";\r\necho \"<col style=\'width:12%\'>\";\r\necho \"</colgroup>\";\r\necho \"<tr>\";\r\necho \"<td  style=\'text-align: left; font-size: 1.75em; font-weight: bold;\'>Suggested Wines</td>\";\r\n      if($food1 != \"none\" AND $food1 != \"\"){\r\n          echo \"<td style=\'text-align: center; font-size: 1.25em;\'>\";\r\n           echo $xfood1;\r\n          echo \"</td>\";\r\n           }\r\n           if($food2 != \"none\" AND $food2 != \"\"){\r\n          echo \"<td style=\'text-align: center; font-size: 1.25em;\'>\";\r\n          \r\n            echo $xfood2;\r\n          echo \"</td>\";\r\n           }\r\n           if($food3 != \"none\" AND $food3 != \"\"){\r\n          echo \"<td style=\'text-align: center; font-size: 1.25em;\'>\";\r\n          \r\n           echo $xfood3;\r\n          echo \"</td>\";\r\n           }\r\n           if($food4 != \"none\" AND $food4 != \"\"){\r\n           echo \"<td style=\'text-align: center; font-size: 1.25em;\'>\";\r\n            \r\n            echo $xfood4;\r\n          echo \"</td>\";\r\n           }\r\n        echo \"</tr></table>\";\r\n\r\necho \"<section class=\'\'>\";\r\necho  \"<div class=\'container\'>\";\r\necho  \"<table width=100%>\";\r\necho \"<colgroup>\";\r\necho \"<col style=\'width:52%\'>\";\r\necho \"<col style=\'width:12%\'>\";\r\necho \"<col style=\'width:12%\'>\";\r\necho \"<col style=\'width:12%\'>\";\r\necho \"<col style=\'width:12%\'>\";\r\necho \"</colgroup>\";\r\n\r\necho \"<tbody>\";\r\n\r\n\r\nif (wonderplugin_is_device(\'Windows,Mac,Linux,iPad\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n$GlassTitle = False;\r\n$BottleTitle = False;\r\n\r\n$food1 = str_replace(\"&\",\"%26\",$food1);\r\n$food2 = str_replace(\"&\",\"%26\",$food2);\r\n$food3 = str_replace(\"&\",\"%26\",$food3);\r\n$food4 = str_replace(\"&\",\"%26\",$food4);\r\n\r\n$wineNumber=0;\r\nfor($x = 0; $x <= $wineCount-1; $x++){\r\n\r\nif($x==0 AND $foodWines[$x][6] >100 AND $GlassTitle == False){\r\necho \"<tr><td style=\'text-align: left; font-size: 1.25em; font-weight: 700;\' >By the Glass</td><td></tr>\";\r\n$GlassTitle = True;\r\n}\r\nelseif($x!=0 AND $GlassTitle == True AND $BottleTitle == False AND $foodWines[$x][9] == 1){\r\n\r\necho \"<tr><td></td></tr><tr><td style=\'text-align: left; font-size: 1.25em; font-weight: 700;\' >By the Bottle</td></tr>\";\r\n$BottleTitle = True;\r\n}\r\n\r\nif(($foodWines[$x][6] < 100 AND $foodWines[$x][6] >=3) OR $foodWines[$x][6] >=103){\r\n   if($foodWines[$x][9] == 0){\r\n       $winePrice = \"$\".$foodWines[$x][11].\"/Glass\";\r\n    }\r\n    else{\r\n       $winePrice = \"$\".$foodWines[$x][11];\r\n     }    \r\n$wineNumber=$wineNumber+1;      \r\n           $wineID=\"<b><a href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$foodWines[$x][10].\"&listType=byFood&listName=Food&linkCount=1&food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"#wine\".$wineNumber.\"\'>\".$foodWines[$x][1].\"&emsp;\".$winePrice.\"</a></b>\";\r\n\r\n\r\necho \"<tr><td style=\'text-align: left; font-size: 1.2em;\' >\".$wineID.\"<br><font = \'-1\'>\".$foodWines[$x][7].\" / \".$foodWines[$x][8].\"</font></td>\";\r\n\r\nif($food1 != \"none\" AND $food1 != \"\"){\r\nif($foodWines[$x][12]==5){\r\necho \"<td style=\'text-align: center;  font-size: 1em;\'><img src=\'http://www.bistrowinelist.com/WineListImages/3stars.png\'></td>\";\r\n}\r\nelseif($foodWines[$x][12]==4){\r\necho \"<td style=\'text-align: center;  font-size: 1em;\'><img src=\'http://www.bistrowinelist.com/WineListImages/2stars.png\'></td>\";\r\n}\r\nelseif($foodWines[$x][12]==3){\r\necho \"<td style=\'text-align: center;  font-size: 1em;\'><img src=\'http://www.bistrowinelist.com/WineListImages/1star.png\'></td>\";\r\n}\r\nelse{\r\necho \"<td></td>\";\r\n}\r\n}\r\n\r\nif($food2 != \"none\" AND $food2 != \"\"){\r\nif($foodWines[$x][13]==5){\r\necho \"<td style=\'text-align: center;  font-size: 1em;\'><img src=\'http://www.bistrowinelist.com/WineListImages/3stars.png\'></td>\";\r\n}\r\nelseif($foodWines[$x][13]==4){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score4color.\";\'>&nbsp;\".do_shortcode($score4).\"</td>\";\r\n}\r\nelseif($foodWines[$x][13]==3){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score3color.\";\'>&nbsp;\".do_shortcode($score3).\"</td>\";\r\n}\r\nelse{\r\necho \"<td></td>\";\r\n}\r\n}\r\n\r\n\r\nif($food3 != \"none\" AND $food3 != \"\"){\r\nif($foodWines[$x][14]==5){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score5color.\";\'>&nbsp;\".do_shortcode($score5).\"</td>\";\r\n}\r\nelseif($foodWines[$x][14]==4){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score4color.\";\'>&nbsp;\".do_shortcode($score4).\"</td>\";\r\n}\r\nelseif($foodWines[$x][14]==3){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score3color.\";\'>&nbsp;\".do_shortcode($score3).\"</td>\";\r\n}\r\nelse{\r\necho \"<td></td>\";\r\n}\r\n}\r\n\r\nif($food4 != \"none\" AND $food4 != \"\"){\r\nif($foodWines[$x][15]==5){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score5color.\";\'>&nbsp;\".do_shortcode($score5).\"</td>\";\r\n}\r\nelseif($foodWines[$x][15]==4){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score4color.\";\'>&nbsp;\".do_shortcode($score4).\"</td>\";\r\n}\r\nelseif($foodWines[$x][15]==3){\r\necho \"<td style=\'text-align: center;  font-size: 2em; color: \".$score3color.\";\'>&nbsp;\".do_shortcode($score3).\"</td>\";\r\n}\r\nelse{\r\necho \"<td></td>\";\r\n}\r\n}\r\n\r\n// echo \"<td style=\'text-align: center;  font-size: 1.5em;\'>\".$winescore[$x].\"</td>\";\r\n\r\necho \"</tr>\";\r\n\r\n}\r\n}\r\necho \"</tbody></table></div></section>\";','[xyz-ips snippet=\"DisplayFoodMatchPHP2\"]',1),(24,'ContinuousDisplayPHP-5','<?php\r\n\r\n$search = $_GET[\'search\'];\r\n\r\n\r\n$variable = $_GET[\'WineID\'];\r\n$listType = $_GET[\'listType\'];\r\n$listName = $_GET[\'listName\'];\r\n$linkCount = $_GET[\'linkCount\'];\r\n$food1 = trim($_GET[\'food1\']);\r\n$food2 = trim($_GET[\'food2\']);\r\n$food3 = trim($_GET[\'food3\']);\r\n$food4 = trim($_GET[\'food4\']);\r\n$wineNumber = 0;\r\n$screenWidth = 1000;\r\n\r\nif(!empty($search)){\r\n  $listType = \"bySearch\";\r\n}\r\n\r\n\r\n\r\nif(wonderplugin_is_device(\'iPhone\')){\r\n$screenWidth = 400;\r\n$device = \"iPhone\";\r\n}\r\nelseif(wonderplugin_is_device(\'Windows\')){\r\n$screenWidth = 1000;\r\n$device = \"Windows\";\r\n}\r\nelseif(wonderplugin_is_device(\'iPad\')){\r\n$screenWidth = 1000;\r\n$device = \"iPad\";\r\n}\r\nelseif(wonderplugin_is_device(\'Mac\')){\r\n$screenWidth = 1000;\r\n$device = \"Mac\";\r\n\r\n}\r\nelseif(wonderplugin_is_device(\'Android\')){\r\n$screenWidth = 1000;\r\n$device = \"Android\";\r\n}\r\n\r\n//echo \"Width \",$screenWidth;\r\n\r\n\r\nif($food1!=\"\"){\r\n$xfood1=substr($food1, (strlen($food1)-2)*-1);\r\n}\r\nif($food2!=\"\"){\r\n$xfood2=substr($food2, (strlen($food2)-2)*-1);\r\n}\r\nif($food3!=\"\"){\r\n$xfood3=substr($food3, (strlen($food3)-2)*-1);\r\n}\r\nif($food4!=\"\"){\r\n$xfood4=substr($food4, (strlen($food4)-2)*-1);\r\n}\r\n\r\n\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\nif (wonderplugin_is_device(\'iPhone\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\nif($listType==\"bySearch\"){\r\n\r\n     $sql=\"SELECT * FROM Wines WHERE (WineName Like \'%\".$search.\"%\' OR WineRegion Like \'%\".$search.\"%\' OR WineCountry Like \'%\".$search.\"%\' OR WineNationality Like \'%\".$search.\"%\' OR WineSubRegion Like \'%\".$search.\"%\' OR Category Like \'%\".$search.\"%\' OR Category2 Like \'%\".$search.\"%\' OR Category3 Like \'%\".$search.\"%\'  OR  Desc1 Like \'%\".$search.\"%\' OR  Desc2 Like \'%\".$search.\"%\' OR  Desc3 Like \'%\".$search.\"%\' OR  Desc4 Like \'%\".$search.\"%\' OR  Eyes Like \'%\".$search.\"%\' OR  Nose Like \'%\".$search.\"%\' OR  Mouth Like \'%\".$search.\"%\' OR  WineVarietal Like \'%\".$search.\"%\' OR  WineProfile1 Like \'%\".$search.\"%\' OR  WineProfile2 Like \'%\".$search.\"%\' OR  PairingSuggestion Like \'%\".$search.\"%\' OR  WineVintage Like \'%\".$search.\"%\') AND WineType != \'Glass\' AND QtyInStock <> -1 ORDER BY WinePrice\";\r\n\r\n// Does not include Desc1 \'From the Winemaker\'\r\n\r\n\r\n// echo $sql;\r\n//$records1=mysqli_query($con, $sql);\r\n//       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n//       echo $row1[\'WineName\'],\"<br>\";\r\n//}\r\n}\r\nelseif($listType==\"byVarietal\"){\r\n      $sql=\"SELECT * FROM Wines WHERE (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE WineCountry = \'\".$listName.\"\' AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY CASE \r\n               WHEN WineType = \'Sparkling\' THEN 1\r\n               WHEN WineType = \'White\' THEN 2\r\n               WHEN WineType = \'Rose\' THEN 3\r\n               WHEN WineType = \'Red\' THEN 4\r\n               ELSE 5\r\n         END,  WinePrice\";\r\n          \r\n\r\n}\r\nelseif($listType==\"byProfile\"){\r\n\r\n      if($listName==\"WhitesAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock!=-1 ORDER BY WineName\";\r\n            $showName=\"All Whites A - Z\";\r\n            $listTypeName=\"White Wines\";\r\n      }\r\n       elseif($listName==\"WhitePrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock!=-1 ORDER BY WinePrice\";\r\n            $showName=\"All Whites by Price\";\r\n            $listTypeName=\"White Wines\";\r\n      }\r\n      elseif($listName==\"RedsAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock!=-1 ORDER BY WineName\";\r\n            $showName=\"All Reds A - Z\";\r\n            $listTypeName=\"Red Wines\";\r\n      }\r\n      elseif($listName==\"RedPrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock!=-1 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red Wines\";\r\n      }    \r\n      \r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byGlass\"){\r\n\r\n // $sql=\"SELECT * FROM Wines WHERE WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WineType2, WinePrice\";           \r\n\r\n$sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND (AvailableToday = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY AvailableToday, AvailablePremium, WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n// $sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND (AvailableToday = -1 OR AvailableOnRequest = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n     \r\n}\r\nelseif($listType==\"byFood\"){\r\n\r\n$foodList = \"(\'\".$food1.\"\', \'\".$food2.\"\', \'\".$food3.\"\', \'\".$food4.\"\')\";\r\n\r\n$sql=\"SELECT * FROM Wines WHERE ((WineType != \'Glass\' AND QtyInStock!=-1) OR (WineType = \'Glass\' AND AvailableToday = -1))  AND (FoodPairing1 IN \".$foodList.\" OR FoodPairing2 IN \".$foodList.\" OR FoodPairing3 IN \".$foodList.\" OR FoodPairing4 IN \".$foodList.\" OR FoodPairing5 IN \".$foodList.\" OR FoodPairing6 IN \".$foodList.\" OR FoodPairing7 IN \".$foodList.\" OR FoodPairing8 IN \".$foodList.\" OR FoodPairing9 IN \".$foodList.\" OR FoodPairing10 IN \".$foodList.\"  OR FoodPairing11 IN \".$foodList.\"  OR FoodPairing12 IN \".$foodList.\"  OR FoodPairing13 IN \".$foodList.\"  OR FoodPairing14 IN \".$foodList.\"  OR FoodPairing15 IN \".$foodList.\")\";\r\n\r\n$showName=\"Food Pairings\";\r\n$listTypeName=\"Food Matches\";\r\n}\r\n\r\n\r\n\r\n// Read all wines to determine length of list.\r\n// Need to sort items based on match score (desc) then price (asc). Wines by the glass will appear first as they have 6 added\r\n// to the base score whereas other wines start at 0\r\n\r\n       $IDarray=array();\r\n       $wineCount=0;\r\n      $foodWines = array();      //two dimensional array 1= name, 2 = food1, 3 = food2, 4 = food3, 5 = food4, 6 = score, 7 = country, 8 = varietal, 9 = btl or glass, 10 = WineID, 11 = Price. 12 = Desc1, 13 = Desc2, 14= Desc3, 15 = Desc 4, 16 = Image1, 17= Image2, 18 = QtyInStock, 19 = Eyes, 20 = Nose, 21 = Mouth, 22 = Vintage, 23 = Alcohol Content, 24 = Pairing Suggestion , 25=Cases Produced, 26 = WineRegion, 27 = Wine Subregion, 28 = Nationality\r\n\r\n\r\n       $records1=mysqli_query($con, $sql);\r\n       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n            \r\n      $wineCount = $wineCount+1;\r\n\r\n      $foodWines[$wineCount][1] = $row1[\'WineName\'];\r\n      $foodWines[$wineCount][6] = 0;\r\n      $foodWines[$wineCount][7]  = $row1[\'WineCountry\'];\r\n      $foodWines[$wineCount][8] = $row1[\'WineVarietal\'];\r\n      $foodWines[$wineCount][10] = $row1[\'ID\'];\r\n      $foodWines[$wineCount][11] = $row1[\'WinePrice\'];\r\n      //$foodWines[$wineCount][12] = $row1[\'PairingValue1\'];\r\n      //$foodWines[$wineCount][13] = $row1[\'PairingValue2\'];\r\n      //$foodWines[$wineCount][14] = $row1[\'PairingValue3\'];\r\n      //$foodWines[$wineCount][15] = $row1[\'PairingValue4\'];\r\n      $foodWines[$wineCount][32] = $row1[\'Desc1\'];\r\n      $foodWines[$wineCount][33] = $row1[\'Desc2\'];\r\n      $foodWines[$wineCount][34] = $row1[\'Desc3\'];\r\n      $foodWines[$wineCount][35] = $row1[\'Desc4\'];\r\n      $foodWines[$wineCount][16] = $row1[\'Image1\'];\r\n      $foodWines[$wineCount][17] = $row1[\'Image2\'];\r\n      $foodWines[$wineCount][18] = $row1[\'QtyInStock\'];\r\n      $foodWines[$wineCount][19] = $row1[\'Eyes\'];\r\n      $foodWines[$wineCount][20] = $row1[\'Nose\'];\r\n      $foodWines[$wineCount][21] = $row1[\'Mouth\'];\r\n      $foodWines[$wineCount][22] = $row1[\'WineVintage\'];\r\n      $foodWines[$wineCount][23] = $row1[\'AlcoholContent\'];\r\n      $foodWines[$wineCount][24] = $row1[\'PairingSuggestion\'];\r\n      $foodWines[$wineCount][25] = $row1[\'CasesProduced\'];\r\n      $foodWines[$wineCount][26] = $row1[\'WineRegion\'];\r\n      $foodWines[$wineCount][27] = $row1[\'WineSubregion\'];\r\n      $foodWines[$wineCount][28] = $row1[\'WineNationality\'];  \r\n      $foodWines[$wineCount][29] = $row1[\'WineType\']; \r\n      $foodWines[$wineCount][30] = $row1[\'WineSize\']; \r\n      $foodWines[$wineCount][36] = $row1[\'AvailableToday\'];\r\n      $foodWines[$wineCount][37] = $row1[\'AvailablePremium\'];\r\n      $foodWines[$wineCount][38] = $row1[\'AvailableOnRequest\'];  \r\n       $foodWines[$wineCount][39] = $row1[\'SoldAs\'];\r\n      $foodWines[$wineCount][45] = $row1[\'ServingSize\'];\r\n\r\n      if( $foodWines[$wineCount][29] == \"Glass\"){\r\n          $foodWines[$wineCount][6] = 100;\r\n          $foodWines[$wineCount][9] = 0;\r\n          }\r\n      else{\r\n            $foodWines[$wineCount][9] = 1;\r\n            $foodWines[$wineCount][6] = 0;\r\n      }\r\nif($listType==\'bySearch\'){\r\nfor($x = 1; $x <= 40; $x++){\r\nif($x!=16 AND $x!=17){\r\n$foodWines[$wineCount][$x]= preg_replace(\"/\".$search.\"/i\", \"<span style=\'background-color: #FFFF00;\'>\\$0</span>\",$foodWines[$wineCount][$x]);\r\n}\r\n}\r\n}\r\n\r\n// preg_replace(\"/the/i\", \"<b>\\$0</b>\", $original);\r\n\r\n\r\n\r\n// $foodWines[$wineCount][1] = \"<span style=\"background-color: #FFFF00\">\".$foodWines[$wineCount][1].\"</span>\" \r\n\r\nif($listType == \'byFood\'){\r\n\r\n// only sort the array if this is a food match selection\r\n\r\n$minPairing = 0;\r\n\r\nfor($x = 1; $x <= 15; $x++){\r\n\r\nif($food1!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food1){\r\n          \r\n          $foodWines[$wineCount][12] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][12]==6){\r\n           $foodWines[$wineCount][12]=5;\r\n          } \r\n          if($foodWines[$wineCount][12]==0 OR is_null($foodWines[$wineCount][12])){\r\n             $foodWines[$wineCount][12]=5; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][12];\r\n         }   \r\n}\r\n\r\nif($food2!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food2){\r\n         $foodWines[$wineCount][13] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n         if($foodWines[$wineCount][13]==6){\r\n           $foodWines[$wineCount][13]=5;\r\n          } \r\n         if($foodWines[$wineCount][13]==0 OR is_null($foodWines[$wineCount][13])){\r\n             $foodWines[$wineCount][13]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][13];\r\n         }   \r\n}\r\n\r\nif($food3!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food3){\r\n         $foodWines[$wineCount][14] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][14]==6){\r\n           $foodWines[$wineCount][14]=5;\r\n          } \r\n         if($foodWines[$wineCount][14]==0 OR is_null($foodWines[$wineCount][14])){\r\n             $foodWines[$wineCount][14]=1; \r\n          }\r\n        $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][14];\r\n         }   \r\n}\r\nif($food4!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food4){\r\n         $foodWines[$wineCount][15] = $row1[\'PairingValue\'.$x] * -1 + 6;\r\n          if($foodWines[$wineCount][15]==6){\r\n           $foodWines[$wineCount][15]=5;\r\n          } \r\n          if($foodWines[$wineCount][15]==0 OR is_null($foodWines[$wineCount][15])){\r\n             $foodWines[$wineCount][15]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][15];\r\n         }   \r\n   }   \r\n\r\n}  \r\n\r\n//echo $foodWines[$wineCount][1].\" \".$foodWines[$wineCount][12].\" \".$foodWines[$wineCount][13].\" \".$foodWines[$wineCount][14].\" \".$foodWines[$wineCount][15].\"<br>\";\r\n\r\nif($foodWines[$wineCount][12] <3  AND  $foodWines[$wineCount][13] < 3 AND $foodWines[$wineCount][14] < 3 AND $foodWines[$wineCount][15] < 3){\r\n//echo \"Skipping\".$foodWines[$wineCount][1].\"<br>\";\r\n$wineCount=$wineCount - 1;\r\n\r\n}\r\n\r\n}\r\n       \r\n}\r\n\r\n//sort Array\r\nif($listType==\'byFood\'){\r\nforeach ($foodWines as $key => $row) {\r\n    $score[$key]  = $row[6];\r\n    $winePrice[$key] = $row[11];\r\n}\r\n\r\n// With the use of the column keys you can now sort entire array by these columns and keep the row index value intact if they are non-numeric. This is good if your using some kind of hashed index.\r\n\r\narray_multisort($score, SORT_DESC, $winePrice, SORT_DESC, $foodWines);\r\n}\r\n\r\n\r\n     // echo $wineCount;\r\n       \r\nif($listType == \'byFood\'){\r\n$xstart = 0;\r\n$totalWines = $wineCount-1;\r\n}\r\nelse{\r\n$xstart = 1;\r\n$totalWines = $wineCount;\r\n\r\n}\r\n\r\n\r\nif($totalWines!=0){\r\n for($x = $xstart; $x <= $totalWines; $x++){\r\n\r\nif($listType == \'byFood\'){\r\n$y=$x+1;\r\n}\r\nelse{\r\n$y=$x;\r\n}       \r\n\r\n   if($listType==\"byCountry\"){\r\n\r\n               $listTypeName=$foodWines[$x][28];\r\n          \r\n\r\n         }\r\n         elseif($listType==\"byProfile\" AND $listTypeName!=\"\"){\r\n\r\n\r\n         }\r\n        elseif($listType==\"byProfile\" AND $listTypeName==\"\"){\r\n\r\n          $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byVarietal\"){\r\n          $listTypeName=$listName;\r\n        }\r\n\r\n        if($listType==\'bySearch\'){\r\n        $browsing=$y.\" of \".$wineCount.\"&nbsp;<b>Results for \'\".ucwords($search).\"\'</b>\";\r\n       }\r\n       elseif($listType==\'byCountry\'){\r\n\r\n              $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n\r\n\r\n           \r\n             if($foodWines[$x][29]==\'Rose\'){\r\n             $showName=$listName.\"&nbsp;(Rosé)\";\r\n             }\r\n             else{\r\n             $showName=$listName.\"&nbsp;(\".$foodWines[$x][29]. \" Wines)\";\r\n             }\r\n        }\r\n        elseif($listType==\'byVarietal\'){\r\n                  $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n\r\n                  $showName=$listName;\r\n         }\r\n         elseif($listType==\'byProfile\'){\r\n            $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" </b></a>\";\r\n\r\n            $showName=$listName;\r\n         }\r\n         elseif($listType==\"byGlass\"){\r\n         $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b> Wines By The Glass</b></a>\";\r\n\r\n         }\r\n         \r\n         elseif($listType==\"byFood\"){\r\n\r\n           $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/foodmatches/?food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\'><b> Food Matches</b></a>\";\r\n           \r\n          }\r\n\r\nif($browsing==\"\"){\r\n\r\n        $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n        echo \"<body>\";\r\n\r\n\r\necho \"<a class=\'anchor\' id=\'wine\".$y.\"\'></a>\";\r\n\r\n//set to 500 now so it does not change - effectively disabling\r\n\r\n        if(strlen($foodWines[$x][1].\"&emsp\".$foodWines[$x][22])>500){\r\n         $nameFont=\"1.1em\";\r\n         }\r\n        else{\r\n        $nameFont=\"1.35em\";\r\n        }\r\n\r\n  if($foodWines[$x][29] == \'Glass\' OR $foodWines[$x][39] == 1){\r\n        \r\n          if($foodWines[$x][45] == 5 OR $foodWines[$x][45] == 0){\r\n         $winePrice = \"<b>$\".$foodWines[$x][11].\"/glass</b>\";  \r\n          }\r\n          else{\r\n           $winePrice = \"<b>$\".$foodWines[$x][11].\"/glass (\".$foodWines[$x][45].\"oz)</b>\";\r\n           }\r\n         }        \r\n        else{\r\n        $winePrice= \"<b>$\".$foodWines[$x][11].\"</b>\";\r\n        }\r\n\r\n\r\n      \r\nif ($device == \'Windows\' OR $device == \'Mac\' OR $device == \'Linux\'){\r\n        $bodytext=\"justify\";\r\n        \r\n       echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 84%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n      \r\n\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\necho\"<tr>\";\r\n\r\nif(!empty($foodWines[$x][17])){\r\n\r\n\r\n$tempstr = \"changeImage(\".$foodWines[$x][10].\", &#039\".$foodWines[$x][16].\"&#039, &#039\".$foodWines[$x][17].\"&#039)\";\r\n\r\n\r\necho \"<td style=\'vertical-align: top; text-align: center;\'><div style=\'width:image width px; font-size:80%; text-align:center;\'><img id=\".$foodWines[$x][10].\" onclick=\'\".$tempstr.\"\' style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'>Click Image for Front / Back View</div></td>\";\r\n}\r\nelse{\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n\r\n}\r\n\r\n\r\n    \r\n\r\n         if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\nelseif($device == \'iPad\' OR $device == \'Android\'){\r\n   \r\n  $bodytext=\"left\";\r\n\r\n      echo \"<table>\";\r\n\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 30%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 69%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n  \r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: normal;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n echo\"<tr>\";\r\nif(!empty($foodWines[$x][17])){\r\n$tempstr = \"changeImage(\".$foodWines[$x][10].\", &#039\".$foodWines[$x][16].\"&#039, &#039\".$foodWines[$x][17].\"&#039)\";\r\n\r\necho \"<td style=\'vertical-align: top; text-align: center;\'><div style=\'width:image width px; font-size:80%; text-align:center;\'><img id=\".$foodWines[$x][10].\" onclick=\'\".$tempstr.\"\' style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'>Click Image for Front / Back View</div></td>\";\r\n}\r\nelse{\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n\r\n}\r\n\r\n            \r\n\r\n     if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n      elseif($device == \'iPhone\'){\r\n\r\n   $bodytext=\"left\";\r\n   \r\n\r\n\r\n \r\n echo \"<table>\";\r\n\r\necho \"<tr><td style=\'display:block-inline; text-align: center; font-size: 1.1em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n \r\n      \r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 35%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 64%;\'>\";\r\n        echo \"</colgroup>\";  \r\n\r\n         echo\"<tr>\";\r\n   \r\nif(!empty($foodWines[$x][17])){\r\n$tempstr = \"changeImage(\".$foodWines[$x][10].\", &#039\".$foodWines[$x][16].\"&#039, &#039\".$foodWines[$x][17].\"&#039)\";\r\n\r\necho \"<td style=\'vertical-align: top; text-align: center;\'><div style=\'width:image width px; font-size:80%; text-align:center;\'><img id=\".$foodWines[$x][10].\" onclick=\'\".$tempstr.\"\' style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'>Click Image for Front / Back View</div></td>\";\r\n}\r\nelse{\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n\r\n}\r\n         \r\n\r\n     if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n         \r\n\r\n         //  ///Common Code Here\r\n        \r\n\r\n         \r\n  	if($listType==\"byFood\"){\r\n\r\n $foodarray = array($row[\'FoodPairing1\'], $row[\'FoodPairing2\'], $row[\'FoodPairing3\'], $row[\'FoodPairing4\'], $row[\'FoodPairing5\'], $row[\'FoodPairing6\'], $row[\'FoodPairing7\'], );\r\n         $goodfoods = \"\";\r\n         $badfoods = \"\";\r\n\r\n          if(in_array($food1, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood1;\r\n           }\r\n           elseif($food1!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood1;\r\n            }\r\n\r\n           if(in_array($food2, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n           }\r\n           elseif($food2!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood2;\r\n            }\r\n\r\n   if(in_array($food3, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood4;\r\n            }\r\n            \r\n        if($goodfoods!=\"\"){\r\n        $goodfoods=substr($goodfoods, (strlen($goodfoods)-2)*-1);\r\n         echo \"<font size=\'+1\'><b>We suggest with: </b>\".$goodfoods.\"<br><font>\";\r\n        }\r\n\r\n//alternate good food list - show all food listed as pairing with this wine\r\n      \r\n\r\n\r\n\r\n\r\n\r\n        if($badfoods!=\"\"){\r\n        $badfoods=substr($badfoods, (strlen($badfoods)-2)*-1);\r\n // leave off for now    echo \"<font size=\'+1\'><b>Mabye not so good with: </b>\".$badfoods.\"<br><font>\";\r\n        }\r\n\r\n\r\n          \r\n\r\n         }\r\n       \r\n        \r\n        $varietalText=$foodWines[$x][8];\r\n        if ($varietalText != \"\"){\r\n            if (strpos($foodWines[$x][1], $varietalText) > 0){\r\n                $varietalText=\"\";\r\n            }\r\n        }\r\n\r\n            // echo $foodWines[$x][8].\"<br>\";\r\n\r\n         if($varietalText != \"\"){\r\n               echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$varietalText.\"</span>\";\r\n               echo \"<br>\";\r\n         }\r\n   \r\n    \r\n if($foodWines[$x][7] != \"\"){\r\n\r\n    if($foodWines[$x][26] != \"\"){\r\n        echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\">\".$foodWines[$x][26].\"</span><br><br>\";\r\n    }\r\n    else{\r\n        echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\"</span><br><br>\";\r\n    }\r\n}\r\nelse{\r\n    echo \"<br>\";\r\n}\r\n// echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\">\".$foodWines[$x][26].\"</span><br><br>\";\r\n    \r\n//if($foodWines[$x][29]!=\'Glass\' AND $foodWines[$x][18] > 0){   \r\n// echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>In our Cellar: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][18].\"</span><br><font>\";\r\n//}\r\n\r\n    if (!empty($foodWines[$x][19])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Eyes: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][19].\"</span><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][20])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Nose: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][20].\"</span><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][21])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Mouth: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][21].\"</span><br><font>\";\r\n      }\r\n   \r\n      if (!empty($foodWines[$x][23]) AND $foodWines[$x][23]!=0) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Alcohol Content: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][23].\"%</span><br><font>\";\r\n      }\r\n  	if (!empty($foodWines[$x][34])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Ratings: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][34].\"</span><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($foodWines[$x][33])) {\r\n       echo \"<font size=\'+1\'><text align=\'justify\'><span style=\'font-weight: bold\'>Why we like it: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][33].\"</span><br><font>\";\r\n      }\r\n   if($screenWidth > 500){     \r\n  	if (!empty($foodWines[$x][24])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Pairs with: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][24].\"</span><br><font>\";\r\n      }\r\n}\r\nif($screenWidth > 500){    \r\n  	if (!empty($foodWines[$x][32])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>From the Winemaker: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][32].\"</span><br><font>\";\r\n      }\r\n}\r\n      echo \"<br><font size=\'-1\'><span style=\'font-weight: normal\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1</span><font>\";\r\n    \r\n    echo \"</td>\";\r\n\r\n    // echo \"<td valign=\'top\' align=\'left\'>\";\r\n    // echo do_shortcode($nextWine);\r\n    // echo \"</td>\";\r\n\r\n  	echo \"</tr>\";\r\n	echo \"</table>\";\r\n     echo \"<br><br><br><br>\";\r\n}\r\necho \"</body>\";\r\n}\r\nelse{\r\necho \"<h5>No Matching Results for  \'\".$search.\"\'</h5>\";\r\n}','[xyz-ips snippet=\"ContinuousDisplayPHP-5\"]',1),(25,'ContinuousDisplayPHP-6','<?php\r\n\r\n$search = $_GET[\'search\'];\r\n\r\ndate_default_timezone_set(\"America/Belize\"); \r\n $dt = new DateTime();\r\n    $dt->setTimestamp(time()); //<--- Pass a UNIX TimeStamp\r\n   $hourtimestr= $dt->format(\'H\');\r\n\r\nif ($hourtimestr >= 15 AND $hourtimestr < 17){\r\n$happyhour = True;\r\n}\r\nelse{\r\n$happyhour = False;\r\n}\r\n$happyhour=true;\r\n\r\n$variable = $_GET[\'WineID\'];\r\n$listType = $_GET[\'listType\'];\r\n$listName = $_GET[\'listName\'];\r\n$linkCount = $_GET[\'linkCount\'];\r\n$food1 = trim($_GET[\'food1\']);\r\n$food2 = trim($_GET[\'food2\']);\r\n$food3 = trim($_GET[\'food3\']);\r\n$food4 = trim($_GET[\'food4\']);\r\n$wineNumber = 0;\r\n$screenWidth = 1000;\r\n\r\nif(!empty($search)){\r\n  $listType = \"bySearch\";\r\n}\r\n\r\n\r\n\r\nif(wonderplugin_is_device(\'iPhone\')){\r\n$screenWidth = 400;\r\n$device = \"iPhone\";\r\n}\r\nelseif(wonderplugin_is_device(\'Windows\')){\r\n$screenWidth = 1000;\r\n$device = \"Windows\";\r\n}\r\nelseif(wonderplugin_is_device(\'iPad\')){\r\n$screenWidth = 1000;\r\n$device = \"iPad\";\r\n}\r\nelseif(wonderplugin_is_device(\'Mac\')){\r\n$screenWidth = 1000;\r\n$device = \"Mac\";\r\n\r\n}\r\nelseif(wonderplugin_is_device(\'Android\')){\r\n$screenWidth = 1000;\r\n$device = \"Android\";\r\n}\r\n\r\n//echo \"Width \",$screenWidth;\r\n\r\n\r\nif($food1!=\"\"){\r\n$xfood1=substr($food1, (strlen($food1)-2)*-1);\r\n}\r\nif($food2!=\"\"){\r\n$xfood2=substr($food2, (strlen($food2)-2)*-1);\r\n}\r\nif($food3!=\"\"){\r\n$xfood3=substr($food3, (strlen($food3)-2)*-1);\r\n}\r\nif($food4!=\"\"){\r\n$xfood4=substr($food4, (strlen($food4)-2)*-1);\r\n}\r\n\r\n\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\nif (wonderplugin_is_device(\'iPhone\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\nif($listType==\"bySearch\"){\r\n\r\n     $sql=\"SELECT * FROM Wines WHERE (WineName Like \'%\".$search.\"%\' OR WineRegion Like \'%\".$search.\"%\' OR WineCountry Like \'%\".$search.\"%\' OR WineNationality Like \'%\".$search.\"%\' OR WineSubRegion Like \'%\".$search.\"%\' OR Category Like \'%\".$search.\"%\' OR Category2 Like \'%\".$search.\"%\' OR Category3 Like \'%\".$search.\"%\'  OR  Desc1 Like \'%\".$search.\"%\' OR  Desc2 Like \'%\".$search.\"%\' OR  Desc3 Like \'%\".$search.\"%\' OR  Desc4 Like \'%\".$search.\"%\' OR  Eyes Like \'%\".$search.\"%\' OR  Nose Like \'%\".$search.\"%\' OR  Mouth Like \'%\".$search.\"%\' OR  WineVarietal Like \'%\".$search.\"%\' OR  WineProfile1 Like \'%\".$search.\"%\' OR  WineProfile2 Like \'%\".$search.\"%\' OR  PairingSuggestion Like \'%\".$search.\"%\' OR  WineVintage Like \'%\".$search.\"%\') AND WineType != \'Glass\' AND QtyInStock <> -1 ORDER BY WinePrice\";\r\n\r\n// Does not include Desc1 \'From the Winemaker\'\r\n\r\n\r\n// echo $sql;\r\n//$records1=mysqli_query($con, $sql);\r\n//       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n//       echo $row1[\'WineName\'],\"<br>\";\r\n//}\r\n}\r\nelseif($listType==\"byVarietal\"){\r\n      $sql=\"SELECT * FROM Wines WHERE (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE WineCountry = \'\".$listName.\"\' AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY CASE \r\n               WHEN WineType = \'Sparkling\' THEN 1\r\n               WHEN WineType = \'White\' THEN 2\r\n               WHEN WineType = \'Rose\' THEN 3\r\n               WHEN WineType = \'Red\' THEN 4\r\n               ELSE 5\r\n         END,  WinePrice\";\r\n          \r\n\r\n}\r\nelseif($listType==\"byProfile\"){\r\n\r\n      if($listName==\"WhitesAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock!=-1 ORDER BY WineName\";\r\n            $showName=\"All Whites A - Z\";\r\n            $listTypeName=\"White Wines\";\r\n      }\r\n       elseif($listName==\"WhitePrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock!=-1 ORDER BY WinePrice\";\r\n            $showName=\"All Whites by Price\";\r\n            $listTypeName=\"White Wines\";\r\n      }\r\n      elseif($listName==\"RedsAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock!=-1 ORDER BY WineName\";\r\n            $showName=\"All Reds A - Z\";\r\n            $listTypeName=\"Red Wines\";\r\n      }\r\n      elseif($listName==\"RedPrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock!=-1 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red Wines\";\r\n      }    \r\n      \r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byGlass\"){\r\n\r\n // $sql=\"SELECT * FROM Wines WHERE WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WineType2, WinePrice\";           \r\n\r\nif($happyhour==True){\r\n$sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND (AvailableToday = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY AvailablePremium, AvailableToday, WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n}\r\nelse{\r\n$sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND AvailableToday = -1) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY AvailableToday, AvailablePremium, WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n}\r\n\r\n$sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND (AvailableToday = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY AvailableToday, AvailablePremium, WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n// $sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND (AvailableToday = -1 OR AvailableOnRequest = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n     \r\n}\r\nelseif($listType==\"byFood\"){\r\n\r\n$foodList = \"(\'\".$food1.\"\', \'\".$food2.\"\', \'\".$food3.\"\', \'\".$food4.\"\')\";\r\n\r\n$sql=\"SELECT * FROM Wines WHERE ((WineType != \'Glass\' AND QtyInStock!=-1) OR (WineType = \'Glass\' AND AvailableToday = -1))  AND (FoodPairing1 IN \".$foodList.\" OR FoodPairing2 IN \".$foodList.\" OR FoodPairing3 IN \".$foodList.\" OR FoodPairing4 IN \".$foodList.\" OR FoodPairing5 IN \".$foodList.\" OR FoodPairing6 IN \".$foodList.\" OR FoodPairing7 IN \".$foodList.\" OR FoodPairing8 IN \".$foodList.\" OR FoodPairing9 IN \".$foodList.\" OR FoodPairing10 IN \".$foodList.\"  OR FoodPairing11 IN \".$foodList.\"  OR FoodPairing12 IN \".$foodList.\"  OR FoodPairing13 IN \".$foodList.\"  OR FoodPairing14 IN \".$foodList.\"  OR FoodPairing15 IN \".$foodList.\")\";\r\n\r\n$showName=\"Food Pairings\";\r\n$listTypeName=\"Food Matches\";\r\n}\r\n\r\n\r\n\r\n// Read all wines to determine length of list.\r\n// Need to sort items based on match score (desc) then price (asc). Wines by the glass will appear first as they have 6 added\r\n// to the base score whereas other wines start at 0\r\n\r\n       $IDarray=array();\r\n       $wineCount=0;\r\n      $foodWines = array();      //two dimensional array 1= name, 2 = food1, 3 = food2, 4 = food3, 5 = food4, 6 = score, 7 = country, 8 = varietal, 9 = btl or glass, 10 = WineID, 11 = Price. 12 = Desc1, 13 = Desc2, 14= Desc3, 15 = Desc 4, 16 = Image1, 17= Image2, 18 = QtyInStock, 19 = Eyes, 20 = Nose, 21 = Mouth, 22 = Vintage, 23 = Alcohol Content, 24 = Pairing Suggestion , 25=Cases Produced, 26 = WineRegion, 27 = Wine Subregion, 28 = Nationality\r\n\r\n\r\n       $records1=mysqli_query($con, $sql);\r\n       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n            \r\n      $wineCount = $wineCount+1;\r\n\r\n      $foodWines[$wineCount][1] = $row1[\'WineName\'];\r\n      $foodWines[$wineCount][6] = 0;\r\n      $foodWines[$wineCount][7]  = $row1[\'WineCountry\'];\r\n      $foodWines[$wineCount][8] = $row1[\'WineVarietal\'];\r\n      $foodWines[$wineCount][10] = $row1[\'ID\'];\r\n      $foodWines[$wineCount][11] = $row1[\'WinePrice\'];\r\n      //$foodWines[$wineCount][12] = $row1[\'PairingValue1\'];\r\n      //$foodWines[$wineCount][13] = $row1[\'PairingValue2\'];\r\n      //$foodWines[$wineCount][14] = $row1[\'PairingValue3\'];\r\n      //$foodWines[$wineCount][15] = $row1[\'PairingValue4\'];\r\n      $foodWines[$wineCount][32] = $row1[\'Desc1\'];\r\n      $foodWines[$wineCount][33] = $row1[\'Desc2\'];\r\n      $foodWines[$wineCount][34] = $row1[\'Desc3\'];\r\n      $foodWines[$wineCount][35] = $row1[\'Desc4\'];\r\n      $foodWines[$wineCount][16] = $row1[\'Image1\'];\r\n      $foodWines[$wineCount][17] = $row1[\'Image2\'];\r\n      $foodWines[$wineCount][18] = $row1[\'QtyInStock\'];\r\n      $foodWines[$wineCount][19] = $row1[\'Eyes\'];\r\n      $foodWines[$wineCount][20] = $row1[\'Nose\'];\r\n      $foodWines[$wineCount][21] = $row1[\'Mouth\'];\r\n      $foodWines[$wineCount][22] = $row1[\'WineVintage\'];\r\n      $foodWines[$wineCount][23] = $row1[\'AlcoholContent\'];\r\n      $foodWines[$wineCount][24] = $row1[\'PairingSuggestion\'];\r\n      $foodWines[$wineCount][25] = $row1[\'CasesProduced\'];\r\n      $foodWines[$wineCount][26] = $row1[\'WineRegion\'];\r\n      $foodWines[$wineCount][27] = $row1[\'WineSubregion\'];\r\n      $foodWines[$wineCount][28] = $row1[\'WineNationality\'];  \r\n      $foodWines[$wineCount][29] = $row1[\'WineType\']; \r\n      $foodWines[$wineCount][30] = $row1[\'WineSize\']; \r\n      $foodWines[$wineCount][36] = $row1[\'AvailableToday\'];\r\n      $foodWines[$wineCount][37] = $row1[\'AvailablePremium\'];\r\n      $foodWines[$wineCount][38] = $row1[\'AvailableOnRequest\'];  \r\n       $foodWines[$wineCount][39] = $row1[\'SoldAs\'];\r\n      $foodWines[$wineCount][45] = $row1[\'ServingSize\'];\r\n\r\n      if( $foodWines[$wineCount][29] == \"Glass\"){\r\n          $foodWines[$wineCount][6] = 100;\r\n          $foodWines[$wineCount][9] = 0;\r\n          }\r\n      else{\r\n            $foodWines[$wineCount][9] = 1;\r\n            $foodWines[$wineCount][6] = 0;\r\n      }\r\nif($listType==\'bySearch\'){\r\nfor($x = 1; $x <= 40; $x++){\r\nif($x!=16 AND $x!=17){\r\n$foodWines[$wineCount][$x]= preg_replace(\"/\".$search.\"/i\", \"<span style=\'background-color: #FFFF00;\'>\\$0</span>\",$foodWines[$wineCount][$x]);\r\n}\r\n}\r\n}\r\n\r\n// preg_replace(\"/the/i\", \"<b>\\$0</b>\", $original);\r\n\r\n\r\n\r\n// $foodWines[$wineCount][1] = \"<span style=\"background-color: #FFFF00\">\".$foodWines[$wineCount][1].\"</span>\" \r\n\r\nif($listType == \'byFood\'){\r\n\r\n// only sort the array if this is a food match selection\r\n\r\n$minPairing = 0;\r\n\r\nfor($x = 1; $x <= 15; $x++){\r\n\r\nif($food1!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food1){\r\n          \r\n          $foodWines[$wineCount][12] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][12]==6){\r\n           $foodWines[$wineCount][12]=5;\r\n          } \r\n          if($foodWines[$wineCount][12]==0 OR is_null($foodWines[$wineCount][12])){\r\n             $foodWines[$wineCount][12]=5; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][12];\r\n         }   \r\n}\r\n\r\nif($food2!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food2){\r\n         $foodWines[$wineCount][13] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n         if($foodWines[$wineCount][13]==6){\r\n           $foodWines[$wineCount][13]=5;\r\n          } \r\n         if($foodWines[$wineCount][13]==0 OR is_null($foodWines[$wineCount][13])){\r\n             $foodWines[$wineCount][13]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][13];\r\n         }   \r\n}\r\n\r\nif($food3!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food3){\r\n         $foodWines[$wineCount][14] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][14]==6){\r\n           $foodWines[$wineCount][14]=5;\r\n          } \r\n         if($foodWines[$wineCount][14]==0 OR is_null($foodWines[$wineCount][14])){\r\n             $foodWines[$wineCount][14]=1; \r\n          }\r\n        $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][14];\r\n         }   \r\n}\r\nif($food4!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food4){\r\n         $foodWines[$wineCount][15] = $row1[\'PairingValue\'.$x] * -1 + 6;\r\n          if($foodWines[$wineCount][15]==6){\r\n           $foodWines[$wineCount][15]=5;\r\n          } \r\n          if($foodWines[$wineCount][15]==0 OR is_null($foodWines[$wineCount][15])){\r\n             $foodWines[$wineCount][15]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][15];\r\n         }   \r\n   }   \r\n\r\n}  \r\n\r\n//echo $foodWines[$wineCount][1].\" \".$foodWines[$wineCount][12].\" \".$foodWines[$wineCount][13].\" \".$foodWines[$wineCount][14].\" \".$foodWines[$wineCount][15].\"<br>\";\r\n\r\nif($foodWines[$wineCount][12] <3  AND  $foodWines[$wineCount][13] < 3 AND $foodWines[$wineCount][14] < 3 AND $foodWines[$wineCount][15] < 3){\r\n//echo \"Skipping\".$foodWines[$wineCount][1].\"<br>\";\r\n$wineCount=$wineCount - 1;\r\n\r\n}\r\n\r\n}\r\n       \r\n}\r\n\r\n//sort Array\r\nif($listType==\'byFood\'){\r\nforeach ($foodWines as $key => $row) {\r\n    $score[$key]  = $row[6];\r\n    $winePrice[$key] = $row[11];\r\n}\r\n\r\n// With the use of the column keys you can now sort entire array by these columns and keep the row index value intact if they are non-numeric. This is good if your using some kind of hashed index.\r\n\r\narray_multisort($score, SORT_DESC, $winePrice, SORT_DESC, $foodWines);\r\n}\r\n\r\n\r\n     // echo $wineCount;\r\n       \r\nif($listType == \'byFood\'){\r\n$xstart = 0;\r\n$totalWines = $wineCount-1;\r\n}\r\nelse{\r\n$xstart = 1;\r\n$totalWines = $wineCount;\r\n\r\n}\r\n\r\n\r\nif($totalWines!=0){\r\n for($x = $xstart; $x <= $totalWines; $x++){\r\n\r\nif($listType == \'byFood\'){\r\n$y=$x+1;\r\n}\r\nelse{\r\n$y=$x;\r\n}       \r\n\r\n   if($listType==\"byCountry\"){\r\n\r\n               $listTypeName=$foodWines[$x][28];\r\n          \r\n\r\n         }\r\n         elseif($listType==\"byProfile\" AND $listTypeName!=\"\"){\r\n\r\n\r\n         }\r\n        elseif($listType==\"byProfile\" AND $listTypeName==\"\"){\r\n\r\n          $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byVarietal\"){\r\n          $listTypeName=$listName;\r\n        }\r\n\r\n        if($listType==\'bySearch\'){\r\n        $browsing=$y.\" of \".$wineCount.\"&nbsp;<b>Results for \'\".ucwords($search).\"\'</b>\";\r\n       }\r\n       elseif($listType==\'byCountry\'){\r\n\r\n              $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n\r\n\r\n           \r\n             if($foodWines[$x][29]==\'Rose\'){\r\n             $showName=$listName.\"&nbsp;(Rosé)\";\r\n             }\r\n             else{\r\n             $showName=$listName.\"&nbsp;(\".$foodWines[$x][29]. \" Wines)\";\r\n             }\r\n        }\r\n        elseif($listType==\'byVarietal\'){\r\n                  $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n\r\n                  $showName=$listName;\r\n         }\r\n         elseif($listType==\'byProfile\'){\r\n            $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" </b></a>\";\r\n\r\n            $showName=$listName;\r\n         }\r\n         elseif($listType==\"byGlass\"){\r\n         $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b> Wines By The Glass</b></a>\";\r\n\r\n         }\r\n         \r\n         elseif($listType==\"byFood\"){\r\n\r\n           $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/foodmatches/?food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\'><b> Food Matches</b></a>\";\r\n           \r\n          }\r\n\r\nif($browsing==\"\"){\r\n\r\n        $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n        echo \"<body>\";\r\n\r\n\r\necho \"<a class=\'anchor\' id=\'wine\".$y.\"\'></a>\";\r\n\r\n//set to 500 now so it does not change - effectively disabling\r\n\r\n        if(strlen($foodWines[$x][1].\"&emsp\".$foodWines[$x][22])>500){\r\n         $nameFont=\"1.1em\";\r\n         }\r\n        else{\r\n        $nameFont=\"1.35em\";\r\n        }\r\n\r\n  if($foodWines[$x][29] == \'Glass\' OR $foodWines[$x][39] == 1){\r\n        \r\n          if($foodWines[$x][45] == 5 OR $foodWines[$x][45] == 0){\r\n         $winePrice = \"<b>$\".$foodWines[$x][11].\"/glass</b>\";  \r\n          }\r\n          else{\r\n           $winePrice = \"<b>$\".$foodWines[$x][11].\"/glass (\".$foodWines[$x][45].\"oz)</b>\";\r\n           }\r\n         }        \r\n        else{\r\n        $winePrice= \"<b>$\".$foodWines[$x][11].\"</b>\";\r\n        }\r\n\r\n\r\n      \r\nif ($device == \'Windows\' OR $device == \'Mac\' OR $device == \'Linux\'){\r\n        $bodytext=\"justify\";\r\n        \r\n       echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 84%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n      \r\n\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\necho\"<tr>\";\r\n\r\nif(!empty($foodWines[$x][17])){\r\n\r\n\r\n//$tempstr = \"changeImage(\".$foodWines[$x][10].\", &#039\".$foodWines[$x][16].\"&#039, &#039\".$foodWines[$x][17].\"&#039)\";\r\n\r\n\r\necho \"<td style=\'vertical-align: top; text-align: center;\'><div style=\'width:image width px; font-size:80%; text-align:center;\'><a style=\'width: 100%; height: 100%\' href=\'#\' data-featherlight=\'\".$foodWines[$x][17].\"\'><img id=\".$foodWines[$x][10].\" style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'>Click Image for Front / Back View</div></td>\";\r\n\r\n}\r\nelse{\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n\r\n}\r\n\r\n    \r\n\r\n         if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\nelseif($device == \'iPad\' OR $device == \'Android\'){\r\n   \r\n  $bodytext=\"left\";\r\n\r\n      echo \"<table>\";\r\n\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 30%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 69%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n  \r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: normal;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n echo\"<tr>\";\r\nif(!empty($foodWines[$x][17])){\r\n\r\n\r\n$tempstr = \"changeImage(\".$foodWines[$x][10].\", &#039\".$foodWines[$x][16].\"&#039, &#039\".$foodWines[$x][17].\"&#039)\";\r\n\r\n\r\necho \"<td style=\'vertical-align: top; text-align: center;\'><div style=\'width:image width px; font-size:80%; text-align:center;\'><a href=\'#\' data-featherlight=\'\".$foodWines[$x][17].\"\'><img id=\".$foodWines[$x][10].\" style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'>Click Image for Front / Back View</div></td>\";\r\n\r\n}\r\nelse{\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n\r\n}\r\n\r\n            \r\n\r\n     if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n      elseif($device == \'iPhone\'){\r\n\r\n   $bodytext=\"left\";\r\n   \r\n\r\n\r\n \r\n echo \"<table>\";\r\n\r\necho \"<tr><td style=\'display:block-inline; text-align: center; font-size: 1.1em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n \r\n      \r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 35%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 64%;\'>\";\r\n        echo \"</colgroup>\";  \r\n\r\n         echo\"<tr>\";\r\n   \r\nif(!empty($foodWines[$x][17])){\r\n$tempstr = \"changeImage(\".$foodWines[$x][10].\", &#039\".$foodWines[$x][16].\"&#039, &#039\".$foodWines[$x][17].\"&#039)\";\r\n\r\necho \"<td style=\'vertical-align: top; text-align: center;\'><div style=\'width:image width px; font-size:80%; text-align:center;\'><img id=\".$foodWines[$x][10].\" onclick=\'\".$tempstr.\"\' style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'>Click Image for Front / Back View</div></td>\";\r\n}\r\nelse{\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n\r\n}\r\n         \r\n\r\n     if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n         \r\n\r\n         //  ///Common Code Here\r\n        \r\n\r\n         \r\n  	if($listType==\"byFood\"){\r\n\r\n $foodarray = array($row[\'FoodPairing1\'], $row[\'FoodPairing2\'], $row[\'FoodPairing3\'], $row[\'FoodPairing4\'], $row[\'FoodPairing5\'], $row[\'FoodPairing6\'], $row[\'FoodPairing7\'], );\r\n         $goodfoods = \"\";\r\n         $badfoods = \"\";\r\n\r\n          if(in_array($food1, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood1;\r\n           }\r\n           elseif($food1!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood1;\r\n            }\r\n\r\n           if(in_array($food2, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n           }\r\n           elseif($food2!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood2;\r\n            }\r\n\r\n   if(in_array($food3, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood4;\r\n            }\r\n            \r\n        if($goodfoods!=\"\"){\r\n        $goodfoods=substr($goodfoods, (strlen($goodfoods)-2)*-1);\r\n         echo \"<font size=\'+1\'><b>We suggest with: </b>\".$goodfoods.\"<br><font>\";\r\n        }\r\n\r\n//alternate good food list - show all food listed as pairing with this wine\r\n      \r\n\r\n\r\n\r\n\r\n\r\n        if($badfoods!=\"\"){\r\n        $badfoods=substr($badfoods, (strlen($badfoods)-2)*-1);\r\n // leave off for now    echo \"<font size=\'+1\'><b>Mabye not so good with: </b>\".$badfoods.\"<br><font>\";\r\n        }\r\n\r\n\r\n          \r\n\r\n         }\r\n       \r\n        \r\n        $varietalText=$foodWines[$x][8];\r\n        if ($varietalText != \"\"){\r\n            if (strpos($foodWines[$x][1], $varietalText) > 0){\r\n                $varietalText=\"\";\r\n            }\r\n        }\r\n\r\n            // echo $foodWines[$x][8].\"<br>\";\r\n\r\n         if($varietalText != \"\"){\r\n               echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$varietalText.\"</span>\";\r\n               echo \"<br>\";\r\n         }\r\n   \r\n    \r\n if($foodWines[$x][7] != \"\"){\r\n\r\n    if($foodWines[$x][26] != \"\"){\r\n        echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\">\".$foodWines[$x][26].\"</span><br><br>\";\r\n    }\r\n    else{\r\n        echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\"</span><br><br>\";\r\n    }\r\n}\r\nelse{\r\n    echo \"<br>\";\r\n}\r\n// echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\">\".$foodWines[$x][26].\"</span><br><br>\";\r\n    \r\n//if($foodWines[$x][29]!=\'Glass\' AND $foodWines[$x][18] > 0){   \r\n// echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>In our Cellar: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][18].\"</span><br><font>\";\r\n//}\r\n\r\n    if (!empty($foodWines[$x][19])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Eyes: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][19].\"</span><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][20])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Nose: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][20].\"</span><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][21])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Mouth: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][21].\"</span><br><font>\";\r\n      }\r\n   \r\n      if (!empty($foodWines[$x][23]) AND $foodWines[$x][23]!=0) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Alcohol Content: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][23].\"%</span><br><font>\";\r\n      }\r\n  	if (!empty($foodWines[$x][34])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Ratings: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][34].\"</span><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($foodWines[$x][33])) {\r\n       echo \"<font size=\'+1\'><text align=\'justify\'><span style=\'font-weight: bold\'>Why we like it: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][33].\"</span><br><font>\";\r\n      }\r\n   if($screenWidth > 500){     \r\n  	if (!empty($foodWines[$x][24])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Pairs with: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][24].\"</span><br><font>\";\r\n      }\r\n}\r\nif($screenWidth > 500){    \r\n  	if (!empty($foodWines[$x][32])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>From the Winemaker: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][32].\"</span><br><font>\";\r\n      }\r\n}\r\n      echo \"<br><font size=\'-1\'><span style=\'font-weight: normal\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1</span><font>\";\r\n    \r\n    echo \"</td>\";\r\n\r\n    // echo \"<td valign=\'top\' align=\'left\'>\";\r\n    // echo do_shortcode($nextWine);\r\n    // echo \"</td>\";\r\n\r\n  	echo \"</tr>\";\r\n	echo \"</table>\";\r\n     echo \"<br><br><br><br>\";\r\n}\r\necho \"</body>\";\r\n}\r\nelse{\r\necho \"<h5>No Matching Results for  \'\".$search.\"\'</h5>\";\r\n}','[xyz-ips snippet=\"ContinuousDisplayPHP-6\"]',1),(26,'byGlassPHP-expanded3','<?php\r\n//$page = $_SERVER[\'PHP_SELF\'];\r\n//$sec = \"10\";\r\n//header(\"Refresh: $sec; url=$page\");\r\n$tableName=\"Wines2\";\r\ndate_default_timezone_set(\"America/Belize\"); \r\n  $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n session_start();\r\n  if(isset($_SESSION[\'reloadPage\'])) {\r\n  unset($_SESSION[\'reloadPage\']);\r\n  echo\'\r\n  <script>\r\n  window.location.replace(\"/****/****/*****.php\");\r\n  </script>\r\n  \';\r\n}\r\n$happyHourCount = 0;\r\n$sql=\"SELECT * FROM settings\";\r\n$records3 = mysqli_query($con, $sql);\r\nwhile($wines=mysqli_fetch_assoc($records3)){\r\n    $happyHourStart = $wines[\'HappyHourStart\'];\r\n    $happyHourEnd = $wines[\'HappyHourEnd\'];\r\n    $happyhourwineprice = $wines[\'HappyHourPrice\'];\r\n    $happyHourShowStart = strtotime(\'-\'.$wines[\'ShowBeforeHH\'].\' minutes\', strtotime($happyHourStart));\r\n    $happyHourShowStop = strtotime(\'+\'.$wines[\'ShowAfterHH\'].\' minutes\', strtotime($happyHourEnd));\r\n    $happyHourOffer = $wines[\'HappyHourOffer\'];\r\n}\r\n\r\n$sql=\"SELECT * FROM \".$tableName.\" WHERE OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 AND AvailableHappyHour = -1\";\r\n$records3 = mysqli_query($con, $sql);\r\nwhile($wines=mysqli_fetch_assoc($records3)){\r\n$happyHourCount =$happyHourCount +1;\r\n}\r\n\r\n\r\n\r\n$redWineCount=0;\r\n$whiteWineCount=0;\r\n$sql=\"SELECT * FROM \".$tableName.\" WHERE WineType != \'Glass\' AND QtyInStock > 0 AND OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0\";\r\n$records2 = mysqli_query($con, $sql);\r\nwhile($wines=mysqli_fetch_assoc($records2)){\r\n\r\nif($wines[\'WineType\']==\'Red\'){\r\n$redWineCount=$redWineCount+1;\r\n}\r\nelseif($wines[\'WineType\']==\'White\'){\r\n$whiteWineCount=$whiteWineCount+1;\r\n}\r\n\r\n}\r\n\r\necho \"<div style=\'text-align: center; font-size: 1.5em;\'>Our current selection has \".$whiteWineCount.\" <a href=\'/byprofile/?Listing=WhitePrice\'>Whites</a> and \".$redWineCount.\"  <a href=\'/byprofile/?Listing=RedPrice\'>Reds</a> by the bottle</div><br>\";\r\necho \"<div style=\'text-align: center; font-size: 1.25em;\'>Plus <a href=\'/byprofile/?Listing=Sparkling\'>Champagne/Sparkling Wines</a>, <a href=\'/byprofile/?Listing=Rose\'>Rosés</a> and <a href=\'/byprofile/?Listing=Dessert Wines and Port\'>Dessert Wines</a></div><br>\";\r\n\r\n//$happyhourwineprice=14;\r\n\r\nif (time() >= $happyHourShowStart AND time() <= $happyHourShowStop AND $happyHourCount >0){\r\n$happyhour = True;\r\necho \"<head><meta http-equiv=\'refresh\' content=\'120\'></head>\";\r\n}\r\nelse{\r\n$happyhour = False;\r\n}\r\n\r\n\r\nif(!isset($_GET[\'screen_check\']))\r\n{\r\n /* This code will be executed if screen resolution has not been detected.*/\r\n echo \"<script language=\'JavaScript\'>\r\n <!-- \r\ndocument.location=\\\"$PHP_SELF?screen_check=done&Width=\\\"+screen.width+\\\"&Height=\\\"+screen.height;\r\n //-->\r\n </script>\";\r\n}\r\nelse \r\n{    \r\n /* This code will be executed after screen resolution is detected.*/\r\n    if(isset($_GET[\'Width\']) && isset($_GET[\'Height\'])) {\r\n // Resolution  detected\r\n //echo \"<h1>Your screen resolution is \".$_GET[\'Width\'].\" x \".$_GET[\'Height\'].\".</h1><br />\";\r\n //Display page as per resolution\r\n if(($_GET[\'Width\']>1024)&&($_GET[\'Height\']>768)) {\r\n //echo \"<b>This will be displayed when screen resolution is greater than 1024x768.</b>\";\r\n }\r\n else {\r\n //Display page as per resolution\r\n //echo \"<b>This will be displayed when screen resolution is either equal to or less than 1024x768.</b>\";\r\n }\r\n     }\r\n     else {\r\n               // Resolution not detected\r\n     }\r\n}\r\n\r\n\r\n$screenWidth = $_GET[\'Width\'];\r\n$screenHeight = $_GET[\'Height\'];\r\n//echo $screenWidth;\r\n//echo \"<br>\";\r\n//echo $screenHeight;\r\n//echo \"<br>\";\r\n\r\nif($screenWidth > 1000){\r\n$leftPad = 75; //$screenWidth/2-400;\r\n$rightPad = 0; //$screenWidth/2-400;\r\n}\r\nelseif($screenWidth > 700){\r\n$leftPad = 30; //$screenWidth/2-400;\r\n$rightPad = 0; //$screenWidth/2-400;\r\n\r\n}\r\n\r\nelse{\r\n$leftPad = 0; //$screenWidth/2-400;\r\n$rightPad = 0; //$screenWidth/2-400;\r\n\r\n}\r\n\r\necho\"<style> .listView {width: 100%; max-width: 800px; text-align: left; padding-right: \".$rightPad.\"px; padding-left: \".$leftPad.\"px; padding-top: 0px; padding-bottom: 0px; margin: auto; }</style>\";\r\n\r\n//echo\"<style> span {width: 100%; max-width: 800px; margin-right: auto; margin-left: auto; padding-right: 100px; padding-left: 100px;}</style>\";\r\n\r\n\r\n\r\n\r\n$variable = \'Glass\';\r\n\r\n  $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n \r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\n$sortButton=\"\";\r\n$wineCount=0;\r\nfor($x=2; $x<=3; $x++){ \r\n\r\n$wineCount1=0;\r\nif($x==2){\r\n\r\nif($happyhour==True){\r\n$sql=\"SELECT * FROM \".$tableName.\" WHERE  ((WineType=\'Glass\' AND (AvailableToday = -1 OR AvailableHappyHour = -1))) AND QtyInStock >0 AND OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 ORDER BY WineType2, WinePrice\";\r\n}\r\nelse{\r\n$sql=\"SELECT * FROM \".$tableName.\" WHERE ((WineType=\'Glass\' AND AvailableToday = -1))  AND QtyInStock >0 AND OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 ORDER BY WineType2, WinePrice\";\r\n}\r\n\r\n}\r\nelseif($x==1 AND $happyhour==True){\r\n\r\n$sql=\"SELECT * FROM \".$tableName.\"  WHERE WineType=\'Glass\' AND AvailableOnRequest = 0 AND AvailableHappyHour = -1  AND QtyInStock <> -1 ORDER BY WineType2, WinePrice\"; //currently not used\r\n\r\n}\r\nelseif($x==3){\r\n$sql=\"SELECT * FROM \".$tableName.\"  WHERE WineType!=\'Glass\' AND ShowOnGlassList=-1 AND QtyInStock >0 AND OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 ORDER BY WineType2, WinePrice\";\r\n\r\n}\r\nelse{\r\n$sql=\"SELECT * FROM \".$tableName.\" WHERE WineName <> \'Mimosa\' AND WineType=\'Glass\' AND AvailableToday = 0 AND AvailableOnRequest = -1  AND QtyInStock <> -1 ORDER BY WineType2, WinePrice\"; //currently not used\r\n\r\n\r\n}\r\n//echo \"<div style=\'text-align: center\'>\";\r\n$records1=mysqli_query($con, $sql);\r\nwhile($wines=mysqli_fetch_assoc($records1)){\r\n  if($wines[\'WineName\']!=\'Mimosa\'){    \r\n        $wineCount=$wineCount+1;\r\n        $wineCount1=$wineCount1+1;\r\n    }\r\n        if($wineCount1 == 1){\r\n            if($x==2){\r\n                      $prevType= 0;\r\n                      if($happyhour==True){\r\n                        if (date(\"H:00:00\", strtotime($happyHourStart)) == date(\"H:i:00\", strtotime($happyHourStart))){\r\n                          $timeStr = \"Happy Hour \". date(\"ga\", strtotime($happyHourStart)).\' - \';\r\n                        }\r\n                        else{\r\n                          $timeStr = \"Happy Hour \". date(\"g:ia\", strtotime($happyHourStart)).\' - \';\r\n\r\n                        }\r\n\r\n                        if (date(\"H:00:00\", strtotime($happyHourEnd)) == date(\"H:i:00\", strtotime($happyHourEnd))){\r\n                          $timeStr = $timeStr. date(\"ga\", strtotime($happyHourEnd));\r\n                        }\r\n                        else{\r\n                          $timeStr = $timeStr.date(\"g:ia\", strtotime($happyHourEnd));\r\n\r\n                        }\r\n\r\n\r\n                        \r\n                      echo \"<p class = \'listView\' style=\'padding-bottom: 10px;\'><span style=\'opacity: 1.0; font-weight: bold; font-size: 1.5em; display: inline-block;\'>Today\'s Wine By the Glass (5 oz pour)</span></p>\";\r\n echo \"<p class = \'listView\' style=\'padding-bottom: 10px;\'><span style=\'opacity: 1.0; font-weight: normal; font-size: 1.25em; text-align: right; \'>\".$timeStr.\"</span></p>\";\r\n                      }\r\n                      else{\r\n                      echo \"<p class = \'listView\' style = \'padding-bottom: 10px;\'><span style=\'opacity: 1.0; font-weight: bold; font-size: 1.5em;\'>Today\'s Wine By the Glass (5 oz pour)</span></p>\";\r\n                      }\r\n                      $opacity = 1.0;\r\n             }\r\n             elseif($x==1 AND $happyhour==True){\r\n                       $prevType= 0;\r\n                       echo \"<p class = \'listView\'><span style=\'opacity: 1.0; font-weight: bold; font-size: 1.5em;\'>Happy Hour 3pm - 5pm ($12 while they last)</span></p>\";\r\n                     $opacity = 1.0;\r\n             }\r\n             elseif($x==3){\r\n                  $prevType= 0;\r\n                  echo \"<div style=\'opacity: 1.0; text-align: left; font-weight: bold; font-size: 1.5em;\'><p class = \'listView\' style=\'padding-top: 10px;\'>Sparkling (small bottles)</p></div>\";\r\n                  $opacity = 1.0;\r\n\r\n             }\r\n\r\n              else{\r\n                    $prevType= 0;\r\n                    echo \"<p class = \'listView\'><span style=\'opacity: 0.5; font-weight: bold; font-size: 1.5em;\'>By the Glass (on request - 2 glass minimum)</span></p>\";\r\n                    $opacity = 0.5;\r\n              }\r\n         } 	\r\n          \r\n          if($wines[\'WineVintage\']==0){\r\n          	\r\n            $vintage=NULL;	\r\n          }\r\n          else{\r\n          	$vintage=$wines[\'WineVintage\'];\r\n          }\r\n            if($wines[\'QtyInStock\'] < 3 AND $wines[\'WineType\']!=\'Glass\'){\r\n          $lowStock = \" \";  \r\n//don\'t use with by the glass\r\n          }\r\n          else{\r\n          $lowStock = \"\";\r\n           }\r\n          if($wines[\'WineSize\']<750 AND $wines[\'WineSize\']!=0){\r\n                 $sizeinfo=\"\";    //$sizeinfo=\"&nbsp;(small bottle)\";\r\n          }\r\n          else{\r\n               $sizeinfo=\"\";\r\n          }	\r\n\r\n          $singlePage=\"single-item/\";\r\n          if ( wonderplugin_is_device(\'Windows,Mac,Linux,iPad\' )){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"singleitem-smallscreen/\";\r\n}\r\n\r\n\r\nif($happyhour==True AND $wines[\'AvailableHappyHour\'] == -1){\r\n$happyhourtext=\"     <font color=\'red\'>(Happy Hour)</font>\";\r\n} \r\nelse{\r\n$happyhourtext=\"\";\r\n}\r\n           $wineID=\"<b><span style= \'opacity: \".$opacity.\";\'><a  href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byGlass&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"&emsp;\".$happyhourtext.\"</a></span></b>\";\r\n\r\n\r\n\r\n   if($prevID != $wines[\'WineType2\']){\r\n      $prevID = $wines[\'WineType2\'];\r\n      if($prevID == 1){\r\n         echo \"<span style=\'opacity: \".$opacity.\"; font-weight: bold; font-size: 1.5em; line-height: 50%;\'><p class = \'listView\'>White</p></span>\";\r\n       }\r\n       elseif($prevID == 2){\r\n        // echo \"<br>\";   \r\n         echo \"<br><span style=\'opacity: \".$opacity.\"; font-weight: bold; font-size: 1.5em;  line-height: 50%;\'><p class = \'listView\'>Red</p></span>\";\r\n       }\r\n       elseif($prevID == 3){\r\n          // echo \"<br>\";  \r\n          if($wines[\'WineSize\'] != 187){ \r\n          echo \"<br><span style=\'opacity:  \".$opacity.\"; font-weight: bold; font-size: 1.5em;  line-height: 50%;\'><p class = \'listView\'>Sparkling</p></span>\";\r\n       }\r\n       }\r\n       elseif($prevID == 4){\r\n            // echo \"<br>\";\r\n             echo \"<br><span style=\'opacity:  \".$opacity.\"; font-weight: bold; font-size: 1.5em;  line-height: 50%;\'><p class = \'listView\'>Rosé</p></span>\";\r\n       }\r\n    }\r\n\r\n   echo \"<p class= \'listView\' style = \'padding-top: 8px;\'><span style=\'font-size: 1.25em; text-align: left; width:85%; line-height: 100%; display: inline-block;\'>\".$wineID.\"</span>\";\r\n	        \r\n    if($x==2 AND $happyhour==True AND $wines[\'AvailableHappyHour\'] == -1){\r\n                if($happyHourOffer==\'Fixed Price\'){\r\n                  $happyHourFinal=$happyhourwineprice;\r\n                }\r\n                else if($happyHourOffer==\'Amount Off\'){\r\n                  $happyHourFinal=$wines[\'WinePrice\'] - $happyhourwineprice;\r\n                }\r\n                else if($happyHourOffer==\'Percent Off\'){\r\n                  $happyHourFinal=round($wines[\'WinePrice\'] * (1-$happyhourwineprice/100));\r\n                }\r\n                 $winePrice=\"<del><b>$\".$wines[\'WinePrice\'].\"</del>&nbsp;<font color=\'red\'>$\".$happyHourFinal.\"</font></b>\";\r\n    }\r\n                 \r\n\r\n    else{\r\n    $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b>\";\r\n    }\r\n\r\n                 echo \"<span style=\'font-size: 1.25em; text-align: left; width:85%; line-height: 100%;\'>\".$winePrice.\"</span></p>\"; \r\n\r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                       echo \"<p  class = \'listView\' style = \'font-size:1.1em; padding-top: 0px; line-height: 120%\'>\".$wineVarietal.\"</p>\";\r\n\r\n                  }\r\n                 \r\n	\r\n  		$wineCountry=$wines[\'WineCountry\'].\">\".$wines[\'WineRegion\'];\r\n             \r\n                 if(substr($wineCountry, strlen($wineCountry)-1,1)==\">\"){\r\n\r\n                       $wineCountry=substr($wineCountry, 0, strlen($wineCountry)-1);\r\n                }\r\n                      $wineCountry=$wineCountry;\r\n\r\n		echo \"<p class = \'listView\' style = \'font-size:1.1em; padding-top: 0px; padding-bottom: 5px;  line-height: 120%\'>\".$wineCountry.\"</p>\";\r\n                         \r\n    \r\n                \r\n        }\r\n        //echo \"<br>\";\r\n}\r\n\r\n\r\necho \"<br><p class = \'listView\'><font size=\'-1\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax).  BZ$2 = US$1</p><font>\";\r\n//echo \"</div>\";','[xyz-ips snippet=\"byGlassPHP-expanded3\"]',1),(27,'ContinuousDisplayPHP-7','<?php\r\n\r\n$search = $_GET[\'search\'];\r\n\r\n\r\n\r\n$happyhourprice = 12;\r\n\r\ndate_default_timezone_set(\"America/Belize\"); \r\nif (time() >= strtotime(\'14:55:00\') AND time() <= strtotime(\'17:00:00\')){\r\n$happyhour = True;\r\n}\r\nelse{\r\n$happyhour = False;\r\n}\r\n\r\n$variable = $_GET[\'WineID\'];\r\n$listType = $_GET[\'listType\'];\r\n$listName = $_GET[\'listName\'];\r\n$linkCount = $_GET[\'linkCount\'];\r\n$food1 = trim($_GET[\'food1\']);\r\n$food2 = trim($_GET[\'food2\']);\r\n$food3 = trim($_GET[\'food3\']);\r\n$food4 = trim($_GET[\'food4\']);\r\n$wineNumber = 0;\r\n$screenWidth = 1000;\r\n\r\nif(!empty($search)){\r\n  $listType = \"bySearch\";\r\n}\r\n\r\n\r\n\r\nif(wonderplugin_is_device(\'iPhone\')){\r\n$screenWidth = 400;\r\n$device = \"iPhone\";\r\n}\r\nelseif(wonderplugin_is_device(\'Windows\')){\r\n$screenWidth = 1000;\r\n$device = \"Windows\";\r\n}\r\nelseif(wonderplugin_is_device(\'iPad\')){\r\n$screenWidth = 1000;\r\n$device = \"iPad\";\r\n}\r\nelseif(wonderplugin_is_device(\'Mac\')){\r\n$screenWidth = 1000;\r\n$device = \"Mac\";\r\n\r\n}\r\nelseif(wonderplugin_is_device(\'Android\')){\r\n$screenWidth = 1000;\r\n$device = \"Android\";\r\n}\r\n\r\n//echo \"Width \",$screenWidth;\r\n\r\n\r\nif($food1!=\"\"){\r\n$xfood1=substr($food1, (strlen($food1)-2)*-1);\r\n}\r\nif($food2!=\"\"){\r\n$xfood2=substr($food2, (strlen($food2)-2)*-1);\r\n}\r\nif($food3!=\"\"){\r\n$xfood3=substr($food3, (strlen($food3)-2)*-1);\r\n}\r\nif($food4!=\"\"){\r\n$xfood4=substr($food4, (strlen($food4)-2)*-1);\r\n}\r\n\r\n\r\n   $con = mysqli_connect(\'localhost\', \'mayabeac_wine\', \'3]eGo-r(Scru\',\"mayabeac_WineList\");\r\n        if (mysqli_connect_errno()) {\r\n            echo\"\r\n                Failed to connect to the MySQL DB:\".mysqli_connect_error();\r\n            }\r\n           else{\r\n\r\n\r\n}\r\n\r\nif (wonderplugin_is_device(\'iPhone\')){\r\n$singlePage=\"single-item/\";\r\n}\r\nelse{\r\n$singlePage=\"single-item/\";\r\n}\r\n\r\n\r\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\nif($listType==\"bySearch\"){\r\n\r\n     $sql=\"SELECT * FROM Wines WHERE (WineName Like \'%\".$search.\"%\' OR WineRegion Like \'%\".$search.\"%\' OR WineCountry Like \'%\".$search.\"%\' OR WineNationality Like \'%\".$search.\"%\' OR WineSubRegion Like \'%\".$search.\"%\' OR Category Like \'%\".$search.\"%\' OR Category2 Like \'%\".$search.\"%\' OR Category3 Like \'%\".$search.\"%\'  OR  Desc1 Like \'%\".$search.\"%\' OR  Desc2 Like \'%\".$search.\"%\' OR  Desc3 Like \'%\".$search.\"%\' OR  Desc4 Like \'%\".$search.\"%\' OR  Eyes Like \'%\".$search.\"%\' OR  Nose Like \'%\".$search.\"%\' OR  Mouth Like \'%\".$search.\"%\' OR  WineVarietal Like \'%\".$search.\"%\' OR  WineProfile1 Like \'%\".$search.\"%\' OR  WineProfile2 Like \'%\".$search.\"%\' OR  PairingSuggestion Like \'%\".$search.\"%\' OR  WineVintage Like \'%\".$search.\"%\') AND WineType != \'Glass\' AND QtyInStock <> -1 ORDER BY WinePrice\";\r\n\r\n// Does not include Desc1 \'From the Winemaker\'\r\n\r\n\r\n// echo $sql;\r\n//$records1=mysqli_query($con, $sql);\r\n//       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n//       echo $row1[\'WineName\'],\"<br>\";\r\n//}\r\n}\r\nelseif($listType==\"byVarietal\"){\r\n      $sql=\"SELECT * FROM Wines WHERE (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE WineCountry = \'\".$listName.\"\' AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY CASE \r\n               WHEN WineType = \'Sparkling\' THEN 1\r\n               WHEN WineType = \'White\' THEN 2\r\n               WHEN WineType = \'Rose\' THEN 3\r\n               WHEN WineType = \'Red\' THEN 4\r\n               ELSE 5\r\n         END,  WinePrice\";\r\n          \r\n\r\n}\r\nelseif($listType==\"byProfile\"){\r\n\r\n      if($listName==\"WhitesAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock!=-1 ORDER BY WineName\";\r\n            $showName=\"All Whites A - Z\";\r\n            $listTypeName=\"White Wines\";\r\n      }\r\n       elseif($listName==\"WhitePrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'White\' AND QtyInStock!=-1 ORDER BY WinePrice\";\r\n            $showName=\"All Whites by Price\";\r\n            $listTypeName=\"White Wines\";\r\n      }\r\n      elseif($listName==\"RedsAZ\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock!=-1 ORDER BY WineName\";\r\n            $showName=\"All Reds A - Z\";\r\n            $listTypeName=\"Red Wines\";\r\n      }\r\n      elseif($listName==\"RedPrice\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType = \'Red\' AND QtyInStock!=-1 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red Wines\";\r\n      }    \r\n      \r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND QtyInStock!=-1 AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byGlass\"){\r\n\r\n // $sql=\"SELECT * FROM Wines WHERE WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WineType2, WinePrice\";           \r\n\r\nif($happyhour==True){\r\n\r\n$sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND (AvailableToday = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY SoldAs DESC, WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n}\r\nelse{\r\n\r\n$sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND AvailableToday = -1) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY SoldAs DESC, WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n}\r\n\r\n//$sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND (AvailableToday = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY AvailableToday, AvailablePremium, WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n// $sql=\"SELECT * FROM Wines WHERE (WineType = \'Glass\' AND (AvailableToday = -1 OR AvailableOnRequest = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 750) ORDER BY WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n\r\n     \r\n}\r\nelseif($listType==\"byFood\"){\r\n\r\n$foodList = \"(\'\".$food1.\"\', \'\".$food2.\"\', \'\".$food3.\"\', \'\".$food4.\"\')\";\r\n\r\n$sql=\"SELECT * FROM Wines WHERE ((WineType != \'Glass\' AND QtyInStock!=-1) OR (WineType = \'Glass\' AND AvailableToday = -1))  AND (FoodPairing1 IN \".$foodList.\" OR FoodPairing2 IN \".$foodList.\" OR FoodPairing3 IN \".$foodList.\" OR FoodPairing4 IN \".$foodList.\" OR FoodPairing5 IN \".$foodList.\" OR FoodPairing6 IN \".$foodList.\" OR FoodPairing7 IN \".$foodList.\" OR FoodPairing8 IN \".$foodList.\" OR FoodPairing9 IN \".$foodList.\" OR FoodPairing10 IN \".$foodList.\"  OR FoodPairing11 IN \".$foodList.\"  OR FoodPairing12 IN \".$foodList.\"  OR FoodPairing13 IN \".$foodList.\"  OR FoodPairing14 IN \".$foodList.\"  OR FoodPairing15 IN \".$foodList.\")\";\r\n\r\n$showName=\"Food Pairings\";\r\n$listTypeName=\"Food Matches\";\r\n}\r\n\r\n\r\n\r\n// Read all wines to determine length of list.\r\n// Need to sort items based on match score (desc) then price (asc). Wines by the glass will appear first as they have 6 added\r\n// to the base score whereas other wines start at 0\r\n\r\n       $IDarray=array();\r\n       $wineCount=0;\r\n      $foodWines = array();      //two dimensional array 1= name, 2 = food1, 3 = food2, 4 = food3, 5 = food4, 6 = score, 7 = country, 8 = varietal, 9 = btl or glass, 10 = WineID, 11 = Price. 12 = Desc1, 13 = Desc2, 14= Desc3, 15 = Desc 4, 16 = Image1, 17= Image2, 18 = QtyInStock, 19 = Eyes, 20 = Nose, 21 = Mouth, 22 = Vintage, 23 = Alcohol Content, 24 = Pairing Suggestion , 25=Cases Produced, 26 = WineRegion, 27 = Wine Subregion, 28 = Nationality\r\n\r\n\r\n       $records1=mysqli_query($con, $sql);\r\n       while ($row1 = mysqli_fetch_assoc($records1)) {\r\n            \r\n      $wineCount = $wineCount+1;\r\n\r\n      $foodWines[$wineCount][1] = $row1[\'WineName\'];\r\n      $foodWines[$wineCount][6] = 0;\r\n      $foodWines[$wineCount][7]  = $row1[\'WineCountry\'];\r\n      $foodWines[$wineCount][8] = $row1[\'WineVarietal\'];\r\n      $foodWines[$wineCount][10] = $row1[\'ID\'];\r\n      $foodWines[$wineCount][11] = $row1[\'WinePrice\'];\r\n      //$foodWines[$wineCount][12] = $row1[\'PairingValue1\'];\r\n      //$foodWines[$wineCount][13] = $row1[\'PairingValue2\'];\r\n      //$foodWines[$wineCount][14] = $row1[\'PairingValue3\'];\r\n      //$foodWines[$wineCount][15] = $row1[\'PairingValue4\'];\r\n      $foodWines[$wineCount][32] = $row1[\'Desc1\'];\r\n      $foodWines[$wineCount][33] = $row1[\'Desc2\'];\r\n      $foodWines[$wineCount][34] = $row1[\'Desc3\'];\r\n      $foodWines[$wineCount][35] = $row1[\'Desc4\'];\r\n      $foodWines[$wineCount][16] = $row1[\'Image1\'];\r\n      $foodWines[$wineCount][17] = $row1[\'Image2\'];\r\n      $foodWines[$wineCount][18] = $row1[\'QtyInStock\'];\r\n      $foodWines[$wineCount][19] = $row1[\'Eyes\'];\r\n      $foodWines[$wineCount][20] = $row1[\'Nose\'];\r\n      $foodWines[$wineCount][21] = $row1[\'Mouth\'];\r\n      $foodWines[$wineCount][22] = $row1[\'WineVintage\'];\r\n      $foodWines[$wineCount][23] = $row1[\'AlcoholContent\'];\r\n      $foodWines[$wineCount][24] = $row1[\'PairingSuggestion\'];\r\n      $foodWines[$wineCount][25] = $row1[\'CasesProduced\'];\r\n      $foodWines[$wineCount][26] = $row1[\'WineRegion\'];\r\n      $foodWines[$wineCount][27] = $row1[\'WineSubregion\'];\r\n      $foodWines[$wineCount][28] = $row1[\'WineNationality\'];  \r\n      $foodWines[$wineCount][29] = $row1[\'WineType\']; \r\n      $foodWines[$wineCount][30] = $row1[\'WineSize\']; \r\n      $foodWines[$wineCount][36] = $row1[\'AvailableToday\'];\r\n      $foodWines[$wineCount][37] = $row1[\'AvailablePremium\'];\r\n      $foodWines[$wineCount][38] = $row1[\'AvailableOnRequest\'];  \r\n       $foodWines[$wineCount][39] = $row1[\'SoldAs\'];\r\n      $foodWines[$wineCount][51] = $row1[\'FoodPairing1\'];\r\n      $foodWines[$wineCount][52] = $row1[\'FoodPairing2\'];\r\n      $foodWines[$wineCount][53] = $row1[\'FoodPairing3\'];\r\n      $foodWines[$wineCount][54] = $row1[\'FoodPairing4\'];\r\n      $foodWines[$wineCount][55] = $row1[\'FoodPairing5\'];\r\n      $foodWines[$wineCount][56] = $row1[\'FoodPairing6\'];\r\n      $foodWines[$wineCount][57] = $row1[\'FoodPairing7\'];\r\n      $foodWines[$wineCount][58] = $row1[\'FoodPairing8\'];\r\n      $foodWines[$wineCount][59] = $row1[\'FoodPairing9\'];\r\n      $foodWines[$wineCount][60] = $row1[\'FoodPairing10\'];\r\n      $foodWines[$wineCount][61] = $row1[\'FoodPairing11\'];\r\n      $foodWines[$wineCount][62] = $row1[\'FoodPairing12\'];\r\n      $foodWines[$wineCount][63] = $row1[\'FoodPairing13\'];\r\n      $foodWines[$wineCount][64] = $row1[\'FoodPairing14\'];\r\n      $foodWines[$wineCount][65] = $row1[\'FoodPairing15\'];\r\n  \r\n\r\n      if( $foodWines[$wineCount][29] == \"Glass\"){\r\n          $foodWines[$wineCount][6] = 100;\r\n          $foodWines[$wineCount][9] = 0;\r\n          }\r\n      else{\r\n            $foodWines[$wineCount][9] = 1;\r\n            $foodWines[$wineCount][6] = 0;\r\n      }\r\nif($listType==\'bySearch\'){\r\nfor($x = 1; $x <= 40; $x++){\r\nif($x!=16 AND $x!=17){\r\n$foodWines[$wineCount][$x]= preg_replace(\"/\".$search.\"/i\", \"<span style=\'background-color: #FFFF00;\'>\\$0</span>\",$foodWines[$wineCount][$x]);\r\n}\r\n}\r\n}\r\n\r\n// preg_replace(\"/the/i\", \"<b>\\$0</b>\", $original);\r\n\r\n\r\n\r\n// $foodWines[$wineCount][1] = \"<span style=\"background-color: #FFFF00\">\".$foodWines[$wineCount][1].\"</span>\" \r\n\r\nif($listType == \'byFood\'){\r\n\r\n// only sort the array if this is a food match selection\r\n\r\n$minPairing = 0;\r\n\r\nfor($x = 1; $x <= 15; $x++){\r\n\r\nif($food1!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food1){\r\n          \r\n          $foodWines[$wineCount][12] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][12]==6){\r\n           $foodWines[$wineCount][12]=5;\r\n          } \r\n          if($foodWines[$wineCount][12]==0 OR is_null($foodWines[$wineCount][12])){\r\n             $foodWines[$wineCount][12]=5; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][12];\r\n         }   \r\n}\r\n\r\nif($food2!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food2){\r\n         $foodWines[$wineCount][13] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n         if($foodWines[$wineCount][13]==6){\r\n           $foodWines[$wineCount][13]=5;\r\n          } \r\n         if($foodWines[$wineCount][13]==0 OR is_null($foodWines[$wineCount][13])){\r\n             $foodWines[$wineCount][13]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][13];\r\n         }   \r\n}\r\n\r\nif($food3!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food3){\r\n         $foodWines[$wineCount][14] = $row1[\'PairingValue\'.$x] * -1 + 6; \r\n          if($foodWines[$wineCount][14]==6){\r\n           $foodWines[$wineCount][14]=5;\r\n          } \r\n         if($foodWines[$wineCount][14]==0 OR is_null($foodWines[$wineCount][14])){\r\n             $foodWines[$wineCount][14]=1; \r\n          }\r\n        $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][14];\r\n         }   \r\n}\r\nif($food4!=\"\"){\r\n         if($row1[\'FoodPairing\'.$x]==$food4){\r\n         $foodWines[$wineCount][15] = $row1[\'PairingValue\'.$x] * -1 + 6;\r\n          if($foodWines[$wineCount][15]==6){\r\n           $foodWines[$wineCount][15]=5;\r\n          } \r\n          if($foodWines[$wineCount][15]==0 OR is_null($foodWines[$wineCount][15])){\r\n             $foodWines[$wineCount][15]=1; \r\n          }\r\n         $foodWines[$wineCount][6] =$foodWines[$wineCount][6]+$foodWines[$wineCount][15];\r\n         }   \r\n   }   \r\n\r\n}  \r\n\r\n//echo $foodWines[$wineCount][1].\" \".$foodWines[$wineCount][12].\" \".$foodWines[$wineCount][13].\" \".$foodWines[$wineCount][14].\" \".$foodWines[$wineCount][15].\"<br>\";\r\n\r\nif($foodWines[$wineCount][12] <3  AND  $foodWines[$wineCount][13] < 3 AND $foodWines[$wineCount][14] < 3 AND $foodWines[$wineCount][15] < 3){\r\n//echo \"Skipping\".$foodWines[$wineCount][1].\"<br>\";\r\n$wineCount=$wineCount - 1;\r\n\r\n}\r\n\r\n}\r\n       \r\n}\r\n\r\n//sort Array\r\nif($listType==\'byFood\'){\r\nforeach ($foodWines as $key => $row) {\r\n    $score[$key]  = $row[6];\r\n    $winePrice[$key] = $row[11];\r\n}\r\n\r\n// With the use of the column keys you can now sort entire array by these columns and keep the row index value intact if they are non-numeric. This is good if your using some kind of hashed index.\r\n\r\narray_multisort($score, SORT_DESC, $winePrice, SORT_DESC, $foodWines);\r\n}\r\n\r\n\r\n     // echo $wineCount;\r\n       \r\nif($listType == \'byFood\'){\r\n$xstart = 0;\r\n$totalWines = $wineCount-1;\r\n}\r\nelse{\r\n$xstart = 1;\r\n$totalWines = $wineCount;\r\n\r\n}\r\n\r\n\r\nif($totalWines!=0){\r\n for($x = $xstart; $x <= $totalWines; $x++){\r\n\r\nif($listType == \'byFood\'){\r\n$y=$x+1;\r\n}\r\nelse{\r\n$y=$x;\r\n}       \r\n\r\n   if($listType==\"byCountry\"){\r\n\r\n               $listTypeName=$foodWines[$x][28];\r\n          \r\n\r\n         }\r\n         elseif($listType==\"byProfile\" AND $listTypeName!=\"\"){\r\n\r\n\r\n         }\r\n        elseif($listType==\"byProfile\" AND $listTypeName==\"\"){\r\n\r\n          $listTypeName=$listName;\r\n         }\r\n        elseif($listType==\"byVarietal\"){\r\n          $listTypeName=$listName;\r\n        }\r\n\r\n        if($listType==\'bySearch\'){\r\n        $browsing=$y.\" of \".$wineCount.\"&nbsp;<b>Results for \'\".ucwords($search).\"\'</b>\";\r\n       }\r\n       elseif($listType==\'byCountry\'){\r\n\r\n              $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" Wines</b></a>\";\r\n\r\n\r\n           \r\n             if($foodWines[$x][29]==\'Rose\'){\r\n             $showName=$listName.\"&nbsp;(Rosé)\";\r\n             }\r\n             else{\r\n             $showName=$listName.\"&nbsp;(\".$foodWines[$x][29]. \" Wines)\";\r\n             }\r\n        }\r\n        elseif($listType==\'byVarietal\'){\r\n                  $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n\r\n                  $showName=$listName;\r\n         }\r\n         elseif($listType==\'byProfile\'){\r\n            $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\" </b></a>\";\r\n\r\n            $showName=$listName;\r\n         }\r\n         elseif($listType==\"byGlass\"){\r\n         $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b> Wines By The Glass</b></a>\";\r\n\r\n         }\r\n         \r\n         elseif($listType==\"byFood\"){\r\n\r\n           $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/foodmatches/?food1=\".$food1.\"&food2=\".$food2.\"&food3=\".$food3.\"&food4=\".$food4.\"\'><b> Food Matches</b></a>\";\r\n           \r\n          }\r\n\r\nif($browsing==\"\"){\r\n\r\n        $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n        echo \"<body>\";\r\n\r\n\r\necho \"<a class=\'anchor\' id=\'wine\".$y.\"\'></a>\";\r\n\r\n//set to 500 now so it does not change - effectively disabling\r\n\r\n        if(strlen($foodWines[$x][1].\"&emsp\".$foodWines[$x][22])>500){\r\n         $nameFont=\"1.1em\";\r\n         }\r\n        else{\r\n        $nameFont=\"1.35em\";\r\n        }\r\n\r\n  if($foodWines[$x][29] == \'Glass\' OR $foodWines[$x][39] == 1){\r\n        \r\n          if($foodWines[$x][45] == 5 OR $foodWines[$x][45] == 0){\r\n                  if($happyhour==True AND $foodWines[$x][37] == -1){\r\n                      $winePrice = \"<b><del>$\".$foodWines[$x][11].\"</del>&emsp;<font color=\'red\'>$\".$happyhourprice.\"/glass</font></b>\";\r\n                     }\r\n                    else{\r\n                      $winePrice = \"<b>$\".$foodWines[$x][11].\"/glass</b>\";\r\n                     }\r\n             \r\n          }\r\n          else{\r\n           $winePrice = \"<b>$\".$foodWines[$x][11].\"/glass (\".$foodWines[$x][45].\"oz)</b>\";\r\n           }\r\n         }        \r\n        else{\r\n        $winePrice= \"<b>$\".$foodWines[$x][11].\"</b>\";\r\n        }\r\n\r\n\r\n      \r\nif ($device == \'Windows\' OR $device == \'Mac\' OR $device == \'Linux\'){\r\n        $bodytext=\"justify\";\r\n        \r\n       echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 84%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n      \r\n\r\n\r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\necho\"<tr>\";\r\n\r\nif(!empty($foodWines[$x][17])){\r\n\r\n\r\n//$tempstr = \"changeImage(\".$foodWines[$x][10].\", &#039\".$foodWines[$x][16].\"&#039, &#039\".$foodWines[$x][17].\"&#039)\";\r\n\r\n\r\necho \"<td style=\'vertical-align: top; text-align: center;\'><div style=\'width:image width px; font-size:80%; text-align:center;\'><a style=\'width: 100%; height: 100%\' href=\'#\' data-featherlight=\'\".$foodWines[$x][17].\"\'><img id=\".$foodWines[$x][10].\" style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'>Click Image for Front / Back View</div></td>\";\r\n\r\n}\r\nelse{\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n\r\n}\r\n\r\n    \r\n\r\n         if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\nelseif($device == \'iPad\' OR $device == \'Android\'){\r\n   \r\n  $bodytext=\"left\";\r\n\r\n      echo \"<table>\";\r\n\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 30%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 69%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n  \r\n  echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: normal;\'>\".$winePrice.\"</td><td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n echo\"<tr>\";\r\nif(!empty($foodWines[$x][17])){\r\n\r\n\r\n$tempstr = \"changeImage(\".$foodWines[$x][10].\", &#039\".$foodWines[$x][16].\"&#039, &#039\".$foodWines[$x][17].\"&#039)\";\r\n\r\n\r\necho \"<td style=\'vertical-align: top; text-align: center;\'><div style=\'width:image width px; font-size:80%; text-align:center;\'><a href=\'#\' data-featherlight=\'\".$foodWines[$x][17].\"\'><img id=\".$foodWines[$x][10].\" style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'>Click Image for Front / Back View</div></td>\";\r\n\r\n}\r\nelse{\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 37vw; height: 65vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n\r\n}\r\n\r\n            \r\n\r\n     if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n\r\n      elseif($device == \'iPhone\'){\r\n\r\n   $bodytext=\"left\";\r\n   \r\n\r\n\r\n \r\n echo \"<table>\";\r\n\r\necho \"<tr><td style=\'display:block-inline; text-align: center; font-size: 1.1em;  font-weight: normal;\'>\".do_shortcode($prevWine).\"&emsp;\".$browsing.\"&emsp;\".do_shortcode($nextWine).\"</td></tr></table>\";\r\n\r\n \r\n      \r\n      echo \"<table>\";\r\n       echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 35%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 64%;\'>\";\r\n        echo \"</colgroup>\";  \r\n\r\n         echo\"<tr>\";\r\n   \r\nif(!empty($foodWines[$x][17])){\r\n$tempstr = \"changeImage(\".$foodWines[$x][10].\", &#039\".$foodWines[$x][16].\"&#039, &#039\".$foodWines[$x][17].\"&#039)\";\r\n\r\necho \"<td style=\'vertical-align: top; text-align: center;\'><div style=\'width:image width px; font-size:80%; text-align:center;\'><img id=\".$foodWines[$x][10].\" onclick=\'\".$tempstr.\"\' style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'>Click Image for Front / Back View</div></td>\";\r\n}\r\nelse{\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 30vw; height: 70vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n\r\n}\r\n         \r\n\r\n     if($foodWines[$x][22] != 0){\r\n  	         echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"&emsp; \".$foodWines[$x][22].\"</span><br>\";\r\n        }\r\n        else{\r\n               echo \"<td style=\'vertical-align:top; font-weight: normal; text-align: \".$bodytext.\"; line-height: 1.25em; padding-right: 20px; font-size: 1.35em\'><span style=\'font-weight: bold\'>\".$foodWines[$x][1].\"</span><br>\";\r\n         }\r\n\r\n\r\n        }\r\n         \r\n\r\n         //  ///Common Code Here\r\n        \r\n\r\n         \r\n  	if($listType==\"byFood\"){\r\n\r\n $foodarray = array($foodWines[$x][51],$foodWines[$x][52],$foodWines[$x][53],$foodWines[$x][54],$foodWines[$x][55],$foodWines[$x][56],$foodWines[$x][57],$foodWines[$x][58],$foodWines[$x][59],$foodWines[$x][60],$foodWines[$x][61],$foodWines[$x][62],$foodWines[$x][63],$foodWines[$x][64],$foodWines[$x][65]);\r\n         $goodfoods = \"\";\r\n         $badfoods = \"\";\r\n\r\n          if(in_array($food1, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood1;\r\n           }\r\n           elseif($food1!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood1;\r\n            }\r\n\r\n           if(in_array($food2, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n           }\r\n           elseif($food2!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood2;\r\n            }\r\n\r\n   if(in_array($food3, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n           \r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n           }\r\n           elseif($food4!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood4;\r\n            }\r\n            \r\n       // if($goodfoods!=\"\"){\r\n       // $goodfoods=substr($goodfoods, (strlen($goodfoods)-2)*-1);\r\n        // echo \"<font size=\'+1\'><b>We suggest with: </b>\".$goodfoods.\"<br><font>\";\r\n       // }\r\n\r\n//alternate good food list - show all food listed as pairing with this wine\r\n      \r\n\r\n\r\n\r\n\r\n\r\n        if($badfoods!=\"\"){\r\n        $badfoods=substr($badfoods, (strlen($badfoods)-2)*-1);\r\n // leave off for now    echo \"<font size=\'+1\'><b>Mabye not so good with: </b>\".$badfoods.\"<br><font>\";\r\n        }\r\n\r\n\r\n          \r\n\r\n         }\r\n       \r\n        \r\n        $varietalText=$foodWines[$x][8];\r\n        if ($varietalText != \"\"){\r\n            if (strpos($foodWines[$x][1], $varietalText) > 0){\r\n                $varietalText=\"\";\r\n            }\r\n        }\r\n\r\n            // echo $foodWines[$x][8].\"<br>\";\r\n\r\n         if($varietalText != \"\"){\r\n               echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$varietalText.\"</span>\";\r\n               echo \"<br>\";\r\n         }\r\n   \r\n    \r\n if($foodWines[$x][7] != \"\"){\r\n\r\n    if($foodWines[$x][26] != \"\"){\r\n        echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\">\".$foodWines[$x][26].\"</span><br><br>\";\r\n    }\r\n    else{\r\n        echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\"</span><br><br>\";\r\n    }\r\n}\r\nelse{\r\n    echo \"<br>\";\r\n}\r\n// echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][7].\">\".$foodWines[$x][26].\"</span><br><br>\";\r\n    \r\n//if($foodWines[$x][29]!=\'Glass\' AND $foodWines[$x][18] > 0){   \r\n// echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>In our Cellar: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][18].\"</span><br><font>\";\r\n//}\r\n\r\nif ($listType==\"byFood\"){\r\n\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Goes with our: &nbsp;</span><span style=\'font-weight: normal\'>\".$goodfoods.\"</span><br><font>\";\r\n\r\n\r\n}\r\n    if (!empty($foodWines[$x][19])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Eyes: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][19].\"</span><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][20])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Nose: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][20].\"</span><br><font>\";\r\n      }\r\n  \r\n  	if (!empty($foodWines[$x][21])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Mouth: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][21].\"</span><br><font>\";\r\n      }\r\n   \r\n      if (!empty($foodWines[$x][23]) AND $foodWines[$x][23]!=0) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Alcohol Content: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][23].\"%</span><br><font>\";\r\n      }\r\n  	if (!empty($foodWines[$x][34])) {\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>Ratings: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][34].\"</span><br><font>\";\r\n      }\r\n    \r\n  	if (!empty($foodWines[$x][33])) {\r\n       echo \"<font size=\'+1\'><text align=\'justify\'><span style=\'font-weight: bold\'>Why we like it: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][33].\"</span><br><font>\";\r\n      }\r\n   if($screenWidth > 500){     \r\n  	if (!empty($foodWines[$x][24])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Pairs with: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][24].\"</span><br><font>\";\r\n      }\r\n}\r\nif($screenWidth > 500){    \r\n  	if (!empty($foodWines[$x][32])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>From the Winemaker: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][32].\"</span><br><font>\";\r\n      }\r\n}\r\n      echo \"<br><font size=\'-1\'><span style=\'font-weight: normal\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax). BZ$2 = US$1</span><font>\";\r\n    \r\n    echo \"</td>\";\r\n\r\n    // echo \"<td valign=\'top\' align=\'left\'>\";\r\n    // echo do_shortcode($nextWine);\r\n    // echo \"</td>\";\r\n\r\n  	echo \"</tr>\";\r\n	echo \"</table>\";\r\n     echo \"<br><br><br><br>\";\r\n}\r\necho \"</body>\";\r\n}\r\nelse{\r\necho \"<h5>No Matching Results for  \'\".$search.\"\'</h5>\";\r\n}','[xyz-ips snippet=\"ContinuousDisplayPHP-7\"]',1),