<html>
<head>
<title>show picture details</title>
</head>

<body>

<?php

include "../calendar/popuptop.php";

$mediaID = $_GET["mediaID"];

$link = mysql_connect("localhost", "whateversg", "what0820");
mysql_select_db("whatever_com_sg",$link);

$query = "select categoryID, mediaName, mediaDescrip, mediaURL from media_media where mediaID='$mediaID'";

$result = mysql_query($query);

if (mysql_num_rows($result) < 1)
{
	echo "no such picture!";
	exit;
}

$row = mysql_fetch_array($result);

$categoryID = $row[0];
$mediaName = $row[1];
$mediaDescrip = $row[2];
$mediaURL = $row[3];

if ($categoryID == 0)
{
	$categoryName = "Default Category";
}
else
{
	$query = "select categoryName from media_category where categoryID='$categoryID'";
	$result = mysql_query($query);

	$row = mysql_fetch_array($result);

	$categoryName = $row[0];
}
?>

<center>
<table width=80% cellpadding=3 cellspacing=5>

<?php

echo "<tr><td align=center valign=top colspan=2><img src=$mediaURL></td></tr>";
/*
echo "<tr><td align=right valign=top><font face=verdana size=2>Name:</font></td><td><font face=verdana size=2>$mediaName</font></td></tr>";
echo "<tr><td align=right valign=top><font face=verdana size=2>Category:</font></td><td><font face=verdana size=2>$categoryName</font></td></tr>";
echo "<tr><td align=right valign=top><font face=verdana size=2>Description:</font></td><td><font face=verdana size=2>$mediaDescrip</font></td></tr>";
*/
?>

</table>


</center>

</body>

</html>