<?php
if($_REQUEST['action']=='delete' and $_REQUEST['Id']!='')
{
$del=DB_query("delete from machine_center where id='".$_REQUEST['Id']."' ",$db);	
}

?>

<h2 align="center">Machine Center List</h2>
<a href="index.php?route=Machine_center&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>">Add Machine Center</a>
<br><br>
<table width="100%" border="0" cellpadding="2" cellspacing="2">
<tr>
<th>Code</th>
<th>Model No.</th>
<th>Under Group</th>
<th>SR_No </th>
<th>Chesis No</th>
<th>View</th>
<th>Edit</th>
<th>Delete</th>
</tr>
<?php
$sql=DB_query("Select * from machine_center",$db);	
$i=0;
$num=DB_num_rows($sql);
if($num>0)
{
while($myrow=DB_fetch_array($sql))
{
?>
<tr bgcolor="#FFFFFF">
<td><?php  echo $myrow['code']  ?></td>
<td><?php echo $myrow['model_no'];?></td>
<td><?php echo $myrow['under_group'];?></td>
<td><?php echo $myrow['sr_no'];?></td>
<td><?php echo $myrow['chesis_no'];?></td>
<td><div align="center"><a href="index.php?route=view_machinecente&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>&action=view&Id=<?php echo $myrow['id'];?>">View</a></div></td>
<td><div align="center"><a href="">Edit</a></div></td>
<td><div align="center"><a href="index.php?route=view_machine_center&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>&action=delete&Id=<?php echo $myrow['id'];?>">Delete</a></div></td>
</tr>
<?php $i++;}}
else { ?>
	<tr bgcolor="#FFFFFF">
<td colspan="9">No Records Find</td>
</tr>
<?php }   ?>
	
</table>
