<html>
<head>
<title>Add Stock</title>
</head>
<body style="background-color: #ffffff;background-image:url(rail.jpg);background-repeat: repeat-y">
<center>
<?php include('link.php');?>
</center>
<center><h1>Admin Purchase Stock</h1></center>



<?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");


$SupID = $_GET['SupID'];
$result = mysql_query("select * from stock where SupID='$SupID' order by ProID");	
$result1 = mysql_query("select * from supplier where SupID='$SupID'");	
$row=mysql_fetch_array($result1);

echo "<center><a href='http://www.wauhaha.com/karaoke/supplier.php'><img src=back.jpg width=80 height=80></a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href='http://www.wauhaha.com/karaoke/addnewstock.php?SupID=$SupID ' ><img src=addst.jpg width=80 height=80></a>&nbsp;&nbsp;&nbsp;&nbsp;</center><hr color=black>";

echo "<form method=post action='http://www.wauhaha.com/karaoke/addstockaction.php'>
	  <table align=center style='font-size:22pt'><tr><td>Company Name:</td>  <td>".$row['SupName']."</td></tr>
	  <tr><td>Contact Number:</td><td>  ".$row['SupContact']."</td></tr>
	  <tr><td>Date  :</td><td> $time <input type=hidden name=time value=".$time."></td></tr></table>";


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 align=center>Product ID</th>
						<th align=center>Product Name</th>
						
					
						<th colspan=2 align=center>Function</th>
						</tr>";
						
while($row2=mysql_fetch_array($result)){	
$ProID = $row2['ProID'];				
echo "					<tr>
							<td align=center> ".$row2['ProID']."</td>
							<td align=center>".$row2['ProName']."</td>
						
							
							
							<td><a href='editstock.php?ProID=$ProID' ><img src=edit.jpg width=30 height=30></td>
							<td><a href='deletestock.php?ProID=$ProID '><img src=delete.png width=30 height=30></td>
					
							
							
							
							
							
						</tr>



";
}	








?>