@@ 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'; |
@@ 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'; |
@@ 21-34 (lines=14) @@ | ||
18 | $this->layout = 'wadmin'; |
|
19 | } |
|
20 | ||
21 | public function adicionar_cadastro() { |
|
22 | $this->loadModel('CategoriaBanner'); |
|
23 | ||
24 | $this->set('categorias', $this->CategoriaBanner->find('all', |
|
25 | array('conditions' => |
|
26 | array('ativo' => 1, |
|
27 | 'usuario_id' => $this->instancia |
|
28 | ) |
|
29 | ) |
|
30 | ) |
|
31 | ); |
|
32 | ||
33 | $this->layout = 'wadmin'; |
|
34 | } |
|
35 | ||
36 | public function editar_cadastro($id) { |
|
37 | $this->loadModel('CategoriaBanner'); |
@@ 61-72 (lines=12) @@ | ||
58 | } |
|
59 | } |
|
60 | ||
61 | function listar_cadastros() { |
|
62 | $this->layout = 'wadmin'; |
|
63 | ||
64 | $this->set('clientes', $this->Cliente->find('all', |
|
65 | array('conditions' => |
|
66 | array('ativo' => 1, |
|
67 | 'id_usuario' => $this->instancia |
|
68 | ) |
|
69 | ) |
|
70 | ) |
|
71 | ); |
|
72 | } |
|
73 | ||
74 | function editar_cliente() { |
|
75 | $this->layout = 'wadmin'; |
@@ 313-326 (lines=14) @@ | ||
310 | return $html; |
|
311 | } |
|
312 | ||
313 | public function adicionar_cadastro() { |
|
314 | $this->loadModel('Categoria'); |
|
315 | ||
316 | $this->set('categorias', $this->Categoria->find('all', |
|
317 | array('conditions' => |
|
318 | array('ativo' => 1, |
|
319 | 'usuario_id' => $this->instancia |
|
320 | ) |
|
321 | ) |
|
322 | ) |
|
323 | ); |
|
324 | ||
325 | $this->layout = 'wadmin'; |
|
326 | } |
|
327 | ||
328 | public function s_adicionar_cadastro() { |
|
329 | $dados = $this->request->data('dados'); |