<?php namespace App\Controllers\Admin;

class Career_application extends AdminController
{
	private $mObj;
	
	public function __construct(){		
        $this->mObj = model('App\Models\Admin\Career_applicationModel');
		$this->menu_id =24;
    }
	
	public function index(){
		$this->allowed('is_list');
		$data['footer_includes'] = ['career_application_list_js'];		
		echo $this->view_inner_template('career_application_list',$data);
	}
	
	public function ajax_list(){
		$this->allowed('is_list');
		$result = $this->mObj->get_datatable();
		$output = array(
			"meta" => $result['meta'],
            "data" => $result['data']
        );
        
        // Output to JSON format
        echo json_encode($output);
	}
	
	public function view($career_application_id ){
		$this->allowed('is_edit');
		$data['form_heading'] = "Career Application";
		
		$data['rec'] = $this->mObj->get($career_application_id);
		echo $this->view_inner_template('career_application_view',$data);
	}
	
	
}