This file contains hidden or 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 Clientes { | |
public function upload_arquivo() { | |
if ( !empty($_FILES['arquivo']['tmp_name']) ) { | |
$status = true; | |
This file contains hidden or 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 echo $this->Html->script('vendor/jquery-1.9.0.min'); ?> | |
<div class="row"> | |
<div class="span12"> | |
<br/> | |
<ul class="breadcrumb"> | |
<li><?php echo $this->Html->link('Página Inicial', '/'); ?> | |
<span class="divider">></span> | |
</li> | |
<li class="active">Compras |
This file contains hidden or 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 echo 'Primeira mensagem vista por um novo programador'; ?> | |
<?php print 'Primeira mensagem vista por um novo programador'; ?> | |
<?php | |
// → para comentários de apenas uma linha | |
/* */ → para cometários com várias linhas | |
/** */ → para comentários a nível de documentação | |
# → estilo shell para cometários em uma linha somente | |
(existem configurações que não aceitam este tipo de comentário) |
This file contains hidden or 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 AppController extends Controller { | |
public $components = array('Session', 'Acl', 'Auth'); | |
public function beforeFilter() { | |
// Mecanismo de autenticação | |
$this->Auth->authenticate = array('Blowfish' => array( |
This file contains hidden or 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 | |
// código de sua View | |
echo $this->Form->input('email.'); | |
// importantíssimo existir o ponto após o nome do campo, ele quem determinará que é um array | |
// código do Controller |
This file contains hidden or 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 UsuariosController extends AppController { | |
public function login() { | |
if ($this->request->is('post')) { | |
if ($this->Auth->login()) { | |
$this->redirect($this->Auth->redirectUrl()); |
This file contains hidden or 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'); | |
/** | |
* Usuarios Controller | |
* | |
* @property Usuario $Usuario | |
*/ | |
class UsuariosController extends AppController { |
This file contains hidden or 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 | |
// $q variable | |
WP_Query Object | |
( | |
[query] => Array | |
( | |
[post_type] => product | |
) | |
[query_vars] => Array |
This file contains hidden or 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 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) |
OlderNewer