<!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'; ?>

<div id="content">
<?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 itinerary WHERE package_id='$package_id' ORDER BY day ASC");

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

if($num == "0") {

echo "Contact a Moreno Representative for the itinerary.";

}

else {

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

echo "<h3>Day&nbsp;".$row['day'].":&nbsp;".$row['headline']."</h3><ul>".
$row['details']."
</ul><ul><ul><li><font color=\"15317E\"><b>Breakfast</b></font> is held ".$row['breakfast']."
</li><li><font color=\"15317E\"><b>Lunch</font></b> is held ".$row['lunch']."
</li><li><font color=\"15317E\"><b>Dinner</font></b> is held ".$row['dinner']."
</li><li><font color=\"15317E\"><b>Overnight</font></b>, enjoy a good night's rest at ".$row['overnight']."</li></ul></ul>";

}}
?>


</div></div>

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


</body>

</html>