<?
	require("config.inc");
	$AdminID = $_SESSION['AdminID'];
	$type1 = "NORMAL";
?>
<html>
	<head>
		<title>Android System</title>
	</head>
	
	<body>
	<center>
		<a href="http://www.tnchemie.com.my"><img src="pic/projectTitle.JPG" border="0px"></a>
		</center>
	<table width="100%" height="5px" bgcolor="#66FF66">
	<tr><td align="left">Welcome, <a href="editAdmin.php?adminID=<?echo "$AdminID"; ?>"><?echo "$AdminID"; ?></a>, <a href="logout.php">Logout</a></td></tr>
	</table><br/>
	
		<center>
		<h1><u>View Product</u></h1>
			<?
			$result = mysql_query("Select * from tbl_product");
						$i = 1;
						
										
						echo "<table border='1'><tr><td>Product ID</td>";
						echo "<td>Product Type</td>";
						echo "<td>Product Name</td>";
						echo "<td>Product description</td>";
						echo "<td>Product Price</td></tr>";
						while ($row=mysql_fetch_array($result))
						{
							echo "<tr><td><a href='editS.php?ProID=".$row['product_ID']."'>".$row['product_ID']."</a></td>";
							echo "<td>".$row['product_TYPE']."</td>";
							echo "<td>".$row['product_NAME']."</td>";
							echo "<td>".$row['product_desc']."</td>";
							echo "<td>RM".$row['product_PRICE']."</td></tr>";
						}
						echo "</table>";
						
			?>
			<h5><a href="addProduct.php?type=<?echo "$type1"; ?>">Insert a new product</a></h5>
			<h4><a href="intro.php">BACK</a></h4>
		</center>
	</body>
</html>