<?php
include("../session.php");
include("../connect.php");

$id=$_GET['id'];
$user=$_SESSION['company'];
?>
<html>
<head>
<link href="header.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<?php

$query=mysql_query("SELECT * from product where id='$id'");
		
$display=mysql_fetch_array($query);

$id=$display['id'];
$name=$display['pName'];
$type=$display['type'];
$companyID=$display['companyID'];
$price=$display['price'];
$productPic=$display['productPic'];
$detail=$display['detail'];
$dateInsert=$display['dateInsert'];
$dateRemove=$display['dateRemove'];
$status=$display['status'];
$checkpic = $id.".";

echo "<b>".$id."</b>";

?>
<br/>
<table width=500 border=1 cellpadding=5 cellspacing=3 align=center>
	<tr>
		<td colspan=2 align=center><address>The product of your viewing is <b><?php echo $name?></b>.</address></td>
		</tr>
	<tr>
		<td colspan=2 align=center>
		<?php
			if ($productPic == $checkpic){
			echo "<img src='album/NoImage.jpg' width=180 height=180/>";
			}
			else{
				echo "<img src='album/".$productPic."' width=180 height=180/>";
			}
		?>
		</td>
		</tr>
	<tr>
		<td>Detail :</td>
		<td><?php echo $detail; ?></td>
		</tr>
	<tr>
		<td>Insert Date :</td>
		<td><?php echo $dateInsert; ?></td>
		</tr>
	<tr>
		<td colspan=2 style="height:350">Review :<br/>
		<iframe align='center' height='100%' frameborder=0 width='100%' src='<?php echo "reviewProduct.php?user=$user&id=$id";?>' scrolling='yes'></iframe>
		</td>
		</tr>
	</table>
	<center>
	
	</center>

</body>
</html>
<?php
include("../closeconnection.php");
?>