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

/**
 * @property Grocery_crud_model $Grocery_crud_model Optional description            // ===== AGREGADO ===== //
 * @property Dojo_model $Dojo_model Optional description            // ===== AGREGADO ===== //
 * @property stdClass db
 *
 *
 */

class Main extends CI_Controller {

	public function __construct()
	{
		parent::__construct();

		$this->load->database();
		//$this->load->helper('url');

		$this->load->library('grocery_CRUD');

        $this->load->helper(array('form','url','security','file','html','date'));   // ===== AGREGADO ===== //
        $this->load->library(array('session','form_validation','email','upload'));  // ===== AGREGADO ===== //

        $this->load->model('Grocery_crud_model');                                   // ===== AGREGADO ===== //
        $this->load->model('Dojo_model');                                           // ===== AGREGADO ===== //
        $this->load->helper('selectdojo');                                          // ===== AGREGADO ===== //
	}

	public function _example_output($output = null)
	{
		$this->load->view('example.php',$output);
	}

	public function offices()
	{
		$output = $this->grocery_crud->render();

		$this->_example_output($output);
	}

	public function index()
	{
		$this->_example_output((object)array('output' => '' , 'js_files' => array() , 'css_files' => array()));
	}

	public function offices_management()
	{
		try{
			$crud = new grocery_CRUD();

			$crud->set_theme('datatables');
			$crud->set_table('offices');
			$crud->set_subject('Office');
			$crud->required_fields('city');
			$crud->columns('city','country','phone','addressLine1','postalCode');

			$output = $crud->render();

			$this->_example_output($output);

		}catch(Exception $e){
			show_error($e->getMessage().' --- '.$e->getTraceAsString());
		}
	}

	public function employees_management()
	{
			$crud = new grocery_CRUD();

			$crud->set_theme('datatables');
			$crud->set_table('employees');
			$crud->set_relation('officeCode','offices','city');
			$crud->display_as('officeCode','Office City');
			$crud->set_subject('Employee');

			$crud->required_fields('lastName');

			$crud->set_field_upload('file_url','assets/uploads/files');

			$output = $crud->render();

			$this->_example_output($output);
	}

	public function customers_management()
	{
			$crud = new grocery_CRUD();

			$crud->set_table('customers');
			$crud->columns('customerName','contactLastName','phone','city','country','salesRepEmployeeNumber','creditLimit');
			$crud->display_as('salesRepEmployeeNumber','from Employeer')
				 ->display_as('customerName','Name')
				 ->display_as('contactLastName','Last Name');
			$crud->set_subject('Customer');
			$crud->set_relation('salesRepEmployeeNumber','employees','lastName');

			$output = $crud->render();

			$this->_example_output($output);
	}

