Commit 04a2023c6c5c61562dd5e5e5aa10f877251215cd
1 parent
5d159e81
Exists in
master
and in
7 other branches
Atualização do sistema de administração
Showing
8 changed files
with
24 additions
and
12 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin1/catalogo/menus/grupos/index.php
... | ... | @@ -185,7 +185,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
185 | 185 | <div class="form-group form-group-lg"> |
186 | 186 | <label class="col-md-4 control-label" for="perfil">{{{perfis}}}</label> |
187 | 187 | <div class="col-md-4"> |
188 | - <input title="{{{perfis}}}" id="perfil_no-{{id_n1}}" type="text" value="{{{perfil}}}" class="form-control" name="perfil"> | |
188 | + <input title="{{{perfis}}}" id="perfil_no-{{id_n1}}" type="text" value="{{{n1_perfil}}}" class="form-control" name="n1_perfil"> | |
189 | 189 | </div> |
190 | 190 | <div class="col-md-4"> |
191 | 191 | <select title="{{{perfis}}}" class="form-control" onchange="i3GEOadmin.grupos.addInput('perfil_no-{{id_n1}}',this.value)"> | ... | ... |
admin1/catalogo/menus/grupos/listadegrupos/exec.php
... | ... | @@ -41,10 +41,13 @@ if (in_array ( strtoupper ( $funcao ), $funcoesEdicao )) { |
41 | 41 | } |
42 | 42 | include (dirname ( __FILE__ ) . "/../../../../../admin/php/conexao.php"); |
43 | 43 | |
44 | +$id_grupo = $_POST["id_grupo"]; | |
45 | +testaSafeNumerico([$id_grupo]); | |
46 | + | |
44 | 47 | $funcao = strtoupper ( $funcao ); |
45 | 48 | switch ($funcao) { |
46 | 49 | case "ADICIONAR" : |
47 | - $novo = adicionar( $nome_grupo, $desc_grupo, $en, $es, $dbhw ); | |
50 | + $novo = adicionar( $_POST["nome_grupo"], $_POST["desc_grupo"], $_POST["en"], $_POST["es"], $dbhw ); | |
48 | 51 | if ($novo === false) { |
49 | 52 | $dbhw = null; |
50 | 53 | $dbh = null; |
... | ... | @@ -54,7 +57,7 @@ switch ($funcao) { |
54 | 57 | exit (); |
55 | 58 | break; |
56 | 59 | case "ALTERAR" : |
57 | - $novo = alterar ( $id_grupo, $nome_grupo, $desc_grupo, $en, $es, $dbhw ); | |
60 | + $novo = alterar ( $id_grupo, $_POST["nome_grupo"], $_POST["desc_grupo"], $_POST["en"], $_POST["es"], $dbhw ); | |
58 | 61 | if ($novo === false) { |
59 | 62 | $dbhw = null; |
60 | 63 | $dbh = null; | ... | ... |
admin1/catalogo/menus/grupos/subgrupos/index.php
... | ... | @@ -189,7 +189,7 @@ $nome_menu = filter_var ( $_GET ["nome_menu"], FILTER_SANITIZE_STRING ); |
189 | 189 | <div class="form-group form-group-lg"> |
190 | 190 | <label class="col-md-4 control-label" for="perfil">{{{perfis}}}</label> |
191 | 191 | <div class="col-md-4"> |
192 | - <input title="{{{perfis}}}" id="perfil_no-{{id_n2}}" type="text" value="{{{perfil}}}" class="form-control" name="perfil"> | |
192 | + <input title="{{{perfis}}}" id="perfil_no-{{id_n2}}" type="text" value="{{{n2_perfil}}}" class="form-control" name="n2_perfil"> | |
193 | 193 | </div> |
194 | 194 | <div class="col-md-4"> |
195 | 195 | <select title="{{{perfis}}}" class="form-control" onchange="i3GEOadmin.subgrupos.addInput('perfil_no-{{id_n2}}',this.value)"> | ... | ... |
admin1/catalogo/menus/grupos/subgrupos/listadesubgrupos/exec.php
... | ... | @@ -41,10 +41,13 @@ if (in_array ( strtoupper ( $funcao ), $funcoesEdicao )) { |
41 | 41 | } |
42 | 42 | include (dirname ( __FILE__ ) . "/../../../../../../admin/php/conexao.php"); |
43 | 43 | |
44 | +$id_subgrupo = $_POST["id_subgrupo"]; | |
45 | +testaSafeNumerico([$id_subgrupo]); | |
46 | + | |
44 | 47 | $funcao = strtoupper ( $funcao ); |
45 | 48 | switch ($funcao) { |
46 | 49 | case "ADICIONAR" : |
47 | - $novo = adicionar( $nome_subgrupo, $desc_subgrupo, $en, $es, $dbhw ); | |
50 | + $novo = adicionar( $_POST["nome_subgrupo"], $_POST["desc_subgrupo"], $_POST["en"], $_POST["es"], $dbhw ); | |
48 | 51 | if ($novo === false) { |
49 | 52 | $dbhw = null; |
50 | 53 | $dbh = null; |
... | ... | @@ -54,7 +57,7 @@ switch ($funcao) { |
54 | 57 | exit (); |
55 | 58 | break; |
56 | 59 | case "ALTERAR" : |
57 | - $novo = alterar ( $id_subgrupo, $nome_subgrupo, $desc_subgrupo, $en, $es, $dbhw ); | |
60 | + $novo = alterar ( $id_subgrupo, $_POST["nome_subgrupo"], $_POST["desc_subgrupo"], $_POST["en"], $_POST["es"], $dbhw ); | |
58 | 61 | if ($novo === false) { |
59 | 62 | $dbhw = null; |
60 | 63 | $dbh = null; | ... | ... |
admin1/catalogo/menus/grupos/subgrupos/temas/exec.php
... | ... | @@ -45,10 +45,15 @@ if (in_array ( strtoupper ( $funcao ), $funcoesEdicao )) { |
45 | 45 | } |
46 | 46 | include (dirname ( __FILE__ ) . "/../../../../../../admin/php/conexao.php"); |
47 | 47 | |
48 | +$id_n2 = $_POST["id_n2"]; | |
49 | +$id_n3 = $_POST["id_n3"]; | |
50 | +$id_tema = $_POST["id_tema"]; | |
51 | +testaSafeNumerico([$id_tema,$id_n2,$id_n3]); | |
52 | + | |
48 | 53 | $funcao = strtoupper ( $funcao ); |
49 | 54 | switch ($funcao) { |
50 | 55 | case "ORDENA" : |
51 | - $ordem = explode(" ",$ordem); | |
56 | + $ordem = explode(" ",$_POST["ordem"]); | |
52 | 57 | //verifica se existe a mesma quantidade de registros no banco e na lista de ids |
53 | 58 | $dados = pegaDados ( "SELECT ordem from ".$esquemaadmin."i3geoadmin_n3 WHERE id_n2 = $id_n2", $dbh, false ); |
54 | 59 | if(count($dados) != count($ordem)){ |
... | ... | @@ -62,7 +67,7 @@ switch ($funcao) { |
62 | 67 | exit (); |
63 | 68 | } |
64 | 69 | |
65 | - $retorna = i3GeoAdminOrdena($dbhw,$ordem,i3geoadmin_n3,"id_n3"); | |
70 | + $retorna = i3GeoAdminOrdena($dbhw,$ordem,"i3geoadmin_n3","id_n3"); | |
66 | 71 | $dbhw = null; |
67 | 72 | $dbh = null; |
68 | 73 | if ($retorna === false) { |
... | ... | @@ -73,7 +78,7 @@ switch ($funcao) { |
73 | 78 | exit(); |
74 | 79 | break; |
75 | 80 | case "ADICIONAR" : |
76 | - $novo = adicionar( $id_tema, $id_n2, $publicado, $n3_perfil, $ordem, $dbhw ); | |
81 | + $novo = adicionar( $id_tema, $id_n2, $_POST["publicado"], $_POST["n3_perfil"], $_POST["ordem"], $dbhw ); | |
77 | 82 | if ($novo === false) { |
78 | 83 | header ( "HTTP/1.1 500 erro ao consultar banco de dados" ); |
79 | 84 | exit (); |
... | ... | @@ -81,7 +86,7 @@ switch ($funcao) { |
81 | 86 | exit (); |
82 | 87 | break; |
83 | 88 | case "ALTERAR" : |
84 | - $novo = alterar ( $id_n3, $id_tema, $id_n2, $publicado, $n3_perfil, $ordem, $dbhw ); | |
89 | + $novo = alterar ( $id_n3, $id_tema, $id_n2, $_POST["publicado"], $_POST["n3_perfil"], $_POST["ordem"], $dbhw ); | |
85 | 90 | if ($novo === false) { |
86 | 91 | header ( "HTTP/1.1 500 erro ao consultar banco de dados" ); |
87 | 92 | exit (); | ... | ... |
admin1/catalogo/menus/grupos/subgrupos/temas/index.js
... | ... | @@ -40,7 +40,8 @@ i3GEOadmin.temas = { |
40 | 40 | i3GEOadmin.core.iconeAguarde(i3GEOadmin.temas.onde); |
41 | 41 | |
42 | 42 | $.post( |
43 | - "exec.php?funcao=lista&id_n2=" + i3GEOadmin.temas.id_n2 | |
43 | + "exec.php?funcao=lista", | |
44 | + "id_n2=" + i3GEOadmin.temas.id_n2 | |
44 | 45 | ) |
45 | 46 | .done( |
46 | 47 | function(data, status){ | ... | ... |
admin1/catalogo/menus/grupos/subgrupos/temas/index.php
... | ... | @@ -98,7 +98,7 @@ $nome_subgrupo = filter_var ( $_GET ["nome_subgrupo"], FILTER_SANITIZE_STRING ); |
98 | 98 | <div class="form-group form-group-lg"> |
99 | 99 | <label class="col-md-4 control-label" for="perfil">{{{perfis}}}</label> |
100 | 100 | <div class="col-md-4"> |
101 | - <input title="{{{perfis}}}" id="perfil_tema-{{id_n3}}" type="text" value="{{{perfil}}}" class="form-control" name="perfil"> | |
101 | + <input title="{{{perfis}}}" id="perfil_tema-{{id_n3}}" type="text" value="{{{n3_perfil}}}" class="form-control" name="n3_perfil"> | |
102 | 102 | </div> |
103 | 103 | <div class="col-md-4"> |
104 | 104 | <select title="{{{perfis}}}" class="form-control" onchange="i3GEOadmin.temas.addInput('perfil_tema-{{id_n3}}',this.value)"> | ... | ... |