<?php  
defined('BASEPATH') OR exit('No direct script access allowed');  
  
class Applications extends CI_Controller {  
      
    public function index()  
    {  
        $this->load->view('hello_world');  
    }  
	
	public function getApplicationsData(){
		
		$this->load->model('ApplicationsData');
		
		$mainApps = $this->ApplicationsData->fetchApplicationsData();
		
		echo json_encode($mainApps);
		//echo($mainCategories);
		
	}
	
	public function getNewApplicationsData(){
		
		$this->load->model('ApplicationsData');
		
		$mainApps = $this->ApplicationsData->fetchNewApplicationsData();
		
		echo json_encode($mainApps);
		//echo($mainCategories);
		
	}
}  
?>  