Initial import.
[siap.git] / site / inc / routines / routines.php
CommitLineData
696f20d5
MS
1<?\r
2include("../../../_system/app.php");\r
3\r
4$rotina = $input->get('action');\r
5\r
6switch($rotina) {\r
7 case 'insertComentario':\r
8 $load->config('classes/CasoEstudo.php');\r
9 $o_casoEstudo = new CasoEstudo();\r
10 $retorno = $o_casoEstudo->insertComentario();\r
11 switch($retorno){\r
12 case 0:\r
13 $input->setSession('msg','Erro ao inserir comentário. Tente novamente mais tarde.');\r
14 break;\r
15 case 1:\r
16 $input->setSession('msg','Comentário inserido com sucesso!');\r
17 break;\r
18 }\r
19 redir($_SERVER["HTTP_REFERER"]);\r
20 die;\r
21 break;\r
22 case 'inativeComentario':\r
23 $load->config('classes/CasoEstudo.php');\r
24 $o_casoEstudo = new CasoEstudo();\r
25 $retorno = $o_casoEstudo->inativeComentario($input->get('id'));\r
26 switch($retorno){\r
27 case 0:\r
28 $input->setSession('msg','Erro ao inativar comentário. Tente novamente mais tarde.');\r
29 break;\r
30 case 1:\r
31 $input->setSession('msg','Comentário inativado com sucesso!');\r
32 break;\r
33 }\r
34 redir($_SERVER["HTTP_REFERER"]);\r
35 die;\r
36 break;\r
37}\r
38?>