<html>

<body style="background-color: #ffffff;background-image:url(rail.jpg);background-repeat: repeat-y">
<center>
<?php include('link.php');?>
<h1>Kitchen Supplier</h1>

<a href="kitstock.php" ><img src=back.jpg width=70 height=70></a>
<hr>
</center>
<center>
<table>
		<tr>
			<td ><a href="http://www.wauhaha.com/karaoke/kaddsup.php"><img src=adds.jpg	width=150 height=150 border=0/><br/></a></td>
			
			
		</tr>
</table>
</center>

<?php
echo"<form action='http://www.wauhaha.com/karaoke/searchsup.php' method='post'>
<table border='1' cellspacing='0' cellpadding='5' bordercolorlight='tan' align=center>
<tr>
	<td>Search by:</td>
	<td><select name='searchBy'>
	<option value='SupID'>Supplier ID</option>
	<option value='SupName'>Supplier Name</option>

	</select>
	</td>
	<td rowspan='2'><input type='submit' name='search' value='Search'>&nbsp;&nbsp;&nbsp;&nbsp;
	
	</td>
</tr>
<tr>
	<td>Keywords:</td>
	<td><input type='text' name='keywords'></td>
</tr>
</table>

</form>";

$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
mysql_selectDB("wauhaha_karaoke",$login);

$result = mysql_query("SELECT * FROM ksupplier order by SupID");

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>SupID</th>
						<th>Company Name</th>
						<th>Supplier Address</th>
						<th>Supplier Phone</th>
						<th>Supplier Hand-Phone</th>
						<th>Supplier Fax</th>
						<th>Supplier Hotmail</th>
					
				        <th colspan=3>Funtion</th>
						</tr>";


while($row2 = mysql_fetch_array($result)){
$SupID=$row2['SupID'];
  
  echo"<tr align='center' border=1>";
	
  echo "<td border=1>".$row2['SupID']."</td>";
  echo "<td border=1>".$row2['SupName']."</td>";
  echo "<td border=1>".$row2['SupAdd']."</td>";
  echo "<td border=1>".$row2['SupContact']."</td>";
  echo "<td border=1>".$row2['SupHp']."</td>";
  echo "<td border=1>".$row2['SupFax']."</td>";
  echo "<td border=1>".$row2['SupHot']."</td>";
  
  echo "<td border=1><a href=http://www.wauhaha.com/karaoke/addkstock.php?SupID=$SupID /><img src=add.jpg width=30 height=30></a></td>";
  echo "<td border=1><a href=http://www.wauhaha.com/karaoke/editksup.php?SupID=$SupID /><img src=edit.jpg width=30 height=30></a></td>";
  echo "<td border=1><a href=http://www.wauhaha.com/karaoke/deleteksup.php?SupID=$SupID /><img src=delete.png width=30 height=30></a></td>";
  
  
  echo "</tr>";
 
  }
  echo "</table>";

mysql_close($login);
?>
