<?php

Class Tracking extends CI_Controller
{
	function __construct()
	{
		parent::__construct();
		$this->load->model('trackings');
	}

	function index()
	{
		if( !empty($this->input->get('searchbar')) )
		{
			$this->session->set_userdata('search_value', $this->input->get('searchbar'));
			$data['tracking'] = $this->trackings->get_tracking_list_search($this->input->get('searchbar'));
		}
		else
		{
			$this->session->unset_userdata('search_value');
			$data['tracking'] = $this->trackings->get_tracking_list();
		}
		
		$this->load->view('tracking/report_trigger',$data);

	}
}