<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">

<head>
<title>Moreno Travel</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="content-type"
        content="text/html; charset=utf-8" />



<?php include 'analytics.php'; ?>
</head>

<?php include 'header.php'; ?>


<?php

$package_id=$_GET['package_id']; 

require_once('connectvars.php');

	

$dbh = mysql_connect(hostname, username, password)

	or die("Unable to connect to MySQL");

mysql_select_db (dbname, $dbh);


$query = sprintf("SELECT * FROM packages WHERE package_id='$package_id'");

$result = mysql_query($query);



if (!$result) {

    $message  = 'Invalid query: ' . mysql_error() . "\n";

    $message .= 'Whole query: ' . $query;

    die($message);

}

while ($row = mysql_fetch_assoc($result)) {


echo "<b><font size=\"4px\">".$row['package_name']." - ".$row['duration']." days</b></font>&nbsp;&nbsp;&nbsp;<br> <a href=\"downloadbrochure.php?package_id=".$row['package_id']."\" class=\"top_link\" target=\"_blank\"><span>Download Details</span></a> &nbsp; &nbsp;<a href=\"downloadbrochure2.php?package_id=".$row['package_id']."\" class=\"top_link\" target=\"_blank\"><span>Download Brochure</span></a>";

}
?>


<?php include 'destnavigation.php'; ?>







<br><br>

<?php
$package_id=$_GET['package_id']; 
require_once('connectvars.php');
$dbh = mysql_connect(hostname, username, password)
	or die("Unable to connect to MySQL");
mysql_select_db (dbname, $dbh);

$query = sprintf("SELECT 
prices.price_id, 
prices.package_id, 
prices.season, 
prices.triplecost, 
prices.doublecost, 
prices.singlecost, 
prices.minorcost, 
hotelpricelink.price_id, 
hotelpricelink.hotel_id, 
hotel.hotel_id,
prices.rating, 
hotel.hotel_city,
GROUP_CONCAT(hotel.hotel_name SEPARATOR '<BR>') AS hotels
FROM prices
INNER JOIN hotelpricelink ON hotelpricelink.price_id = prices.price_id
INNER JOIN hotel ON hotel.hotel_id = hotelpricelink.hotel_id
WHERE prices.package_id='$package_id'
GROUP BY prices.price_id
ORDER BY doublecost DESC, hotel_city ASC, hotel_name ASC");

$result = mysql_query($query);
$num = mysql_num_rows($result);

if($num == "0") {

echo "<br><br><b>Contact a Moreno Representative for pricing.</b><br><br><br>";
}

else {
while ($row = mysql_fetch_assoc($result)) {


echo "
<table><th>Hotel Options</th>
<th>Triple</th><th>Double</th>
<th>Single</th><th>Child</th><tr height=\"50px\" >
<td  width=\"460px\" align=\"left\"><font size=\"1px\"><table><tr><td width=\"100px\">".$row['hotel_city']."</td><td> <a href=\"hotel.php?hotel_id=".$row['hotel_id']."\" target=\"_blank\">".$row['hotels']." 
 </a><img width=\"90px\" height=\"20px\" src=\"img/".$row['rating']."star.png\"></td></tr></table></td>

</td>
<td  width=\"60px\" align=\"center\">".$row['triplecost']." </td>
<td  width=\"60px\" align=\"center\">".$row['doublecost']." </td>
<td  width=\"60px\" align=\"center\">".$row['singlecost']."</td>
<td  width=\"60px\" align=\"center\">".$row['minorcost']." </td></tr>";

}}
?>

</table>

<p><i>Prices are per person in US dollars. The itinerary indicates which overnight stays are at pre-determined hotels.</i></p>
<br><br>



</div>

<?php include 'footer.php'; ?>
</div>



</body>

</html>