<!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']."</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'; ?>





<center>
<p><i>Prices are in US Dollars unless otherwise specified and may vary depending on the season.<br> The itinerary indicates which overnight stays are at pre-determined hotels.</i></p>

<table><th>Rating</th>
<th>Season</th>
<th>Triple</th><th>Double</th>
<th>Single</th><th>Child</th>
<?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 prices WHERE prices.package_id='$package_id'
GROUP BY prices.price_id
ORDER BY doublecost DESC");

$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 "
<tr height=\"50px\" ><td align=\"center\" width=\"80px\">
<img width=\"90px\" height=\"20px\" src=\"img/".$row['rating']."star.png\"></td>
<td  width=\"120px\" align=\"center\">".$row['season']." </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></center>

<br><br>
<h3><u>Hotels</u>  </h3>
For your desired star rating, select one hotel from each city from the list below.  <br><i><font size="1">Some overnight stays are at predetermined hotels within the list below; see the itinerary for more details.</font></i></p>
<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 *
FROM hotel h, hotelpackagelink hp
WHERE hp.hotel_id = h.hotel_id
AND hp.package_id =$package_id order by hotel_rating,hotel_city");


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

if($num == "0") {

echo "Contact a Moreno representative for a hotel listing.<br><br>";

}

else {


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


$rating = $row['hotel_rating'];
$city = $row['hotel_city'];
if ($rating != $last_rating){
	$last_city = "";
	echo "<br><img src=\"img/".$rating."star.png\"><br>";
	}
if($city != $last_city) {
	echo "<b>".$row['hotel_city']."</b>";
}
echo "<ul><a href=\"hotel.php?hotel_id=".$row['hotel_id']."\" target=\"_blank\">".$row['hotel_name']." </a></ul>";

$last_rating = $rating;
$last_city = $city;
}}

?>


<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 * 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 $row['price_notes'];

}
?>

<br><br>

</div>

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



</body>

</html>