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
sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server mysql-client php5-mysql php-pear php5-suhosin |
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
<h2>Seja bem vindo!</h2> | |
<p>Este é o site do maior evento de <strong>CakePHP</strong> do Brasil!</p> | |
<p>As inscrições abrirão no dia 01 de julho de 2011... Aguardem!</p> | |
<p>Para mais informações, entrem em contato através do e-mail <a href="mailto:[email protected]">[email protected]</a></p> |
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
# Habilita o gzip | |
gzip on; | |
gzip_http_version 1.1; | |
gzip_vary on; | |
gzip_comp_level 6; | |
gzip_proxied any; | |
# Mime-types que serão compactados | |
gzip_types text/html text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>CakePHP Brasil</title> | |
</head> | |
<body> | |
<?php echo $content_for_layout; ?> | |
</body> | |
</html> |
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 `inscricoes` ( | |
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
`nome` VARCHAR(50) NOT NULL, | |
`email` VARCHAR(100) NOT NULL, | |
`telefone` CHAR(10) NOT NULL, | |
`endereco` VARCHAR(100) NOT NULL, | |
`created` DATETIME NOT NULL, | |
`updated` DATETIME NOT NULL, | |
UNIQUE (`email`) | |
) ENGINE = MYISAM; |
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 Inscricao extends AppModel { | |
public $name = 'Inscricao'; | |
public $useTable = 'inscricoes'; | |
} |
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 Inscricao extends AppModel { | |
// Nome do model | |
public $name = 'Inscricao'; | |
// Nome da tabela | |
public $useTable = 'inscricoes'; | |
// Cacheia consultas | |
public $cacheQueries = true; |
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 InscricoesController extends AppController { | |
public $name = 'Inscricoes'; | |
public $use = array('Inscricao'); | |
} |
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 InscricoesController extends AppController { | |
public $name = 'Inscricoes'; | |
public $uses = array('Inscricao'); | |
public function inscrever() { | |
// Carrega a view /views/inscricoes/inscrever.ctp | |
} | |
} |
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
<h3>Login</h3> | |
<?php echo $this->Form->create('Usuario', array('action' => 'login')); ?> | |
<?php echo $this->Form->input('login'); ?> | |
<?php echo $this->Form->input('senha', array('type' => 'password')); ?> | |
<?php echo $this->Form->submit('Entrar'); ?> | |
<?php echo $this->Form->end(); ?> |
OlderNewer