<html>
<head>
<title>Add Stock</title>
</head>
<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>
</center>
<center><h1><u>Admin In Stock</u></h1>




<?php


$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
mysql_selectDB("wauhaha_karaoke",$login);
$time_offset ="240"; 
$time_a = ($time_offset * 120);
$time = date("d/m/Y");
$PoNum = $_GET['PoNum'];

$result = mysql_query("Select * from porder where PoNum='$PoNum' ");

$row=mysql_fetch_array($result);
$SupName = $row['SupName'];
$PoID = $row['PoID'];
$ProName = $row['ProName'];
$q=$row['ProQuan'];
$p=$row['price'];
$d=$row['Date'];
$result1 = mysql_query("Select * from supplier where SupName='$SupName' ");
$row1=mysql_fetch_array($result1);


echo "
<a href='http://www.wauhaha.com/karaoke/instock1.php?PoID=$PoID'>Back</a></center>
<form method=post action=instock2.php?PoID=$PoID>
<table align=center style='font-size:14pt;font-family:verdana'>
<tr>
	<td align=right>PO ID:</td>
	<td>&nbsp; $PoID</td>
</tr>
<tr>
	<td align=right>Supplier Name:</td>
	<td>&nbsp; ".$row['SupName']."</td>
</tr>
<tr>
	<td align=right>Supplier Contact:</td>
	<td>&nbsp; ".$row1['SupContact']."</td>
</tr>
<tr>
	<td align=right>Date:</td>
	<td>&nbsp; $time</td>
</tr>
</table>


<table border=1 align=center style ='font-family:Arial, Helvetica, sans-serif;font-size:1em' color='blue' bordercolorlight='tan' cellspacing=0 cellpadding=4>
	<tr>
		<th width=100 align=center bgcolor=lightblue>Product Name</th>
		<th width=100 align=center bgcolor=lightblue>Quantity</th>
		<th width=100 align=center bgcolor=lightblue>Unit Price</th>
		<th width=100 align=center bgcolor=lightblue>Date</th>
		<th width=100 align=center bgcolor=lightblue>Add</th>
	</tr>
	<tr>
		<td align=center>$ProName</td>
		<td align=center><input type=text name=q value=".$q." size=5></td>
		<td align=center><input type=text name=q value=".$q." size=5></td>
		<td align=center>$d</td>
		<td align=center	><input type=submit value=Add></td>
	</tr>
	
	
	
	
	
	
	
	
	";
	
	
	
	
	
	