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 | |
/** | |
* | |
* AppController | |
* | |
*/ | |
App::uses('Controller', 'Controller'); | |
class AppController extends Controller { |
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
<form action="/base/painel/usuarios/login" id="UsuarioPainelLoginForm" method="post" accept-charset="utf-8"> | |
<div style="display:none;"> | |
<input type="hidden" name="_method" value="POST"/> | |
</div> | |
<div class="input text required"> | |
<label for="UsuarioUsuario">Usuario</label> | |
<input name="data[Usuario][usuario]" maxlength="20" type="text" value="root" id="UsuarioUsuario" required="required"/> | |
</div> | |
<div class="input password"> | |
<label for="UsuarioSenha">Senha</label> |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Bootstrap 3</title> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> | |
<style type="text/css"> | |
h4{color:white} | |
.row{background:red;margin-bottom:50px} | |
.col-md-1,.col-md-4,.col-md-6{background:blue} |
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 | |
App::uses('AppController', 'Controller'); | |
class UsuariosAppController extends AppController { | |
/** | |
* Métodos carregados antes da action ser chamada | |
*/ | |
public function beforeFilter() |
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
public function login() | |
{ | |
// Ação de Login | |
if ($this->request->is('post')): | |
if ($this->Auth->login()): | |
$this->redirect($this->Auth->redirectUrl()); | |
else: | |
$this->Session->setFlash('Usuário ou senha inválidos, tente novamente.'); |
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
public class ListaSequencial { | |
Carro [] carros = new Carro[100]; | |
int n = 0; | |
boolean isVazia(){ | |
return (n == 0); | |
} | |
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 | |
/** | |
* This is the PHP base ACL configuration file. | |
* | |
* Use it to configure access control of your Cake application. | |
* | |
* PHP 5 | |
* | |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | |
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) |
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 | |
/** | |
* AclPhp | |
* | |
* Como utilizar? | |
* | |
* 1. Crie o model User em sua aplicação, com os seguintes atributos: | |
* username, group_id, password, email, firstname, lastname e assim por diante. | |
* | |
* 2. Configure o AuthComponent autorizar ações via: |
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
<article class="col-xs-12 col-sm-6 col-md-6"> | |
<figure class="post-img"> | |
<img src="images/artigo1.jpg" alt="Web Standards"> | |
<figcaption> | |
<a href="#"><h2>Web Standards</h2></a> | |
<a href="#"><h3>Lorem ipsum dolor</h3></a> | |
</figcaption> | |
</figure> | |
</article> |
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 | |
/** | |
* | |
* TaskModel | |
* | |
*/ | |
define('UPLOAD_DIR', WWW_ROOT . 'img/tasks/'); | |
App::uses('AppModel', 'Model'); |
OlderNewer