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 | |
/** | |
* Application level Controller | |
* | |
* This file is application-wide controller file. You can put all | |
* application-wide controller-related methods here. | |
* | |
* 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 | |
class UsersController extends AppController { | |
public $uses = 'User'; | |
public $name = 'Users'; | |
public function index() | |
{ |
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
class AppController extends Controller { | |
public $components = array( | |
'Session', | |
'Auth' => array( | |
'loginRedirect' => array('controller' => 'users', 'action' => 'index'), | |
'logoutRedirect' => array('controller' => 'users', 'action' => 'login'), | |
'authError' => 'You can´t access that page', | |
'authorize' => array('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
class AppController extends Controller { | |
public $components = array( | |
'Session', | |
'Auth' => array( | |
'loginRedirect' => array('controller' => 'users', 'action' => 'index'), | |
'logoutRedirect' => array('controller' => 'users', 'action' => 'login'), | |
'authError' => 'You can´t access that page', | |
'authorize' => array('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 VIEW INDEX.CTP | |
<br/> | |
<?php echo $this->Form->create('Shoppingguide',array('type' => 'file', | |
'class'=>'form-horizontal', | |
'role'=>'form', | |
'inputDefaults'=>array( | |
'before'=>'<div class="form-group">', | |
'between'=>'<div class="col-sm-10">', | |
'after'=>'</div></div>', | |
'label'=>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 | |
class PostsController extends AppController{ | |
var $name = 'Posts'; | |
public $helpers=array('Html','Form','Session'); | |
public $components=array('Session'); | |
public function index(){ | |
$this->set('posts',$this->Post->find('all')); | |
} |
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 | |
// Incluir o utility File no Controller | |
App::uses('File', 'Utility'); | |
//App::import('Vendor', 'WideImage/WideImage'); | |
//class $components = array("Redimensiona"); | |
class ImagesController extends AppController { | |
//public $components = array('Qimage'); | |
// define o 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 | |
// Incluir o utility File no Controller | |
App::uses('File', 'Utility'); | |
//App::import('Vendor', 'WideImage/WideImage'); | |
//class $components = array("Redimensiona"); | |
class ImagesController extends AppController { | |
//public $components = array('Qimage'); | |
// define o 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 | |
// Incluir o utility File no Controller | |
App::uses('File', 'Utility'); | |
//App::import('Vendor', 'WideImage/WideImage'); | |
//class $components = array("Redimensiona"); | |
class ImagesController extends AppController { | |
//public $components = array('Qimage'); | |
// define o Model |
NewerOlder