<?php
class Task extends CI_Controller{
	function __construct(){
		parent::__construct();
		$this->load->model('TaskModel');
	}
	function index(){
	    $this->load->view('common/header');
        $this->load->view('common/menu');
		$this->load->view('admin/myTask');
		$this->load->view('common/footer');
	}
	function show(){
	    $sessionuser = $this->session->userdata('employeeId');
		$data=$this->TaskModel->employeeList($sessionuser);
// 		echo "<pre>";
// 		echo print_r($data);
// 		echo "</pre>";
		echo json_encode($data);
	}
	function donelist(){
	    $sessionuser = $this->session->userdata('employeeId');
		$data=$this->TaskModel->DoneTaskList($sessionuser);
		echo json_encode($data);
	}
	function done(){
		$data=$this->TaskModel->doneTask();
		echo json_encode($data);
	}
	function save(){
		$data=$this->TaskModel->saveEmp();
		echo json_encode($data);
	}
	function update(){
		$data=$this->TaskModel->updateEmp();
		echo json_encode($data);
	}
	function delete(){
		$data=$this->TaskModel->deleteEmp();
		echo json_encode($data);
	}
}