Mini Shell

Direktori : /home/brasafestival/www/old/bkp_2023/app/Plugin/Galeria/Controller/
Upload File :
Current File : /home/brasafestival/www/old/bkp_2023/app/Plugin/Galeria/Controller/GaleriaController.php

<?PHP
class GaleriaController extends GaleriaAppController {
    
    public $paginate = array('limit'=>16,'order'=>array('created'=>'DESC'));
    
    public function admin_add(){
        $this->layout = 'Painel.admin';
        $this->view = 'admin_editor';
        if($this->request->data && ($this->request->is('post') || $this->request->is('put'))){
            if($this->Galeria->save($this->request->data)){
                $this->redirect(array('action'=>'edit'));
            }
        }
    }
    
    public function admin_edit(){
        $this->layout = 'Painel.admin';
        $this->view = 'admin_editor';
        $post = $this->Galeria->find('first');
        $this->data = $this->Galeria->read('*',$post['Galeria']['id']); 
    }
    
}

Zerion Mini Shell 1.0