<table width="80%" border="1" cellspacing="0" cellpadding="0">
   <tr class="row1">
   <td width="6%" class="tabledata1">SNo.</td>
   <td width="15%" class="tabledata1">Zone Title</td>
   <td width="10%" class="tabledata1">Branch</td> 
   <td width="28%" class="tabledata1">Company Name</td> 
   <td width="16%" class="tabledata1">Sub Zone</td> 
   <td width="9%" class="tabledata1">Status</td>
   <td width="6%" class="tabledata1">Edit</td>
   <td width="10%" class="tabledata1">Delete</td>
  
   </tr>
   <?php 
      // LIMIT $startpoint,$perpage
  $GetRecord = "Select * from $table order by id  ";
   $ResultData = DB_query($GetRecord,$db);
   $i=1;
   if(DB_num_rows($ResultData)==0)
   echo "<td>--No Record--</td>";
   
   while($RowData = DB_fetch_array($ResultData))
   {?>
 <tr class="row1"> <td ><div align="center"><?php echo $i; ?></div></td>
 <td><?php echo $s->getField('zone_master','id',$RowData['zone'],'ZoneTitle');  ?>	  </td>
<td><?php   echo   $Sitename= $s->getField('locations','loccode',$RowData['Site'],'locationname');	  ?></td>
<td >  <?php 	echo   $Companyname= $s->getField('companies','CompanyId',$RowData['CompanyId'],'CompanyName'); ?></td>
<td ><?php echo $RowData['subzone']; ?> </td>	
<td ><?php echo ($RowData['status']=='Y'?'Active':'Inactive'); ?> </td>	

   <td ><div align="center"><a href="<?php echo $targetpage?>&action=Edit&amp;id=<?php echo $RowData['id']; ?>"><img src="images/icon-edit.png"  width="10" height="10"/></a></div></td>
   <td><div align="center"><a href="<?php echo $targetpage?>&action=Delete&amp;id=<?php echo $RowData['id']; ?>">Delete</a></div>  </td>
	 </tr>
 
	<?php $i++;}   
   ?> 
	
   </table>

  