
 <div class="row">
  
   	

   	<div class="col-md-12">
	
  
		<div class="panel panel-default" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
						 <span class="pull-right"> Task history</span>	
                        <a  id="more" target="blank" class="btn btn-primary" href="<?php echo base_url();?>user/assigntask">back  </a>
						 
Post Task For employees
				
            	</div>
            </div>
			<div class="panel-body">

				<div class="widget-content nopadding table_holder table-responsive" >				
	<?PHP
 $session_data = $this->session->userdata('logged_in');

   
 	$data['id'] = $session_data['id'];
        
		 $userid = $data['id'];

 $data['companyid'] = $session_data['companyid'];
	 $companyid = $data['companyid'];
		 $data['usertype'] = $session_data['usertype'];
	 $usertype = $data['usertype'];

				echo $this->session->flashdata('msg'); 
								?>	
										
					
									
				

		<div class="panel panel-default" data-collapsed="0">

	
  <div class="modal-dialog">

  
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Post Weekly/ daily  Task for employees</h4>
      </div>
      <div class="modal-body">
      
	  	

				<?PHP
//$session_data = $this->session->userdata('logged_in');



				echo $this->session->flashdata('msg'); 
		
                 echo form_open('user/postdailytask' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>



 <input type="hidden" id="view"name="view" class="view" placeholder="view" value="user/assigntask">

<div class ="form-inline">

<table width="100%" border="1">
<tr>
<td width="30%">Task</td>
<td>Achived Target</td>
<td>Status</td>
<td>Comment</td>

</tr>
</table>
 <div class="col-sm-12">
<?php	

					 

//$mytask = $this->usermodel->populatealldatanoarraythree('assigntask', 'companyid',$companyid,'defaulttype','yes','employeeid',$userid);



if(is_array($mytask)) {

   foreach($mytask as $mytaskrow){
    ?>

<p>

     <div class="form-group">
	     <label for="inputmytaskid" class="col-sm-1 control-label">	Task?</label>

    <div class="col-sm-3">
	<select class="form-control" style="width:90%" name="mytaskid[]" required>
	
	<option value=""  >-Select task-</option>

	
	<?php 
					 

					// $mytask= $this->usermodel->populateall('assigntask','employeeid',$userid);

//$mytask = $this->usermodel->populatealldatanoarraythree('assigntask', 'companyid',$companyid,'defaulttype','yes','employeeid',$userid);



  $mytasks= $this->usermodel->populateallarray('tasktype','id',$mytaskrow->taskid);
			echo$taskname=$mytasks[0]['name'];
    ?>
					<option selected="selected" value="<?=  $mytaskrow->taskid;   ?>"><?=  $taskname; ?></option>




</select>


	</div>
	
		 <div class="col-sm-2" style="margin:0px;">	
		 <input type="text" style="width:100%; margin:0px;" autofocus  name="achieved[]" value="0"  id="achieved" class="form-control" required placeholder="Enter total achived">
		 </div>

<div class="col-sm-2" style="margin:0px;">	
	<select class="form-control" style="width:90px" name="status[]" required>
		<option value=""  >-select task status-</option>

	<option value="new"  >new</option>
	<option value="pending"  >pending</option>
		<option value="ongoing"  >ongoing</option>
		<option value="closed" selected="selected" >closed</option>
</select>
				 </div>
				 		 <div class="col-sm-4">	
		 <input type="text" style="width:100%; margin:0px;" autofocus  name="comment[]" value="n/a"  id="comment" class="form-control" required placeholder="Enter task comments">

						 </div>


  </div>


		 
</p>
  	<?php

}} else {
    echo 'No branch available.';
}
	
?>

	  </div>
	  </div>




 <div class="form-group">
    <label for="inputuser" class="col-sm-2 control-label">User?</label>
    <div class="col-sm-10">
	<select class="form-control" name="user" required>
	
	<option value=""  >---Select user---</option>

			<?php
			$allusers = $this->usermodel->populatealldatanoarray('people', 'id',$user,'id >',0);

 		
				
	

	
if(is_array($allusers)) {

   foreach($allusers as $userrow){

   //echo $courserow->coursename;
    ?>
						<option selected="selected" value="<?=  $userrow->id;   ?>"><?=  $userrow->firstname ."- ".$userrow->surname ."(". $userrow->email.")"; ?></option>




	<?php

}} else {
    echo 'No user available.';
}
	
?>
</select>
		
						<span class="text-danger"><?php echo form_error('user'); ?>

	</div>
  </div>
  



  <div class="form-group">
    <label for="inputexactdate" class="col-sm-2 control-label">Task Date </label>
    <div class="col-sm-10">
	
		  		<input type="date" name="exactdate" value="<?php echo $exactdate; ?>" class="form-control" required placeholder="Enter start date">
		 
				
		<span class="text-danger"> <?php echo form_error('exactdate'); ?>
		
		</span>
	</div>
  </div>
  
  
  
  
 
	<div class="form-group">
    <label for="inputchallanges" class="col-sm-2 control-label">	Challanges and Recommendation  </label>
    <div class="col-sm-10">

				<textarea name="challanges" id="challanges" required value="<?php echo set_value('challanges'); ?>"  class="form-control"  placeholder="Enter task challanges"></textarea>
			
		<span class="text-danger"> <?php echo form_error('challanges'); ?>
		
		</span>
	</div>
  </div>
		<div class="form-group" style="display:none">
    <label for="inputrecommendation" class="col-sm-2 control-label">To list </label>
    <div class="col-sm-10">

				<textarea name="recommendation" id="recommendation" required value="<?php echo set_value('recommendation'); ?>"  class="form-control"  placeholder="Enter your todo list for next day">N/A</textarea>
			
		<span class="text-danger"> <?php echo form_error('recommendation'); ?>
		
		</span>
	</div>
  </div>
		

	
	

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="task" name="btn_postdailytask" class="btn btn-info"> Post  Task    </button>

    </div>
  </div>
  					<?php echo form_close();?>
			</div>							   
				
									
							
								
			<div class="modal-footer">

    

				</div>

		</div>
	    </div>
    </div>		















					
		






						
									
									
					</div>	

			
			</div>
		</div>
		
		
  </div>
			
			
			
		
		
  

 
</div>


















