/home/desid573/public_html/ims2/application/controllers
NameSizeModeActions
Administrators.php149860644editdlrm
Audit.php5150644editdlrm
Dashboard.php62360644editdlrm
Employees.php5270644editdlrm
Eventlog.php5280644editdlrm
Home.php47920644editdlrm
index.html1310644editdlrm
Items.php176340644editdlrm
Logout.php4000644editdlrm
Misc.php29710644editdlrm
Reports.php12020644editdlrm
Search.php63550644editdlrm
Test.php4810644editdlrm
Transactions.php221500644editdlrm
Edit: /home/desid573/public_html/ims2/application/controllers/Search.php (6355B)
* @date 26th Rab.Awwal, 1437A.H (Jan. 7th, 2016) */ class Search extends CI_Controller { protected $value; public function __construct() { parent::__construct(); //$this->gen->checklogin(); $this->genlib->ajaxOnly(); $this->load->model(['transaction', 'item']); $this->load->helper('text'); $this->value = $this->input->get('v', TRUE); } /* ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** */ public function index() { /** * function will call models to do all kinds of search just to check whether there is a match for the searched value * in the search criteria or not. This applies only to global search */ //set final output $this->output->set_content_type('application/json')->set_output(json_encode($json)); } /* ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** */ /* ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** */ /* ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** */ public function itemSearch() { $data['allItems'] = $this->item->itemsearch($this->value); $data['sn'] = 1; $data['cum_total'] = $this->item->getItemsCumTotal(); $json['itemsListTable'] = $data['allItems'] ? $this->load->view('items/itemslisttable', $data, TRUE) : "No match found"; //set final output $this->output->set_content_type('application/json')->set_output(json_encode($json)); } /* ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** */ public function transSearch() { $data['allTransactions'] = $this->transaction->transsearch($this->value); $data['sn'] = 1; $json['transTable'] = $data['allTransactions'] ? $this->load->view('transactions/transtable', $data, TRUE) : "No match found"; //set final output $this->output->set_content_type('application/json')->set_output(json_encode($json)); } /* ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** */ /* ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** ******************************************************************************************************************************** */ }