    public function miembros()
    {
        $crud = new grocery_CRUD();

        $crud->set_model('Dojo_model');              // ------------ AGREGADO ------------ //
        $crud->set_table('miembros');
        $crud->columns('codmiembro','nombre','apellido','id_dojo','cargo','fechaingreso', 'estado');
        //$crud->columns('customerName','contactLastName','phone','city','country','salesRepEmployeeNumber','creditLimit');
        $crud->display_as('codmiembro',      'Código de Miembro')
            ->display_as('nombre',         'Nombre')
            ->display_as('apellido',       'Apellido')
            ->display_as('nummovil',       'Núm Móvil')
            ->display_as('id_dojo',           'Dojo')
            ->display_as('estado',         'Estado')
            ->display_as('fechaingreso',   'Fecha de Ingreso')
            ->display_as('fechareingreso', 'Fecha de Reingreso')
            ->display_as('cargo',          'Cargo')
            ->display_as('menor',          'Menor')
            ->display_as('9kyu',           '9 Kyu')
            ->display_as('5kyu',           '5 Kyu')
            ->display_as('4kyu',           '4 Kyu')
            ->display_as('3kyu',           '3 Kyu')
            ->display_as('2kyu',           '2 Kyu')
            ->display_as('1kyu',           '1 Kyu')
            ->display_as('1dan',           '1 Dan')
            ->display_as('2dan',           '2 Dan')
            ->display_as('aikikai',        'Aikikai #')
            ->display_as('registration',   'Registration #')
            ->display_as('numoficina',     'Núm Oficina')
            ->display_as('numcasa',        'Núm Casa')
            ->display_as('numpadre',       'Núm Padre')
            ->display_as('nummadre',       'Núm Madre')
            ->display_as('acudiente',      'Acudiente')
            ->display_as('centro',         'Centro de Labores o Estudio')
            ->display_as('direccion',      'Dirección Residencial')
            ->display_as('email',          'e-Mail')
            ->display_as('fechanac',       'Fecha de Nacimiento')
            ->display_as('edad',           'Edad')
            ->display_as('cumplemes',      'Cumple Mes')
            ->display_as('identificacion', 'Identificación')
            ->display_as('tiposangre',     'Tipo de Sangre')
            ->display_as('enfermedad',     'Enfermedad')
            ->display_as('alergicoa',      'Alergico a');
<commit_msg>Agregados 3dan y 4dan (Discrepantes entre dojos CH-CA con PA)<commit_after><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * @property Grocery_crud_model $Grocery_crud_model Optional description            // ===== AGREGADO ===== //
 * @property Dojo_model $Dojo_model Optional description            // ===== AGREGADO ===== //
 * @property stdClass db
 *
 *
 */

class Main extends CI_Controller {

	public function __construct()
	{
		parent::__construct();

		$this->load->database();
		//$this->load->helper('url');

		$this->load->library('grocery_CRUD');

        $this->load->helper(array('form','url','security','file','html','date'));   // ===== AGREGADO ===== //
        $this->load->library(array('session','form_validation','email','upload'));  // ===== AGREGADO ===== //

        $this->load->model('Grocery_crud_model');                                   // ===== AGREGADO ===== //
        $this->load->model('Dojo_model');                                           // ===== AGREGADO ===== //
        $this->load->helper('selectdojo');                                          // ===== AGREGADO ===== //
	}

	public function _example_output($output = null)
	{
		$this->load->view('example.php',$output);
	}

	public function offices()
	{
		$output = $this->grocery_crud->render();

		$this->_example_output($output);
	}

	public function index()
	{
		$this->_example_output((object)array('output' => '' , 'js_files' => array() , 'css_files' => array()));
	}

	public function offices_management()
	{
		try{
			$crud = new grocery_CRUD();

			$crud->set_theme('datatables');
			$crud->set_table('offices');
			$crud->set_subject('Office');
			$crud->required_fields('city');
			$crud->columns('city','country','phone','addressLine1','postalCode');

			$output = $crud->render();

			$this->_example_output($output);

		}catch(Exception $e){
			show_error($e->getMessage().' --- '.$e->getTraceAsString());
		}
	}

	public function employees_management()
	{
			$crud = new grocery_CRUD();

			$crud->set_theme('datatables');
			$crud->set_table('employees');
			$crud->set_relation('officeCode','offices','city');
			$crud->display_as('officeCode','Office City');
			$crud->set_subject('Employee');

			$crud->required_fields('lastName');

			$crud->set_field_upload('file_url','assets/uploads/files');

			$output = $crud->render();

			$this->_example_output($output);
	}

	public function customers_management()
	{
			$crud = new grocery_CRUD();

			$crud->set_table('customers');
			$crud->columns('customerName','contactLastName','phone','city','country','salesRepEmployeeNumber','creditLimit');
			$crud->display_as('salesRepEmployeeNumber','from Employeer')
				 ->display_as('customerName','Name')
				 ->display_as('contactLastName','Last Name');
			$crud->set_subject('Customer');
			$crud->set_relation('salesRepEmployeeNumber','employees','lastName');

			$output = $crud->render();

			$this->_example_output($output);
	}

    public function miembros()
    {
        $crud = new grocery_CRUD();

        $crud->set_model('Dojo_model');              // ------------ AGREGADO ------------ //
        $crud->set_table('miembros');
        $crud->columns('codmiembro','nombre','apellido','id_dojo','cargo','fechaingreso', 'estado');
        //$crud->columns('customerName','contactLastName','phone','city','country','salesRepEmployeeNumber','creditLimit');
        $crud->display_as('codmiembro',      'Código de Miembro')
            ->display_as('nombre',         'Nombre')
            ->display_as('apellido',       'Apellido')
            ->display_as('nummovil',       'Núm Móvil')
            ->display_as('id_dojo',           'Dojo')
            ->display_as('estado',         'Estado')
            ->display_as('fechaingreso',   'Fecha de Ingreso')
            ->display_as('fechareingreso', 'Fecha de Reingreso')
            ->display_as('cargo',          'Cargo')
            ->display_as('menor',          'Menor')
            ->display_as('9kyu',           '9 Kyu')
            ->display_as('5kyu',           '5 Kyu')
            ->display_as('4kyu',           '4 Kyu')
            ->display_as('3kyu',           '3 Kyu')
            ->display_as('2kyu',           '2 Kyu')
            ->display_as('1kyu',           '1 Kyu')
            ->display_as('1dan',           '1 Dan')
            ->display_as('2dan',           '2 Dan')
            ->display_as('3dan',           '3 Dan')
            ->display_as('4dan',           '4 Dan')
            ->display_as('aikikai',        'Aikikai #')
            ->display_as('registration',   'Registration #')
            ->display_as('numoficina',     'Núm Oficina')
            ->display_as('numcasa',        'Núm Casa')
            ->display_as('numpadre',       'Núm Padre')
            ->display_as('nummadre',       'Núm Madre')
            ->display_as('acudiente',      'Acudiente')
            ->display_as('centro',         'Centro de Labores o Estudio')
            ->display_as('direccion',      'Dirección Residencial')
            ->display_as('email',          'e-Mail')
            ->display_as('fechanac',       'Fecha de Nacimiento')
            ->display_as('edad',           'Edad')
            ->display_as('cumplemes',      'Cumple Mes')
            ->display_as('identificacion', 'Identificación')
            ->display_as('tiposangre',     'Tipo de Sangre')
            ->display_as('enfermedad',     'Enfermedad')
            ->display_as('alergicoa',      'Alergico a');

{'fraction_non_alphanumeric': 0.19614888520361157, 'fraction_numerical': 0.0036852773171181133, 'mean_word_length': 2.4825152390118705, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 187, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1663532', 'n_tokens_mistral': 3650, 'n_tokens_neox': 3402, 'n_words': 473}