<?php 
$SQLTask=DB_query("SELECT * FROM tsk_taskassignment where assigned_by in($lowerlist)",$db);
?>
<h1>Task Assignment</h1>
<table width="100%" cellpadding="3" cellspacing="0" border="1">
	<tr class="row1">
		 <td class="tabledata">Branch</td>
          <td class="tabledata">Task No.</td>
		  <td class="tabledata">Start Date</td>
          <td class="tabledata">End Date</td>
		  <td class="tabledata">Assigned To</td>
		  <td class="tabledata">Task</td>
		  <td class="tabledata">Status</td>
	</tr>
<?php while($TaskView=DB_fetch_array($SQLTask)) {?>
	<tr class="row1">
		<td><?php  echo $s->GetFieldValue('locations',"loccode='".$TaskView['branch']."'",'locationname'); ?></td>
		<td><?php echo $TaskView['task_no']; ?></td>
		<td><?php echo ConvertSQLDate($TaskView['start_date']); ?></td>
		<td><?php echo ConvertSQLDate($TaskView['end_date']); ?></td>
		<td><?php if($TaskView['assign_to']=='user'){echo $s->getField('www_users','id',$TaskView['user_id'],'realname');;} else{echo $TaskView['assign_to'];} ?></td>
		
		<td><?php echo $TaskView['task_description']; ?></td>
		<td><?php echo $TaskView['status']; ?></td>
	</tr>
<?php }?>
</table>