<html>
<head>
<title>Edit 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>Admin Edit 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");


$ProID = $_GET['ProID'];
$result = mysql_query("select * from stock where ProID='$ProID'");	
$result2 = mysql_query("select * from stock where ProID='$ProID'");	
$row3=mysql_fetch_array($result);
$SupID = $row3['SupID'];
$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><a href='http://www.wauhaha.com/karaoke/addnewstock.php?SupID=$SupID '><img src=addst.jpg width=80 height=80></a></center><hr color=black>";
echo "<form method=post action='http://www.wauhaha.com/karaoke/editstockaction.php?ProID=$ProID '>
	  <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><hr width=40% color=black>";

$row3=mysql_fetch_array($result2);
echo "<table align=center style='font-size:18pt'>
						<tr>
							<td>Product ID:</td>
							<td> $ProID</td>
						</tr>
						<tr>
							<td>Product Name:</td>
							<td><input type=text name=ProName value= ".$row3['ProName']." readonly></td>
						</tr>
						<tr>
							<td>Product Price:</td>
							<td><input type=text name=p value= ".$row3['ProPrice']."></td>
						</tr>
						<tr>
							<td colspan=2 align=center><input type=submit value=Edit style='width:60;height:40'><input type=reset value=Reset style='width:60;height:40'></td>
						
						</tr>";













?>