<html>

<body style="background-color: #ffffff;background-image:url(rail.jpg);background-repeat: repeat-y">
<center>
<table>
	<tr>	
		<td><a href="http://www.wauhaha.com/karaoke/adminaccount.php"><img src=admin.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/adminviewmem.php"><img src=member.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/adminviewstaff.php"><img src=staff.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/dutytime.php"><img src=duty.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/salary.php"><img src=salary.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href=adminhistory.php><img src=leave.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href=adminhistory.php><img src=job.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href=adminhistory.php><img src=advertisement.gif width=140 height=140 border=0/><br/></a></td>
		<td><a href="http://www.wauhaha.com/karaoke/room.php"><img src=room.gif width=140 height=140 border=0/><br/></a></td>
		
	</tr>
</table>
<h2>View Stock</h2>
<a href="stock.php" ><img src=back.jpg width=40 height=40></a>
</center>
<center>
<table>
		<tr>
			<td width=200><a href="http://www.wauhaha.com/karaoke/supplier.php"><img src=supplier.jpg	width=150 height=150 border=0/><br/></a></td>
			
			<td ><a href="http://www.wauhaha.com/karaoke/viewtrans.php"><img src=views.jpg width=140 height=140 border=0/><br/></a></td>
		</tr>
</table>
</center>

<?php
$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
mysql_selectDB("wauhaha_karaoke",$login);
$ProID =$_GET['ProID'];
$result = mysql_query("SELECT * FROM stockuse where ProID='$ProID'");

echo "<form method=post action='http://www.wauhaha.com/karaoke/editstockuseaction.php?ProID=$ProID'>";
echo "<table border=3 align=center style ='font-family:Arial, Helvetica, sans-serif;font-size:1em' color='blue' bordercolorlight='tan' cellspacing=0 cellpadding=4>
 <tr bgcolor=lightblue ><th>Company Name</th>
						<th>Product ID</th>
						<th>Product Name</th>
						
						<th>Quantity Total</th>
						<th>Quantity Used</th>
						<th>Function</th>
						
			
						</tr>";


if($row2 = mysql_fetch_array($result)){
$ProID=$row2['ProID'];
  
  echo"<tr align='center' border=1>";
	
  echo "<td border=1>".$row2['SupName']."</td>";
  echo "<td border=1>".$row2['ProID']."</td>";
  echo "<td border=1>".$row2['ProName']."</td>";
  echo "<td border=1>".$row2['ProQuan']."<input type=hidden name=quan value=".$row2['ProQuan']." ></td>";
  echo "<td border=1><input type=text name=use></td>";
  echo "<td><input type=submit value=OK ></td>";



  
  
  echo "</tr>";
 
  }
  echo "</table>";

mysql_close($login);
?>
