| @@ 19-32 (lines=14) @@ | ||
| 16 | $this->layout = 'wadmin'; |
|
| 17 | } |
|
| 18 | ||
| 19 | public function adicionar_cadastro() { |
|
| 20 | $this->loadModel('CategoriaBanner'); |
|
| 21 | ||
| 22 | $this->set('categorias', $this->CategoriaBanner->find('all', |
|
| 23 | array('conditions' => |
|
| 24 | array('ativo' => 1, |
|
| 25 | 'usuario_id' => $this->instancia |
|
| 26 | ) |
|
| 27 | ) |
|
| 28 | ) |
|
| 29 | ); |
|
| 30 | ||
| 31 | $this->layout = 'wadmin'; |
|
| 32 | } |
|
| 33 | ||
| 34 | public function editar_cadastro($id) { |
|
| 35 | $this->loadModel('CategoriaBanner'); |
|
| @@ 5-19 (lines=15) @@ | ||
| 2 | ||
| 3 | class CategoriaController extends AppController { |
|
| 4 | ||
| 5 | public function listar_cadastros() { |
|
| 6 | $this->loadModel('Categoria'); |
|
| 7 | ||
| 8 | $categorias = $this->Categoria->find('all', |
|
| 9 | array('conditions' => |
|
| 10 | array('ativo' => 1, |
|
| 11 | 'usuario_id' => $this->instancia |
|
| 12 | ) |
|
| 13 | ) |
|
| 14 | ); |
|
| 15 | ||
| 16 | $this->set('categorias', $categorias); |
|
| 17 | ||
| 18 | $this->layout = 'wadmin'; |
|
| 19 | } |
|
| 20 | ||
| 21 | public function adicionar_cadastro() { |
|
| 22 | $this->layout = 'wadmin'; |
|
| @@ 55-66 (lines=12) @@ | ||
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| 55 | function listar_cadastros() { |
|
| 56 | $this->layout = 'wadmin'; |
|
| 57 | ||
| 58 | $this->set('clientes', $this->Cliente->find('all', |
|
| 59 | array('conditions' => |
|
| 60 | array('ativo' => 1, |
|
| 61 | 'id_usuario' => $this->instancia |
|
| 62 | ) |
|
| 63 | ) |
|
| 64 | ) |
|
| 65 | ); |
|
| 66 | } |
|
| 67 | ||
| 68 | function editar_cliente() { |
|
| 69 | $this->layout = 'wadmin'; |
|
| @@ 5-16 (lines=12) @@ | ||
| 2 | ||
| 3 | class ConsultaController extends AppController { |
|
| 4 | ||
| 5 | public function listar_cadastros(){ |
|
| 6 | $this->loadModel('Consulta'); |
|
| 7 | $consultas = $this->Consulta->find('all', |
|
| 8 | array('conditions' => |
|
| 9 | array('ativo' => 1, |
|
| 10 | 'id_usuario' => $this->instancia |
|
| 11 | ) |
|
| 12 | ) |
|
| 13 | ); |
|
| 14 | $this->set('consultas', $consultas); |
|
| 15 | $this->layout = 'wadmin'; |
|
| 16 | } |
|
| 17 | ||
| 18 | function excluir_consulta() { |
|
| 19 | $this->layout = 'ajax'; |
|
| @@ 41-55 (lines=15) @@ | ||
| 38 | } |
|
| 39 | } |
|
| 40 | ||
| 41 | public function editar_cupom($id) |
|
| 42 | { |
|
| 43 | $this->set('cupom', $this->Cupom->find('all', |
|
| 44 | array('conditions' => |
|
| 45 | array( |
|
| 46 | 'ativo' => 1, |
|
| 47 | 'usuario_id' => $this->instancia, |
|
| 48 | 'id' => $id |
|
| 49 | ) |
|
| 50 | ) |
|
| 51 | ) |
|
| 52 | ); |
|
| 53 | ||
| 54 | $this->layout = 'wadmin'; |
|
| 55 | } |
|
| 56 | ||
| 57 | public function s_editar_cupom($id) |
|
| 58 | { |
|
| @@ 5-17 (lines=13) @@ | ||
| 2 | ||
| 3 | class HieraquiaController extends AppController { |
|
| 4 | ||
| 5 | public function listar_cadastros() { |
|
| 6 | $this->loadModel('Hieraquia'); |
|
| 7 | $dados = $this->Hieraquia->find('all', |
|
| 8 | array('conditions' => |
|
| 9 | array('ativo' => 1, |
|
| 10 | 'id_usuario' => $this->instancia |
|
| 11 | ) |
|
| 12 | ) |
|
| 13 | ); |
|
| 14 | ||
| 15 | $this->set('hieraquias', $dados); |
|
| 16 | $this->layout = 'wadmin'; |
|
| 17 | } |
|
| 18 | ||
| 19 | public function adicionar_hieraquia() { |
|
| 20 | $this->layout = 'wadmin'; |
|
| @@ 58-71 (lines=14) @@ | ||
| 55 | echo json_encode($produto); |
|
| 56 | } |
|
| 57 | ||
| 58 | public function listar_cadastros() { |
|
| 59 | $this->layout = 'wadmin'; |
|
| 60 | ||
| 61 | $this->set('vendas', $this->Venda->find('all', |
|
| 62 | array('conditions' => |
|
| 63 | array( |
|
| 64 | 'ativo' => 1, |
|
| 65 | 'id_usuario' => $this->instancia, |
|
| 66 | 'orcamento' => 0 |
|
| 67 | ) |
|
| 68 | ) |
|
| 69 | ) |
|
| 70 | ); |
|
| 71 | } |
|
| 72 | ||
| 73 | public function adicionar_cadastro() { |
|
| 74 | $this->layout = 'wadmin'; |
|
| @@ 270-283 (lines=14) @@ | ||
| 267 | return $html; |
|
| 268 | } |
|
| 269 | ||
| 270 | public function adicionar_cadastro() { |
|
| 271 | $this->loadModel('Categoria'); |
|
| 272 | ||
| 273 | $this->set('categorias', $this->Categoria->find('all', |
|
| 274 | array('conditions' => |
|
| 275 | array('ativo' => 1, |
|
| 276 | 'usuario_id' => $this->instancia |
|
| 277 | ) |
|
| 278 | ) |
|
| 279 | ) |
|
| 280 | ); |
|
| 281 | ||
| 282 | $this->layout = 'wadmin'; |
|
| 283 | } |
|
| 284 | ||
| 285 | public function s_adicionar_cadastro() { |
|
| 286 | $dados = $this->request->data('dados'); |
|