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 | |
/** | |
* Given a string containing any combination of YouTube and Vimeo video URLs in | |
* a variety of formats (iframe, shortened, etc), each separated by a line break, | |
* parse the video string and determine it's valid embeddable URL for usage in | |
* popular JavaScript lightbox plugins. | |
* | |
* In addition, this handler grabs both the maximize size and thumbnail versions | |
* of video images for your general consumption. In the case of Vimeo, you must | |
* have the ability to make remote calls using file_get_contents(), which may be |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php/$1 [L] | |
</IfModule> |
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; |
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['salvar'] = "Base/Salvar"; | |
$route['editar/(:num)'] = "Base/Editar/$1"; | |
$route['atualizar'] = "Base/Atualizar"; |
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','form_validation'); | |
$autoload['drivers'] = array(); | |
$autoload['helper'] = array('url'); | |
$autoload['config'] = array(); | |
$autoload['language'] = array(); | |
$autoload['model'] = array('contatos_model'); |
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> | |
<div> | |
<h1>Criando um CRUD com CodeIgniter</h1> | |
</div> | |
<?php if ($this->session->flashdata('error') == TRUE): ?> | |
<p><?php echo $this->session->flashdata('error'); ?></p> | |
<?php endif; ?> | |
<?php if ($this->session->flashdata('success') == TRUE): ?> | |
<p><?php echo $this->session->flashdata('success'); ?></p> | |
<?php endif; ?> |
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> | |
<h1>Criando um CRUD com CodeIgniter</h1> | |
</div> | |
<?php if ($this->session->flashdata('error') == TRUE): ?> | |
<p><?php echo $this->session->flashdata('error'); ?></p> | |
<?php endif; ?> | |
<?php if ($this->session->flashdata('success') == TRUE): ?> | |
<p><?php echo $this->session->flashdata('success'); ?></p> | |
<?php endif; ?> |
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 MY_Model extends CI_Model { | |
// Variável que define o nome da tabela | |
var $table = ""; | |
/** | |
* Método Construtor |
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 Contatos_model extends MY_Model { | |
function __construct() { | |
parent::__construct(); | |
$this->table = 'contatos'; | |
} | |
/** |
OlderNewer