<?php
$PageSecurity = 15;
//include('../includes/SQL_CommonFunctions.inc');
?>
<h2 align="center"><strong>Leave Applications</strong></h2>
<a href="<?php echo $target;?>">ADD NEW</a>
<br>
<br>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <th>Branch</th>
    <th>Employee</th>
    <th>Leave Days </th>
    <th>Date Of Application </th>
    <th>View</th>
    <th>Edit</th>
    <th>Delete</th>
    </tr>
	<?php 
	$sql=DB_query("Select * from leave_application",$db);
	$i=0;
	while($myrow=DB_fetch_array($sql))
	{
	?>
  <tr bgcolor="#FFFFFF">
    <td><?php 
	$sitename=$s->getField('locations','loccode',$myrow['site'],'locationname');
	echo $sitename;?></td>
    <td><?php 
	$employeename=$s->getField('empmaster','id',$myrow['employeeCode'],'emp_name');
	echo $employeename;?></td>
    <td><?php echo $myrow['totalDays'];?></td>
    <td><?php echo ConvertSQLDate($myrow['applicationDate']);?></td>
    <td><a href="">View</a></td>
    <td><a href="">Edit</a></td>
    <td><a href="">Delete</a></td>
  </tr>
  <?php } ?>
</table>
