<commit_before><?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Admin extends CI_Controller {
    
    function __construct() {
        parent::__construct();
        $this->load->model('usuario', 'usuario');
        $this->usuario->logado();
    }
    
    public function index() {
	//cadastrar usuario
	$this->load->library('form_validation');
	$this->form_validation->set_rules('nome', 'Nome', 'required');
        $this->form_validation->set_rules('email', 'Email', 'required');
        $this->form_validation->set_rules('senha', 'senha', 'required');
        $this->form_validation->set_error_delimiters('<p class="error">', '</p>');
		
	$nome  = $this->input->post('nome');
	$email = $this->input->post('email');
	$senha = $this->input->post('senha');
	if ($this->form_validation->run() == FALSE) {
	           // echo "Erro ao insirir dados	";
        } else {
		$this->usuario->inserir($nome, $email, $senha);
		redirect('admin');
		}
	//listar usuario
        $data['query'] = $this->usuario->listar();
	$this->load->view('admin_view', $data);
        
    }
	public function excluir(){
		
		$this->load->model('Usuario', 'usuario');
		$id = $this->uri->segment(3);
		$this->usuario->excluir($id);
		redirect('admin');
	}
	public function buscar(){
		$id    = $this->uri->segment(3);
		$data['query'] = $this->usuario->buscar($id);
		$this->load->view('admin-editar_view', $data);
	}
	
	public function editar(){
		$this->load->model('Usuario', 'usuario');
		$id     = $this->input->post('id');
		$nome   = $this->input->post('nome');
		$email  = $this->input->post('email');
		$senha  = $this->input->post('senha');		
		$status = $this->input->post('status');
		$this->usuario->update($id, $nome, $email, $senha, $status)
	}
	
}			
<commit_msg>Update Admin.php<commit_after><?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Admin extends CI_Controller {
    
    function __construct() {
        parent::__construct();
        $this->load->model('usuario', 'usuario');
        $this->usuario->logado();
    }
    
    public function index() {
	//cadastrar usuario
	$this->load->library('form_validation');
	$this->form_validation->set_rules('nome', 'Nome', 'required');
        $this->form_validation->set_rules('email', 'Email', 'required');
        $this->form_validation->set_rules('senha', 'senha', 'required');
        $this->form_validation->set_error_delimiters('<p class="error">', '</p>');
		
	$nome  = $this->input->post('nome');
	$email = $this->input->post('email');
	$senha = $this->input->post('senha');
	if ($this->form_validation->run() == FALSE) {
	           // echo "Erro ao insirir dados	";
        } else {
		$this->usuario->inserir($nome, $email, $senha);
		redirect('admin');
		}
	//listar usuario
        $data['query'] = $this->usuario->listar();
	$this->load->view('admin_view', $data);
        
    }
	public function excluir(){
		
		$this->load->model('Usuario', 'usuario');
		$id = $this->uri->segment(3);
		$this->usuario->excluir($id);
		redirect('admin');
	}
	public function buscar(){
		$id    = $this->uri->segment(3);
		$data['query'] = $this->usuario->buscar($id);
		$this->load->view('admin-editar_view', $data);
	}
	
	public function editar(){
		$this->load->model('Usuario', 'usuario');
		$id     = $this->input->post('id');
		$nome   = $this->input->post('nome');
		$email  = $this->input->post('email');
		$senha  = $this->input->post('senha');		
		$status = $this->input->post('status');
		$this->usuario->update($id, $nome, $email, $senha, $status);
	}
	
}			

{'fraction_non_alphanumeric': 0.23046875, 'fraction_numerical': 0.0011160714285714285, 'mean_word_length': 3.6862745098039214, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 115, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7128738', 'n_tokens_mistral': 1324, 'n_tokens_neox': 1289, 'n_words': 199}