<?php

echo heading($heading,3,'align="center"') ; 


/**
*
*	here $result_array is an array, not an array of objects
*	because we used $query->result_array() instead of $query->result() 
*
*/

if( count($result_array)>0 ): 

?>

<table width="600" align="center" cellpadding="6" cellspacing="2">

<tr class="tdcolor">
<td width="2%" align="center">No.</td>
<td width="48%" align="center">Location</td>


<td width="10%" align="center">Modify</td>
<td width="10%" align="center">Delete</td>
</tr>

<?php 

$i=1;

foreach($result_array as $row):

?>

<tr class="tdcolor2">
<td align="center"><?=$i?></td>
<td align="center"><?=$row['location']?></td>



<td align="center">
<a href="<?php echo site_url('location_admin/edit/'.$row['lid']) ; ?>">
<img src="<?php echo base_url('assets/web_images/edit.png'); ?>" width="20" height="20" />
</a>
</td>

<td align="center">
<a href="<?php echo site_url('location_admin/delete/'.$row['lid'].'/1/') ; ?>" onClick="return confirm('Delete content ?')">
<img src="<?php echo base_url('assets/web_images/delete.gif'); ?>" width="20" height="20" />
</a> 
</td>
</tr>

<?php $i++; endforeach ; ?>


</table>

<?php endif; ?>