<div class="row-fluid">
	<div class="span2" style="padding-left:15px;">
		<?php echo $nav_view; ?>
	</div>
	<div class="span8" style="border-right:1px solid #ddd;border-left:1px solid #ddd; min-height:1024px; padding:0 20px;">
	  <div class="span12" id="tasks-container" style="margin-left:0;">
	  	<?php if(!empty($task_list_in_edit)){ ?>
	  	<legend>Ongoing Tasks</legend>
			<table class="table table-striped">
			  <thead>
				<tr>
				  <th>#</th>
				  <th>Task Name</th>
				  <th>Task Type</th>
				  <th>Sent By</th>
				  <th>Start Date</th>
				  <th>End Date</th>
				  <th>Revisions</th>
				</tr>
			  </thead>
			  <tbody>
			  <?php foreach($task_list_in_edit as $key=>$task){ ?>
				<tr class="info">
				  <td><?php echo $key+1; ?></td>
				 <td>
				  <?php if(have_unread_sms('task',$task->t_id)){ ?>
					<a href="<?php echo site_url('welcome/view/'.$task->t_id); ?>#sms"><i class="icon-envelope"></i><?php echo $task->t_title; ?></a> 
				<?php }else{ ?>
					<a href="<?php echo site_url('welcome/view/'.$task->t_id); ?>"><?php echo $task->t_title; ?></a>
					<?php } ?>
				  </td>
				  <td><?php echo $task->t_td_type; ?></td>
				  <td><?php echo get_author_name($task->t_ht_op_code); ?></td>
				  <td><?php echo date('m/d/Y',strtotime($task->t_datetime)); ?></td>
				  <td><?php echo date('m/d/Y',strtotime($task->t_expires)); ?></td>
				  <td><?php echo $task->t_edit_count; ?></td>
				</tr>
			  <?php } ?>
				
			  </tbody>
			</table> 
		<?php } ?>

	  	<?php if(!empty($task_list_in_review)){ ?>	
		<legend>Tasks Submitted for Review</legend>
			<table class="table table-striped">
			  <thead>
				<tr>
				  <th>Task Number</th>
				  <th>Task Name</th>
				  <th>Task Type</th>
				  <th>Sent By</th>
				  <th>Start Date</th>
				  <th>End Date</th>
				</tr>
			  </thead>
			  <tbody>
			  <?php foreach($task_list_in_review as $key=>$task){ ?>
				<tr class="info">
				  <td><?php echo $task->t_id; ?></td>
				  <td>
				  <?php if(have_unread_sms('task',$task->t_id)){ ?>
					<a href="<?php echo site_url('welcome/view/'.$task->t_id); ?>#sms"><i class="icon-envelope"></i><?php echo $task->t_title; ?></a> 
				<?php }else{ ?>
					<a href="<?php echo site_url('welcome/view/'.$task->t_id); ?>"><?php echo $task->t_title; ?></a>
					<?php } ?>
				  </td>
				  <td><?php echo $task->t_td_type; ?></td>
				  <td><?php echo get_author_name($task->t_ht_op_code); ?></td>
				  <td><?php echo date('m/d/Y',strtotime($task->t_datetime)); ?></td>
				  <td><?php echo date('m/d/Y',strtotime($task->t_expires)); ?></td>
				</tr>
			  <?php } ?>
				
			  </tbody>
			</table> 
		<?php } ?>

		<?php if(!empty($task_list_in_reviewed)){ ?>
		    <legend>Tasks Accepted But Not Paid For</legend>
			<table class="table table-striped">
			  <thead>
				<tr>
				  <th>Task Number</th>
				  <th>Task Name</th>
				  <th>Task Type</th>
				  <th>Sent By</th>
				  <th>Start Date</th>
				  <th>End Date</th>
				</tr>
			  </thead>
			  <tbody>
			  <?php foreach($task_list_in_reviewed as $key=>$task){ ?>
				<tr class="info">
				  <td><?php echo $task->t_id; ?></td>
				  <td>
				  <?php if(have_unread_sms('task',$task->t_id)){ ?>
					<a href="<?php echo site_url('welcome/view/'.$task->t_id); ?>#sms"><i class="icon-envelope"></i><?php echo $task->t_title; ?></a> 
				<?php }else{ ?>
					<a href="<?php echo site_url('welcome/view/'.$task->t_id); ?>"><?php echo $task->t_title; ?></a>
					<?php } ?>
				  </td>
				  <td><?php echo $task->t_td_type; ?></td>
				  <td><?php echo get_author_name($task->t_ht_op_code); ?></td>
				  <td><?php echo date('m/d/Y',strtotime($task->t_datetime)); ?></td>
				  <td><?php echo date('m/d/Y',strtotime($task->t_expires)); ?></td>
				</tr>
			  <?php } ?>
				
			  </tbody>
			</table> 
		<?php } ?>
	  </div>
	</div>
	<div class="span2" style="padding-right:12px;"><?php echo $rank_view; ?></div>
</div>

