<?php
	require_once ('authorize1.php');
?>
<!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>
<script src="sorttable.js"></script>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="content-type"
        content="text/html; charset=utf-8" />



</head>



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

<h1>Manage Packages</h1>

<i><font color="#C11B17" size="0.5px">Click <a href="admin_addpackage.php" target="blank">here</a> to add a new package.</i></font><br><br>

<ul>
<p>Select from the following list of packages to edit:</p>
<center>

<?php


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 ORDER BY package_order ASC");



$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 "
<center><div class=\"figure7\">
<img width=\"160px\" height=\"160px\" src=\"pkgimg/".$row['overviewpic']."\">
<table><tr height=\"40px\"><td>".$row['package_name']."</td></tr><tr><td>  <font size=\"0.5px\">
<br>
<a href=\"admin_editpackage.php?package_id=".$row['package_id']."\" class=\"top_link\"><font color=\"ffffff\">Overview</font></a>
| <a href=\"admin_edititinerary.php?package_id=".$row['package_id']."\" class=\"top_link\">
<font color=\"ffffff\">Itinerary</font></a>| <a href=\"admin_manageprice.php?package_id=".$row['package_id']."\" class=\"top_link\">
<font color=\"ffffff\">Price</a></font></font></td></tr></table></div></center>";

}
?>



</center>
<br><br>




</ul><br><br><br>
</div>


</div>

</body>

</html>