-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ajustes no core que causava erros na sessão para php >=7
- Loading branch information
1 parent
dd09d03
commit bbb49ca
Showing
187 changed files
with
2,991 additions
and
2,360 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,53 +22,41 @@ public function index() | |
} | ||
|
||
public function logar(){ | ||
// echo sha1('7894900') | ||
|
||
$this->db->where('email_funcionario', $this->input->post('email')); | ||
$this->db->where('senha_funcionario', sha1($this->input->post('senha'))); | ||
$this->db->where('status', '1'); | ||
$query = $this->db->get('funcionarios'); | ||
//inicia a sessão | ||
//$this->load->library('session'); | ||
|
||
//$this->db->where('status', 1); // Verifica o status do usuário | ||
|
||
// pegando post puro | ||
$usuario = $this->input->post("email"); | ||
//$senha = sha1($this->input->post("senha")); | ||
|
||
//Código sha1 da senha 123456 7c4a8d09ca3762af61e59520943dc26494f8941b | ||
//O usuário no exemplo aqui será [email protected] | ||
//Mas em um projeto real, você trará isto do banco de dados. | ||
|
||
// pegando post puro | ||
$usuario = $this->input->post("email"); | ||
|
||
//Se o usuário e senha combinarem, então basta eu redirecionar para a url base, pois agora o usuário irá passa | ||
//pela verificação que checa se ele está logado. | ||
|
||
if ($query->num_rows() == 1) { | ||
// if (1 == 1) { | ||
$this->session->set_userdata("logado", 1); | ||
//Se o usuário e senha combinarem, então basta eu redirecionar para a url base, pois agora o usuário irá passa | ||
//pela verificação que checa se ele está logado. | ||
if ($query->num_rows() == 1) { | ||
|
||
$this->session->set_userdata("logado", 1); | ||
|
||
|
||
//carregando o model para pegar o usuario | ||
$this->load->model('Getuser'); | ||
$news = $this->Getuser->get_user('funcionarios',$usuario); | ||
//armazena o usuario na variavel | ||
|
||
//armazena o usuario na variavel | ||
$UsuarioNome = $news['nome_funcionario']; | ||
$UsuarioID = $news['id_funcionario']; | ||
// $Alias = $news['alias_funcionario']; | ||
$UsuarioFuncao = $news['funcao_funcionario']; | ||
$Departamento = $news['departamento']; | ||
$Departamento = $news['departamento']; | ||
|
||
// define o nome do usuario na sessão | ||
$this->session->set_userdata("Usuario",$UsuarioNome); | ||
$this->session->set_userdata("ID",$UsuarioID); | ||
// $this->session->set_userdata("Alias",$Alias); | ||
$this->session->set_userdata("Funcao",$UsuarioFuncao); | ||
$this->session->set_userdata("Departamento",$Departamento); | ||
$this->session->set_userdata("Funcao",$UsuarioFuncao); | ||
$this->session->set_userdata("Departamento",$Departamento); | ||
|
||
// pegando a funcao em outra tabela | ||
// $this->load->model('getuser'); | ||
// $news2 = $this->getuser->get_funcao('funcionarios_funcoes',$UsuarioID); | ||
// $UsuarioFuncao = $news2['funcao_id']; | ||
|
||
|
||
|
||
if($Departamento == 7){ | ||
|
||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.