<?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" />

<style>

tr.order { border-bottom: 1px solid }</style

</head>




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


<h1>Moreno Travel Admin Portal</h1>


<ul>



<p>Manage countries as required:</p>

<table><tr><td width="200px"><b>Country</b></td><td width="100px"><b>Order</b></td><td width="200px"><b>Picture Filename</b></td><td width="300px"><b>Map Filename</b></td></tr></table>

<?php



require_once('connectvars.php');

$dbh = mysql_connect(hostname, username, password)

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

mysql_select_db (dbname, $dbh);

$result = mysql_query("SELECT * FROM location ORDER BY location_name");

$i = 0;

echo "<form name='managelocations' method='post' action='admin_updatelocations.php'>";

while ($locations = mysql_fetch_array($result)) {




echo "<input type='hidden' size='3' name='location_id[$i]' value='{$locations['location_id']}' />";
echo "<input type='text' size='30' name='location_name[$i]' value='{$locations['location_name']}' /> 
<input type='text' size='10' name='location_order[$i]' value='{$locations['location_order']}' />
<input type='text' size='30' name='location_pic[$i]' value='{$locations['location_pic']}' />
<input type='text' size='30' name='location_map[$i]' value='{$locations['location_map']}' /><br>";


	$i++;
//echo "i=" . $i;

}
echo "<br><input type='submit' value='submit' />";
echo "</form>";
mysql_close();
?>




<br><br>




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



</body>

</html>