0) { Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.crazyaboutwine.com/guide/".$companyFile.".php" ); } ?> Wines by $companyName\r\n"; echo "\r\n"; echo "\r\n"; include '../head.php'; ?>
\r\n
Wine Guide > $companyName"; include '../odbc.php'; if($siteURL != "") { if (substr($siteURL, 0, 7) != "http://") $siteURL = "http://".$siteURL; } if (@fopen("images/company/$featID.jpg", "r")) { if($siteURL != "") echo "$companyName
"; else echo "$companyName
"; } else { if($siteURL != "") echo "

$companyName

"; else echo "

$companyName

"; } //echo "
"; //include 'counter.php'; //echo "
\r\n"; echo "
"; if ($Ccity != "NULL" && $Ccity && $Cstate) echo ""; $query3 = mysql_query("SELECT * FROM wine_listings WHERE companyID = $featID AND disabled=0", $odbc); $i = 2; $jsFunction = ""; while($row = mysql_fetch_array($query3, MYSQL_ASSOC)){ $categoryID = $row['category']; $siteURL = $row['siteURL']; $description = stripslashes($row['description']); $image = $row['LI_ID']; $title = stripslashes($row['title']); $status = $row['status']; $vintage = $row['vintage']; $buyLink = $row['buyLink']; if ($row['locationDetail']) $locationDetail = "".$row['locationDetail']."
"; else $locationDetail = ""; $listingURL = $row['listingURL']; if ($listingURL && substr($listingURL, 0, 7) != "http://") $listingURL = "http://".$listingURL; $price = $row['price']; $theDec = explode(".", $price); if (!$theDec[1]) $theDec[1] = "00"; $dispPrice = "$".$theDec[0].".".$theDec[1].""; if (strlen($description) > 184) { $leftovers = substr( $description, 180, strlen($description) ); $description = substr( $description, 0, 180 ); $jsFunction .= " document.getElementById('box".$image."').style.display = 'none';\r\n"; $description = $description." ... more$leftovers"; } $jobID = $row['LI_ID']; $i = $i+1; if ($i%2==0) $bgColor = "tableborder"; else $bgColor = "categoryBG"; $getCategoryName = mysql_query("SELECT categoryName, categoryFile FROM wine_category WHERE categoryID = $categoryID", $odbc) or die (mysql_error()); while($row = mysql_fetch_array($getCategoryName, MYSQL_ASSOC)){ $categoryName = $row['categoryName']; $categoryFile = $row['categoryFile']; } $profileID = 0; $getProfile = mysql_query("SELECT profileID FROM wine_profiles WHERE wineID = $jobID", $odbc) or die (mysql_error()); while($row = mysql_fetch_array($getProfile, MYSQL_ASSOC)){ $profileID = $row['profileID']; } echo "
$Cdescription
$Ccity, $Cstate"; if ($companyPhone) echo "
Phone: $companyPhone"; if ($siteURL) echo "
Website: ".$siteURL.""; $getAppName = mysql_query("SELECT appName FROM appellations WHERE appID = $Mapp LIMIT 1", $odbc) or die (mysql_error()); while ($row = mysql_fetch_array($getAppName, MYSQL_ASSOC)) { $appName = $row['appName']; } echo "
Appellation: $appName"; if ($tastingroom && $tastingroom != ".") { echo "
Tasting Room: $tastingroom"; } if ($showMapLink) echo "
Map to $companyName
"; $getJobs = mysql_query("SELECT job_ID FROM wine_jobs WHERE companyID = $featID LIMIT 1", $odbc) or die (mysql_error()); while ($row = mysql_fetch_array($getJobs, MYSQL_ASSOC)) { echo "

Also view our current job openings

"; } $getEvents = mysql_query("SELECT eventID, title, eventDay, eventMonth FROM wine_events WHERE companyID = $featID", $odbc) or die (mysql_error()); $eventCount = 0; while ($row = mysql_fetch_array($getEvents, MYSQL_ASSOC)) { if ($eventCount == 0) echo "
Show Events"; $eventCount++; echo "
".$row['title']." - ".$row['eventMonth']."/".$row['eventDay'].""; } if ($eventCount > 0) echo "
"; echo "
\r\n\r\n"; echo "
\r\n
\r\n\r\n\r\n\r\n"; echo "
\r\n"; $tempURL = ""; if ($listingURL) $tempURL = ""; $theFile = "images/wines/".$jobID.".jpg"; if (@fopen($theFile, "r")) { $displayImage = $theFile; $picsize = getimagesize($theFile); $source_x = $picsize[0]; $source_y = $picsize[1]; } else { $displayImage = "newlisting.gif"; $source_x = 150; $source_y = 113; } //status and main image if (!$status) echo " "; else if ($status == "New") echo "
$tempURL
"; else if ($status == "Library") echo "
$tempURL
"; else if ($status == "Sold") echo "
$tempURL
"; else echo "
$tempURLmore about $title
"; echo "\r\n\r\n
\r\n$tempURL
\r\n"; echo "
$categoryName
\r\n"; if ($profileID) echo "$title Detailed Profile"; echo "
\r\n"; $numReviews = 0; $totalRating = 0; $getReviews = mysql_query("SELECT rating FROM wine_reviews WHERE approved = 1 AND wineID = $jobID", $odbc) or die (mysql_error()); while ($row = mysql_fetch_array($getReviews, MYSQL_ASSOC)) { $numReviews++; $totalRating = $totalRating + $row['rating']; } if ($numReviews > 0) { ?>
CAW Rating:
50
100
reviews
Rate this wine
"; echo "

$vintage $title
$locationDetail

\r\n"; echo " $description
"; if ($price && $price != "") echo "
"; if ($buyLink) { ?>
$dispPrice  
BUY TODAY!
"; echo "
"; echo "
"; } mysql_close($odbc); if ($i < 3) echo "
"; else echo "
"; include '../footer.inc'; ?>