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
<?php | |
$config['csrf_exclude_uris'] = array('pessoas/add'); | |
$config['csrf_exclude_uris'] = array( | |
'pessoa/[0-9]+', | |
'registro/[a-z]+' | |
); | |
?> |
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
CREATE TABLE IF NOT EXISTS `contatos` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`nome` varchar(255) DEFAULT NULL, | |
`email` varchar(255) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB; | |
# Cria alguns registros na tabela 'contatos' | |
INSERT INTO `contatos` (`nome`,`email`) VALUES ("Hayes","commodo.tincidunt@aliquamadipiscinglacus.org"),("Avram","sem.Pellentesque.ut@molestietellusAenean.org"),("Mufutau","in.sodales.elit@nunc.org"),("Malachi","sagittis.felis@Ut.co.uk"),("Victor","orci.luctus.et@Phasellusdolor.net"),("Geoffrey","Cras.interdum@ligula.ca"),("Chaney","mi@Cumsociis.net"),("Emerson","Curae@semutdolor.co.uk"),("Xanthus","dolor.sit.amet@nasceturridiculus.co.uk"),("Elvis","dis@ipsumnuncid.com"); |
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
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
$autoload['packages'] = array(); | |
$autoload['libraries'] = array('database', 'session'); | |
$autoload['drivers'] = array(); | |
$autoload['helper'] = array('url'); | |
$autoload['config'] = array(); | |
$autoload['language'] = array(); | |
$autoload['model'] = array(); |
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
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
$route['default_controller'] = 'Base'; | |
$route['404_override'] = ''; | |
$route['translate_uri_dashes'] = FALSE; | |
$route['importar'] = "Base/ImportCsv"; |
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
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
$active_group = 'default'; | |
$query_builder = TRUE; | |
$db['default'] = array( | |
'dsn' => '', | |
'hostname' => 'host', | |
'username' => 'usuario', |
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
<div> | |
<?php if (isset($error)): ?> | |
<div><?php echo $error; ?></div> | |
<?php endif; ?> | |
<?php if ($this->session->flashdata('success') == TRUE): ?> | |
<div><?php echo $this->session->flashdata('success'); ?></div> | |
<?php endif; ?> | |
<form method="post" action="<?=base_url('importar')?>" enctype="multipart/form-data"> | |
<div> |
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
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Csvimport { | |
private $handle = ""; | |
private $filepath = FALSE; | |
private $column_headers = FALSE; | |
private $initial_line = 0; | |
private $delimiter = ","; | |
private $detect_line_endings = FALSE; |
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
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Base extends CI_Controller { | |
/** | |
* Método construtor | |
* | |
* @access public | |
* @return void |
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
<?php | |
class Csv_model extends CI_Model { | |
/** | |
* Método construtor | |
* | |
* @access public | |
* @return void | |
*/ |
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
# Tabela que armazenará os métodos | |
CREATE TABLE `metodos` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`classe` varchar(50) DEFAULT NULL, | |
`metodo` varchar(50) DEFAULT NULL, | |
`identificacao` varchar(100) DEFAULT NULL, | |
`privado` tinyint(1) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |