<table width="80%" border="0" cellspacing="2" cellpadding="2">
<tr>
   <th>SNo.</th>
   <th>Transport Name</th>
   <th>Branch</th> 
   <th>Company Name</th> 
   <th>Status</th>
   <th>Edit</th>
   <th>Delete</th>
</tr>
   <?php 
   
      // LIMIT $startpoint,$perpage
   if($_SESSION['dealerid'])
        {
   $GetRecord = "Select * from $table where CompanyId='".$_SESSION['ACGCompanyId']."' and dealerid='".$_SESSION['dealerid']."' order by id";
        }
 else {
     $GetRecord = "Select * from $table where CompanyId='".$_SESSION['ACGCompanyId']."' and dealerid='0' 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 bgcolor="#FFFFFF"> <td width="10%"><div align="center"><?php echo $i; ?></div></td>
	<td width="30%"><?php echo $RowData['TransportName']; ?>	  </td>
	<td width="30%"><?php echo   $Sitename= $s->getField('locations','loccode',$RowData['Site'],'locationname');?></td>
	<td><?php 	echo   $Companyname= $s->getField('companies','CompanyId',$RowData['CompanyId'],'CompanyName'); ?></td>
	<td width="10%"><div align="center"><?php echo ($RowData['status']=='Y'?'Active':'Inactive'); ?> </td>	
	<td width="10%"><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 width="10%"><div align="center"><a href="<?php echo $targetpage?>&amp;action=Del&amp;id=<?php echo $RowData['id']; ?>"><img src="images/Icon_Delete.png"  width="10" height="10"/></a></div></td>
</tr>
 <?php $i++;} ?> 
    <!-- <td colspan="4">
	<?php  
	//$cond="1=1";
	//Pages($table,20,"index.php?route=AccountGroups_Master&action=Edit".$url,$cond,'picklist_id');
	 //echo Pages("jos_users",$perpage,"index.php?option=com_empdictory&dept=$dept&",$condition);?>
	</td> -->
   
  </tr>
 