(28,'ContinuousDisplayPHP-8','<?php\r\n\r\n$search = $_GET[\'search\'];\r\n$pageOffset = 7;\r\n$anchor = $_GET[\'wine\'];\r\n\r\n$tableName=\"Wines2\";\r\n\r\n\r\n//$happyhourprice = 14;\r\n\r\ndate_default_timezone_set(\"America/Belize\"); \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$callingType = $_GET[\'identifier\'];\r\n$returnPage = $_GET[\'returnPage\'];\r\n\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$singlePage=\"single-item/\";\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 \"XXXX\".$device,\"XXXX\";\r\n\r\n//$screenWidth=1000;\r\n//$device = \"iPad\";\r\n\r\necho \"<style>\";\r\necho \"img {display: block; margin: auto;}\";\r\necho \".top { vertical-align: top; }\";\r\necho \".bottom { vertical-align: bottom; }\";\r\necho \"</style>\";\r\n\r\n\r\n\r\n\r\n//echo\"<meta name=\'viewport\' id=\'viewport\' content=\'width=500\'/>\";\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$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    $happyhourprice = $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    if (time() >= $happyHourShowStart AND time() <= $happyHourShowStop){\r\n    $happyhour = True;\r\n    }\r\n    else{\r\n    $happyhour = False;\r\n    }\r\n\r\nif($listType==\"bySearch\"){\r\n\r\n     $sql=\"SELECT * FROM \".$tableName.\" 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 > 0 AND AvailableForSale = -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 \".$tableName.\" WHERE (OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 AND (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\' OR Category4 = \'\".$listName.\"\' OR Category5 = \'\".$listName.\"\' OR Category6 = \'\".$listName.\"\') AND ((QtyInStock > 0 AND WineType != \'Glass\') OR (SoldAs = 1 AND WineType2 = 6))) ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM \".$tableName.\" WHERE (OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 AND WineCountry = \'\".$listName.\"\' AND ((QtyInStock > 0 AND WineType != \'Glass\'  AND WineType != \'Beer\') OR (SoldAs = 1 AND WineType2 = 6))) 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 \".$tableName.\" WHERE WineType = \'White\' AND QtyInStock > 0 AND OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 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 \".$tableName.\" WHERE WineType = \'White\' AND QtyInStock > 0 AND OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 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 \".$tableName.\" WHERE WineType = \'Red\' AND QtyInStock > 0 AND OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 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 \".$tableName.\" WHERE WineType = \'Red\' AND QtyInStock > 0 AND OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red Wines\";\r\n      }  \r\n      elseif($listName==\"Inventory\"){\r\n            $sql=\"SELECT * FROM \".$tableName.\" WHERE WineType != \'Glass\' AND WineType != \'Dessert\' AND QtyInStock > 0 AND OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 ORDER BY WineType, WineName\";\r\n            $showName=\"All Wines A-Z\";\r\n            $listTypeName=\"All Wines\";\r\n      }\r\n\r\nelseif($listName==\"All\"){\r\n            $sql=\"SELECT * FROM \".$tableName.\" WHERE WineType != \'Glass\' AND WineType != \'Dessert\' AND QtyInStock > 0 AND OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 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            $showName=\"All Wines A-Z\";\r\n            $listTypeName=\"All Wines\";\r\n      }  \r\n  \r\n      elseif($listName==\"Dessert\"){\r\n             $sql=\"SELECT * FROM \".$tableName.\" WHERE (OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 AND (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND (QtyInStock > 0 AND WineType != \'Glass\' OR (SoldAs = 1 AND WineType2 = 6))) ORDER BY WinePrice\";\r\n            $showName=\"\";\r\n\r\n       }\r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM \".$tableName.\" WHERE (OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 AND (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND (QtyInStock > 0 AND WineType != \'Glass\' OR (SoldAs = 1 AND WineType2 = 6))) ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byPerson\"){\r\n\r\n  $sql=\"SELECT * FROM \".$tableName.\" WHERE (OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 AND WhosFavorite = \'\".$listName.\"\' AND ((QtyInStock > 0 AND WineType != \'Glass\'  AND WineType != \'Beer\') OR (SoldAs = 1 AND WineType2 = 6))) 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==\"byGlass\"){\r\n\r\n // $sql=\"SELECT * FROM \".$tableName.\" WHERE AvailableForSale = -1  AND WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WineType2, WinePrice\";           \r\n\r\nif($happyhour==True){\r\n\r\n$sql=\"SELECT * FROM \".$tableName.\" WHERE  OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0  AND ((WineType = \'Glass\' AND (AvailableToday = -1 OR AvailableHappyHour = -1)) OR (WineType!=\'Glass\' AND ShowOnGlassList = -1 AND QtyInStock > 0)) AND WineName!=\'Mimosa\'  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 \".$tableName.\" WHERE OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 AND  ((WineType = \'Glass\' AND AvailableToday = -1) OR (WineType!=\'Glass\' AND ShowOnGlassList = -1 AND QtyInStock > 0)) AND WineName!=\'Mimosa\' ORDER BY SoldAs DESC, WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n}\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 \".$tableName.\" WHERE (OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 AND ((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[\'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[\'AvailableHappyHour\'];\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      $foodWines[$wineCount][66] = $row1[\'WineryWebsite\'];\r\n      $foodWines[$wineCount][67] = $row1[\'CellarLocation\'];\r\n      $foodWines[$wineCount][101] = $row1[\'WhosFavorite\'];\r\n      $foodWines[$wineCount][102] = $row1[\'FavoriteImage\'];\r\n      $foodWines[$wineCount][103] = $row1[\'WineMaker\'];\r\n      $foodWines[$wineCount][104] = $row1[\'AverageYield\'];\r\n      $foodWines[$wineCount][105] = $row1[\'MainClones\'];\r\n      $foodWines[$wineCount][106] = $row1[\'pH\'];\r\n      $foodWines[$wineCount][107] = $row1[\'Barrels\'];\r\n      $foodWines[$wineCount][108] = $row1[\'TA\'];\r\n      $foodWines[$wineCount][109] = $row1[\'Winery\'];\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\nif($x<$pageOffset){\r\n$Offset = \"\";\r\n}\r\nelse{\r\n$temp = $x-$pageOffset;\r\n$Offset = \"#wine\".$temp;\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==\"byPerson\"){\r\n        $listTypeName=$foodWines[$x][101].\"\'s Favorites\";\r\n        $listName=$foodWines[$x][101];\r\n}\r\n\r\n\r\nelseif($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($listTypeName==\"Rose\"){\r\n         $listTypeName=\"Rosé\";\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       \r\n        elseif($listType==\'byPerson\'){\r\n\r\n          $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'/\".$listType.\"/?Listing=\".$listName.\"&identifier=\".$callingType.\"&listType=\".$returnPage.$Offset.\"\'><b>\".$listTypeName.\"</b></a>\";  \r\n\r\n        }\r\n\r\n        elseif($listType==\'byCountry\'){\r\n\r\n              $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'/\".$listType.\"/?Listing=\".$listName.$Offset.\"\'><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		$listName1=str_replace(\"&\",\"%26\",$listName); \r\n                  $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'/\".$listType.\"/?Listing=\".$listName1.$Offset.\"\'><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=\'/\".$listType.\"/?Listing=\".$listName.$Offset.\"\'><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=\'/\".$listType.\"/?Listing=\".$listName.$Offset.\"\'><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=\'/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=\'/\".$listType.\"/?Listing=\".$listName.$Offset.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n    echo \"<body>\";\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($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                        if($happyHourOffer==\'Fixed Price\'){\r\n                              $happyHourFinal=$happyhourprice;\r\n                        }\r\n                        else if($happyHourOffer==\'Amount Off\'){\r\n                        $happyHourFinal=$foodWines[$x][11] - $happyhourprice;\r\n                        }\r\n                        else if($happyHourOffer==\'Percent Off\'){\r\n                        $happyHourFinal=round($foodWines[$x][11] * (1-$happyhourprice/100));\r\n                        }\r\n                      $winePrice = \"<b><del>$\".$foodWines[$x][11].\"</del>&emsp;<font color=\'red\'>$\".$happyHourFinal.\"/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      if($foodWines[$x][30]<750 AND $foodWines[$x][30]>50){\r\n\r\n      if($foodWines[$x][30]==375){\r\n        $sizeInfo = \" (half bottle)\";\r\n       } \r\n       else{\r\n        $sizeInfo = \" (small bottle)\";\r\n        }\r\n\r\n        }\r\n        else{\r\n         $sizeInfo = \"\";\r\n         }  \r\n         \r\n        \r\n      if($listType==\'byPerson\'){\r\n         $favorite=\"\";\r\n      }\r\n\r\n      elseif(is_null($foodWines[$x][101])){\r\n         	$favorite=\"\";\r\n          	}   \r\n      else{\r\n          $favorite=\"<a href=\'/byperson/?WineID=\".$foodWines[$x][10].\"&Listing=\".$foodWines[$x][101].\"&listType=\".$listType.\"&identifier=\".$listName.\"&wine=\".$x.\"\'>\".$foodWines[$x][102].\"</a>\";\r\n         \r\n\r\n\r\n //$favorite=\"<a href=\'/byperson/?Listing=\".$foodWines[$x][101].\"\'>\".$foodWines[$x][102].\"</a>\";\r\n          	}\r\n\r\necho \"<a style=\'display:block;  height:200px;  margin-top:-200px; visibility:hidden;\' id=\'wine\".$y.\"\'></a>\";\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  cellspacing=\'0\' cellpadding=\'0\'>\";\r\n       echo \"<colgroup style=\'vertical-align: top;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%; vertical-align: top;\'>\";\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 style=\'vertical-align: top;\'>\";\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\n\r\necho \"<td style=\'vertical-align: top;\'><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;\'><img id=\".$foodWines[$x][10].\" 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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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\n//echo \"<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 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         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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n                }\r\n                else{\r\n                $goodfoods = $goodfoods.$xfood2;\r\n                 }\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                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n                }\r\n                else{\r\n                $goodfoods = $goodfoods.$xfood3;\r\n                  }\r\n           }\r\n           elseif($food3!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n                 }\r\n                 else{\r\n                 $goodfoods = $goodfoods.$xfood4;\r\n                 }\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        if(!empty($foodWines[$x][109])){\r\n   \r\n   // leave off for now echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][109].\"</span><br>\";\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\r\n$wineCountry = $foodWines[$x][7];\r\nif(!empty($foodWines[$x][26])){\r\n\r\n$wineCountry=$wineCountry.\">\".$foodWines[$x][26];\r\n\r\nif(!empty($foodWines[$x][27])){\r\n$wineCountry=$wineCountry.\">\".$foodWines[$x][27];\r\n\r\n}\r\n\r\n}    \r\n   \r\n        echo \"<p><span style=\'font-weight: normal font-size: 1.25em\'>\".$wineCountry.\"</span></p>\";\r\n \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 your selections:</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 > 10000){     \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\n\r\n$pairsString=\"\";\r\n   \r\nif($screenWidth > 500){\r\n   \r\n     for($y = 51; $y <= 55; $y++){\r\n\r\n      if(!empty($foodWines[$x][$y])){\r\n      \r\n      if($y==51){\r\n            $pairsString = substr($foodWines[$x][$y], (strlen($foodWines[$x][$y])-2)*-1);\r\n      }\r\n      else{\r\n            $pairsString=$pairsString.\", \".substr($foodWines[$x][$y], (strlen($foodWines[$x][$y])-2)*-1);\r\n      }\r\n      }      \r\n      }\r\n   if(!empty($pairsString)){\r\n    echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Pairs with:&nbsp;</span><span style=\'font-weight: normal\'>\".$pairsString.\"</span><br><font>\";\r\n   }\r\n   }\r\n\r\n \r\n\r\n\r\nif($screenWidth > 500){    \r\n       if (!empty($foodWines[$x][103])) {\r\n       $winemakertext=\"From the Winemaker:\";         \r\n\r\n//$winemakertext=\"From the Winemaker (\".$foodWines[$x][103].\"):\";\r\n        }\r\n        else{\r\n        $winemakertext=\"From the Winemaker:\";\r\n         }\r\n  	if (!empty($foodWines[$x][32])) {\r\n       \r\n        //add in carriage returns because this does not seem to do it automatically\r\n        $newstring = nl2br($foodWines[$x][32]); \r\n\r\necho \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>\",$winemakertext.\" &nbsp;</span><span style=\'font-weight: normal\'>\".$newstring.\"</span><br><font>\";\r\n      }\r\n\r\nif (!empty($foodWines[$x][103])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Winemaker: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][103].\"</span><font>\";\r\n      }\r\nif (!empty($foodWines[$x][25])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Cases Produced: &nbsp;</span><span style=\'font-weight: normal\'>\".number_format($foodWines[$x][25]).\"</span><font>\";\r\n      }\r\n\r\nif (!empty($foodWines[$x][107])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Winemaking / Barrels / Aging: &nbsp;</span><span style=\'font-weight: normal\'>\".nl2br($foodWines[$x][107]).\"</span><font>\";\r\n      }\r\n\r\nif (!empty($foodWines[$x][104])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Average Yield: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][104].\"</span><font>\";\r\n      }\r\n\r\n\r\nif(!empty($foodWines[$x][106]) AND !empty($foodWines[$x][108])){\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>pH: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][106].\"</span><span style=\'font-weight: bold\'>&emsp; Total Acidity: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][108].\"g/L</span> <font>\";\r\n\r\n}\r\n\r\nelseif (!empty($foodWines[$x][106])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>pH: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][106].\"</span> <font>\";\r\n      }\r\nelseif (!empty($foodWines[$x][108])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Total Acidity: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][108].\"g/L</span> <font>\";\r\n      }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n  	if (!empty($foodWines[$x][66])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Winery Website: &nbsp;</span><span style=\'font-weight: normal\'><a href=\'\".$foodWines[$x][66].\"\'  \r\n target=\'_blank\'>Click Here</a> </span><br><font>\";\r\n      }\r\n\r\n\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   if($foodWines[$x][18]<3 AND $foodWines[$x][39]==0){\r\n   if($foodWines[$x][18]==1){\r\necho \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>Only 1 Bottle Left in Our Cellar</span><font>\";\r\n}\r\nelse{\r\n    echo \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>Only 2 Bottles Left in Our Cellar</span><font>\";\r\n}\r\n}\r\n\r\nif(!empty($foodWines[$x][67]))  {\r\n\r\necho \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>\".$foodWines[$x][67].\"</span><font>\";\r\n}   \r\n\r\necho \"</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-8\"]',1),(29,'byVarietal1','<?php\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\r\n 	\r\n       echo \"<b><span style=\'display: inline-block; text-align: left; width:100%; line-height: 200%; font-size: 150%\'>\".$variable.\"</span></b>\";\r\n\r\n     	$sql=\"SELECT * FROM Wines WHERE QtyInStock>0 AND (Category =\'\".$variable.\"\' OR Category2 = \'\".$variable.\"\' OR Category3 =\'\".$variable.\"\') AND WineType != \'Glass\' ORDER BY WinePrice\";\r\n      	$records1=mysqli_query($con, $sql);\r\n      	\r\n        echo \"<table style=\'width: 100%\'>\";\r\n        echo \"<colgroup>\";\r\n        echo \"<col span=\'1\' style=\'width: 85%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%;\'>\";\r\n        echo \"</colgroup>\";\r\n        $wineCount = 0;\r\n      	while($wines=mysqli_fetch_assoc($records1)){\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                $sizeinfo=\"&nbsp;(small bottle)\";\r\n          }\r\n          else{\r\n               $sizeinfo=\"\";\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=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byVarietal&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></b>\";\r\n\r\n\r\necho \"<tr>\"; \r\necho \"<td style=\'text-align: left; vertical-align: bottom; font-size: 1.25em; height: 80%; padding-top: 0px; padding-bottom: 0px; \'>\".$wineID.\"</td>\";\r\n\r\n                \r\n                $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b>\";\r\n                echo \"<td style=\'font-size: 1.25em; text-align: right; vertical-align: bottom; height: 80%; padding-top: 0px; padding-bottom: 0px;\'>\".$winePrice.\"</td></tr>\"; \r\n            \r\n               $wineCountry=$wines[\'WineCountry\'].\">\".$wines[\'WineRegion\'];\r\n                if(substr($wineCountry, strlen($wineCountry)-1,1)==\">\"){\r\n\r\n                       $wineCountry=substr($wineCountry, 0, strlen($wineCountry)-1);\r\n                }\r\n echo \"<td style=\'text-align: left; vertical-align: bottom; font-size: 1em; height: 80%; padding-top: 0px; padding-bottom: 0px; \'>\".$wineCountry.\"</td>\";\r\n\r\n     \r\n        	echo \"<tr><td style=\'text-align: left; vertical-align: top; height: 80%; padding-top: 0px; padding-bottom: 1em; \'>\".$wines[\'WineVarietal\'].\"</td></tr>\";\r\n\r\n        }\r\n        echo \"</table>\";\r\n      	echo \"<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=\"byVarietal1\"]',1),(30,'byCountry-with-Filters','<?php\r\n$variable = $_GET[\'Listing\'];\r\n$filter = $_GET[\'Filter\'];\r\n//echo $filter;\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\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\nif(empty($filter)){\r\n\r\n$sql=\"SELECT DISTINCT Category FROM Wines WHERE ((QtyInStock > 0 AND WineType<>\'Glass\') OR (QtyInStock = 0 AND SoldAs = 1 AND WineType2 = 6)) AND WineCountry=\'\".$variable.\"\' ORDER BY WineType\";\r\n \r\n$records = mysqli_query($con, $sql); \r\n\r\n$linecount = 1;\r\n$category = array();\r\n$categoryCount=0;\r\n\r\n\r\nwhile($wine=mysqli_fetch_assoc($records)){\r\n     if(!empty($wine[\'Category\'])){\r\n          $categoryCount = $categoryCount + 1;\r\n          $category[$categoryCount] = $wine[\'Category\'];\r\n        \r\n    }\r\n}\r\n\r\n$sql=\"SELECT DISTINCT Category2 FROM Wines WHERE ((QtyInStock > 0 AND WineType<>\'Glass\') OR (QtyInStock = 0 AND SoldAs = 1 AND WineType2 = 6)) AND WineCountry=\'\".$variable.\"\' ORDER BY WineType\";\r\n \r\n$records = mysqli_query($con, $sql); \r\nwhile($wine=mysqli_fetch_assoc($records)){\r\n     if(!empty($wine[\'Category2\'])){\r\n          $categoryFound = 0;\r\n           for ($x = 1; $x <= $categoryCount; $x++) {\r\n                 if($category[$x] == $wine[\'Category2\']){\r\n                  \r\n                        $categoryFound = 1;\r\n                  }\r\n           }\r\n           if($categoryFound == 0){\r\n              $categoryCount = $categoryCount + 1;\r\n              $category[$categoryCount] = $wine[\'Category2\'];\r\n          }\r\n    }\r\n}\r\n\r\nsort($category);\r\n\r\n\r\n$categoryList = \"<a href=\'http://www.bistrowinelist.com/byCountry/?Listing=\".$variable.\"&Filter=\".$category[0].\"\'>\".$category[0].\"</a>\" ;\r\nfor ($x = 1; $x <= $categoryCount-1; $x++) {\r\n$temp = \"<a href=\'http://www.bistrowinelist.com/byCountry/?Listing=\".$variable.\"&Filter=\".$category[$x].\"\'>\".$category[$x].\"</a>\" ;;\r\n$categoryList = $categoryList.\"&emsp;\".$temp;\r\n//echo $category[$x].\"<br>\";\r\n}\r\n//echo $categoryList;\r\n}\r\n\r\n\r\n\r\n     echo \"<body>\";\r\n\r\nif(!empty($filter)){\r\n      echo \"<p><span style=\' display: inline-block; font-weight: bold; text-align: left; width:85%; line-height: 150%; font-size: 200%\'>\".$variable.\" (\".$filter.\")</span>\";\r\n}\r\nelse{\r\n  echo \"<p><span style=\' display: inline-block; font-weight: bold; text-align: left; width:85%; line-height: 150%; font-size: 200%\'>\".$variable.\"</span>\";\r\n\r\necho \"<span style=\' display: inline-block; font-weight: bold; text-align: left; width:85%; line-height: 150%; font-size: 100%\'>\".$categoryList.\"</span>\";\r\n}\r\n\r\necho \"</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       $wineCount=0;\r\n        for ($x = 1; $x <= 5; $x++) {\r\n	\r\nif(empty($filter)){\r\n     	$sql=\"SELECT * FROM Wines WHERE (QtyInStock>0 OR SoldAs = 1) AND WineCountry=\'\".$variable.\"\' AND WineType=\'\".$wineTypes[$x].\"\' ORDER BY WinePrice\";\r\n}\r\nelse{\r\n     	$sql=\"SELECT * FROM Wines WHERE (QtyInStock>0 OR SoldAs = 1) AND WineCountry=\'\".$variable.\"\' AND WineType=\'\".$wineTypes[$x].\"\' AND (Category = \'\".$filter.\"\' OR Category2 = \'\".$filter.\"\') ORDER BY WinePrice\";\r\n//echo $sql;\r\n}\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              $wineNationality = $wines[\'WineNationality\'];\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\"; \r\n                }\r\n               else{\r\n               $wineType2=$wineTypes[$x];\r\n               }\r\n\r\n              echo \"<span style=\'font-weight: bold; text-align: left; width:85%; line-height: 150%; display: inline-block; font-size: 1.5em\'>\".$wineType2.\"</span><br>\";\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[\'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           $sizeinfo=\"&nbsp (small bottle)\";\r\n            }\r\n            else{\r\n            $sizeinfo=\"\";\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           $wineID=\"<b><a href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byCountry&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></b>\";\r\n\r\n            \r\n            \r\n     echo \"<div style=\'line-height: 140%;\'>\";\r\n            echo \"<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><br>\"; \r\n             \r\n               $wineCountry=$wines[\'WineRegion\'];\r\n\r\n               if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                      \r\n                       echo \"<span style=\' display: inline-block; text-align: left; width:85%;\'>\".$wineVarietal.\"</span><br>\";\r\n\r\n                  }\r\n\r\n		echo \"<span style=\' display: inline-block; text-align: left; width:85%;\'>\".$wineCountry.\"</span><br>\";\r\n                \r\n                \r\n               echo \"<br>\";\r\n                        	\r\n      	  echo \"</div>\";\r\n        }\r\n      \r\n  \r\n}\r\n\r\nif(!empty($filter)){\r\n\r\n$filterList1 = \"<a href=\'http://www.bistrowinelist.com/byCountry/?Listing=\".$variable.\"&Filter=\".$category[0].\"\'>\".$wineNationality.\" Wines</a>\" ;\r\n$filterList2 = \"<a href=\'http://www.bistrowinelist.com/byVarietal/?Listing=\".$filter.\">All \".$filter.\"</a>\" ;\r\n\r\necho \"<span style=\' display: inline-block; text-align: left; width:85%;\'>\".$filterList1.\"&emsp;\".$filterList2.\"</span><br>\";\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>\";\r\necho \"</body>\";','[xyz-ips snippet=\"byCountry-with-Filters\"]',1),(31,'ContinuousDisplayPHP-9','<?php\r\n\r\n$search = $_GET[\'search\'];\r\n$pageOffset = 7;\r\n$anchor = $_GET[\'wine\'];\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 AND AvailableForSale = -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 AvailableForSale = -1 AND ((QtyInStock > 0 AND WineType != \'Glass\') OR (QtyInStock = 0 AND SoldAs = 1 AND WineType2 = 6)) ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE WineCountry = \'\".$listName.\"\'  AND AvailableForSale = -1 AND ((QtyInStock > 0 AND WineType != \'Glass\') OR (QtyInStock = 0 AND SoldAs = 1 AND WineType2 = 6)) 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 AvailableForSale = -1 AND QtyInStock > 0 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 AvailableForSale = -1 AND QtyInStock > 0 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 AvailableForSale = -1 AND QtyInStock > 0 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 AvailableForSale = -1 AND QtyInStock > 0 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red Wines\";\r\n      }    \r\n      elseif($listName==\"Dessert\"){\r\n             $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\')  AND AvailableForSale = -1 AND (QtyInStock > 0 AND WineType != \'Glass\' OR (QtyInStock = 0 AND SoldAs = 1 AND WineType2 = 6)) ORDER BY WinePrice\";\r\n            $showName=\"\";\r\n\r\n       }\r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\')  AND AvailableForSale = -1 AND (QtyInStock > 0 AND WineType != \'Glass\' OR (QtyInStock = 0 AND SoldAs = 1 AND WineType2 = 6)) 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 AvailableForSale = -1 AND AvailableToday = -1 ORDER BY WineType2, WinePrice\";           \r\n\r\nif($happyhour==True){\r\n\r\n$sql=\"SELECT * FROM Wines WHERE QtyInStock > -1  AND AvailableForSale = -1 AND ((WineType = \'Glass\' AND (AvailableToday = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 375)) 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 QtyInStock > -1  AND AvailableForSale = -1 AND ((WineType = \'Glass\' AND AvailableToday = -1) OR (WineType!=\'Glass\' AND WineSize > 0 AND WineSize < 375)) 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)  AND AvailableForSale = -1 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 < 375)  AND AvailableForSale = -1 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 AvailableForSale = -1 AND ((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      $foodWines[$wineCount][66] = $row1[\'AvailableForSale\'];\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\nif($x<$pageOffset){\r\n$Offset = \"\";\r\n}\r\nelse{\r\n$temp = $x-$pageOffset;\r\n$Offset = \"#wine\".$temp;\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($listTypeName==\"Rose\"){\r\n         $listTypeName=\"Rosé\";\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.$Offset.\"\'><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.$Offset.\"\'><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.$Offset.\"\'><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.$Offset.\"\'><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.$Offset.\"\'><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      if($foodWines[$x][30]<750 AND $foodWines[$x][30]!=0){\r\n\r\n      if($foodWines[$x][30]==375){\r\n        $sizeInfo = \" (half bottle)\";\r\n       } \r\n       else{\r\n        $sizeInfo = \" (small bottle)\";\r\n        }\r\n\r\n        }\r\n        else{\r\n         $sizeInfo = \"\";\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].$sizeInfo.\"</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].$sizeInfo.\"</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].$sizeInfo.\"</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].$sizeInfo.\"</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\n//echo \"<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 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         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].$sizeInfo.\"</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].$sizeInfo.\"</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                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n                }\r\n                else{\r\n                $goodfoods = $goodfoods.$xfood2;\r\n                 }\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                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n                }\r\n                else{\r\n                $goodfoods = $goodfoods.$xfood3;\r\n                  }\r\n           }\r\n           elseif($food3!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n                 }\r\n                 else{\r\n                 $goodfoods = $goodfoods.$xfood4;\r\n                 }\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 your selections:</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 > 10000){     \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\n\r\n$pairsString=\"\";\r\n   \r\nif($screenWidth > 500){\r\n   \r\n     for($y = 51; $y <= 55; $y++){\r\n\r\n      if(!empty($foodWines[$x][$y])){\r\n      \r\n      if($y==51){\r\n            $pairsString = substr($foodWines[$x][$y], (strlen($foodWines[$x][$y])-2)*-1);\r\n      }\r\n      else{\r\n            $pairsString=$pairsString.\", \".substr($foodWines[$x][$y], (strlen($foodWines[$x][$y])-2)*-1);\r\n      }\r\n      }      \r\n      }\r\n   if(!empty($pairsString)){\r\n    echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Pairs with:&nbsp;</span><span style=\'font-weight: normal\'>\".$pairsString.\"</span><br><font>\";\r\n   }\r\n   }\r\n\r\n \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   if($foodWines[$x][18]<3 AND $foodWines[$x][39]==0){\r\n   if($foodWines[$x][18]==1){\r\necho \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>Only 1 Bottle Left in Our Cellar</span><font>\";\r\n}\r\nelse{\r\n    echo \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>Only 2 Bottles Left in Our Cellar</span><font>\";\r\n}\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-9\"]',1),(32,'SelectDistinctVarietals-TESTING','<?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\r\n$redWineCount=0;\r\n$whiteWineCount=0;\r\n$sql=\"SELECT * FROM Wines WHERE QtyInStock > 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\r\n\r\n$sql=\"SELECT DISTINCT Category FROM Wines WHERE QtyInStock > 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 Wines WHERE QtyInStock > 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 Wines WHERE QtyInStock > 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 Wines WHERE QtyInStock > 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\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=\'http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\'>Champagne/Sparkling Wines</a>, <a href=\'http://www.bistrowinelist.com/byprofile/?Listing=Rose\'>Rosés</a> and <a href=\'http://www.bistrowinelist.com/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=\'http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\'>Whites</a></b></td><td></td><td style=\'font-size: 1.5em; text-align: left;\'><b><a href=\'http://www.bistrowinelist.com/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                    \r\n                   $redstr = \"<td style=\'font-size: 1.5em; text-align: left;\'><a href=\'http://www.bistrowinelist.com/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            \r\n                   $whitestr = \"<td style=\'font-size: 1.5em; text-align: right;\'><a href=\'http://www.bistrowinelist.com/byVarietal/?Listing=\".$whites[$x].\"\'>\".$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>\";','[xyz-ips snippet=\"SelectDistinctVarietals-TESTING\"]',1),(34,'byProfile','<?php\r\n$tableName=\"Wines2\";\r\n$variable = $_GET[\'Listing\'];\r\n//echo $variable;\r\n\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//echo $leftPad;\r\n\r\n$leftPad = 40;\r\n$rightPad = 40;\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\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//echo \"<body>\";\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\" || $variable==\"Inventory\" || $variable==\"All\"){\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=\'/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=\'/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=\'/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=\'/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           elseif($variable==\"Inventory\"){\r\n                $winetype=\"All\";\r\n                $sorttype=\"WineType, WineName\";\r\n               $winetitle=\"All Wines A-Z (Reds/Rose/Sparkling/White)\";\r\n               $newvariable = \"Inventory\";\r\n           }\r\n           elseif($variable==\"All\"){\r\n               $winetype=\"All\";\r\n                $sorttype=\"WineType, WinePrice\";\r\n               $winetitle=\"All Wines (Sparkling/White/Rose/Red)\";\r\n               $newvariable = \"All\";\r\n\r\n           }\r\n           \r\n           //echo \"<p class=\'listView\' style=\'padding-top: 0px;\'><b><font size=\'+2\'>\".$winetitle.\"</font></b></p>\";\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: 1.75em\'>\".$winetitle.\"</span></p>\"; \r\n\r\n           if($variable==\"Inventory\"){\r\n\r\n            $sql=\"SELECT * FROM \".$tableName.\" WHERE OutOfStock=0 AND LeaveOffMenu=0 AND Archived=0 AND QtyInStock>0  AND WineType!= \'Glass\' ORDER BY \".$sorttype;\r\n\r\n            }\r\n            elseif($variable==\"All\"){\r\n               $sql=\"SELECT * FROM \".$tableName.\" WHERE OutOfStock=0 AND LeaveOffMenu=0 AND Archived=0 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           else{\r\n           $sql=\"SELECT * FROM \".$tableName.\" WHERE OutOfStock=0 AND LeaveOffMenu=0 AND Archived=0 AND QtyInStock>0 AND WineType = \'\".$winetype.\"\' ORDER BY \".$sorttype;\r\n            }\r\n\r\n      	   $records=mysqli_query($con, $sql);\r\n      	   $wineCount = 0;\r\n      	   while($wines=mysqli_fetch_assoc($records)){\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=byProfile&identifier=\".$variable.\"\'>\".$wines[\'FavoriteImage\'].\"</a>\";\r\n          	}\r\n\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\nif($variable==\"Inventory\"  or $variable==\"All\"){\r\n  \r\nif($prevWine!=$wines[\'WineType\']){\r\n          echo\"<br>\";\r\n          echo \"<b><p class=\'listView\'><span style=\'font-size: 1.5em; text-align: left; width:85%; line-height: 150%; display: inline-block;\'>\".$wines[\'WineType\'].\"</span></p></b>\";  \r\n\r\n         }\r\n   \r\n$prevWine=$wines[\'WineType\'];\r\n \r\nif($variable==\"Inventory\"){\r\n          $wineID=\"<a href=\'/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$newvariable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"&emsp; ( \".$wines[\'QtyInStock\'].\" ) &emsp;\".$wines[\'CellarLocation\'].\"</a>\";\r\n}\r\n\r\nelse{\r\n  $wineID=\"<b><a href=\'/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$newvariable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></b>\";\r\n}\r\n\r\n}\r\nelse{\r\n\r\n           $wineID=\"<b><a href=\'/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$newvariable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"&emsp;\".$favorite.\"</a></b>\";\r\n}\r\n         \r\n             echo \"<p class=\'listView\'><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>\";\r\n                echo \"<span style=\'display: inline-block; font-size: 1.25em; text-align: right; width:15%; line-height: 150%; \'>\".$winePrice.\"</span></p>\"; \r\n               \r\n                 if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                     if($variable!=\"Inventory\"){ \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\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\nif($variable!=\"Inventory\"){\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\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 \".$tableName.\" WHERE WineType=\'Glass\' ORDER BY WinePrice\";\r\n      	$records1=mysqli_query($con, $sql);\r\n\r\n      	 echo \"<p class=\'listView\'><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\n//*******************************************************here\r\n\r\n     \r\n           $wineID=\"<b><a href=\'/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"&emsp;\".$favorite.\"</a></b>\";\r\n\r\n   echo \"<p class=\'listView\'><span style=\'font-size: 1.25em; text-align: left; width:85%; line-height: 150%; padding-bottom: 11px; display: inline-block;\'>\".$wineID.\"</span>\";\r\n	        \r\n                 $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b>\";\r\n                 echo \"<p class=\'listView\'><span style=\'font-size: 1.25em; text-align: right; width:15%; line-height: 150%; display: inline-block;\'>\".$winePrice.\"</span></p>\"; \r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                       echo \"<p class=\'listView\'><span style=\'text-align: left; width:85%; line-height: 40%;\'>\".$wineVarietal.\"</span></p>\";\r\n\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		echo \"<p class=\'listView\'><span style=\'text-align: left; width:85%; line-height: 40%; display:\'>\".$wineCountry.\"</span></p>\";\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       if($variable==\"Dessert Wines and Port\"){\r\n          $stockLimit = -10000;\r\n       }\r\n       else{\r\n        $stockLimit = 0;\r\n        }\r\n      \r\n\r\n     	$sql=\"SELECT * FROM \".$tableName.\" WHERE (WineProfile1=\'\".$variable.\"\' OR WineProfile2=\'\".$variable.\"\') AND QtyInStock !=0  AND WineType!=\'Glass\' AND OutOfStock=0 AND LeaveOffMenu=0 AND Archived=0 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 class=\'listView\' style=\'padding-bottom: 5px;\'><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  if(is_null($wines[\'WhosFavorite\'])){\r\n         	$favorite=\"\";\r\n          	}   \r\n          else{\r\n          $favorite=\"<a href=\'/byperson/?Listing=\".$wines[\'WhosFavorite\'].\"&listType=byProfile&identifier=\".$variable.\"\'>\".$wines[\'FavoriteImage\'].\"</a>\";\r\n          	}      \r\n\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 $stockLimit==0 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\n\r\nif($headerPrinted==False AND $wines[\'SoldAs\'] == 1){\r\n$printBottleHeader = True;\r\n$headerPrinted=True;\r\necho \"<p class=\'listView\'><span style=\'font-size: 1.5em; text-align: left; font-weight: bold; width:85%; line-height: 150%; display: inline-block;\'>By The Glass</span></p>\";\r\n}\r\nelseif($wines[\'SoldAs\'] == 0 AND $printBottleHeader==True){\r\n$printBottleHeader=False;\r\necho \"<p class=\'listView\'><span style=\'font-size: 1.5em; text-align: left; font-weight: bold; width:85%; line-height: 150%; display: inline-block;\'>By The Bottle</span></p>\";\r\n}\r\n           $wineID=\"<b><a href=\'/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"&emsp;\".$favorite.\"</a></b>\";\r\n\r\n   echo \"<p class=\'listView\'><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>\";\r\n                 echo \"<span style=\'display: inline-block; font-size: 1.25em; text-align: right; width:15%; line-height: 150%;\'>\".$winePrice.\"</span></p>\"; \r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                       //echo \"<p class=\'listView\'><span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineVarietal.\"</span></p>\";\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  		 $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                  echo \"<p class = \'listView\' style = \'font-size:1.1em; padding-top: 0px; padding-bottom: 5px;  line-height: 120%\'>\".$wineCountry.\"</p>\";      \r\n             \r\n                  //echo \"<br>\"; \r\n    \r\n                  \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\n//echo \"</body>\";\r\n\r\n?>','[xyz-ips snippet=\"byProfile\"]',1),(35,'Beer','<?php\r\n\r\n$search = $_GET[\'search\'];\r\n$pageOffset = 7;\r\n$anchor = $_GET[\'wine\'];\r\n\r\n$happyhourprice = -2;\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$happyhour = False;   //don\'t use for now\r\n$tableName=\"Wines2\";\r\n$variable = $_GET[\'WineID\'];\r\n$listType = \"byProfile\";\r\n$listName = \"Beer\";\r\n$linkCount = $_GET[\'linkCount\'];\r\n\r\n$wineNumber = 0;\r\n$screenWidth = 1000;\r\n\r\nif(!empty($search)){\r\n  $listType = \"bySearch\";\r\n}\r\n\r\n$screenWidth = 1000;\r\n$device = \"iPad\";\r\n$singlePage=\"single-item/\";\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\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==\"byProfile\"){\r\n\r\n      if($listName==\"Beer\"){\r\n            $sql=\"SELECT * FROM \".$tableName.\" WHERE WineType = \'Beer\' AND OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 ORDER BY WineCountry, SortOrder\";\r\n            $showName=\"Beer\";\r\n            $listTypeName=\"Beer\";\r\n      }\r\n       \r\n}\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][67] = $row1[\'WineSizeUnit\']; \r\n      \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 //echo \"<p>\".$row1[\'SoldAs\'].\"</p>\";\r\n\r\n      \r\n\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      $foodWines[$wineCount][66] = $row1[\'AvailableForSale\'];\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\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\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\r\nif($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\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\nif($x<$pageOffset){\r\n$Offset = \"\";\r\n}\r\nelse{\r\n$temp = $x-$pageOffset;\r\n$Offset = \"#wine\".$temp;\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($listTypeName==\"Rose\"){\r\n         $listTypeName=\"Rosé\";\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=\'/\".$listType.\"/?Listing=\".$listName.$Offset.\"\'><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=\'/\".$listType.\"/?Listing=\".$listName.$Offset.\"\'><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=\'/\".$listType.\"/?Listing=\".$listName.$Offset.\"\'><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=\'/\".$listType.\"/?Listing=\".$listName.$Offset.\"\'><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=\'/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=\'/\".$listType.\"/?Listing=\".$listName.$Offset.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n\r\n       echo \"<body>\";\r\n\r\n\r\n\r\necho \"<a class=\'anchor\' id=\'wine\".$y.\"\'></a>\";       \r\nif($x!=1){\r\necho \"<p>&emsp;</p>\";\r\necho \"<p>&emsp;</p>\";\r\necho \"<p>&emsp;</p>\";\r\necho \"<p>&emsp;</p>\";\r\necho \"<p>&emsp;</p>\";\r\necho \"<p>&emsp;</p>\";\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($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] == \'Beer\' OR $foodWines[$x][39] == 1){\r\n        \r\n         if(1 == 1){\r\n                  if($happyhour==True){\r\n                      $newPrice = $foodWines[$x][11] + $happyhourprice;\r\n                      $winePrice = \"<b><del>$\".$foodWines[$x][11].\"</del>&emsp;<font color=\'red\'>$\".$newPrice.\"</font></b>\";\r\n                     }\r\n                    else{\r\n                      $winePrice = \"<b>$\".$foodWines[$x][11].\"</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      if($foodWines[$x][30]<750 AND $foodWines[$x][30]!=0){\r\n\r\n      if($foodWines[$x][30]==375){\r\n        $sizeInfo = \" (half bottle)\";\r\n       } \r\n       else{\r\n        $sizeInfo = \" (small bottle)\";\r\n        }\r\n\r\n        }\r\n        else{\r\n         $sizeInfo = \"\";\r\n         }  \r\n       $sizeInfo = \"\";  //not using for beer\r\n\r\n$browsing=\"<b><a href=\'/byBeer\'>Back to Beer List</a></b>\";\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: 25%;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 74%;\'>\";\r\n        echo \"</colgroup>\";\r\n\r\n\r\n  // echo \"<a class=\'anchor\' id=\'wine\".$y.\"\'></a>\";   \r\n\r\n\r\n//echo \"<tr><td style=\'text-align: center; font-size: 1.5em;  font-weight: bold;\'>\".$winePrice.\"</td></tr>\r\n\r\n\r\n\r\necho\"<tr>\";\r\n\r\n\r\n\r\n\r\n\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'vertical-align: top; width: 28vw; height: 60vh; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'></td>\";\r\n\r\n\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].$sizeInfo.\"&emsp;\".$winePrice.\"</span><br>\";\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></tr>\";\r\n//echo \"<tr><td style=\'text-align: center; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n//<td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n\r\n echo\"<tr>\";\r\n//if(!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\n//echo \"<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: 30vw; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'>Click Image for Front / Back View</div></td>\";\r\n\r\n//}\r\n//else{\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 30vw; 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].$sizeInfo.\"</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].$sizeInfo.\"&emsp;\".$winePrice.\"</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\n//echo \"<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><td style=\'text-align: center; font-size: 1.5em;  font-weight: normal;\'>\".$winePrice.\"</td></tr>\";\r\n\r\n//<td style=\'text-align: left; font-size: 1.0em;  font-weight: normal;\'>\".$browsing.\"</td></tr>\";\r\n         echo\"<tr>\";\r\n   \r\n//if(!empty($foodWines[$x][17])){\r\n//$tempstr = \"changeImage(\".$foodWines[$x][10].\", &#039\".$foodWines[$x][16].\"&#039, &#039\".$foodWines[$x][17].\"&#039)\";\r\n\r\n//echo \"<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; object-fit: contain;\' src=\'\".$foodWines[$x][16].\"\' alt=\'WineImage\'>Click Image for Front / Back View</div></td>\";\r\n//}\r\n//else{\r\n  echo \"<td style=\'vertical-align: top; text-align: center;\'><img style=\'width: 30vw; 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].$sizeInfo.\"</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].$sizeInfo.\"&emsp;\".$winePrice.\"</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                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n                }\r\n                else{\r\n                $goodfoods = $goodfoods.$xfood2;\r\n                 }\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                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n                }\r\n                else{\r\n                $goodfoods = $goodfoods.$xfood3;\r\n                  }\r\n           }\r\n           elseif($food3!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n                 }\r\n                 else{\r\n                 $goodfoods = $goodfoods.$xfood4;\r\n                 }\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 your selections:</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\r\n     if (!empty($foodWines[$x][30]) AND !empty($foodWines[$x][67]) AND $foodWines[$x][30]!=0) {\r\n\r\n\r\n  if($foodWines[$x][39]==0){\r\n        $soldtype=\"bottle\";\r\n        }\r\n        elseif($foodWines[$x][39]==1){\r\n        $soldtype=\"glass\";\r\n        }\r\n        elseif($foodWines[$x][39]==2){\r\n        $soldtype=\"can\";\r\n        }\r\n       echo \"<font size=\'+1\'><span style=\'font-weight: bold\'>\".$foodWines[$x][30].$foodWines[$x][67].\"&nbsp;\".$soldtype.\"</span><br><font>\";\r\n      }\r\n\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 > 10000){     \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\n\r\n$pairsString=\"\";\r\n   \r\nif($screenWidth > 500){\r\n   \r\n     for($y = 51; $y <= 55; $y++){\r\n\r\n      if(!empty($foodWines[$x][$y])){\r\n      \r\n      if($y==51){\r\n            $pairsString = substr($foodWines[$x][$y], (strlen($foodWines[$x][$y])-2)*-1);\r\n      }\r\n      else{\r\n            $pairsString=$pairsString.\", \".substr($foodWines[$x][$y], (strlen($foodWines[$x][$y])-2)*-1);\r\n      }\r\n      }      \r\n      }\r\n   if(!empty($pairsString)){\r\n    echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Pairs with:&nbsp;</span><span style=\'font-weight: normal\'>\".$pairsString.\"</span><br><font>\";\r\n   }\r\n   }\r\n\r\n \r\n\r\n\r\n//if($screenWidth > 500){    \r\n  	if (!empty($foodWines[$x][32])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>From the Brew Master &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      echo \"<br><font size=\'+0\'><span style=\'font-weight: normal\'>\",$browsing.\"</span><font>\";\r\n     \r\n   if($foodWines[$x][18]<3 AND $foodWines[$x][39]==0){\r\n   if($foodWines[$x][18]==1){\r\n// echo \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>Only 1 Bottle Left in Our Cellar</span><font>\";\r\n}\r\nelse{\r\n   // echo \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>Only 2 Bottles Left in Our Cellar</span><font>\";\r\n}\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=\"Beer\"]',1),(36,'byBeer','<?php\r\n//$variable = $_GET[\'Listing\'];\r\n$variable = \"Beer\";\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$leftPad=30;\r\n$rightPad=0;\r\n\r\n $importCount = 0;	\r\n       \r\necho\"<style> .listView {width: 100%; max-width: 500px; text-align: left; padding-right: \".$rightPad.\"px; padding-left: \".$leftPad.\"px; padding-top: 5px; padding-bottom: 0px; margin: auto; }</style>\";\r\n\r\n\r\n     	$sql=\"SELECT * FROM \".$tableName.\" WHERE OutOfStock=0 AND Archived=0 AND LeaveOffMenu=0 AND (Category =\'\".$variable.\"\' OR Category2 = \'\".$variable.\"\' OR Category3 =\'\".$variable.\"\' OR Category4 =\'\".$variable.\"\' OR Category5 = \'\".$variable.\"\' OR Category6 =\'\".$variable.\"\') AND WineType != \'Glass\' ORDER BY WineCountry, SortOrder\";\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        $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\'] < -10000){  \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$sizeinfo=\"\";\r\n$singlePage=\"Beer/\";\r\n/*\r\n  if (wonderplugin_is_device(\'Windows,Mac,Linux,iPad\')){\r\n$singlePage=\"Beer/\";\r\n}\r\nelse{\r\n$singlePage=\"Beer/\";\r\n}\r\n  */\r\n\r\nif($wineCount==1){\r\n\r\n $wineID=\"<b><a href=\'/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byVarietal&listName=\".$variable.\"&linkCount=1\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></b>\";\r\n\r\n}\r\nelse{\r\n\r\n           $wineID=\"<b><a href=\'/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byVarietal&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></b>\";\r\n}\r\n\r\nif($prevCountry != $wines[\'WineCountry\']){\r\n   if($wines[\'WineCountry\'] == \'Belize\'){\r\n          echo \"<b><p class=\'listView\'><span style=\'display: inline-block; text-align: left; width:100%; line-height: 100%; font-size: 150%; padding-bottom: 0px;\'>Belizean Beers</span></p></b>\";\r\n    }\r\n    elseif($importCount==0){\r\n          echo \"<b><p class=\'listView\'><span style=\'display: inline-block; text-align: left; width:100%; line-height: 100%; font-size: 150%; padding-bottom: 0px; padding-top: 15px;\'>Imported Beers</span></p></b>\";\r\n          $importCount = $importCount + 1;\r\n     }\r\n}\r\n\r\n$prevCountry = $wines[\'WineCountry\'];\r\n\r\n //echo \"<div style=\'line-height: 110%;\'>\";\r\n            echo \"<p class=\'listView\'><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                $winePrice=\"<b>$\".$wines[\'WinePrice\'].\"</b>\";\r\n                echo \"<span style=\' font-size: 1.25em; text-align: right; width:15%;\'>\".$winePrice.\"</span></p>\"; \r\n             \r\n               //$wineCountry=$wines[\'WineRegion\'];\r\n\r\n               if($importCount > 0 AND $wines[\'WineCountry\']!=\"\"){\r\n                              \r\n                       $wineCountry=$wines[\'WineCountry\'];\r\n                      \r\n                      echo \"<p class = \'listView\' style = \'font-size:1.1em; padding-top: 0px; padding-bottom: 0px;  line-height: 100%\'>\".$wineCountry.\"</p>\";  \r\n\r\n                  }\r\n                  else{\r\n                      $wineRegion=$wines[\'WineRegion\'];\r\n                    echo \"<p class = \'listView\' style = \'font-size:1.1em; padding-top: 0px; padding-bottom: 0px;  line-height: 100%\'>\".$wineRegion.\"</p>\";  \r\n                   }\r\n\r\n		//echo \"<p style=\'line-height: 10%\'></p>\";\r\n                \r\n                \r\n               //echo \"<br>\";\r\n                        	\r\n      	 // echo \"</div>\";\r\n}\r\n\r\n      	echo \"<br><p class=\'listView\'><font size=\'-1\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax).&nbsp; BZ$2 = US$1<font></p>\";','[xyz-ips snippet=\"byBeer\"]',1),(37,'Guest-List','<?php\r\ndate_default_timezone_set(\"America/Belize\"); \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\nheader(\"Cache-Control: no-store, no-cache, must-revalidate, max-age=0\");\r\nheader(\"Cache-Control: post-check=0, pre-check=0\", false);\r\nheader(\"Pragma: no-cache\");\r\n\r\n$today = date(\"Y-m-d\");\r\n$sql=\"SELECT * FROM HotelGuestData WHERE CheckInDate <= \'\".$today.\"\' AND CheckOutDate >= \'\".$today.\"\' ORDER BY LastName\";\r\n//$sql=\"SELECT * FROM HotelGuestData WHERE Status = \'In-House\'\" ;\r\n\r\n\r\n$records = mysqli_query($con, $sql);\r\necho \"<head>\";\r\necho \"<style>\";\r\necho \"table {font-family: arial, sans-serif; border-collapse: collapse; width: 100%;}\";\r\necho \"td, th {border: 1px solid #aaaaaa; text-align: left; padding: 20px;}\";\r\necho \"tr:nth-child(even) {background-color: #dddddd;}\";\r\necho \"</style>\";\r\necho \"</head>\";\r\n\r\necho \"<body>\";\r\n\r\n//echo \"<h2>Guest List</h2>\";\r\n\r\necho \"<table style=\'display: inline-block; text-align: left; width:100%; line-height: 200%; font-size: 150%\'>\";\r\n\r\n\r\necho \"<tr>\";\r\necho \"<th>Guest Name</th>\";\r\necho \"<th>Room</th>\";\r\necho \"<th>Check In</th>\";\r\necho \"<th>Check Out</th>\";\r\necho \"<th>Status</th>\";\r\necho \"</tr>\";\r\n\r\nwhile($guests=mysqli_fetch_assoc($records)){\r\n\r\n$status = \"<td style=\'color:Black;\'>\".$guests[\'Status\'].\"</td>\";\r\n\r\n\r\nif($guests[\'Status\'] != \'Checked-Out\'){\r\n\r\n$status = \"<td style=\'color:Black;\'>In-House</td>\";\r\n\r\n}\r\n\r\nelse{\r\n$status = \"<td style=\'color:Tomato;\'>Checked Out</td>\";\r\n}\r\n\r\nif($guests[\'CheckOutDate\'] == $today AND $guests[\'Status\'] != \'Checked-Out\'){\r\n\r\n$status = \"<td style=\'color:Tomato;\'>Checking Out Today</td>\";\r\n\r\n}\r\n\r\nif($guests[\'CheckInDate\'] == $today AND $guests[\'Status\'] != \'In-House\'){\r\n\r\n$status = \"<td style=\'color:Black;\'>Checking In Today</td>\";\r\n\r\n}\r\n\r\n$in_date = DateTime::createFromFormat(\'Y-m-d\', $guests[\'CheckInDate\'])->format(\'M d\');\r\n$out_date = DateTime::createFromFormat(\'Y-m-d\', $guests[\'CheckOutDate\'])->format(\'M d\');\r\n\r\necho \"<tr >\";\r\necho \"<td>\".$guests[\'FullName\'].\"</td>\";\r\necho \"<td>\".$guests[\'RoomName\'].\"</td>\";\r\necho \"<td>\";\r\necho $in_date;\r\necho \"</td>\";\r\necho \"<td>\".$out_date.\"</td>\";\r\necho $status;\r\necho \"</tr>\";\r\n\r\n}\r\necho \"</table>\";\r\necho\"</body>\";\r\necho\"</html>\";\r\n}','[xyz-ips snippet=\"Guest-List\"]',1),(38,'byPerson','<?php\r\n$variable = $_GET[\'Listing\'];\r\n$callingPage = $_GET[\'listType\'];\r\n$callingType = $_GET[\'identifier\'];\r\n$callingurl = $_GET[\'url\'];\r\n$WineID = $_GET[\'WineID\'];\r\n$WineNum = $_GET[\'wine\'];\r\n\r\n$tableName=\"Wines2\";\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$variable = str_replace(\'%20\',\' \', $variable);\r\n\r\n\r\nif(wonderplugin_is_device(\'Windows, Mac, Linux\')){\r\n$leftPad = 40; //$screenWidth/2-400;\r\n$rightPad = 40; //$screenWidth/2-400;\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//echo $leftPad;\r\n//$leftPad = 40; //$screenWidth/2-400;\r\n//$rightPad = 40; //$screenWidth/2-400;\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\nmysqli_query($con, \"SET NAMES \'utf8\'\");\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 WhosFavorite=\'\".$variable.\"\'\";\r\n$records1=mysqli_query($con, $sql);\r\nwhile($wines=mysqli_fetch_assoc($records1)){\r\n$favoriteicon = $wines[\'FavoriteImage\'];           \r\n}\r\n  echo \"<body>\";\r\n\r\necho \"<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.\"\'s Favorites &emsp;\".$favoriteicon.\"</span></p>\";\r\n\r\n\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 WhosFavorite=\'\".$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[\'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 (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=byPerson&listName=\".$variable.\"&linkCount=1&identifier=\".$callingType.\"&returnPage=\".$callingPage.\"#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</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               $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               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\n\r\n\r\nif($callingType==\"WhitePrice\"){\r\n$returnPage = \"White Wines\";\r\n}\r\nelseif($callingType==\"WhitesAZ\"){\r\n$returnPage = \"White Wines\";\r\n}\r\nelseif($callingType==\"RedPrice\"){\r\n$returnPage = \"Red Wines\";\r\n}\r\nelseif($callingType==\"RedsAZ\"){\r\n$returnPage = \"Red Wines\";\r\n}\r\nelse{\r\n$returnPage = $callingType;\r\n}\r\n\r\n\r\nif(!empty ($WineNum)){\r\n$returnCall = \" href=\'/single-item/?WineID=\".$WineID.\"&listType=\".$callingPage.\"&listName=\".$callingType.\"&linkCount=1&#wine\".$WineNum.\"\'\" ;\r\n}\r\nelse{\r\n$returnCall = \" href=\'/\".$callingPage.\"/?Listing=\".$callingType.\"\'\";\r\n}\r\n\r\necho \"<br><p class = \'listView\' style=\'line-spacing: 90%; font-size: 1em; padding-top: 0px; padding-bottom: 0px;\'><a\".$returnCall.\">Back to &nbsp;\".$returnPage.\" Listing</a></p>\";\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=\"byPerson\"]',1),(39,'byGlass-Feb1','<?php\r\n//$page = $_SERVER[\'PHP_SELF\'];\r\n//$sec = \"10\";\r\n//header(\"Refresh: $sec; url=$page\");\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\r\n$redWineCount=0;\r\n$whiteWineCount=0;\r\n$sql=\"SELECT * FROM Wines WHERE WineType != \'Glass\' AND QtyInStock > 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=\'http://www.bistrowinelist.com/byprofile/?Listing=WhitePrice\'>Whites</a> and \".$redWineCount.\"  <a href=\'http://www.bistrowinelist.com/byprofile/?Listing=RedPrice\'>Reds</a> by the bottle</div><br>\";\r\necho \"<div style=\'text-align: center; font-size: 1.25em;\'>Plus <a href=\'http://www.bistrowinelist.com/byprofile/?Listing=Sparkling\'>Champagne/Sparkling Wines</a>, <a href=\'http://www.bistrowinelist.com/byprofile/?Listing=Rose\'>Rosés</a> and <a href=\'http://www.bistrowinelist.com/byprofile/?Listing=Dessert Wines and Port\'>Dessert Wines</a></div><br>\";\r\n\r\n$happyhourwineprice=12;\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\necho \"<meta http-equiv=\'refresh\' content=\'120\'>\";\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\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: 15px; 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 Wines WHERE WineType=\'Glass\' AND (AvailableToday = -1 OR AvailablePremium = -1) AND QtyInStock <> -1 ORDER BY WineType2, WinePrice\";\r\n}\r\nelse{\r\n$sql=\"SELECT * FROM Wines WHERE WineType=\'Glass\' AND AvailableToday = -1  AND QtyInStock <> -1 ORDER BY WineType2, WinePrice\";\r\n}\r\n\r\n}\r\nelseif($x==1 AND $happyhour==True){\r\n\r\n$sql=\"SELECT * FROM Wines WHERE WineType=\'Glass\' AND AvailableOnRequest = 0 AND AvailablePremium = -1  AND QtyInStock <> -1 ORDER BY WineType2, WinePrice\";\r\n\r\n}\r\nelseif($x==3){\r\n$sql=\"SELECT * FROM Wines WHERE WineSize >50 AND WineSize < 375  AND WineType!=\'Glass\'  AND QtyInStock <> -1 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 QtyInStock <> -1 ORDER BY WineType2, WinePrice\";\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        $wineCount=$wineCount+1;\r\n        $wineCount1=$wineCount1+1;\r\n        if($wineCount1 == 1){\r\n            if($x==2){\r\n                      $prevType= 0;\r\n                      if($happyhour==True){\r\n                      echo \"<p class = \'listView\'><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\'><span style=\'opacity: 1.0; font-weight: normal; font-size: 1.25em; text-align: right; display: inline-block;\'>Happy Hour 3pm - 5pm</span></p>\";\r\n                      }\r\n                      else{\r\n                      echo \"<p class = \'listView\'><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\'>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\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\nif($happyhour==True AND $wines[\'AvailablePremium\'] == -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[\'AvailablePremium\'] == -1){\r\n                 $winePrice=\"<del><b>$\".$wines[\'WinePrice\'].\"</del>&nbsp;<font color=\'red\'>$\".$happyhourwineprice.\"</font></b>\";\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=\"byGlass-Feb1\"]',1),(40,'screenSizePHP','<?php\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\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\nif($screenWidth > 1000){\r\n$leftPad = 75; //$screenWidth/2-400;\r\n$rightPad = 0; //$screenWidth/2-400;\r\n}\r\nelse{\r\n$leftPad = 0; \r\n$rightPad = 0;\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: 15px; padding-bottom: 0px; margin: auto; }</style>\";','[xyz-ips snippet=\"screenSizePHP\"]',1),(41,'byProfileFeb2020','<?php\r\n\r\n$variable = $_GET[\'Listing\'];\r\n//echo $variable;\r\n\r\n\r\nif (wonderplugin_is_device(\'Windows, Mac, Linux\')){\r\n$leftPad = 75; //$screenWidth/2-400;\r\n$rightPad = 0; //$screenWidth/2-400;\r\n}\r\nelse{\r\n$leftPad = 0; \r\n$rightPad = 0;\r\n}\r\n//echo $leftPad;\r\n\r\necho\"<style> .listView {width: 100%; max-width: 800px; text-align: left; padding-right: \".$rightPad.\"px; padding-left: \".$leftPad.\"px; padding-top: 15px; padding-bottom: 0px; margin: auto; }</style>\";\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\nmysqli_query($con, \"SET NAMES \'utf8\'\");\r\n\r\n$sortButton=\"\";\r\n\r\n      if($variable==\"WhitePrice\" || $variable==\"RedPrice\" ||  $variable==\"WhitesAZ\" ||  $variable==\"RedsAZ\" || $variable==\"Inventory\" || $variable==\"All\"){\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           elseif($variable==\"Inventory\"){\r\n                $winetype=\"All\";\r\n                $sorttype=\"WineType, WineName\";\r\n               $winetitle=\"All Wines A-Z (Reds/Rose/Sparkling/White)\";\r\n               $newvariable = \"Inventory\";\r\n           }\r\n           elseif($variable==\"All\"){\r\n               $winetype=\"All\";\r\n                $sorttype=\"WineType, WinePrice\";\r\n               $winetitle=\"All Wines (Sparkling/White/Rose/Red)\";\r\n               $newvariable = \"All\";\r\n\r\n           }\r\n           \r\n           echo \"<p class=\'listView\' style=\'padding-top:40px;\'><b><font size=\'+2\'>\".$winetitle.\"</font></b></p>\";\r\n            \r\n\r\n           if($variable==\"Inventory\"){\r\n\r\n            $sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1 AND QtyInStock>0  AND WineType!= \'Glass\' ORDER BY \".$sorttype;\r\n\r\n            }\r\n            elseif($variable==\"All\"){\r\n               $sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1 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           else{\r\n           $sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1 AND QtyInStock>0 AND WineType = \'\".$winetype.\"\' ORDER BY \".$sorttype;\r\n            }\r\n\r\n      	   $records=mysqli_query($con, $sql);\r\n      	   $wineCount = 0;\r\n      	   while($wines=mysqli_fetch_assoc($records)){\r\n           \r\n       if(is_null($wines[\'WhosFavorite\'])){\r\n         	$favorite=\"\";\r\n          	}   \r\n          else{\r\n          $favorite=\"<a href=\'http://www.bistrowinelist.com/byperson/?Listing=\".$wines[\'WhosFavorite\'].\"&listType=byProfile&identifier=\".$variable.\"\'>\".$wines[\'FavoriteImage\'].\"</a>\";\r\n          	}\r\n\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$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\nif($variable==\"Inventory\"  or $variable==\"All\"){\r\n  \r\nif($prevWine!=$wines[\'WineType\']){\r\n          echo\"<br>\";\r\n          echo \"<b><p class=\'listView\'><span style=\'font-size: 1.5em; text-align: left; width:85%; line-height: 150%; display: inline-block;\'>\".$wines[\'WineType\'].\"</span></p></b>\";  \r\n\r\n         }\r\n   \r\n$prevWine=$wines[\'WineType\'];\r\n \r\nif($variable==\"Inventory\"){\r\n          $wineID=\"<a href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$newvariable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"&emsp; ( \".$wines[\'QtyInStock\'].\" ) &emsp;\".$wines[\'CellarLocation\'].\"</a>\";\r\n}\r\n\r\nelse{\r\n  $wineID=\"<b><a href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$newvariable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></b>\";\r\n}\r\n\r\n}\r\nelse{\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.\"&emsp;\".$favorite.\"</a></b>\";\r\n}\r\n         \r\n             echo \"<p class=\'listView\'><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>\";\r\n                echo \"<span style=\'font-size: 1.25em; text-align: right; width:15%; line-height: 150%; \'>\".$winePrice.\"</span></p>\"; \r\n               \r\n                 if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                     if($variable!=\"Inventory\"){ \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               $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\nif($variable!=\"Inventory\"){\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\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 class=\'listView\'><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\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           $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.\"&emsp;\".$favorite.\"</a></b>\";\r\n\r\n   echo \"<p class=\'listView\'><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>\";\r\n                 echo \"<p class=\'listView\'><span style=\'font-size: 1.25em; text-align: right; width:15%; line-height: 150%; display: inline-block;\'>\".$winePrice.\"</span></p>\"; \r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                       echo \"<p class=\'listView\'><span style=\'text-align: left; width:85%; line-height: 40%;\'>\".$wineVarietal.\"</span></p>\";\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\'><span style=\'text-align: left; width:85%; line-height: 40%; display:\'>\".$wineCountry.\"</span></p>\";\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       if($variable==\"Dessert Wines and Port\"){\r\n          $stockLimit = -10000;\r\n       }\r\n       else{\r\n        $stockLimit = 0;\r\n        }\r\n      \r\n\r\n     	$sql=\"SELECT * FROM Wines WHERE (WineProfile1=\'\".$variable.\"\' OR WineProfile2=\'\".$variable.\"\') AND QtyInStock !=0  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 class=\'listView\'><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  if(is_null($wines[\'WhosFavorite\'])){\r\n         	$favorite=\"\";\r\n          	}   \r\n          else{\r\n          $favorite=\"<a href=\'http://www.bistrowinelist.com/byperson/?Listing=\".$wines[\'WhosFavorite\'].\"&listType=byProfile&identifier=\".$variable.\"\'>\".$wines[\'FavoriteImage\'].\"</a>\";\r\n          	}      \r\n\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 $stockLimit==0 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.\"&emsp;\".$favorite.\"</a></b>\";\r\n\r\n   echo \"<p class=\'listView\'><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>\";\r\n                 echo \"<span style=\'font-size: 1.25em; text-align: right; width:15%; line-height: 150%;\'>\".$winePrice.\"</span></p>\"; \r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                       //echo \"<p class=\'listView\'><span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineVarietal.\"</span></p>\";\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  		$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		\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                  //echo \"<br>\"; \r\n    \r\n                  \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>\";','[xyz-ips snippet=\"byProfileFeb2020\"]',1),(42,'byCountryFeb2020','<?php\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$variable = str_replace(\'%20\',\' \', $variable);\r\n \r\nif (wonderplugin_is_device(\'Windows, Mac, Linux\')){\r\n$leftPad = 75; //$screenWidth/2-400;\r\n$rightPad = 0; //$screenWidth/2-400;\r\n}\r\nelse{\r\n$leftPad = 0; \r\n$rightPad = 0;\r\n}\r\n//echo $leftPad;\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 Wines WHERE AvailableForSale = -1 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=\'http://www.bistrowinelist.com/byperson/?Listing=\".$wines[\'WhosFavorite\'].\"&listType=byCountry&identifier=\".$variable.\"\'>\".$wines[\'FavoriteImage\'].\"</a>\";\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           $wineID=\"<b><a href=\'http://www.bistrowinelist.com/\".$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; padding-top: 0px; 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=\'padding-top: 0px; font-size: 1.25em; text-align: right; width:15%;\'>\".$winePrice.\"</span></p>\"; \r\n             \r\n               $wineCountry=$wines[\'WineRegion\'];\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=\"byCountryFeb2020\"]',1),(43,'byPersonFeb2020','<?php\r\n$variable = $_GET[\'Listing\'];\r\n$callingPage = $_GET[\'listType\'];\r\n$callingType = $_GET[\'identifier\'];\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\n\r\nif (wonderplugin_is_device(\'Windows, Mac, Linux\')){\r\n$leftPad = 75; //$screenWidth/2-400;\r\n$rightPad = 0; //$screenWidth/2-400;\r\n}\r\nelse{\r\n$leftPad = 0; \r\n$rightPad = 0;\r\n}\r\n//echo $leftPad;\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   \r\n\r\n$sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1 AND (QtyInStock>0 OR SoldAs = 1) AND WhosFavorite=\'\".$variable.\"\'\";\r\n$records1=mysqli_query($con, $sql);\r\nwhile($wines=mysqli_fetch_assoc($records1)){\r\n$favoriteicon = $wines[\'FavoriteImage\'];           \r\n}\r\n  echo \"<body>\";\r\n\r\necho \"<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.\"\'s Favorites &emsp;\".$favoriteicon.\"</span></p>\";\r\n\r\n\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 Wines WHERE AvailableForSale = -1 AND (QtyInStock>0 OR SoldAs = 1) AND WhosFavorite=\'\".$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[\'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 (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           $wineID=\"<b><a href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byPerson&listName=\".$variable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$lowStock.$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</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; padding-top: 0px; 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=\'padding-top: 0px; font-size: 1.25em; text-align: right; width:15%;\'>\".$winePrice.\"</span></p>\"; \r\n             \r\n               $wineCountry=$wines[\'WineCountry\'].\" > \".$wines[\'WineRegion\'];\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\n\r\n\r\nif($callingType==\"WhitePrice\"){\r\n$returnPage = \"White Wines\";\r\n}\r\nelseif($callingType==\"WhitesAZ\"){\r\n$returnPage = \"White Wines\";\r\n}\r\nelseif($callingType==\"RedPrice\"){\r\n$returnPage = \"Red Wines\";\r\n}\r\nelseif($callingType==\"RedsAZ\"){\r\n$returnPage = \"Red Wines\";\r\n}\r\nelse{\r\n$returnPage = $callingType;\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=\"byPersonFeb2020\"]',1),(44,'byVarietalFeb2020','<?php\r\n$variable = $_GET[\'Listing\'];\r\n//$variable = \"TEST\";\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 = 75; //$screenWidth/2-400;\r\n$rightPad = 0; //$screenWidth/2-400;\r\n}\r\nelse{\r\n$leftPad = 0; \r\n$rightPad = 0;\r\n}\r\n//echo $leftPad;\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; 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 Wines WHERE AvailableForSale = -1 AND QtyInStock > 0 AND (Category =\'\".$variable.\"\' OR Category2 = \'\".$variable.\"\' OR Category3 =\'\".$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=\'http://www.bistrowinelist.com/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=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byVarietal&listName=\".$variable.\"&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; padding-top: 0px; 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=\'padding-top: 0px; font-size: 1.25em; text-align: right; width:15%;\'>\".$winePrice.\"</span></p>\"; \r\n             \r\n               $wineCountry=$wines[\'WineRegion\'];\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=\"byVarietalFeb2020\"]',1),(45,'byProfileFeb2020-2','<?php\r\n\r\n$variable = $_GET[\'Listing\'];\r\n//echo $variable;\r\n\r\n\r\nif(wonderplugin_is_device(\'Windows, Mac, Linux\')){\r\n$leftPad = 75; //$screenWidth/2-400;\r\n$rightPad = 0; //$screenWidth/2-400;\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\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\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//echo \"<body>\";\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\" || $variable==\"Inventory\" || $variable==\"All\"){\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           elseif($variable==\"Inventory\"){\r\n                $winetype=\"All\";\r\n                $sorttype=\"WineType, WineName\";\r\n               $winetitle=\"All Wines A-Z (Reds/Rose/Sparkling/White)\";\r\n               $newvariable = \"Inventory\";\r\n           }\r\n           elseif($variable==\"All\"){\r\n               $winetype=\"All\";\r\n                $sorttype=\"WineType, WinePrice\";\r\n               $winetitle=\"All Wines (Sparkling/White/Rose/Red)\";\r\n               $newvariable = \"All\";\r\n\r\n           }\r\n           \r\n           //echo \"<p class=\'listView\' style=\'padding-top: 0px;\'><b><font size=\'+2\'>\".$winetitle.\"</font></b></p>\";\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: 1.75em\'>\".$winetitle.\"</span></p>\"; \r\n\r\n           if($variable==\"Inventory\"){\r\n\r\n            $sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1 AND QtyInStock>0  AND WineType!= \'Glass\' ORDER BY \".$sorttype;\r\n\r\n            }\r\n            elseif($variable==\"All\"){\r\n               $sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1 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           else{\r\n           $sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1 AND QtyInStock>0 AND WineType = \'\".$winetype.\"\' ORDER BY \".$sorttype;\r\n            }\r\n\r\n      	   $records=mysqli_query($con, $sql);\r\n      	   $wineCount = 0;\r\n      	   while($wines=mysqli_fetch_assoc($records)){\r\n           \r\n       if(is_null($wines[\'WhosFavorite\'])){\r\n         	$favorite=\"\";\r\n          	}   \r\n          else{\r\n          $favorite=\"<a href=\'http://www.bistrowinelist.com/byperson/?Listing=\".$wines[\'WhosFavorite\'].\"&listType=byProfile&identifier=\".$variable.\"\'>\".$wines[\'FavoriteImage\'].\"</a>\";\r\n          	}\r\n\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$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\nif($variable==\"Inventory\"  or $variable==\"All\"){\r\n  \r\nif($prevWine!=$wines[\'WineType\']){\r\n          echo\"<br>\";\r\n          echo \"<b><p class=\'listView\'><span style=\'font-size: 1.5em; text-align: left; width:85%; line-height: 150%; display: inline-block;\'>\".$wines[\'WineType\'].\"</span></p></b>\";  \r\n\r\n         }\r\n   \r\n$prevWine=$wines[\'WineType\'];\r\n \r\nif($variable==\"Inventory\"){\r\n          $wineID=\"<a href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$newvariable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"&emsp; ( \".$wines[\'QtyInStock\'].\" ) &emsp;\".$wines[\'CellarLocation\'].\"</a>\";\r\n}\r\n\r\nelse{\r\n  $wineID=\"<b><a href=\'http://www.bistrowinelist.com/\".$singlePage.\"?WineID=\".$wines[\'ID\'].\"&listType=byProfile&listName=\".$newvariable.\"&linkCount=1#wine\".$wineCount.\"\'>\".$wines[\'WineName\'].$sizeinfo.\"&emsp;\".$vintage.\"</a></b>\";\r\n}\r\n\r\n}\r\nelse{\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.\"&emsp;\".$favorite.\"</a></b>\";\r\n}\r\n         \r\n             echo \"<p class=\'listView\'><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>\";\r\n                echo \"<span style=\'display: inline-block; font-size: 1.25em; text-align: right; width:15%; line-height: 150%; \'>\".$winePrice.\"</span></p>\"; \r\n               \r\n                 if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                     if($variable!=\"Inventory\"){ \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               $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\nif($variable!=\"Inventory\"){\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\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 class=\'listView\'><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\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           $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.\"&emsp;\".$favorite.\"</a></b>\";\r\n\r\n   echo \"<p class=\'listView\'><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>\";\r\n                 echo \"<p class=\'listView\'><span style=\'font-size: 1.25em; text-align: right; width:15%; line-height: 150%; display: inline-block;\'>\".$winePrice.\"</span></p>\"; \r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                       echo \"<p class=\'listView\'><span style=\'text-align: left; width:85%; line-height: 40%;\'>\".$wineVarietal.\"</span></p>\";\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\'><span style=\'text-align: left; width:85%; line-height: 40%; display:\'>\".$wineCountry.\"</span></p>\";\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       if($variable==\"Dessert Wines and Port\"){\r\n          $stockLimit = -10000;\r\n       }\r\n       else{\r\n        $stockLimit = 0;\r\n        }\r\n      \r\n\r\n     	$sql=\"SELECT * FROM Wines WHERE (WineProfile1=\'\".$variable.\"\' OR WineProfile2=\'\".$variable.\"\') AND QtyInStock !=0  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 class=\'listView\'><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  if(is_null($wines[\'WhosFavorite\'])){\r\n         	$favorite=\"\";\r\n          	}   \r\n          else{\r\n          $favorite=\"<a href=\'http://www.bistrowinelist.com/byperson/?Listing=\".$wines[\'WhosFavorite\'].\"&listType=byProfile&identifier=\".$variable.\"\'>\".$wines[\'FavoriteImage\'].\"</a>\";\r\n          	}      \r\n\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 $stockLimit==0 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 \"<p class=\'listView\'><span style=\'font-size: 1.5em; text-align: left; font-weight: bold; width:85%; line-height: 150%; display: inline-block;\'>By The Glass</span></p>\";\r\n}\r\nelseif($wines[\'SoldAs\'] == 0 AND $printBottleHeader==True){\r\n$printBottleHeader=False;\r\necho \"<p class=\'listView\'><span style=\'font-size: 1.5em; text-align: left; font-weight: bold; width:85%; line-height: 150%; display: inline-block;\'>By The Bottle</span></p>\";\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.\"&emsp;\".$favorite.\"</a></b>\";\r\n\r\n   echo \"<p class=\'listView\'><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>\";\r\n                 echo \"<span style=\'display: inline-block; font-size: 1.25em; text-align: right; width:15%; line-height: 150%;\'>\".$winePrice.\"</span></p>\"; \r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                       //echo \"<p class=\'listView\'><span style=\'text-align: left; width:85%; line-height: 120%; display: inline-block;\'>\".$wineVarietal.\"</span></p>\";\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  		$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		\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                  //echo \"<br>\"; \r\n    \r\n                  \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\n//echo \"</body>\";','[xyz-ips snippet=\"byProfileFeb2020-2\"]',1),(46,'ContDispFeb2020-test','<?php\r\n\r\n$search = $_GET[\'search\'];\r\n$pageOffset = 7;\r\n$anchor = $_GET[\'wine\'];\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\r\n\r\n\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 \"XXXX\".$device,\"XXXX\";\r\necho \"<style>\";\r\necho \"img {display: block; margin: auto;}\";\r\necho \".top { vertical-align: top; }\";\r\necho \".bottom { vertical-align: bottom; }\";\r\necho \"</style>\";\r\n\r\n\r\n\r\n\r\n//echo\"<meta name=\'viewport\' id=\'viewport\' content=\'width=500\'/>\";\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 > 0 AND AvailableForSale = -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 (AvailableForSale = -1 AND (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND ((QtyInStock > 0 AND WineType != \'Glass\') OR (SoldAs = 1 AND WineType2 = 6))) ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE (AvailableForSale = -1 AND WineCountry = \'\".$listName.\"\' AND ((QtyInStock > 0 AND WineType != \'Glass\'  AND WineType != \'Beer\') OR (SoldAs = 1 AND WineType2 = 6))) 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 AND AvailableForSale = -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 > 0 AND AvailableForSale = -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 > 0 AND AvailableForSale = -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 > 0 AND AvailableForSale = -1 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red Wines\";\r\n      }  \r\n      elseif($listName==\"Inventory\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType != \'Glass\' AND WineType != \'Dessert\' AND QtyInStock > 0 AND AvailableForSale = -1 ORDER BY WineType, WineName\";\r\n            $showName=\"All Wines A-Z\";\r\n            $listTypeName=\"All Wines\";\r\n      }\r\n\r\nelseif($listName==\"All\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType != \'Glass\' AND WineType != \'Dessert\' AND QtyInStock > 0 AND AvailableForSale = -1 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            $showName=\"All Wines A-Z\";\r\n            $listTypeName=\"All Wines\";\r\n      }  \r\n  \r\n      elseif($listName==\"Dessert\"){\r\n             $sql=\"SELECT * FROM Wines WHERE (AvailableForSale = -1 AND (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND (QtyInStock > 0 AND WineType != \'Glass\' OR (SoldAs = 1 AND WineType2 = 6))) ORDER BY WinePrice\";\r\n            $showName=\"\";\r\n\r\n       }\r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (AvailableForSale = -1 AND (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND (QtyInStock > 0 AND WineType != \'Glass\' OR (SoldAs = 1 AND WineType2 = 6))) ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byPerson\"){\r\n\r\n  $sql=\"SELECT * FROM Wines WHERE (AvailableForSale = -1 AND WhosFavorite = \'\".$listName.\"\' AND ((QtyInStock > 0 AND WineType != \'Glass\'  AND WineType != \'Beer\') OR (SoldAs = 1 AND WineType2 = 6))) 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==\"byGlass\"){\r\n\r\n // $sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1  AND WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WineType2, WinePrice\";           \r\n\r\nif($happyhour==True){\r\n\r\n$sql=\"SELECT * FROM Wines WHERE QtyInStock > 0 AND AvailableForSale = -1  AND ((WineType = \'Glass\' AND (AvailableToday = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 50 AND WineSize < 375)) 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 QtyInStock > 0 AND AvailableForSale = -1  AND  ((WineType = \'Glass\' AND AvailableToday = -1) OR (WineType!=\'Glass\' AND WineSize > 50 AND WineSize < 375)) ORDER BY SoldAs DESC, WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n}\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 (AvailableForSale = -1 AND ((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      $foodWines[$wineCount][66] = $row1[\'WineryWebsite\'];\r\n      $foodWines[$wineCount][67] = $row1[\'CellarLocation\'];\r\n      $foodWines[$wineCount][101] = $row1[\'WhosFavorite\'];\r\n      $foodWines[$wineCount][102] = $row1[\'FavoriteImage\'];\r\n      $foodWines[$wineCount][103] = $row1[\'WineMaker\'];\r\n      $foodWines[$wineCount][104] = $row1[\'AverageYield\'];\r\n      $foodWines[$wineCount][105] = $row1[\'MainClones\'];\r\n      $foodWines[$wineCount][106] = $row1[\'pH\'];\r\n      $foodWines[$wineCount][107] = $row1[\'Barrels\'];\r\n      $foodWines[$wineCount][108] = $row1[\'TA\'];\r\n      $foodWines[$wineCount][109] = $row1[\'Winery\'];\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\nif($x<$pageOffset){\r\n$Offset = \"\";\r\n}\r\nelse{\r\n$temp = $x-$pageOffset;\r\n$Offset = \"#wine\".$temp;\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==\"byPerson\"){\r\n        $listTypeName=$foodWines[$x][101].\"\'s Favorites\";\r\n        $listName=$foodWines[$x][101];\r\n}\r\n\r\n\r\nelseif($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($listTypeName==\"Rose\"){\r\n         $listTypeName=\"Rosé\";\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       \r\n        elseif($listType==\'byPerson\'){\r\n\r\n          $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.$Offset.\"\'><b>\".$listTypeName.\"</b></a>\";  \r\n\r\n        }\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.$Offset.\"\'><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.$Offset.\"\'><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.$Offset.\"\'><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.$Offset.\"\'><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.$Offset.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n    echo \"<body>\";\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($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      if($foodWines[$x][30]<750 AND $foodWines[$x][30]>50){\r\n\r\n      if($foodWines[$x][30]==375){\r\n        $sizeInfo = \" (half bottle)\";\r\n       } \r\n       else{\r\n        $sizeInfo = \" (small bottle)\";\r\n        }\r\n\r\n        }\r\n        else{\r\n         $sizeInfo = \"\";\r\n         }  \r\n         \r\n        \r\n      if($listType==\'byPerson\'){\r\n         $favorite=\"\";\r\n      }\r\n\r\n      elseif(is_null($foodWines[$x][101])){\r\n         	$favorite=\"\";\r\n          	}   \r\n      else{\r\n          $favorite=\"<a href=\'http://www.bistrowinelist.com/byperson/?WineID=\".$foodWines[$x][10].\"&Listing=\".$foodWines[$x][101].\"&listType=\".$listType.\"&identifier=\".$listName.\"&wine=\".$x.\"\'>\".$foodWines[$x][102].\"</a>\";\r\n         \r\n\r\n\r\n //$favorite=\"<a href=\'http://www.bistrowinelist.com/byperson/?Listing=\".$foodWines[$x][101].\"\'>\".$foodWines[$x][102].\"</a>\";\r\n          	}\r\n\r\necho \"<a style=\'display:block;  height:200px;  margin-top:-200px; visibility:hidden;\' id=\'wine\".$y.\"\'></a>\";\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  cellspacing=\'0\' cellpadding=\'0\'>\";\r\n       echo \"<colgroup style=\'vertical-align: top;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%; vertical-align: top;\'>\";\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 style=\'vertical-align: top;\'>\";\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\nif($listName=\"Beer\"){\r\n$imageHeight = 40;\r\n$imageWidth=18;\r\n\r\n}\r\nelse{\r\n$imageHeight= 60;\r\n$imageWidth = 28;\r\n}\r\n\r\n\r\necho \"<td style=\'vertical-align: top;\'><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;\'><img id=\".$foodWines[$x][10].\" 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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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\n//echo \"<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 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         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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n                }\r\n                else{\r\n                $goodfoods = $goodfoods.$xfood2;\r\n                 }\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                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n                }\r\n                else{\r\n                $goodfoods = $goodfoods.$xfood3;\r\n                  }\r\n           }\r\n           elseif($food3!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n                 }\r\n                 else{\r\n                 $goodfoods = $goodfoods.$xfood4;\r\n                 }\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        if(!empty($foodWines[$x][109])){\r\n   \r\n   // leave off for now echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][109].\"</span><br>\";\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\r\n$wineCountry = $foodWines[$x][7];\r\nif(!empty($foodWines[$x][26])){\r\n\r\n$wineCountry=$wineCountry.\">\".$foodWines[$x][26];\r\n\r\nif(!empty($foodWines[$x][27])){\r\n$wineCountry=$wineCountry.\">\".$foodWines[$x][27];\r\n\r\n}\r\n\r\n}    \r\n   \r\n        echo \"<p><span style=\'font-weight: normal font-size: 1.25em\'>\".$wineCountry.\"</span></p>\";\r\n \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 your selections:</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 > 10000){     \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\n\r\n$pairsString=\"\";\r\n   \r\nif($screenWidth > 500){\r\n   \r\n     for($y = 51; $y <= 55; $y++){\r\n\r\n      if(!empty($foodWines[$x][$y])){\r\n      \r\n      if($y==51){\r\n            $pairsString = substr($foodWines[$x][$y], (strlen($foodWines[$x][$y])-2)*-1);\r\n      }\r\n      else{\r\n            $pairsString=$pairsString.\", \".substr($foodWines[$x][$y], (strlen($foodWines[$x][$y])-2)*-1);\r\n      }\r\n      }      \r\n      }\r\n   if(!empty($pairsString)){\r\n    echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Pairs with:&nbsp;</span><span style=\'font-weight: normal\'>\".$pairsString.\"</span><br><font>\";\r\n   }\r\n   }\r\n\r\n \r\n\r\n\r\nif($screenWidth > 500){    \r\n       if (!empty($foodWines[$x][103])) {\r\n       $winemakertext=\"From the Winemaker:\";         \r\n\r\n//$winemakertext=\"From the Winemaker (\".$foodWines[$x][103].\"):\";\r\n        }\r\n        else{\r\n        $winemakertext=\"From the Winemaker:\";\r\n         }\r\n  	if (!empty($foodWines[$x][32])) {\r\n       \r\n        //add in carriage returns because this does not seem to do it automatically\r\n        $newstring = nl2br($foodWines[$x][32]); \r\n\r\necho \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>\",$winemakertext.\" &nbsp;</span><span style=\'font-weight: normal\'>\".$newstring.\"</span><br><font>\";\r\n      }\r\n\r\nif (!empty($foodWines[$x][103])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Winemaker: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][103].\"</span><font>\";\r\n      }\r\nif (!empty($foodWines[$x][25])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Cases Produced: &nbsp;</span><span style=\'font-weight: normal\'>\".number_format($foodWines[$x][25]).\"</span><font>\";\r\n      }\r\n\r\nif (!empty($foodWines[$x][107])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Winemaking / Barrels / Aging: &nbsp;</span><span style=\'font-weight: normal\'>\".nl2br($foodWines[$x][107]).\"</span><font>\";\r\n      }\r\n\r\nif (!empty($foodWines[$x][104])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Average Yield: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][104].\"</span><font>\";\r\n      }\r\n\r\n\r\nif(!empty($foodWines[$x][106]) AND !empty($foodWines[$x][108])){\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>pH: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][106].\"</span><span style=\'font-weight: bold\'>&emsp; Total Acidity: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][108].\"g/L</span> <font>\";\r\n\r\n}\r\n\r\nelseif (!empty($foodWines[$x][106])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>pH: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][106].\"</span> <font>\";\r\n      }\r\nelseif (!empty($foodWines[$x][108])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Total Acidity: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][108].\"g/L</span> <font>\";\r\n      }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n  	if (!empty($foodWines[$x][66])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Winery Website: &nbsp;</span><span style=\'font-weight: normal\'><a href=\'\".$foodWines[$x][66].\"\'  \r\n target=\'_blank\'>Click Here</a> </span><br><font>\";\r\n      }\r\n\r\n\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   if($foodWines[$x][18]<3 AND $foodWines[$x][39]==0){\r\n   if($foodWines[$x][18]==1){\r\necho \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>Only 1 Bottle Left in Our Cellar</span><font>\";\r\n}\r\nelse{\r\n    echo \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>Only 2 Bottles Left in Our Cellar</span><font>\";\r\n}\r\n}\r\n\r\nif(!empty($foodWines[$x][67]))  {\r\n\r\necho \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>\".$foodWines[$x][67].\"</span><font>\";\r\n}   \r\n\r\necho \"</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=\"ContDispFeb2020-test\"]',1),(47,'byGlassPHP-Hotel','<?php\r\n//$page = $_SERVER[\'PHP_SELF\'];\r\n//$sec = \"10\";\r\n//header(\"Refresh: $sec; url=$page\");\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\r\n$redWineCount=0;\r\n$whiteWineCount=0;\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 Wines2 WHERE  AvailableToday = -1\";\r\n$records2 = mysqli_query($con, $sql);\r\nwhile($wines=mysqli_fetch_assoc($records2)){\r\n\r\nif($wines[\'AvailableHappyHour\']==-1){\r\n$happyHourCount=$happyHourCount+1;\r\n}\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\r\n\r\n//$happyhourwineprice=14;\r\n\r\nif (time() >= $happyHourShowStart AND time() <= $happyHourShowStop AND $happyHourCount > 0){\r\n$happyhour = True;\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\r\n if(($_GET[\'Width\']>1024)&&($_GET[\'Height\']>768)) {\r\n\r\n }\r\n else {\r\n\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 = 20; //$screenWidth/2-400;\r\n$rightPad = 20; //$screenWidth/2-400;\r\n}\r\nelseif($screenWidth > 700){\r\n$leftPad = 20; //$screenWidth/2-400;\r\n$rightPad =20; //$screenWidth/2-400;\r\n\r\n}\r\n\r\nelse{\r\n$leftPad = 20; //$screenWidth/2-400;\r\n$rightPad = 20; //$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$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 Wines2 WHERE WineName <> \'Mimosa\'  AND  WineType=\'Glass\' AND (AvailableToday = -1 OR AvailableHappyHour = -1) AND QtyInStock <> -1 ORDER BY WineType2, WinePrice\";\r\n}\r\nelse{\r\n$sql=\"SELECT * FROM Wines2 WHERE WineName <> \'Mimosa\'  AND WineType=\'Glass\' AND AvailableToday = -1  AND QtyInStock <> -1  ORDER BY WineType2, WinePrice\";\r\n}\r\n\r\n}\r\nelseif($x==1 AND $happyhour==True){\r\n\r\n$sql=\"SELECT * FROM Wines2 WHERE WineName <> \'Mimosa\'  AND  WineType=\'Glass\' AND AvailableOnRequest = 0 AND AvailableHappyHour = -1  AND QtyInStock <> -1  ORDER BY WineType2, WinePrice\";\r\n\r\n}\r\nelseif($x==3){\r\n$sql=\"SELECT * FROM Wines2 WHERE WineName <> \'Mimosa\' AND WineSize >50 AND WineSize < 200  AND WineType!=\'Glass\'  AND QtyInStock <> -1 ORDER BY WineType2, WinePrice\";\r\n\r\n}\r\nelse{\r\n$sql=\"SELECT * FROM Wines2 WHERE WineName <> \'Mimosa\'   AND WineSize >50 AND WineSize < 250 AND  WineType=\'Glass\' AND AvailableToday = 0 AND AvailableOnRequest = -1  AND QtyInStock <> -1 ORDER BY WineType2, WinePrice\";\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        $wineCount=$wineCount+1;\r\n        $wineCount1=$wineCount1+1;\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                        echo \"<p class = \'listView\' style=\'padding-bottom: 10px; padding-top: 40px;\'><span style=\'opacity: 1.0; font-weight: bold; font-size: 1.65em; display: inline-block;\'>Today\'s Wine By the Glass&emsp;<span style=\'font-size: 0.8em; color: red;\'>\".$timeStr.\"</span></span></p>\";\r\n                      }\r\n                      else{\r\n                      echo \"<p class = \'listView\' style = \'padding-bottom: 10px;  padding-top: 40px;\'><span style=\'opacity: 1.0; font-weight: bold; font-size: 1.65em;\'>Today\'s Wine By the Glass</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;\'>\".$timeStr.\"</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; padding-top: 20px;\'><p class = \'listView\'>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\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\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=$wines[\'WineName\'];\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 \"<div style=\'opacity: \".$opacity.\"; font-weight: 700; font-size: 1.5em; line-height: 50%; text-align: left; padding-top: 10px;\'><p class = \'listView\'>White</p></div>\";\r\n       }\r\n       elseif($prevID == 2){\r\n        // echo \"<br>\";   \r\n         echo \"<br><div style=\'opacity: \".$opacity.\"; font-weight: 700; font-size: 1.5em;  line-height: 50%; padding-top: 10px;\'><p class = \'listView\'>Red</p></div>\";\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\' style=\'padding-top:20px;\'>Sparkling</p></span>\";\r\n       }\r\n       }\r\n       elseif($prevID == 4){\r\n            // echo \"<br>\";\r\n             echo \"<br><div style=\'opacity:  \".$opacity.\"; font-weight: bold; font-size: 1.5em;  line-height: 50%; padding-top:10px;\'><p class = \'listView\'>Rosé</p></div>\";\r\n       }\r\n    }\r\n\r\n   echo \"<p class= \'listView\' style = \'padding-top: 6px;\'><span style=\'font-size: 1.35em; font-weight: 400; 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                 else{\r\n                 $winePrice=\"$\".$wines[\'WinePrice\'].\"\";\r\n                 }\r\n\r\n                 echo \"<span style=\'font-size: 1.35em; text-align: left; width:85%; line-height: 100%;\'>\".$winePrice.\"</span></p>\"; \r\nif(1==0){\r\n  		   if($wines[\'WineVarietal\']!=\"\"){\r\n                              \r\n                       $wineVarietal=$wines[\'WineVarietal\'];\r\n                       echo \"<p  class = \'listView\' style = \'font-size:1em; padding-top: 0px; line-height: 120%\'>\".$wineVarietal;\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 \"&emsp;\".$wineCountry.\"</p>\";\r\n                         \r\n    }\r\n                \r\n        }\r\n        //echo \"<br>\";\r\n}\r\n\r\necho \"<br><p class = \'listView\' style=\'font-size: 1em; padding-bottom: 0px; padding-top: 0px;\'>See our full wine list at <u>www.bistrowinelist.com</u></p>\";\r\necho \"<p class = \'listView\' style=\'font-size: 0.85em; padding-top: 0px;\'>All prices are in Belize Dollars and include 12.5% GST (Sales Tax).  BZ$2 = US$1</p>\";\r\n//echo \"</div>\";','[xyz-ips snippet=\"byGlassPHP-Hotel\"]',1),(48,'ContinuousDisplay-July-2020','<?php\r\n\r\n$search = $_GET[\'search\'];\r\n$pageOffset = 7;\r\n$anchor = $_GET[\'wine\'];\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$callingType = $_GET[\'identifier\'];\r\n$returnPage = $_GET[\'returnPage\'];\r\n\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 \"XXXX\".$device,\"XXXX\";\r\necho \"<style>\";\r\necho \"img {display: block; margin: auto;}\";\r\necho \".top { vertical-align: top; }\";\r\necho \".bottom { vertical-align: bottom; }\";\r\necho \"</style>\";\r\n\r\n\r\n\r\n\r\n//echo\"<meta name=\'viewport\' id=\'viewport\' content=\'width=500\'/>\";\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 > 0 AND AvailableForSale = -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 (AvailableForSale = -1 AND (Category = \'\".$listName.\"\' OR Category2 = \'\".$listName.\"\' OR Category3 = \'\".$listName.\"\') AND ((QtyInStock > 0 AND WineType != \'Glass\') OR (SoldAs = 1 AND WineType2 = 6))) ORDER BY WinePrice\";\r\n}\r\nelseif($listType==\"byCountry\"){\r\n\r\n      $sql=\"SELECT * FROM Wines WHERE (AvailableForSale = -1 AND WineCountry = \'\".$listName.\"\' AND ((QtyInStock > 0 AND WineType != \'Glass\'  AND WineType != \'Beer\') OR (SoldAs = 1 AND WineType2 = 6))) 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 AND AvailableForSale = -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 > 0 AND AvailableForSale = -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 > 0 AND AvailableForSale = -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 > 0 AND AvailableForSale = -1 ORDER BY WinePrice\";\r\n            $showName=\"All Reds by Price\";\r\n            $listTypeName=\"Red Wines\";\r\n      }  \r\n      elseif($listName==\"Inventory\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType != \'Glass\' AND WineType != \'Dessert\' AND QtyInStock > 0 AND AvailableForSale = -1 ORDER BY WineType, WineName\";\r\n            $showName=\"All Wines A-Z\";\r\n            $listTypeName=\"All Wines\";\r\n      }\r\n\r\nelseif($listName==\"All\"){\r\n            $sql=\"SELECT * FROM Wines WHERE WineType != \'Glass\' AND WineType != \'Dessert\' AND QtyInStock > 0 AND AvailableForSale = -1 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            $showName=\"All Wines A-Z\";\r\n            $listTypeName=\"All Wines\";\r\n      }  \r\n  \r\n      elseif($listName==\"Dessert\"){\r\n             $sql=\"SELECT * FROM Wines WHERE (AvailableForSale = -1 AND (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND (QtyInStock > 0 AND WineType != \'Glass\' OR (SoldAs = 1 AND WineType2 = 6))) ORDER BY WinePrice\";\r\n            $showName=\"\";\r\n\r\n       }\r\n       else{\r\n      \r\n            $sql=\"SELECT * FROM Wines WHERE (AvailableForSale = -1 AND (WineProfile1 = \'\".$listName.\"\' OR WineProfile2 = \'\".$listName.\"\') AND (QtyInStock > 0 AND WineType != \'Glass\' OR (SoldAs = 1 AND WineType2 = 6))) ORDER BY WinePrice\";\r\n     $showName=\"\";\r\n      } \r\n}\r\nelseif($listType==\"byPerson\"){\r\n\r\n  $sql=\"SELECT * FROM Wines WHERE (AvailableForSale = -1 AND WhosFavorite = \'\".$listName.\"\' AND ((QtyInStock > 0 AND WineType != \'Glass\'  AND WineType != \'Beer\') OR (SoldAs = 1 AND WineType2 = 6))) 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==\"byGlass\"){\r\n\r\n // $sql=\"SELECT * FROM Wines WHERE AvailableForSale = -1  AND WineType = \'Glass\' AND AvailableToday = -1 ORDER BY WineType2, WinePrice\";           \r\n\r\nif($happyhour==True){\r\n\r\n$sql=\"SELECT * FROM Wines WHERE QtyInStock > 0 AND AvailableForSale = -1  AND ((WineType = \'Glass\' AND (AvailableToday = -1 OR AvailablePremium = -1)) OR (WineType!=\'Glass\' AND WineSize > 50 AND WineSize < 375)) 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 QtyInStock > 0 AND AvailableForSale = -1  AND  ((WineType = \'Glass\' AND AvailableToday = -1) OR (WineType!=\'Glass\' AND WineSize > 50 AND WineSize < 375)) ORDER BY SoldAs DESC, WineType2, WinePrice\";\r\n            $showName=\"Wines by Glass\";\r\n            $listTypeName=\"Glass\";\r\n}\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 (AvailableForSale = -1 AND ((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      $foodWines[$wineCount][66] = $row1[\'WineryWebsite\'];\r\n      $foodWines[$wineCount][67] = $row1[\'CellarLocation\'];\r\n      $foodWines[$wineCount][101] = $row1[\'WhosFavorite\'];\r\n      $foodWines[$wineCount][102] = $row1[\'FavoriteImage\'];\r\n      $foodWines[$wineCount][103] = $row1[\'WineMaker\'];\r\n      $foodWines[$wineCount][104] = $row1[\'AverageYield\'];\r\n      $foodWines[$wineCount][105] = $row1[\'MainClones\'];\r\n      $foodWines[$wineCount][106] = $row1[\'pH\'];\r\n      $foodWines[$wineCount][107] = $row1[\'Barrels\'];\r\n      $foodWines[$wineCount][108] = $row1[\'TA\'];\r\n      $foodWines[$wineCount][109] = $row1[\'Winery\'];\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\nif($x<$pageOffset){\r\n$Offset = \"\";\r\n}\r\nelse{\r\n$temp = $x-$pageOffset;\r\n$Offset = \"#wine\".$temp;\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==\"byPerson\"){\r\n        $listTypeName=$foodWines[$x][101].\"\'s Favorites\";\r\n        $listName=$foodWines[$x][101];\r\n}\r\n\r\n\r\nelseif($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($listTypeName==\"Rose\"){\r\n         $listTypeName=\"Rosé\";\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       \r\n        elseif($listType==\'byPerson\'){\r\n\r\n          $browsing=$y.\" of \".$wineCount.\"&nbsp;<a href=\'http://www.bistrowinelist.com/\".$listType.\"/?Listing=\".$listName.\"&identifier=\".$callingType.\"&listType=\".$returnPage.$Offset.\"\'><b>\".$listTypeName.\"</b></a>\";  \r\n\r\n        }\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.$Offset.\"\'><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.$Offset.\"\'><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.$Offset.\"\'><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.$Offset.\"\'><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.$Offset.\"\'><b>\".$listTypeName.\"</b></a>\";\r\n}\r\n\r\n        \r\n    echo \"<body>\";\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($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      if($foodWines[$x][30]<750 AND $foodWines[$x][30]>50){\r\n\r\n      if($foodWines[$x][30]==375){\r\n        $sizeInfo = \" (half bottle)\";\r\n       } \r\n       else{\r\n        $sizeInfo = \" (small bottle)\";\r\n        }\r\n\r\n        }\r\n        else{\r\n         $sizeInfo = \"\";\r\n         }  \r\n         \r\n        \r\n      if($listType==\'byPerson\'){\r\n         $favorite=\"\";\r\n      }\r\n\r\n      elseif(is_null($foodWines[$x][101])){\r\n         	$favorite=\"\";\r\n          	}   \r\n      else{\r\n          $favorite=\"<a href=\'http://www.bistrowinelist.com/byperson/?WineID=\".$foodWines[$x][10].\"&Listing=\".$foodWines[$x][101].\"&listType=\".$listType.\"&identifier=\".$listName.\"&wine=\".$x.\"\'>\".$foodWines[$x][102].\"</a>\";\r\n         \r\n\r\n\r\n //$favorite=\"<a href=\'http://www.bistrowinelist.com/byperson/?Listing=\".$foodWines[$x][101].\"\'>\".$foodWines[$x][102].\"</a>\";\r\n          	}\r\n\r\necho \"<a style=\'display:block;  height:200px;  margin-top:-200px; visibility:hidden;\' id=\'wine\".$y.\"\'></a>\";\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  cellspacing=\'0\' cellpadding=\'0\'>\";\r\n       echo \"<colgroup style=\'vertical-align: top;\'>\";\r\n        echo \"<col span=\'1\' style=\'width: 15%; vertical-align: top;\'>\";\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 style=\'vertical-align: top;\'>\";\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\n\r\necho \"<td style=\'vertical-align: top;\'><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;\'><img id=\".$foodWines[$x][10].\" 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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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\n//echo \"<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 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         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].$sizeInfo.\"&emsp;\".$favorite.\"</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].$sizeInfo.\"&emsp;\".$favorite.\"</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                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood2;\r\n                }\r\n                else{\r\n                $goodfoods = $goodfoods.$xfood2;\r\n                 }\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                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood3;\r\n                }\r\n                else{\r\n                $goodfoods = $goodfoods.$xfood3;\r\n                  }\r\n           }\r\n           elseif($food3!=\'none\'){\r\n                  $badfoods = $badfoods.\", \".$xfood3;\r\n            }\r\n\r\n   if(in_array($food4, $foodarray)) {\r\n                if($goodfoods!=\"\"){\r\n                $goodfoods = $goodfoods.\", \".$xfood4;\r\n                 }\r\n                 else{\r\n                 $goodfoods = $goodfoods.$xfood4;\r\n                 }\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        if(!empty($foodWines[$x][109])){\r\n   \r\n   // leave off for now echo \"<span style=\'font-weight: normal font-size: 1.25em\'>\".$foodWines[$x][109].\"</span><br>\";\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\r\n$wineCountry = $foodWines[$x][7];\r\nif(!empty($foodWines[$x][26])){\r\n\r\n$wineCountry=$wineCountry.\">\".$foodWines[$x][26];\r\n\r\nif(!empty($foodWines[$x][27])){\r\n$wineCountry=$wineCountry.\">\".$foodWines[$x][27];\r\n\r\n}\r\n\r\n}    \r\n   \r\n        echo \"<p><span style=\'font-weight: normal font-size: 1.25em\'>\".$wineCountry.\"</span></p>\";\r\n \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 your selections:</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 > 10000){     \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\n\r\n$pairsString=\"\";\r\n   \r\nif($screenWidth > 500){\r\n   \r\n     for($y = 51; $y <= 55; $y++){\r\n\r\n      if(!empty($foodWines[$x][$y])){\r\n      \r\n      if($y==51){\r\n            $pairsString = substr($foodWines[$x][$y], (strlen($foodWines[$x][$y])-2)*-1);\r\n      }\r\n      else{\r\n            $pairsString=$pairsString.\", \".substr($foodWines[$x][$y], (strlen($foodWines[$x][$y])-2)*-1);\r\n      }\r\n      }      \r\n      }\r\n   if(!empty($pairsString)){\r\n    echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Pairs with:&nbsp;</span><span style=\'font-weight: normal\'>\".$pairsString.\"</span><br><font>\";\r\n   }\r\n   }\r\n\r\n \r\n\r\n\r\nif($screenWidth > 500){    \r\n       if (!empty($foodWines[$x][103])) {\r\n       $winemakertext=\"From the Winemaker:\";         \r\n\r\n//$winemakertext=\"From the Winemaker (\".$foodWines[$x][103].\"):\";\r\n        }\r\n        else{\r\n        $winemakertext=\"From the Winemaker:\";\r\n         }\r\n  	if (!empty($foodWines[$x][32])) {\r\n       \r\n        //add in carriage returns because this does not seem to do it automatically\r\n        $newstring = nl2br($foodWines[$x][32]); \r\n\r\necho \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>\",$winemakertext.\" &nbsp;</span><span style=\'font-weight: normal\'>\".$newstring.\"</span><br><font>\";\r\n      }\r\n\r\nif (!empty($foodWines[$x][103])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Winemaker: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][103].\"</span><font>\";\r\n      }\r\nif (!empty($foodWines[$x][25])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Cases Produced: &nbsp;</span><span style=\'font-weight: normal\'>\".number_format($foodWines[$x][25]).\"</span><font>\";\r\n      }\r\n\r\nif (!empty($foodWines[$x][107])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Winemaking / Barrels / Aging: &nbsp;</span><span style=\'font-weight: normal\'>\".nl2br($foodWines[$x][107]).\"</span><font>\";\r\n      }\r\n\r\nif (!empty($foodWines[$x][104])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Average Yield: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][104].\"</span><font>\";\r\n      }\r\n\r\n\r\nif(!empty($foodWines[$x][106]) AND !empty($foodWines[$x][108])){\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>pH: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][106].\"</span><span style=\'font-weight: bold\'>&emsp; Total Acidity: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][108].\"g/L</span> <font>\";\r\n\r\n}\r\n\r\nelseif (!empty($foodWines[$x][106])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>pH: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][106].\"</span> <font>\";\r\n      }\r\nelseif (!empty($foodWines[$x][108])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Total Acidity: &nbsp;</span><span style=\'font-weight: normal\'>\".$foodWines[$x][108].\"g/L</span> <font>\";\r\n      }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n  	if (!empty($foodWines[$x][66])) {\r\n       echo \"<br><font size=\'+1\'><span style=\'font-weight: bold\'>Winery Website: &nbsp;</span><span style=\'font-weight: normal\'><a href=\'\".$foodWines[$x][66].\"\'  \r\n target=\'_blank\'>Click Here</a> </span><br><font>\";\r\n      }\r\n\r\n\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   if($foodWines[$x][18]<3 AND $foodWines[$x][39]==0){\r\n   if($foodWines[$x][18]==1){\r\necho \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>Only 1 Bottle Left in Our Cellar</span><font>\";\r\n}\r\nelse{\r\n    echo \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>Only 2 Bottles Left in Our Cellar</span><font>\";\r\n}\r\n}\r\n\r\nif(!empty($foodWines[$x][67]))  {\r\n\r\necho \"<br><font size=\'-1\'><span style=\'font-weight: bold\'>\".$foodWines[$x][67].\"</span><font>\";\r\n}   \r\n\r\necho \"</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=\"ContinuousDisplay-July-2020\"]',1);

--
-- Table structure for table `wp_links`
--

CREATE TABLE `wp_links` (
  `link_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `link_url` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `link_name` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `link_image` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `link_target` varchar(25) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `link_description` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `link_visible` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'Y',
  `link_owner` bigint(20) unsigned NOT NULL DEFAULT '1',
  `link_rating` int(11) NOT NULL DEFAULT '0',
  `link_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `link_rel` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `link_notes` mediumtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `link_rss` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`link_id`),
  KEY `link_visible` (`link_visible`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_links`
--


--
-- Table structure for table `wp_options`
--

CREATE TABLE `wp_options` (
  `option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `option_name` varchar(191) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `option_value` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `autoload` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'yes',
  PRIMARY KEY (`option_id`),
  UNIQUE KEY `option_name` (`option_name`),
  KEY `autoload` (`autoload`)
) ENGINE=MyISAM AUTO_INCREMENT=171 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_options`
--



--
-- Table structure for table `wp_postmeta`
--

CREATE TABLE `wp_postmeta` (
  `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `post_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 `post_id` (`post_id`),
  KEY `meta_key` (`meta_key`(191))
) ENGINE=MyISAM AUTO_INCREMENT=339 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_postmeta`
--

INSERT INTO `wp_postmeta` VALUES (1,2,'_wp_page_template','default'),(2,3,'_wp_page_template','default'),(5,1580,'_menu_item_type','custom'),(6,1580,'_menu_item_menu_item_parent','0'),(7,1580,'_menu_item_object_id','1580'),(8,1580,'_menu_item_object','custom'),(9,1580,'_menu_item_target',''),(10,1580,'_menu_item_classes','a:1:{i:0;s:0:\"\";}'),(11,1580,'_menu_item_xfn',''),(12,1580,'_menu_item_url','https://www.mayabeachhotel.com/bistro-menus/'),(13,1581,'_wp_page_template','default'),(14,173,'_edit_last','1'),(15,173,'_sslider_expiry',''),(16,173,'_smooth_slider_style','default'),(17,173,'wptr_hide_title','1'),(18,173,'_edit_last','1'),(19,173,'_sslider_expiry',''),(20,173,'_smooth_slider_style','default'),(21,173,'wptr_hide_title','1'),(22,173,'_wp_page_template','default'),(23,173,'_custom_header_image_id',''),(24,878,'_edit_last','1'),(25,878,'_sslider_expiry',''),(26,878,'_smooth_slider_style','default'),(27,878,'_edit_last','1'),(28,878,'_sslider_expiry',''),(29,878,'_smooth_slider_style','default'),(30,878,'_custom_header_image_id',''),(31,878,'wptr_hide_title','1'),(32,878,'_wp_page_template','default'),(33,956,'_edit_last','1'),(34,956,'_edit_last','1'),(35,956,'_custom_header_image_id',''),(36,956,'wptr_hide_title','1'),(37,956,'_wp_page_template','default'),(38,1792,'_edit_last','1'),(39,1792,'_wp_page_template','default'),(40,1792,'_custom_header_image_id',''),(41,1792,'wptr_hide_title','1'),(42,1792,'_SnS',''),(43,1792,'_inpost_head_script',''),(44,1803,'wp_featherlight_disable',''),(45,1803,'_edit_last','1'),(46,1803,'_wp_page_template','default'),(47,1803,'_custom_header_image_id',''),(48,1803,'wptr_hide_title','1'),(49,1836,'_edit_last','1'),(50,1836,'_wp_page_template','default'),(51,1836,'_custom_header_image_id',''),(52,1836,'wptr_hide_title','0'),(53,3261,'_edit_last','1'),(54,3261,'wp_featherlight_disable',''),(55,3261,'_custom_header_image_id',''),(56,3261,'wptr_hide_title','1'),(57,3261,'_thumbnail_id','1524'),(58,3261,'_wp_page_template','template-page-builder-no-header-footer.php'),(59,3522,'_customize_changeset_uuid','fb23ce18-0619-4f8a-88e8-ea45d45a84a5'),(60,3522,'_edit_last','1'),(61,3522,'wptr_hide_title','1'),(62,3522,'_customize_changeset_uuid','fb23ce18-0619-4f8a-88e8-ea45d45a84a5'),(63,3522,'_edit_last','1'),(64,3522,'wptr_hide_title','1'),(65,3522,'_wp_page_template','default'),(66,3522,'wp_featherlight_disable',''),(67,3522,'_custom_header_image_id',''),(68,3522,'_last_editor_used_jetpack','block-editor'),(69,3523,'_wp_page_template','default'),(70,3523,'_edit_last','1'),(71,3523,'wptr_hide_title','0'),(72,3523,'_custom_header_image_id',''),(73,165,'_edit_last','1'),(74,165,'_oembed_fe25d2770d4878b97f25c8193bed22b1','{{unknown}}'),(75,165,'_sslider_expiry',''),(76,165,'_smooth_slider_style','default'),(77,165,'wptr_hide_title','1'),(78,165,'_edit_last','1'),(79,165,'_oembed_fe25d2770d4878b97f25c8193bed22b1','{{unknown}}'),(80,165,'_sslider_expiry',''),(81,165,'_smooth_slider_style','default'),(82,165,'wptr_hide_title','1'),(83,165,'_wp_page_template','default'),(84,165,'_custom_header_image_id',''),(85,165,'_last_editor_used_jetpack','block-editor'),(86,622,'_edit_last','1'),(87,622,'_sslider_expiry',''),(88,622,'_smooth_slider_style','default'),(89,622,'wptr_hide_title','1'),(90,622,'_edit_last','1'),(91,622,'_sslider_expiry',''),(92,622,'_smooth_slider_style','default'),(93,622,'wptr_hide_title','1'),(94,622,'_wp_page_template','default'),(95,622,'wp_featherlight_disable',''),(96,622,'_custom_header_image_id',''),(97,622,'_last_editor_used_jetpack','block-editor'),(98,630,'_edit_last','1'),(99,630,'wptr_hide_title','1'),(100,630,'_edit_last','1'),(101,630,'wptr_hide_title','1'),(102,630,'_wp_page_template','default'),(103,630,'wp_featherlight_disable',''),(104,630,'_custom_header_image_id',''),(105,630,'_last_editor_used_jetpack','block-editor'),(106,734,'_edit_last','1'),(107,734,'wptr_hide_title','1'),(108,734,'_edit_last','1'),(109,734,'wptr_hide_title','1'),(110,734,'_wp_page_template','default'),(111,734,'wp_featherlight_disable',''),(112,734,'_custom_header_image_id',''),(113,734,'_last_editor_used_jetpack','block-editor'),(114,1077,'_edit_last','1'),(115,1077,'_edit_last','1'),(116,1077,'_wp_page_template','default'),(117,1077,'_custom_header_image_id',''),(118,1077,'wptr_hide_title','0'),(119,1077,'_last_editor_used_jetpack','block-editor'),(120,1085,'_edit_last','2'),(121,1085,'_edit_last','1'),(122,1377,'_customize_changeset_uuid','fb23ce18-0619-4f8a-88e8-ea45d45a84a5'),(123,1377,'_edit_last','1'),(124,1377,'wptr_hide_title','1'),(125,1377,'_customize_changeset_uuid','fb23ce18-0619-4f8a-88e8-ea45d45a84a5'),(126,1377,'_edit_last','1'),(127,1377,'wptr_hide_title','1'),(128,1377,'_wp_page_template','default'),(129,1377,'_custom_header_image_id',''),(130,1377,'wp_featherlight_disable',''),(131,1377,'_inpost_head_script',''),(132,1377,'_last_editor_used_jetpack','block-editor'),(133,1378,'_customize_changeset_uuid','fb23ce18-0619-4f8a-88e8-ea45d45a84a5'),(134,1378,'_edit_last','1'),(135,1378,'wptr_hide_title','1'),(136,1378,'_customize_changeset_uuid','fb23ce18-0619-4f8a-88e8-ea45d45a84a5'),(137,1378,'_edit_last','1'),(138,1378,'wptr_hide_title','1'),(139,1378,'_wp_page_template','default'),(140,1378,'_custom_header_image_id',''),(141,1378,'_last_editor_used_jetpack','block-editor'),(142,1380,'_customize_changeset_uuid','fb23ce18-0619-4f8a-88e8-ea45d45a84a5'),(143,1380,'_edit_last','1'),(144,1380,'wptr_hide_title','1'),(145,1380,'_customize_changeset_uuid','fb23ce18-0619-4f8a-88e8-ea45d45a84a5'),(146,1380,'_edit_last','1'),(147,1380,'wptr_hide_title','1'),(148,1380,'_wp_page_template','default'),(149,1380,'wp_featherlight_disable',''),(150,1380,'_custom_header_image_id',''),(151,1380,'_last_editor_used_jetpack','block-editor'),(152,1637,'_edit_last','1'),(153,1637,'_wp_page_template','default'),(154,1637,'wptr_hide_title','1'),(155,1899,'_edit_last','1'),(156,1899,'_wp_page_template','default'),(157,1899,'_custom_header_image_id',''),(158,1899,'wptr_hide_title','0'),(159,1946,'wptr_hide_title','0'),(160,1946,'_custom_header_image_id',''),(161,1946,'_edit_last','1'),(162,1946,'_wp_page_template','default'),(163,2022,'_custom_header_image_id',''),(164,2022,'_wp_page_template','default'),(165,2022,'_edit_last','1'),(166,2022,'wptr_hide_title','1'),(167,2113,'_wp_page_template','default'),(168,2113,'_custom_header_image_id',''),(169,2113,'wptr_hide_title','1'),(170,2113,'_edit_last','1'),(171,2200,'_edit_last','1'),(172,2200,'_wp_page_template','default'),(173,2200,'_custom_header_image_id',''),(174,2200,'wptr_hide_title','0'),(175,2213,'_edit_last','1'),(176,2213,'_wp_page_template','default'),(177,2213,'_custom_header_image_id',''),(178,2213,'wptr_hide_title','0'),(179,2213,'wp_featherlight_disable',''),(180,2331,'_edit_last','1'),(181,2331,'_custom_header_image_id',''),(182,2331,'wptr_hide_title','0'),(183,3220,'_custom_header_image_id',''),(184,3220,'wptr_hide_title','0'),(185,3220,'_edit_last','1'),(186,1684,'_custom_header_image_id',''),(187,1684,'_edit_last','1'),(188,1684,'_wp_page_template','default'),(189,1684,'wptr_hide_title','1'),(190,1684,'wp_featherlight_disable',''),(191,1692,'_custom_header_image_id',''),(192,1692,'_edit_last','1'),(193,1692,'_wp_page_template','default'),(194,1692,'wptr_hide_title','1'),(195,1692,'wp_featherlight_disable',''),(196,1692,'_last_editor_used_jetpack','block-editor'),(197,1716,'_edit_last','1'),(198,1716,'_wp_page_template','default'),(199,1716,'wptr_hide_title','1'),(200,1716,'_custom_header_image_id',''),(201,1716,'_inpost_head_script',''),(202,1716,'_last_editor_used_jetpack','block-editor'),(203,1769,'_edit_last','1'),(204,1769,'_wp_page_template','template-page-builder-no-header-footer.php'),(205,1769,'wptr_hide_title','1'),(206,1769,'_custom_header_image_id',''),(207,1829,'_edit_last','1'),(208,1829,'_wp_page_template',''),(209,1829,'_custom_header_image_id',''),(210,1829,'wptr_hide_title','1'),(211,1829,'wp_featherlight_disable',''),(212,1829,'_last_editor_used_jetpack','block-editor'),(213,1924,'_edit_last','1'),(214,1924,'_wp_page_template','default'),(215,1924,'_custom_header_image_id',''),(216,1924,'wptr_hide_title','1'),(217,1924,'wp_featherlight_disable',''),(218,1924,'_last_editor_used_jetpack','block-editor'),(219,1954,'_inpost_head_script',''),(220,1954,'wptr_hide_title','0'),(221,1954,'_custom_header_image_id',''),(222,1954,'_wp_page_template','default'),(223,1954,'_edit_last','1'),(224,1959,'wptr_hide_title','0'),(225,1959,'_wp_page_template','default'),(226,1959,'_custom_header_image_id',''),(227,1959,'_edit_last','1'),(228,2056,'wptr_hide_title','1'),(229,2056,'_custom_header_image_id',''),(230,2056,'_wp_page_template','default'),(231,2056,'_edit_last','1'),(232,2056,'wp_featherlight_disable',''),(233,2979,'_edit_last','1'),(234,2979,'_custom_header_image_id',''),(235,2979,'wptr_hide_title','1'),(236,3029,'_edit_last','1'),(237,3029,'_custom_header_image_id',''),(238,3029,'wptr_hide_title','1'),(239,3029,'_inpost_head_script',''),(240,3029,'_wp_page_template',''),(241,3032,'_edit_last','1'),(242,3032,'_custom_header_image_id',''),(243,3032,'wptr_hide_title','1'),(244,3032,'_last_editor_used_jetpack','block-editor'),(245,3062,'_edit_last','1'),(246,3062,'_wp_page_template',''),(247,3062,'_custom_header_image_id',''),(248,3062,'wptr_hide_title','1'),(249,3062,'wp_featherlight_disable',''),(250,3160,'_wp_page_template',''),(251,3160,'_edit_last','1'),(252,3160,'_custom_header_image_id',''),(253,3160,'wptr_hide_title','1'),(254,3196,'_edit_last','1'),(255,3196,'_custom_header_image_id',''),(256,3196,'wptr_hide_title','0'),(257,3196,'_wp_page_template','template-page-builder.php'),(258,3270,'_edit_last','1'),(259,3270,'wp_featherlight_disable',''),(260,3270,'_custom_header_image_id',''),(261,3270,'wptr_hide_title','1'),(262,3270,'_wp_page_template','template-page-builder-no-header-footer.php'),(263,3270,'_inpost_head_script',''),(264,3294,'_edit_last','1'),(265,3294,'_custom_header_image_id',''),(266,3294,'wp_featherlight_disable',''),(267,3294,'wptr_hide_title','1'),(268,3294,'_inpost_head_script',''),(269,3310,'_edit_last','1'),(270,3310,'wp_featherlight_disable',''),(271,3310,'_custom_header_image_id',''),(272,3310,'_inpost_head_script',''),(273,3310,'wptr_hide_title','1'),(274,3310,'_wp_page_template','template-page-builder-no-header-footer.php'),(275,3400,'_wp_page_template','template-page-builder-no-header-footer.php'),(276,3400,'_edit_last','1'),(277,3400,'wp_featherlight_disable',''),(278,3400,'_custom_header_image_id',''),(279,3400,'wptr_hide_title','1'),(280,3400,'_inpost_head_script',''),(281,3445,'_last_editor_used_jetpack','block-editor'),(282,3445,'_edit_last','1'),(283,3445,'wp_featherlight_disable',''),(284,3445,'_custom_header_image_id',''),(285,3445,'_inpost_head_script',''),(286,3445,'wptr_hide_title','0'),(287,3449,'_last_editor_used_jetpack','block-editor'),(288,3449,'_edit_last','1'),(289,3449,'wp_featherlight_disable',''),(290,3449,'_custom_header_image_id',''),(291,3449,'wptr_hide_title','1'),(292,3449,'_inpost_head_script',''),(293,3449,'_wp_page_template','template-page-builder.php'),(294,3526,'_last_editor_used_jetpack','block-editor'),(295,3526,'_edit_last','1'),(296,3526,'wp_featherlight_disable',''),(297,3526,'_custom_header_image_id',''),(298,3526,'wptr_hide_title','0'),(299,3527,'_menu_item_type','post_type'),(300,3527,'_menu_item_menu_item_parent','0'),(301,3527,'_menu_item_object_id','1377'),(302,3527,'_menu_item_object','page'),(303,3527,'_menu_item_target',''),(304,3527,'_menu_item_classes','a:1:{i:0;s:0:\"\";}'),(305,3527,'_menu_item_xfn',''),(306,3527,'_menu_item_url',''),(307,3528,'_menu_item_type','post_type'),(308,3528,'_menu_item_menu_item_parent','0'),(309,3528,'_menu_item_object_id','1378'),(310,3528,'_menu_item_object','page'),(311,3528,'_menu_item_target',''),(312,3528,'_menu_item_classes','a:1:{i:0;s:0:\"\";}'),(313,3528,'_menu_item_xfn',''),(314,3528,'_menu_item_url',''),(315,3529,'_menu_item_type','post_type'),(316,3529,'_menu_item_menu_item_parent','0'),(317,3529,'_menu_item_object_id','1380'),(318,3529,'_menu_item_object','page'),(319,3529,'_menu_item_target',''),(320,3529,'_menu_item_classes','a:1:{i:0;s:0:\"\";}'),(321,3529,'_menu_item_xfn',''),(322,3529,'_menu_item_url',''),(323,3530,'_menu_item_type','post_type'),(324,3530,'_menu_item_menu_item_parent','0'),(325,3530,'_menu_item_object_id','1924'),(326,3530,'_menu_item_object','page'),(327,3530,'_menu_item_target',''),(328,3530,'_menu_item_classes','a:1:{i:0;s:0:\"\";}'),(329,3530,'_menu_item_xfn',''),(330,3530,'_menu_item_url',''),(331,3531,'_menu_item_type','post_type'),(332,3531,'_menu_item_menu_item_parent','0'),(333,3531,'_menu_item_object_id','3032'),(334,3531,'_menu_item_object','page'),(335,3531,'_menu_item_target',''),(336,3531,'_menu_item_classes','a:1:{i:0;s:0:\"\";}'),(337,3531,'_menu_item_xfn',''),(338,3531,'_menu_item_url','');

--
-- Table structure for table `wp_posts`
--

CREATE TABLE `wp_posts` (
  `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `post_author` bigint(20) unsigned NOT NULL DEFAULT '0',
  `post_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `post_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `post_content` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `post_title` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `post_excerpt` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `post_status` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'publish',
  `comment_status` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'open',
  `ping_status` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'open',
  `post_password` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `post_name` varchar(200) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `to_ping` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `pinged` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `post_modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `post_modified_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `post_content_filtered` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `post_parent` bigint(20) unsigned NOT NULL DEFAULT '0',
  `guid` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `menu_order` int(11) NOT NULL DEFAULT '0',
  `post_type` varchar(20) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'post',
  `post_mime_type` varchar(100) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT '',
  `comment_count` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`),
  KEY `post_name` (`post_name`(191)),
  KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`),
  KEY `post_parent` (`post_parent`),
  KEY `post_author` (`post_author`)
) ENGINE=MyISAM AUTO_INCREMENT=3532 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_posts`
--

INSERT INTO `wp_posts` VALUES (1,1,'2021-11-18 15:53:03','2021-11-18 15:53:03','<!-- wp:paragraph -->\n<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!</p>\n<!-- /wp:paragraph -->','Hello world!','','publish','open','open','','hello-world','','','2021-11-18 15:53:03','2021-11-18 15:53:03','',0,'https://www.mgv.dke.mybluehost.me/bistrowinelist/?p=1',0,'post','',1),(2,1,'2021-11-18 15:53:03','2021-11-18 15:53:03','<!-- wp:paragraph -->\n<p>This is an example page. It\'s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:quote -->\n<blockquote class=\"wp-block-quote\"><p>Hi there! I\'m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like pi&#241;a coladas. (And gettin\' caught in the rain.)</p></blockquote>\n<!-- /wp:quote -->\n\n<!-- wp:paragraph -->\n<p>...or something like this:</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:quote -->\n<blockquote class=\"wp-block-quote\"><p>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.</p></blockquote>\n<!-- /wp:quote -->\n\n<!-- wp:paragraph -->\n<p>As a new WordPress user, you should go to <a href=\"https://www.mgv.dke.mybluehost.me/bistrowinelist/wp-admin/\">your dashboard</a> to delete this page and create new pages for your content. Have fun!</p>\n<!-- /wp:paragraph -->','Sample Page','','publish','closed','open','','sample-page','','','2021-11-18 15:53:03','2021-11-18 15:53:03','',0,'https://www.mgv.dke.mybluehost.me/bistrowinelist/?page_id=2',0,'page','',0),(3,1,'2021-11-18 15:53:03','2021-11-18 15:53:03','<!-- wp:heading --><h2>Who we are</h2><!-- /wp:heading --><!-- wp:paragraph --><p><strong class=\"privacy-policy-tutorial\">Suggested text: </strong>Our website address is: https://www.mgv.dke.mybluehost.me/bistrowinelist.</p><!-- /wp:paragraph --><!-- wp:heading --><h2>Comments</h2><!-- /wp:heading --><!-- wp:paragraph --><p><strong class=\"privacy-policy-tutorial\">Suggested text: </strong>When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor&#8217;s IP address and browser user agent string to help spam detection.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.</p><!-- /wp:paragraph --><!-- wp:heading --><h2>Media</h2><!-- /wp:heading --><!-- wp:paragraph --><p><strong class=\"privacy-policy-tutorial\">Suggested text: </strong>If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.</p><!-- /wp:paragraph --><!-- wp:heading --><h2>Cookies</h2><!-- /wp:heading --><!-- wp:paragraph --><p><strong class=\"privacy-policy-tutorial\">Suggested text: </strong>If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select &quot;Remember Me&quot;, your login will persist for two weeks. If you log out of your account, the login cookies will be removed.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.</p><!-- /wp:paragraph --><!-- wp:heading --><h2>Embedded content from other websites</h2><!-- /wp:heading --><!-- wp:paragraph --><p><strong class=\"privacy-policy-tutorial\">Suggested text: </strong>Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.</p><!-- /wp:paragraph --><!-- wp:heading --><h2>Who we share your data with</h2><!-- /wp:heading --><!-- wp:paragraph --><p><strong class=\"privacy-policy-tutorial\">Suggested text: </strong>If you request a password reset, your IP address will be included in the reset email.</p><!-- /wp:paragraph --><!-- wp:heading --><h2>How long we retain your data</h2><!-- /wp:heading --><!-- wp:paragraph --><p><strong class=\"privacy-policy-tutorial\">Suggested text: </strong>If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.</p><!-- /wp:paragraph --><!-- wp:heading --><h2>What rights you have over your data</h2><!-- /wp:heading --><!-- wp:paragraph --><p><strong class=\"privacy-policy-tutorial\">Suggested text: </strong>If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.</p><!-- /wp:paragraph --><!-- wp:heading --><h2>Where we send your data</h2><!-- /wp:heading --><!-- wp:paragraph --><p><strong class=\"privacy-policy-tutorial\">Suggested text: </strong>Visitor comments may be checked through an automated spam detection service.</p><!-- /wp:paragraph -->','Privacy Policy','','draft','closed','open','','privacy-policy','','','2021-11-18 15:53:03','2021-11-18 15:53:03','',0,'https://www.mgv.dke.mybluehost.me/bistrowinelist/?page_id=3',0,'page','',0),(4,1,'2021-11-18 15:53:20','0000-00-00 00:00:00','','Auto Draft','','auto-draft','open','open','','','','','2021-11-18 15:53:20','0000-00-00 00:00:00','',0,'https://www.mgv.dke.mybluehost.me/bistrowinelist/?p=4',0,'post','',0),(83,2,'2018-08-27 02:33:41','2018-08-27 02:33:41','.wrap {\n	/* margin-left: auto; */\n	/* margin-right: auto; */\n	max-width: 100%;\n	/* padding-left: 2em; */\n	/* padding-right: 2em; */\n}\n \n@media screen and (min-width: 48em) {\n	.wrap {\n		max-width: 100%;\n		/* padding-left: 3em; */\n		/* padding-right: 3em; */\n	}\n}\n \n.page.page-one-column:not(.twentyseventeen-front-page) #primary {\n	/*margin-left: auto;*/\n	/*margin-right: auto;*/\n	max-width: 100%;\n}\n\n@media screen and (min-width: 30em) {\n	.page-one-column .panel-content .wrap\n	{\n		max-width: 100%;\n	}\n}\n\ntable { border-bottom: none; }\ntd { border-bottom: none; }\ntd { border-top: none; }\ntr { border-top: none; }\ntr { border-bottom: none; }','twentyseventeen','','publish','closed','closed','','twentyseventeen','','','2018-08-27 02:33:41','2018-08-27 02:33:41','',0,'http://192.168.104.254/wordpress/2018/08/27/twentyseventeen/',0,'custom_css','',0),(1466,2,'2018-09-13 03:41:30','2018-09-13 03:41:30','','savona','','publish','closed','closed','','savona','','','2018-09-13 03:41:30','2018-09-13 03:41:30','',0,'http://192.168.104.254/wordpress/2018/09/13/savona/',0,'custom_css','',0),(1579,1,'2018-09-19 13:54:47','2018-09-19 13:54:47','@media screen and (max-width: 949px){\n	.main-menu-container {\n	    display: block !important;\n	}\n	.mobile-menu-btn {\n	    display: none !important;\n	}\n\n}\n\n@media (max-width: 400px) {\n	.main-menu-container {\n	    display: none !important;\n	}\n	.mobile-menu-btn {\n	    display: inline-block !important;\n	}\n}\n\n','savona-pro','','publish','closed','closed','','savona-pro','','','2018-09-19 13:54:47','2018-09-19 13:54:47','',0,'http://www.bistrowinelist.com/savona-pro/',0,'custom_css','',0),(1580,1,'2021-11-18 16:38:30','2021-11-18 16:38:30','','Bistro Menus','','publish','closed','closed','','bistro-menus','','','2021-11-18 16:38:30','2021-11-18 16:38:30','',0,'https://www.mgv.dke.mybluehost.me/bistrowinelist/2021/11/18/bistro-menus/',1,'nav_menu_item','',0),(1581,1,'2018-09-16 13:22:32','2018-09-16 13:22:32','<h2>Who we are</h2><p>Our website address is: http://www.bistrowinelist.com.</p><h2>What personal data we collect and why we collect it</h2><h3>Comments</h3><p>When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor&#8217;s IP address and browser user agent string to help spam detection.</p><p>An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.</p><h3>Media</h3><p>If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.</p><h3>Contact forms</h3><h3>Cookies</h3><p>If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.</p><p>If you have an account and you log in to this site, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.</p><p>When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select &quot;Remember Me&quot;, your login will persist for two weeks. If you log out of your account, the login cookies will be removed.</p><p>If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.</p><h3>Embedded content from other websites</h3><p>Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.</p><p>These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.</p><h3>Analytics</h3><h2>Who we share your data with</h2><h2>How long we retain your data</h2><p>If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.</p><p>For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.</p><h2>What rights you have over your data</h2><p>If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.</p><h2>Where we send your data</h2><p>Visitor comments may be checked through an automated spam detection service.</p><h2>Your contact information</h2><h2>Additional information</h2><h3>How we protect your data</h3><h3>What data breach procedures we have in place</h3><h3>What third parties we receive data from</h3><h3>What automated decision making and/or profiling we do with user data</h3><h3>Industry regulatory disclosure requirements</h3>','Privacy Policy','','draft','closed','open','','privacy-policy','','','2018-09-16 13:22:32','2018-09-16 13:22:32','',0,'http://www.bistrowinelist.com/?page_id=3',0,'page','',0),(173,2,'2018-08-28 13:51:26','2018-08-28 13:51:26','','Front Page','','private','closed','closed','','front-page','','','2018-08-28 13:51:26','2018-08-28 13:51:26','',0,'http://192.168.104.254/wordpress/?page_id=173',0,'page','',0),(878,2,'2018-09-05 14:13:27','2018-09-05 14:13:27','<head>\n<style>\n\nhtml, body{\n  margin:0;\n  padding:0;\n  height:100%;\n}\nsection {\n  position: relative;\n  border: 1px solid #000;\n  padding-top: 37px;\n  background: #500;\n}\nsection.positioned {\n  position: absolute;\n  top:100px;\n  left:100px;\n  width:800px;\n  box-shadow: 0 0 15px #333;\n}\n.container {\n  overflow-y: auto;\n  height: 600px;\n}\ntable {\n  border-spacing: 0;\n  width:100%;\n}\ntd + td {\n  border-left:1px solid #eee;\n}\ntd, th {\n  border-bottom:1px solid #eee;\n  background: #ddd;\n  color: #000;\n  padding: 10px 25px;\n}\nth {\n  height: 0;\n  line-height: 0;\n  padding-top: 0;\n  padding-bottom: 0;\n  color: transparent;\n  border: none;\n  white-space: nowrap;\n}\nth div{\n  position: absolute;\n  background: transparent;\n  color: #fff;\n  padding: 9px 25px;\n  top: 0;\n  margin-left: -25px;\n  line-height: normal;\n  border-left: 1px solid #800;\n}\nth:first-child div{\n  border: none;\n}\n\n</style>\n</head>\n\n<section class=\"\">\n  <div class=\"container\">\n    <table>\n      <thead>\n        <tr class=\"header\">\n          <th>\n            Table attribute name\n            <div>Lunch</div>\n          </th>\n          <th>\n            Value\n            <div>Small Plates</div>\n          </th>\n          <th>\n            Description\n            <div>Dinner</div>\n          </th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr>\n          <td>align</td>\n          <td>left, center, right</td>\n          <td>Not supported in HTML5. Deprecated in HTML 4.01. Specifies the alignment of a table according to surrounding text</td>\n        </tr>\n        <tr>\n          <td>bgcolor</td>\n          <td>rgb(x,x,x), #xxxxxx, colorname</td>\n          <td>Not supported in HTML5. Deprecated in HTML 4.01. Specifies the background color for a table</td>\n        </tr>\n        <tr>\n          <td>border</td>\n          <td>1,\"\"</td>\n          <td>Specifies whether the table cells should have borders or not</td>\n        </tr>\n        <tr>\n          <td>cellpadding</td>\n          <td>pixels</td>\n          <td>Not supported in HTML5. Specifies the space between the cell wall and the cell content</td>\n        </tr>\n        <tr>\n          <td>cellspacing</td>\n          <td>pixels</td>\n          <td>Not supported in HTML5. Specifies the space between cells</td>\n        </tr>\n        <tr>\n          <td>frame</td>\n          <td>void, above, below, hsides, lhs, rhs, vsides, box, border</td>\n          <td>Not supported in HTML5. Specifies which parts of the outside borders that should be visible</td>\n        </tr>\n        <tr>\n          <td>rules</td>\n          <td>none, groups, rows, cols, all</td>\n          <td>Not supported in HTML5. Specifies which parts of the inside borders that should be visible</td>\n        </tr>\n        <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n\n      </tbody>\n    </table>\n  </div>\n</section>','Fixed Header Table','','private','closed','closed','','swipetest','','','2018-09-05 14:13:27','2018-09-05 14:13:27','',0,'http://192.168.104.254/wordpress/?page_id=878',0,'page','',0),(956,2,'2018-09-05 22:05:40','2018-09-05 22:05:40','<head>\n<script>\nvar index = 0;\nfunction changeImage(BottleID, Image1, Image2) {\n  var imageList = [Image1, Image2];\n  index = index + 1;\n  if (index == imageList.length) {\n     index = 0;\n  }\n  var image1 = document.getElementById(BottleID);\nalert(image1);  \nimage1.src = imageList[index];\n}\n</script>\n</head>\n\n<img id=\"Bottle1923\" onclick=\"changeImage(\'Bottle1923\', \'http://wallpaper-gallery.net/images/image/image-13.jpg\', \'https://3.bp.blogspot.com/-W__wiaHUjwI/Vt3Grd8df0I/AAAAAAAAA78/7xqUNj8ujtY/s1600/image02.png\')\" src=\"http://wallpaper-gallery.net/images/image/image-13.jpg\" style=\"width:100px\">','TestFloatButton','','private','closed','closed','','testfloatbutton','','','2018-09-05 22:05:40','2018-09-05 22:05:40','',0,'http://192.168.104.254/wordpress/?page_id=956',0,'page','',0),(1792,1,'2018-10-01 02:17:50','2018-10-01 02:17:50','[xyz-ips snippet=\"SelectDistinctFoods\"]','FoodList','','private','closed','closed','','foodlist','','','2018-10-01 02:17:50','2018-10-01 02:17:50','',0,'http://www.bistrowinelist.com/?page_id=1792',0,'page','',0),(1803,1,'2018-10-01 02:47:43','2018-10-01 02:47:43','<style>\n<p>html, body{<br />\n  margin:0;<br />\n  padding:0;<br />\n  height:100%;<br />\n}<br />\nsection {<br />\n  position: relative;<br />\n  border: 1px solid #fff;<br />\n  padding-top: 0px;<br />\n  background: #fff;<br />\n}<br />\nsection.positioned {<br />\n  position: absolute;<br />\n  top:100px;<br />\n  left:100px;<br />\n  width:800px;<br />\n  box-shadow: 0 0 15px #fff;<br />\n}<br />\n.container {<br />\n  overflow-y: auto;<br />\n  height: 600px;<br />\n}<br />\ntable {<br />\n  border-spacing: 0;<br />\n  width:100%;<br />\n}<br />\ntd + td {<br />\n  border-left:1px solid #fff;<br />\n}<br />\ntd, th {<br />\n  border-bottom:1px solid #fff;<br />\n  background: #fff;<br />\n  color: #000;<br />\n  padding: 10px 25px;<br />\n}<br />\nth {<br />\n  height: 0px;<br />\n  line-height: 0;<br />\n  padding-top: 0;<br />\n  padding-bottom: 0;<br />\n  color: solid;<br />\n  border: none;<br />\n  word-break: break-all;<br />\n}<br />\nth div{<br />\n  position: absolute;<br />\n  background: solid;<br />\n  color: #000;<br />\n  padding: 9px 25px;<br />\n  top: 0;<br />\n  margin-left: -25px;<br />\n  line-height: normal;<br />\n  border-left: 1px solid #fff;</p>\n<p>}<br />\nth:first-child div{<br />\n  border: none;<br />\n}</p>\n</style>\n\n[xyz-ips snippet=\"DisplayFoodMatchPHP2\"]','FoodMatches','','private','closed','closed','','foodmatches','','','2018-10-01 02:47:43','2018-10-01 02:47:43','',0,'http://www.bistrowinelist.com/?page_id=1803',0,'page','',0),(1836,1,'2018-10-01 22:26:52','2018-10-01 22:26:52','<script>\n<?php\nif (isset($_POST[\'gender\'])){\necho $_POST[\'gender\']; // Displays value of checked checkbox.\n}\n?>\n</script>\n\n<form action=\"#\" method=\"post\">\n<input type=\"checkbox\" name=\"gender\" value=\"Male\">Male</input>\n<input type=\"checkbox\" name=\"gender\" value=\"Female\">Female</input>\n<input type=\"submit\" name=\"submit\" value=\"Submit\"/>\n</form>\n\n\n','CheckTest','','private','closed','closed','','checktest','','','2018-10-01 22:26:52','2018-10-01 22:26:52','',0,'http://www.bistrowinelist.com/?page_id=1836',0,'page','',0),(3236,1,'2020-07-03 22:50:59','0000-00-00 00:00:00','<!-- wp:gallery -->\n<figure class=\"wp-block-gallery columns-0 is-cropped\"><ul class=\"blocks-gallery-grid\"></ul></figure>\n<!-- /wp:gallery -->\n\n<!-- wp:paragraph -->\n<p></p>\n<!-- /wp:paragraph -->','Slideshow','','draft','closed','closed','','','','','2020-07-03 22:50:59','0000-00-00 00:00:00','',0,'http://www.bistrowinelist.com/?page_id=3236',0,'page','',0),(3261,1,'2020-07-03 23:13:11','0000-00-00 00:00:00','<style>\nbody, html {<br />\n  height: 100%;<br />\n  margin: 0;<br />\n}</p>\n<p>.bg {<br />\n  /* The image used */<br />\n  background-image: url(\"image.png\");</p>\n<p>  /* Full height */<br />\n  height: 100%; </p>\n<p>  /* Center and scale the image nicely */<br />\n  background-position: center;<br />\n  background-repeat: no-repeat;<br />\n  background-size: cover;<br />\n}<br />\n</style>\n<div class=\"bg\"></div>\nThis example creates a full page background image. Try to resize the browser window to see how it always will cover the full screen (when scrolled to top), and that it scales nicely on all screen sizes.','','','draft','closed','closed','','','','','2020-07-03 23:13:11','0000-00-00 00:00:00','',0,'http://www.bistrowinelist.com/?page_id=3261',0,'page','',0),(3522,1,'2021-06-08 22:04:36','0000-00-00 00:00:00','[xyz-ips snippet=\"SelectDistinctCountries\"]\n<head>\n<script>\n// Set timeout variables.\nvar timoutWarning = 30000; // Display warning in 14 Mins.\nvar timoutNow = 300000; // Timeout in 5 mins.\nvar logoutUrl = \'http://bistrowinelist.com/byglass/\'; // URL to logout page.\nvar warningTimer;\nvar timeoutTimer;\n// Start timers.\nfunction StartTimers() {\n    timeoutTimer = setTimeout(\"IdleTimeout()\", timoutNow);\n}\n// Reset timers.\nfunction ResetTimers() {\n    clearTimeout(timeoutTimer);\n    StartTimers();\n    $(\"#timeout\").dialog(\'close\');\n}\n// Show idle timeout warning dialog.\nfunction IdleWarning() {\n    $(\"#timeout\").dialog({\n        modal: true\n    });\n}\n// Logout the user.\nfunction IdleTimeout() {\n    window.location = logoutUrl;\n}\n</script>\n</head>\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),(3523,1,'2018-09-16 13:22:32','2018-09-16 13:22:32','','Sample Page','','publish','closed','open','','sample-page-2','','','2018-09-16 13:22:32','2018-09-16 13:22:32','',0,'http://www.bistrowinelist.com/?page_id=2',0,'page','',0),(165,2,'2018-08-28 01:45:52','2018-08-28 01:45:52','<head>\n\n<script>\nfunction goBack() {\n    history.go(-1);\n}\n</script>\n\n\n<style>\n.site-content .wrap {\n    margin-top: -100px!important;\n}\n</style>\n\n</head>\n\n[xyz-ips snippet=\"SingleItemPHP\"]','Single Item','','publish','closed','closed','','oldsingle-item','','','2018-08-28 01:45:52','2018-08-28 01:45:52','',0,'http://192.168.104.254/wordpress/?page_id=165',0,'page','',0),(622,2,'2018-09-02 01:15:31','2018-09-02 01:15:31','[xyz-ips snippet=\"byCountry\"]\n\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>','byCountry','','publish','closed','closed','','bycountry','','','2018-09-02 01:15:31','2018-09-02 01:15:31','',0,'http://192.168.104.254/wordpress/?page_id=622',0,'page','',0),(630,2,'2018-09-02 04:51:13','2018-09-02 04:51:13','[wonderplugin_cond deviceinclude=\"Windows, Mac\"]\n\n<style>\n.site-content .wrap {<br />\n    margin-top: -200px!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: 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\"]\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\"]\n\n<style>\n.site-content .wrap {<br />\n    margin-top: -200px!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: 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</style>[/wonderplugin_cond]\n\n[xyz-ips snippet=\"byVarietal\"]\n\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>','byVarietal','','publish','closed','closed','','byvarietal','','','2018-09-02 04:51:13','2018-09-02 04:51:13','',0,'http://192.168.104.254/wordpress/?page_id=630',0,'page','',0),(734,2,'2018-09-02 19:45:10','2018-09-02 19:45:10','[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}<br />\ndiv.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=\"byProfile\"]\n\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>','byProfile','','publish','closed','closed','','byprofile','','','2018-09-02 19:45:10','2018-09-02 19:45:10','',0,'http://192.168.104.254/wordpress/?page_id=734',0,'page','',0),(1077,2,'2018-09-09 20:59:10','2018-09-09 20:59:10','<div class=\"ibe\" data-region=\"emea\" data-channelcode=\"bze1459\" data-widget=\"embed\"></div>\n\n<script src=\"https://widget.siteminder.com/ibe.min.js\"></script>','SwipeTest','','publish','closed','closed','','swipetest-2','','','2018-09-09 20:59:10','2018-09-09 20:59:10','',0,'http://192.168.104.254/wordpress/?page_id=1077',0,'page','',0),(1085,2,'2018-09-09 22:04:43','2018-09-09 22:04:43','[maxbutton id=\"9\" ] ','SplashPage','','publish','closed','closed','','splashpage','','','2018-09-09 22:04:43','2018-09-09 22:04:43','',0,'http://192.168.104.254/wordpress/?page_id=1085',0,'page','',0),(1377,2,'2018-09-12 14:01:33','2018-09-12 14:01:33','<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>','Profile','','publish','closed','closed','','profile','','','2018-09-12 14:01:33','2018-09-12 14:01:33','',0,'http://192.168.104.254/wordpress/?page_id=1377',0,'page','',0),(1378,2,'2018-09-12 14:01:35','2018-09-12 14:01:35','[xyz-ips snippet=\"SelectDistinctVarietals\"]','Varietal','','publish','closed','closed','','varietal','','','2018-09-12 14:01:35','2018-09-12 14:01:35','',0,'http://192.168.104.254/wordpress/?page_id=1378',0,'page','',0),(1380,2,'2018-09-12 14:01:36','2018-09-12 14:01:36','[xyz-ips snippet=\"SelectDistinctCountries\"]\n<head>\n<script>\n// Set timeout variables.\nvar timoutWarning = 30000; // Display warning in 14 Mins.\nvar timoutNow = 300000; // Timeout in 5 mins.\nvar logoutUrl = \'http://bistrowinelist.com/byglass/\'; // URL to logout page.\nvar warningTimer;\nvar timeoutTimer;\n// Start timers.\nfunction StartTimers() {\n    timeoutTimer = setTimeout(\"IdleTimeout()\", timoutNow);\n}\n// Reset timers.\nfunction ResetTimers() {\n    clearTimeout(timeoutTimer);\n    StartTimers();\n    $(\"#timeout\").dialog(\'close\');\n}\n// Show idle timeout warning dialog.\nfunction IdleWarning() {\n    $(\"#timeout\").dialog({\n        modal: true\n    });\n}\n// Logout the user.\nfunction IdleTimeout() {\n    window.location = logoutUrl;\n}\n</script>\n</head>\n<body onload=\"StartTimers();\" onmousemove=\"ResetTimers();\">','Country','','publish','closed','closed','','country','','','2018-09-12 14:01:36','2018-09-12 14:01:36','',0,'http://192.168.104.254/wordpress/?page_id=1380',0,'page','',0),(1637,1,'2018-09-24 15:15:31','2018-09-24 15:15:31','<head>\n<script>\nfunction goBack() {\n    history.go(-1);\n}\n\n</script>\n\n</head>\n\n[xyz-ips snippet=\"SingleItemPHP\"]','SingleItem-SmallScreen','','publish','closed','closed','','singleitem-smallscreen','','','2018-09-24 15:15:31','2018-09-24 15:15:31','',0,'http://www.bistrowinelist.com/?page_id=1637',0,'page','',0),(1862,1,'2018-10-02 12:41:59','2018-10-02 12:41:59','<p>This is the WPForms preview page. All your form previews will be handled on this page.</p><p>The page is set to private, so it is not publicly accessible. Please do not delete this page :) .</p>','WPForms Preview','','private','closed','closed','','wpforms-preview','','','2018-10-02 12:41:59','2018-10-02 12:41:59','',0,'http://www.bistrowinelist.com/wpforms-preview/',0,'page','',0),(1899,1,'2018-10-05 00:55:38','2018-10-05 00:55:38','<head>\n<style>\n.scrolling-wrapper {\n  overflow-x: scroll;\n  overflow-y: hidden;\n  white-space: nowrap;\n  \n  .card {\n    display: inline-block;\n  }\n}\n\n.scrolling-wrapper-flexbox {\n  display: flex;\n  flex-wrap: nowrap;\n  overflow-x: auto;\n  \n  .card {\n    flex: 0 0 auto;\n    margin-right: 3px;\n  }\n}\n\n.card {\n  border: 1px solid white;\n  width: 150px;\n  height: 75px;\n  background: black;\n}\n\n.scrolling-wrapper, .scrolling-wrapper-flexbox {\n  height: 75px;\n  width: 100%;\n  -webkit-overflow-scrolling: touch;\n  &::-webkit-scrollbar {\n    display: none;\n  }\n}\n\n</style>\n</head>\n\n\n\n<div class=\"container\">\n  <h1>Smooth Horizontal Scrolling</h1>\n  \n  <p>In the era of responsive design, often times we will have a series of card-like divs. While we may show them all on desktop, on mobile things tend to be different. What if we want to have an inner container where the user scrolls left and right to view each card? How do we achieve that?</p>\n  <p>Here\'s a demo. There are more cards to the right that can be scrolled to.</p>\n  \n  <div class=\"scrolling-wrapper\">\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n  </div>\n  \n  <p>To make this, we need to create a container that holds our cards. Then we will enable horizontal scrolling on that container.</p>\n  \n  <p>The <code>overflow-x</code> and <code>overflow-y</code> enable the div to only scroll horizontally. The combination of <code>white-space: nowrap</code> and <code>display: inline-block</code> will neatly line up the cards.</p>\n  \n  <p>We can also use Flexbox to achieve the same result.</p>\n  \n  <p>The result is the same. We have all our cards on a single line and they are scrollalble left to right.</p>\n  \n  <div class=\"scrolling-wrapper-flexbox\">\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n    <div class=\"card\"><h2>Card</h2></div>\n  </div>\n  \n  <p>On iOS, you made want to add <code>-webkit-overflow-scrolling: touch;</code> to your scroll container. By default, Safari will not smoothly scroll these elements.</p>\n  \n  <p>I wrote a <a href=\"https://codepen.io/colinlord/post/horizontal-scrolling-containers\" style=\"color: white\">blog post</a> on this topic if you want to learn more.</p>\n</div>','HorizontalScrolling','','private','closed','closed','','horizontalscrolling','','','2018-10-05 00:55:38','2018-10-05 00:55:38','',0,'http://www.bistrowinelist.com/?page_id=1899',0,'page','',0),(1946,1,'2018-10-17 12:57:10','2018-10-17 12:57:10',' <!DOCTYPE html>\n    <html>\n     <head>\n      <meta charset=\"utf-8\">\n       <script> \n\n        function setCookie(cname,cvalue,exdays) {\n          var d = new Date();\n          d.setTime(d.getTime()+(exdays*24*60*60*1000));\n          var expires = \"expires=\"+d.toGMTString();\n          document.cookie = cname + \"=\" + cvalue + \"; \" + expires;\n        }\n\n        function window_height() {\n           if (document.body) {\n             winH = document.body.offsetHeight;\n           }\n\n          if (document.compatMode==\'CSS1Compat\' &&\n             document.documentElement &&\n             document.documentElement.offsetHeight ) {\n             winH = document.documentElement.offsetHeight;\n             return winH\n          }\n\n         if (window.innerHeight && window.innerHeight) {\n            winH = window.innerHeight;\n            return winH;\n         }\n      }     \n\n      function window_width() {\n        if (document.body) {\n          winW = document.body.offsetWidth;\n        }\n\n       if (document.compatMode==\'CSS1Compat\' &&\n          document.documentElement &&\n          document.documentElement.offsetWidth ) {\n          winW = document.documentElement.offsetWidth;\n          return winW\n       }\n\n       if (window.innerWidth && window.innerWidth) {\n         winW = window.innerWidth;\n         return winW;\n       }\n     }      \n       /* Upon page load, get the page width and height, and store in a JSON object/Cookie */\n       setTimeout(function(){\n         setCookie(\'w_w\',JSON.stringify({\'width\':window_width(),\'height\':window_height()}))\n       })\n\n     </script>\n    </head>\n    <body>\n      <?\n        /* .........your PHP code...........*/\n        /* .........your PHP code...........*/\n        /* Access precise window dimensions */\n        $xy=json_decode($_COOKIE[\'w_w\']);\n        $width=$xy->width;\n        $height=$xy->height;\n      ?>\n     </body>\n   </html>','ResolutionTest','','private','closed','closed','','resolutiontest','','','2018-10-17 12:57:10','2018-10-17 12:57:10','',0,'http://www.bistrowinelist.com/?page_id=1946',0,'page','',0),(2022,1,'2018-10-22 23:27:45','2018-10-22 23:27:45','<style>\n\n   div.container {\n   \n  }\n  table#table1 {\n    text-align:center; \n    margin-left:auto; \n    margin-right:auto; \n    width: 50%;\n  }\n  tr,td {text-align:left;}\n\n</style>\n\n<div class=\"container\">\n    <table id=\"table1\">\n       <tr><td style=\'width: 94%;\'>TEST.............................dasEKLJIH WERUIH  IUR IURT  QEQWKLHREQWDASDASDA DAS DASD  DAS DDAS  RH ............................................................</td><td style=\'width: 5%;\'>TEST2.......................ASD  DASD ASD DA DASD ..........................................................EQ;OWE OI  OIQWUE  OQIWE OIYE QIWY OYU UIYREWQIY  OIYU OQWRYE.............</td></tr>\n    </table>\n</div>\n','Centered Table','','private','closed','closed','','centered-table','','','2018-10-22 23:27:45','2018-10-22 23:27:45','',0,'http://www.bistrowinelist.com/?page_id=2022',0,'page','',0),(2113,1,'2018-10-30 00:57:11','2018-10-30 00:57:11','<head>\n<style>\n\nhtml, body{\n  margin:0;\n  padding:0;\n  height:100%;\n}\nsection {\n  position: relative;\n  border: 1px solid #000;\n  padding-top: 37px;\n  background: #500;\n}\nsection.positioned {\n  position: absolute;\n  top:100px;\n  left:100px;\n  width:800px;\n  box-shadow: 0 0 15px #333;\n}\n.container {\n  overflow-y: auto;\n  height: 160px;\n}\ntable {\n  border-spacing: 0;\n  width:100%;\n}\ntd + td {\n  border-left:1px solid #eee;\n}\ntd, th {\n  border-bottom:1px solid #eee;\n  background: #ddd;\n  color: #000;\n  padding: 10px 25px;\n}\nth {\n  height: 0;\n  line-height: 0;\n  padding-top: 0;\n  padding-bottom: 0;\n  color: transparent;\n  border: none;\n  white-space: nowrap;\n  word-wrap: break-word;\n}\nth div{\n  position: absolute;\n  background: transparent;\n  color: #fff;\n  padding: 9px 25px;\n  top: 0;\n  margin-left: -25px;\n  line-height: normal;\n  border-left: 1px solid #800;\n}\nth:first-child div{\n  border: none;\n}\n</style>\n</head>\n\n<section class=\"\">\n  <div class=\"container\">\n    <table>\n      <thead>\n        <tr class=\"header\">\n          <th>\n            Table attribute name\n            <div>Table attribute name Table attribute name Table attribute name Table attribute name Table attribute name</div>\n          </th>\n          <th>\n            Value\n            <div>Value</div>\n          </th>\n          <th>\n            Description\n            <div>Description</div>\n          </th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr>\n          <td>align</td>\n          <td>left, center, right</td>\n          <td>Not supported in HTML5. Deprecated in HTML 4.01. Specifies the alignment of a table according to surrounding text</td>\n        </tr>\n        <tr>\n          <td>bgcolor</td>\n          <td>rgb(x,x,x), #xxxxxx, colorname</td>\n          <td>Not supported in HTML5. Deprecated in HTML 4.01. Specifies the background color for a table</td>\n        </tr>\n        <tr>\n          <td>border</td>\n          <td>1,\"\"</td>\n          <td>Specifies whether the table cells should have borders or not</td>\n        </tr>\n        <tr>\n          <td>cellpadding</td>\n          <td>pixels</td>\n          <td>Not supported in HTML5. Specifies the space between the cell wall and the cell content</td>\n        </tr>\n        <tr>\n          <td>cellspacing</td>\n          <td>pixels</td>\n          <td>Not supported in HTML5. Specifies the space between cells</td>\n        </tr>\n        <tr>\n          <td>frame</td>\n          <td>void, above, below, hsides, lhs, rhs, vsides, box, border</td>\n          <td>Not supported in HTML5. Specifies which parts of the outside borders that should be visible</td>\n        </tr>\n        <tr>\n          <td>rules</td>\n          <td>none, groups, rows, cols, all</td>\n          <td>Not supported in HTML5. Specifies which parts of the inside borders that should be visible</td>\n        </tr>\n        <tr>\n          <td>summary</td>\n          <td>text</td>\n          <td>Not supported in HTML5. Specifies a summary of the content of a table</td>\n        </tr>\n        <tr>\n          <td>width</td>\n          <td>pixels, %</td>\n          <td>Not supported in HTML5. Specifies the width of a table</td>\n        </tr>\n      </tbody>\n    </table>\n  </div>\n</section>','FixedHeaderTable2','','private','closed','closed','','fixedheadertable2','','','2018-10-30 00:57:11','2018-10-30 00:57:11','',0,'http://www.bistrowinelist.com/?page_id=2113',0,'page','',0),(2200,1,'2018-11-06 13:43:33','2018-11-06 13:43:33','<!DOCTYPE html>\n<html>\n<head>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<script>\n// Get the modal\nfunction showModal(BottleID, Image1, Image2) {\nalert(\"Testing\");\nvar modal = document.getElementById(\'myModal\');\n// Get the image and insert it inside the modal - use its \"alt\" text as a caption\nvar img = document.getElementById(\'myImg\');\nvar modalImg = document.getElementById(\"img01\");\nvar captionText = document.getElementById(\"caption\");\nalert(\"Testing\");\nmodal.style.display = \"block\";\nmodalImg.src = Image1;\ncaptionText.innerHTML = BottleID;\n}\n// Get the <span> element that closes the modal\nvar span = document.getElementsByClassName(\"close\")[0];\n// When the user clicks on <span> (x), close the modal\nspan.onclick = function() { \n    modal.style.display = \"none\";\n}\n</script>\n\n<style>\nbody {font-family: Arial, Helvetica, sans-serif;}\n\n#myImg {\n    border-radius: 5px;\n    cursor: pointer;\n    transition: 0.3s;\n}\n\n#myImg:hover {opacity: 0.7;}\n\n/* The Modal (background) */\n.modal {\n    display: none; /* Hidden by default */\n    position: fixed; /* Stay in place */\n    z-index: 1; /* Sit on top */\n    padding-top: 100px; /* Location of the box */\n    left: 0;\n    top: 0;\n    width: 100%; /* Full width */\n    height: 100%; /* Full height */\n    overflow: auto; /* Enable scroll if needed */\n    background-color: rgb(0,0,0); /* Fallback color */\n    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */\n}\n\n/* Modal Content (image) */\n.modal-content {\n    margin: auto;\n    display: block;\n    width: 80%;\n    max-width: 700px;\n}\n\n/* Caption of Modal Image */\n#caption {\n    margin: auto;\n    display: block;\n    width: 80%;\n    max-width: 700px;\n    text-align: center;\n    color: #ccc;\n    padding: 10px 0;\n    height: 150px;\n}\n\n/* Add Animation */\n.modal-content, #caption {    \n    -webkit-animation-name: zoom;\n    -webkit-animation-duration: 0.6s;\n    animation-name: zoom;\n    animation-duration: 0.6s;\n}\n\n@-webkit-keyframes zoom {\n    from {-webkit-transform:scale(0)} \n    to {-webkit-transform:scale(1)}\n}\n\n@keyframes zoom {\n    from {transform:scale(0)} \n    to {transform:scale(1)}\n}\n\n/* The Close Button */\n.close {\n    position: absolute;\n    top: 15px;\n    right: 35px;\n    color: #f1f1f1;\n    font-size: 40px;\n    font-weight: bold;\n    transition: 0.3s;\n}\n\n.close:hover,\n.close:focus {\n    color: #bbb;\n    text-decoration: none;\n    cursor: pointer;\n}\n\n/* 100% Image Width on Smaller Screens */\n@media only screen and (max-width: 700px){\n    .modal-content {\n        width: 100%;\n    }\n}\n</style>\n</head>\n<body>\n\n<h2>Image Modal</h2>\n<p>In this example, we use CSS to create a modal (dialog box) that is hidden by default.</p>\n<p>We use JavaScript to trigger the modal and to display the current image inside the modal when it is clicked on. Also note that we use the value from the image\'s \"alt\" attribute as an image caption text inside the modal.</p>\n\n<img id=\"myImg\" onclick=\'showModal(718, \"http://www.bistrowinelist.com/WineListImages/BottleImage718-1.jpg\")\' src=\"http://www.bistrowinelist.com/WineListImages/BottleImage717-1.jpg\" alt=\"Snow\" style=\"width:20%;max-width:300px\">\n\n<!-- The Modal -->\n<div id=\"myModal\" class=\"modal\">\n  <span class=\"close\">&times;</span>\n  <img class=\"modal-content\" id=\"img01\">\n  <div id=\"caption\"></div>\n</div>\n\n\n\n</body>\n</html>','Testing Popup','','private','closed','closed','','testing-popup','','','2018-11-06 13:43:33','2018-11-06 13:43:33','',0,'http://www.bistrowinelist.com/?page_id=2200',0,'page','',0),(2213,1,'2018-11-06 16:26:04','2018-11-06 16:26:04','echo \"<a href=\'#\' data-featherlight=\'.$foodWines[$x][17].\'\"><img src=\'.foodWines[$x][16].\"\' alt=\'WineImage\'></a>\n\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 src=\'.foodWines[$x][16].\"\' alt=\'WineImage\'></a>Click Image for Front / Back View</div></td>\";\n\n','Testing Popup 2','','private','closed','closed','','testing-popup-2','','','2018-11-06 16:26:04','2018-11-06 16:26:04','',0,'http://www.bistrowinelist.com/?page_id=2213',0,'page','',0),(2331,1,'2018-12-13 14:25:08','2018-12-13 14:25:08','<div class=\"ibe\" data-region=\"emea\" data-channelcode=\"bze1459\" data-widget=\"embed\"></div>\n<script src=\"https://widget.siteminder.com/ibe.min.js\"><br />\n</script>','Booking Engine','','private','closed','closed','','booking-engine','','','2018-12-13 14:25:08','2018-12-13 14:25:08','',0,'http://www.bistrowinelist.com/?page_id=2331',0,'page','',0),(3220,1,'2020-02-02 16:31:38','2020-02-02 16:31:38','[xyz-ips snippet=\"ContDispFeb2020-test\"]','ContDispFeb2020Test','','private','closed','closed','','conttest','','','2020-02-02 16:31:38','2020-02-02 16:31:38','',0,'http://www.bistrowinelist.com/?page_id=3220',0,'page','',0),(1684,1,'2018-09-26 19:27:18','2018-09-26 19:27:18','<!-- says not to use cached stuff, if there is any -->\n\n[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>\n\n[/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>\n\n[/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}<br />\ndiv.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>\n\n[/wonderplugin_cond]\n\n[xyz-ips snippet=\"byGlassPHP\"]','byGlass','','publish','closed','closed','','byglass-old','','','2018-09-26 19:27:18','2018-09-26 19:27:18','',0,'http://www.bistrowinelist.com/?page_id=1684',0,'page','',0),(1692,1,'2018-09-27 19:13:14','2018-09-27 19:13:14','[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','','publish','closed','closed','','newfront','','','2018-09-27 19:13:14','2018-09-27 19:13:14','',0,'http://www.bistrowinelist.com/?page_id=1692',0,'page','',0),(1716,1,'2018-09-28 14:26:14','2018-09-28 14:26:14','\n[xyz-ips snippet=\"SelectDistinctFoods\"]\n\n\n\n\n\n','Food Pairing','','publish','closed','closed','','foods','','','2018-09-28 14:26:14','2018-09-28 14:26:14','',0,'http://www.bistrowinelist.com/?page_id=1716',0,'page','',0),(1769,1,'2018-09-29 20:27:00','2018-09-29 20:27:00','[xyz-ips snippet=\"Guest-List\"]','Guest List','','publish','closed','closed','','guestlist','','','2018-09-29 20:27:00','2018-09-29 20:27:00','',0,'http://www.bistrowinelist.com/?page_id=1769',0,'page','',0),(1829,1,'2018-10-01 18:55:17','2018-10-01 18:55:17','<!-- tells browser not to cache -->\n<!-- says that the cache expires \'now\' -->\n<!-- says not to use cached stuff, if there is any -->\n\n<script><br />\nvar index = 0;<br />\nfunction changeImage(BottleID, Image1, Image2) {<br />\n  var imageList = [Image1, Image2];<br />\n  index = index + 1;<br />\n  if (index == imageList.length) {<br />\n     index = 0;<br />\n  }<br />\n  var imagex = document.getElementById(BottleID);<br />\n  imagex.src = imageList[index];<br />\n}<br />\nfunction moveWindow{<br />\nalert(\"testing\");<br />\nif (location.hash) {<br />\n    var target = location.hash;<br />\n    window.scrollTop = document.querySelector(target).offsetTop;<br />\n}<br />\n}<br />\n</script>\n\n<style>\n.site-content .wrap {<br />\n    margin-top: 0px!important;<br />\n    padding-top: 6em!important;<br />\n}<br />\n</style>[xyz-ips snippet=\"ContinuousDisplayPHP-8\"]\n\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>','Maya Beach Hotel Wine List','','publish','closed','closed','','single-item','','','2018-10-01 18:55:17','2018-10-01 18:55:17','',0,'http://www.bistrowinelist.com/?page_id=1829',0,'page','',0),(1924,1,'2018-10-09 14:54:17','2018-10-09 14:54:17','<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','','publish','closed','closed','','byglass','','','2018-10-09 14:54:17','2018-10-09 14:54:17','',0,'http://www.bistrowinelist.com/?page_id=1924',0,'page','',0),(1954,1,'2018-10-17 22:21:17','2018-10-17 22:21:17','<p>Apples, Bananas, and Oranges.</p>\n<button type=\"button\" onClick=\'findString(\"Apples\")\'>Search for Apples</button>\n<button type=\"button\" onClick=\'findString(\"Banana\")\'>Search for Banana</button>\n<button type=\"button\" onClick=\'findString(\"Borange\")\'>Search for Borange</button>','SearchPage','','publish','closed','closed','','searchpage','','','2018-10-17 22:21:17','2018-10-17 22:21:17','',0,'http://www.bistrowinelist.com/?page_id=1954',0,'page','',0),(1959,1,'2018-10-17 23:00:36','2018-10-17 23:00:36','<html>\n<body>\n\nWelcome <?php echo $_POST[\"name\"]; ?><br>\nYour email address is: <?php echo $_POST[\"email\"]; ?>\n\n</body>\n</html>','welcome.php','','publish','closed','closed','','welcome-php','','','2018-10-17 23:00:36','2018-10-17 23:00:36','',0,'http://www.bistrowinelist.com/?page_id=1959',0,'page','',0),(2056,1,'2018-10-26 22:03:36','2018-10-26 22:03:36','<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\"]\n\n<style>\n<p>.site-content .wrap {<br />\n    margin-top: -60px!important;<br />\n}</p>\n<p>  div.container {</p>\n<p>  }<br />\n  table#table1 {<br />\n    text-align:center;<br />\n    margin-left:auto;<br />\n    margin-right:auto;<br />\n    width: 50%;<br />\n  }<br />\n  tr,td {text-align:left;}</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: -100px!important;<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</style>[/wonderplugin_cond]\n\n[xyz-ips snippet=\"byGlassPHP-expanded2\"]','byGlass-Expanded2','','publish','closed','closed','','byglass-expanded2','','','2018-10-26 22:03:36','2018-10-26 22:03:36','',0,'http://www.bistrowinelist.com/?page_id=2056',0,'page','',0),(2979,1,'2018-12-15 20:34:26','2018-12-15 20:34:26','[xyz-ips snippet=\"ContinuousDisplayPHP-8\"]','ContinuousDisplay2','','publish','closed','closed','','single-item-2','','','2018-12-15 20:34:26','2018-12-15 20:34:26','',0,'http://www.bistrowinelist.com/?page_id=2979',0,'page','',0),(3029,1,'2019-12-03 19:12:15','2019-12-03 19:12:15','[xyz-ips snippet=\"Beer\"]','Beer-1','','publish','closed','closed','','beer1','','','2019-12-03 19:12:15','2019-12-03 19:12:15','',0,'http://www.bistrowinelist.com/?page_id=3029',0,'page','',0),(3032,1,'2019-12-06 15:27:20','2019-12-06 15:27:20','<!-- wp:paragraph -->\n<p>[xyz-ips snippet=\"byBeer\"]</p>\n<!-- /wp:paragraph -->','byBeer','','publish','closed','closed','','bybeer','','','2019-12-06 15:27:20','2019-12-06 15:27:20','',0,'http://www.bistrowinelist.com/?page_id=3032',0,'page','',0),(3062,1,'2019-12-06 18:26:46','2019-12-06 18:26:46','<!-- tells browser not to cache -->\n<!-- says that the cache expires \'now\' -->\n<!-- says not to use cached stuff, if there is any -->\n\n<script><br />\nvar index = 0;<br />\nfunction changeImage(BottleID, Image1, Image2) {<br />\n  var imageList = [Image1, Image2];<br />\n  index = index + 1;<br />\n  if (index == imageList.length) {<br />\n     index = 0;<br />\n  }<br />\n  var imagex = document.getElementById(BottleID);<br />\n  imagex.src = imageList[index];<br />\n}<br />\nfunction moveWindow{<br />\nalert(\"testing\");<br />\nif (location.hash) {<br />\n    var target = location.hash;<br />\n    window.scrollTop = document.querySelector(target).offsetTop;<br />\n}<br />\n}<br />\n</script>\n\n<style>\n.site-content .wrap {<br />\n    margin-top: 0px !important;<br />\n    padding-top: 6em !important;<br />\n}<br />\n</style>[xyz-ips snippet=\"Beer\"]\n\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>','Beer','','publish','closed','closed','','beer','','','2019-12-06 18:26:46','2019-12-06 18:26:46','',0,'http://www.bistrowinelist.com/?page_id=3062',0,'page','',0),(3160,1,'2020-01-20 13:36:07','2020-01-20 13:36:07','[xyz-ips snippet=\"byPerson\"]\n\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>','byPerson','','publish','closed','closed','','byperson','','','2020-01-20 13:36:07','2020-01-20 13:36:07','',0,'http://www.bistrowinelist.com/?page_id=3160',0,'page','',0),(3196,1,'2020-02-01 14:48:50','2020-02-01 14:48:50','[xyz-ips snippet=\"byProfileFeb2020\"]','byProfileTest','','publish','closed','closed','','byprofiletest','','','2020-02-01 14:48:50','2020-02-01 14:48:50','',0,'http://www.bistrowinelist.com/?page_id=3196',0,'page','',0),(3270,1,'2020-07-23 00:41:50','2020-07-23 00:41:50','[xyz-ips snippet=\"byGlassPHP-Hotel\"]','byGlass-Hotel','','publish','closed','closed','','byglass-hotel','','','2020-07-23 00:41:50','2020-07-23 00:41:50','',0,'http://www.bistrowinelist.com/?page_id=3270',0,'page','',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 17:53:55','2020-10-22 17:53:55','',0,'https://www.bistrowinelist.com/?page_id=3294',0,'page','',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-10-22 21:19:39','2020-10-22 21:19:39','',0,'https://www.bistrowinelist.com/?page_id=3310',0,'page','',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 22:16:41','2020-12-28 22:16:41','',0,'https://www.bistrowinelist.com/?page_id=3400',0,'page','',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:33','2021-05-10 23:02:33','',0,'https://www.bistrowinelist.com/?page_id=3445',0,'page','',0),(3524,1,'2018-09-16 13:22:32','2018-09-16 13:22:32','Welcome to WordPress. This is your first post. Edit or delete it, then start writing!','Hello world!','','publish','open','open','','hello-world-2','','','2018-09-16 13:22:32','2018-09-16 13:22:32','',0,'http://www.bistrowinelist.com/?p=1',0,'post','',1),(1472,2,'2018-08-19 13:56:30','2018-08-19 13:56:30','Welcome to WordPress. This is your first post. Edit or delete it, then start writing!','Hello world!','','publish','open','open','','hello-world-2-2','','','2018-08-19 13:56:30','2018-08-19 13:56:30','',0,'http://192.168.104.254/wordpress/?p=1',0,'post','',1),(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-10 23:07:53','2021-05-10 23:07:53','',0,'https://www.bistrowinelist.com/?page_id=3449',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:07','2021-06-08 22:13:07','',0,'https://www.bistrowinelist.com/?page_id=3526',0,'page','',0),(3527,1,'2021-11-18 16:38:30','2021-11-18 16:38:30',' ','','','publish','closed','closed','','3527','','','2021-11-18 16:38:30','2021-11-18 16:38:30','',0,'https://www.mgv.dke.mybluehost.me/bistrowinelist/2021/11/18/3527/',2,'nav_menu_item','',0),(3528,1,'2021-11-18 16:38:30','2021-11-18 16:38:30',' ','','','publish','closed','closed','','3528','','','2021-11-18 16:38:30','2021-11-18 16:38:30','',0,'https://www.mgv.dke.mybluehost.me/bistrowinelist/2021/11/18/3528/',3,'nav_menu_item','',0),(3529,1,'2021-11-18 16:38:30','2021-11-18 16:38:30',' ','','','publish','closed','closed','','3529','','','2021-11-18 16:38:30','2021-11-18 16:38:30','',0,'https://www.mgv.dke.mybluehost.me/bistrowinelist/2021/11/18/3529/',4,'nav_menu_item','',0),(3530,1,'2021-11-18 16:38:30','2021-11-18 16:38:30','','BY GLASS','','publish','closed','closed','','by-glass','','','2021-11-18 16:38:30','2021-11-18 16:38:30','',0,'https://www.mgv.dke.mybluehost.me/bistrowinelist/2021/11/18/by-glass/',5,'nav_menu_item','',0),(3531,1,'2021-11-18 16:38:30','2021-11-18 16:38:30','','Beer','','publish','closed','closed','','beer','','','2021-11-18 16:38:30','2021-11-18 16:38:30','',0,'https://www.mgv.dke.mybluehost.me/bistrowinelist/2021/11/18/beer/',6,'nav_menu_item','',0);

--
-- Table structure for table `wp_term_relationships`
--

CREATE TABLE `wp_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_term_relationships`
--

INSERT INTO `wp_term_relationships` VALUES (1,1,0),(1580,4,0),(3524,1,0),(1472,1,0),(3527,4,0),(3528,4,0),(3529,4,0),(3530,4,0),(3531,4,0);

--
-- Table structure for table `wp_term_taxonomy`
--

CREATE TABLE `wp_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=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_term_taxonomy`
--

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

--
-- Table structure for table `wp_termmeta`
--

CREATE TABLE `wp_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_termmeta`
--


--
-- Table structure for table `wp_terms`
--

CREATE TABLE `wp_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=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_terms`
--

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

--
-- Table structure for table `wp_usermeta`
--

CREATE TABLE `wp_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=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

--
-- Dumping data for table `wp_usermeta`
--

INSERT INTO `wp_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_capabilities','a:1:{s:13:\"administrator\";b:1;}'),(13,1,'wp_user_level','10'),(14,1,'dismissed_wp_pointers',''),(15,1,'show_welcome_panel','1'),(16,1,'session_tokens','a:2:{s:64:\"4ded05768bbe198b932747fa8e8244f2068f7a4ddb4cc405eedac5b1a0c423ad\";a:4:{s:10:\"expiration\";i:1637423599;s:2:\"ip\";s:13:\"190.197.4.115\";s:2:\"ua\";s:114:\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36\";s:5:\"login\";i:1637250799;}s:64:\"36bca2791b485037bc9e95e48ff7c08329ce37852861a81b903e5754dea8bb7b\";a:4:{s:10:\"expiration\";i:1637423911;s:2:\"ip\";s:14:\"200.123.215.23\";s:2:\"ua\";s:114:\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36\";s:5:\"login\";i:1637251111;}}'),(17,1,'wp_user-settings','libraryContent=browse&urlbutton=custom&imgsize=medium&editor=tinymce&siteorigin_panels_setting_tab=general&advImgDetails=show&align=center&mfold=o&uploader=1'),(18,1,'wp_user-settings-time','1637250795'),(19,1,'wp_dashboard_quick_press_last_post_id','4'),(20,1,'community-events-location','a:1:{s:2:\"ip\";s:11:\"190.197.4.0\";}'),(21,2,'nickname','john@mayabeachhotel.com'),(22,2,'first_name',''),(23,2,'last_name',''),(24,2,'description',''),(25,2,'rich_editing','true'),(26,2,'syntax_highlighting','true'),(27,2,'comment_shortcuts','false'),(28,2,'admin_color','fresh'),(29,2,'use_ssl','0'),(30,2,'show_admin_bar_front','true'),(31,2,'locale',''),(32,2,'wp_capabilities','a:1:{s:10:\"subscriber\";b:1;}'),(33,2,'wp_user_level','0'),(34,2,'dismissed_wp_pointers','');

--
-- Table structure for table `wp_users`
--

CREATE TABLE `wp_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_users`
--

INSERT INTO `wp_users` VALUES (1,'elarsonlee@gmail.com','$P$BIePRWDU/ant/mVY4bWLJV.OzMC1.Q.','elarsonleegmail-com','john@mayabeachhotel.com','https://www.mgv.dke.mybluehost.me/bistrowinelist','2021-11-18 15:53:03','',0,'elarsonlee@gmail.com'),(2,'john@mayabeachhotel.com','$P$BmCP4NAIZvwWhYZKeYF2nBB7K5hbmD/','johnmayabeachhotel-com','john@mayabeachhotel.com','','2021-11-18 16:38:30','',0,'john@mayabeachhotel.com');


