Files
FHC-Core/application/controllers/components/SearchBar.php
T
Paolo 147ab92bae - Added new library libraries/SearchBarLib
- Added new controller components/SearchBar
- Removed not anymore used view application/views/system/logs/logsViewerData.php
2022-06-24 17:59:01 +02:00

44 lines
748 B
PHP

<?php
if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
*
*/
class SearchBar extends FHC_Controller
{
const SEARCHSTR_PARAM = 'searchstr';
const TYPES_PARAM = 'types';
/**
*
*/
public function __construct()
{
parent::__construct();
//
$this->load->library('SearchBarLib');
}
//------------------------------------------------------------------------------------------------------------------
// Public methods
public function index()
{
$this->load->view('test');
}
/**
*
*/
public function search()
{
$searchstr = $this->input->post(self::SEARCHSTR_PARAM);
$types = $this->input->post(self::TYPES_PARAM);
$this->outputJson($this->searchbarlib->search($searchstr, $types));
}
}