Created
March 30, 2016 05:38
-
-
Save valdiney/9819ac7a0adbae0e3c180408ba21d584 to your computer and use it in GitHub Desktop.
Método
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function pesquisa() | |
{ | |
$encontrado = true; | |
$lista_visitantes = false; | |
$parametro = Input::in_post('parametro'); | |
if ($parametro != 'periodo') { | |
$parametro = Input::in_post('parametro'); | |
$palavra_chave = Input::in_post('palavra_chave'); | |
$lista_visitantes = $this->radacct->research($parametro, $palavra_chave); | |
$dados_login_visitante = $this->visitante; | |
$encontrado = false; | |
if ($this->radacct->research_exist($lista_visitantes)) { | |
$encontrado = true; | |
} | |
} else { | |
$data_cliente['periodo_de'] = Input::in_post('periodo_de'); | |
$data_cliente['periodo_ate'] = Input::in_post('periodo_ate'); | |
$lista_visitantes = $this->radacct->filtrar_clientes($data_cliente); | |
if (count($lista_visitantes) > 0) { | |
$encontrado = true; | |
} | |
} | |
$dados_login_visitante = $this->visitante; | |
$this->view->layout('layout_dashboard'); | |
return $this->view->make('visitantes.resultado_pesquisa', compact('lista_visitantes', 'dados_login_visitante', 'encontrado', 'data_cliente')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment