<table width="100%" border="0" cellspacing="2" cellpadding="2">
   <tr class="row1">
   <td class="tabledata">SNo.</td>
   <td class="tabledata">Zone Title</td>
   <td class="tabledata">Branch</td> 
   <td class="tabledata">Company Name</td> 
   <td class="tabledata">Status</td>
   <td class="tabledata">Edit</td>
   <td class="tabledata">Delete</td>
  
   </tr>
   <?php 
      // LIMIT $startpoint,$perpage
  $GetRecord = "Select * from $table where CompanyId='".$_SESSION['ACGCompanyId']."'  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 $RowData['ZoneTitle']; ?>	  </td>
	  <td ><?php 
	   if($RowData['Site']=='0'){ echo "All";}else{
	  echo   $Sitename= $s->getField('locations','loccode',$RowData['Site'],'locationname');	 
	  }
 	   ?></td>
   <td >
   	
  <?php 	echo   $Companyname= $s->getField('companies','CompanyId',$RowData['CompanyId'],'CompanyName'); ?>
   	
   </td>
   	<td ><div align="center"><?php echo ($RowData['status']=='Y'?'Active':'Inactive'); ?></div> </td>	

   <td ><div align="center"><a href="<?php echo $targetpage?>&amp;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?>&amp;action=Delete&amp;id=<?php echo $RowData['id']; ?>">Delete</a></div>  </td>
	 </tr>
 
	<?php $i++;}   
   ?> 
   
     </table>
  
 