<html>

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

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

<?php


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

$result = mysql_query("SELECT * FROM supplier 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/addstock.php?SupID=$SupID /><img src=add.jpg width=30 height=30></a></td>";
  echo "<td border=1><a href=http://www.wauhaha.com/karaoke/editsup.php?SupID=$SupID /><img src=edit.jpg width=30 height=30></a></td>";
  echo "<td border=1><a href=http://www.wauhaha.com/karaoke/deletesup.php?SupID=$SupID /><img src=delete.png width=30 height=30></a></td>";
  
  
  echo "</tr>";
 
  }
  echo "</table>";

mysql_close($login);
?>
