<?php
require_once (PATH_TABLES . "activity/TaskPlanTable.php") ;
require_once (PATH_MODELS . "base/MasterBase.php") ;

class TaskPlanClass extends MasterBase {
	function __construct($db) {
		$this->db 		= $db ;
		$this->tbl 		= TaskPlanTable::C_TABLE ;
		$this->fldid 	= TaskPlanTable::C_ID ;
		$this->flddesc 	= TaskPlanTable::C_DESC ;
	}
	function __destruct() {
	}
    
 /*   function getTaskPlanList($deskfilter = '', $customerFilter = 0, $statusFilter = 'all'){
        $sql = "SELECT * FROM " . TaskPlanTable::C_TABLE . " ";
        $filter = "WHERE " . TaskPlanTable::C_DESC . " like '%" . $titlefilter . "%' ";
        
        $rows = $this->db->getTable($sql . $filter);
        
        return $rows;
    }*/

   function getTaskPlanList($statusFilter = 'all'){
        $sql = "SELECT * FROM " . TaskPlanTable::C_TABLE . " ";
        $filter = "WHERE " . TaskPlanTable::C_CREATE_BY . " = " . $_SESSION[SE_USERID] . " ";
        
        /*if($statusFilter != 'all'){
            if($filter != "") $filter .= "AND ";
            else $filter .= "WHERE ";
            
            if($statusFilter == 'active')
                $filter .= " " . ProjectTable::C_STATUS . " = 1 ";
            else if($statusFilter == 'non-active')
                $filter .= " " . ProjectTable::C_STATUS . " = 0 ";
        }
        */
        $rows = $this->db->getTable($sql . $filter);
        
        return $rows;
    }

}
?>