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
| /** | |
| * Painel Delete | |
| */ | |
| public function painel_delete($id = null) | |
| { | |
| // Prova | |
| $this->Task->id = $id; | |
| // Se o registro não for encontrado |
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 | |
| /** | |
| * | |
| * TeamsController | |
| * | |
| */ | |
| App::uses('AppController', 'Controller'); | |
| class TeamsController 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
| // Controller | |
| $this->Paginator->settings = array('limit' => 1); | |
| $tasks = $this->paginate('Task'); | |
| // Set | |
| $this->set( | |
| array( | |
| 'title_for_layout' => 'Ranking', | |
| 'tasks' => $tasks |
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
| /** | |
| * Index | |
| */ | |
| public function index() | |
| { | |
| // Busca todas as equipes | |
| $teams = $this->Team->find('all', array('conditions' => array('Team.is_active' => true), 'recursive' => -1)); |
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
| echo | |
| $this->Html->link( | |
| $this->Html->image('theme/nophoto.jpg', array('alt' => 'Prova')), | |
| array( | |
| 'controller' => 'tasks', | |
| 'action' => 'view', | |
| 'id' => $result['Task']['id'], | |
| 'slug' => $result['Task']['slug'] | |
| ), | |
| 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
| /** | |
| * Painel Login | |
| */ | |
| public function painel_login() | |
| { | |
| $this->Session->delete('auth_user'); | |
| $user = $this->Auth->user(); |
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
| <!DOCTYPE html> | |
| <html lang="pt-BR"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Curso CSS</title> | |
| <style type="text/css"> | |
| ul { | |
| padding: 0; | |
| margin: 0; | |
| list-style: nome; |
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 | |
| /** | |
| * | |
| * DesignerModel | |
| * | |
| */ | |
| define('DESIGNER_DIR', WWW_ROOT . 'img/designers/'); | |
| App::uses('AppModel', 'Model'); |
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
| //Controller | |
| <?php | |
| public function contact() | |
| { | |
| if ($this->request->is('post')): | |
| if ($this->Contact->send($this->request->data)): | |
| $this->Session->setFlash('<div class="text-center">Mensagem enviada com sucesso.</div>', false); | |
| $this->redirect(array('controller' => 'pages', 'action' => 'contact')); |
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 | |
| /** | |
| * UserModel | |
| */ | |
| App::uses('AppModel', 'Model'); | |
| class User extends AppModel { | |
| /** |