Commit 13897b9c7de143ebdd81267b1f326ceebb7c6b68
1 parent
ec6ddfc0
Exists in
master
and in
7 other branches
Correção no relatório e na função estatística da ferramenta tabela
Showing
3 changed files
with
29 additions
and
14 deletions
Show diff stats
classesjs/classe_editorol.js
... | ... | @@ -691,7 +691,7 @@ i3GEO.editorOL = { |
691 | 691 | //w.document.close(); |
692 | 692 | if(!document.getElementById("panellegendaeditorOL")){ |
693 | 693 | YAHOO.namespace("legendaeditorOL.container"); |
694 | - YAHOO.legendaeditorOL.container.panel = new YAHOO.widget.Panel("panellegendaeditorOL", {zIndex:20000, iframe:true, width:"auto", visible:false, draggable:true, close:true } ); | |
694 | + YAHOO.legendaeditorOL.container.panel = new YAHOO.widget.Panel("panellegendaeditorOL", {zIndex:20000, iframe:true, width:"auto", maxHeight:"300px", visible:false, draggable:true, close:true } ); | |
695 | 695 | YAHOO.legendaeditorOL.container.panel.setBody(ins); |
696 | 696 | YAHOO.legendaeditorOL.container.panel.setHeader($trad("p3")); |
697 | 697 | YAHOO.legendaeditorOL.container.panel.setFooter(""); | ... | ... |
ferramentas/tabela/exec.php
... | ... | @@ -34,7 +34,7 @@ Calcula estatísticas básicas de uma tabela de um tema. |
34 | 34 | case "ESTATISTICA": |
35 | 35 | include_once(dirname(__FILE__)."/../../classesphp/classe_atributos.php"); |
36 | 36 | $m = new Atributos($map_file,$tema,$locaplic,$ext); |
37 | - $retorno = $m->estatDescritivas($item,$exclui); | |
37 | + $retorno = $m->estatDescritivas($_GET["item"],$_GET["exclui"]); | |
38 | 38 | break; |
39 | 39 | /* |
40 | 40 | Valor: GRAFICOPIZZA | ... | ... |
ferramentas/tabela/relatorio.php
... | ... | @@ -12,12 +12,14 @@ include_once (dirname(__FILE__)."/../../classesphp/sani_request.php"); |
12 | 12 | $_GET = array_merge($_GET,$_POST); |
13 | 13 | |
14 | 14 | $nomesrel = $_GET["nomesrel"]; |
15 | +$temarel = $_GET["temarel"]; | |
15 | 16 | $ordemrel = $_GET["ordemrel"]; |
16 | 17 | $itensrel = $_GET["itensrel"]; |
17 | 18 | $itemagruparel = $_GET["itemagruparel"]; |
18 | 19 | |
19 | -if (isset($_GET["g_sid"])) | |
20 | -{session_id($_GET["g_sid"]);} | |
20 | +if (isset($_GET["g_sid"])){ | |
21 | + session_id($_GET["g_sid"]); | |
22 | +} | |
21 | 23 | session_start(); |
22 | 24 | |
23 | 25 | $map_file = $_SESSION["map_file"]; |
... | ... | @@ -61,8 +63,9 @@ else{ |
61 | 63 | $t1 = $t1Temp; |
62 | 64 | } |
63 | 65 | |
64 | -if($itemagruparel != "" && !in_array($itemagruparel,$colunas)) | |
65 | -{$colunas[] = $itemagruparel;} | |
66 | +if($itemagruparel != "" && !in_array($itemagruparel,$colunas)){ | |
67 | + $colunas[] = $itemagruparel; | |
68 | +} | |
66 | 69 | |
67 | 70 | $temp = explode(",",$itensrel); |
68 | 71 | $itensrel = array(); |
... | ... | @@ -81,28 +84,38 @@ if($ext && $ext != ""){ |
81 | 84 | $extatual = $mapa->extent; |
82 | 85 | $extatual->setextent((min($e[0],$e[2])),(min($e[1],$e[3])),(max($e[0],$e[2])),(max($e[1],$e[3]))); |
83 | 86 | } |
87 | + | |
84 | 88 | $layer = $mapa->getlayerbyname($temarel); |
85 | 89 | $layer->set("template","none.html"); |
86 | 90 | //$layer->set("data",$layer->data."options='-c client_encoding=LATIN1'"); |
87 | 91 | $existesel = "nao"; |
92 | + | |
88 | 93 | /* |
89 | 94 | if (file_exists($map_file."qy")) |
90 | 95 | {$mapa->loadquery($map_file."qy");} |
91 | 96 | */ |
92 | 97 | carregaquery2($map_file,$layer,$mapa); |
93 | -if ($layer->getNumresults() > 0){$existesel = "sim";} | |
94 | -if ($existesel == "nao") | |
95 | -{$layer->querybyrect($mapa->extent);} | |
98 | + | |
99 | +if ($layer->getNumresults() > 0){ | |
100 | + $existesel = "sim"; | |
101 | +} | |
102 | +if ($existesel == "nao"){ | |
103 | + $layer->querybyrect($mapa->extent); | |
104 | +} | |
105 | + | |
96 | 106 | $layer->open(); |
97 | -if(strtoupper($layer->getmetadata("convcaracter")) == "NAO") | |
98 | -{$convC = false;} | |
99 | -else | |
100 | -{$convC = true;} | |
107 | +if(strtoupper($layer->getmetadata("convcaracter")) == "NAO"){ | |
108 | + $convC = false; | |
109 | +} | |
110 | +else{ | |
111 | + $convC = true; | |
112 | +} | |
113 | + | |
101 | 114 | //$registros[] = array(); |
102 | 115 | $res_count = $layer->getNumresults(); |
103 | 116 | for ($i = 0; $i < $res_count; $i++){ |
104 | 117 | $valitem = array(); |
105 | - if($versao == 6){ | |
118 | + if($versao >= 6){ | |
106 | 119 | $shape = $layer->getShape($layer->getResult($i)); |
107 | 120 | } |
108 | 121 | else{ |
... | ... | @@ -117,6 +130,7 @@ for ($i = 0; $i < $res_count; $i++){ |
117 | 130 | } |
118 | 131 | $valitem[$item] = $v; |
119 | 132 | } |
133 | + | |
120 | 134 | if ($itemagruparel != ""){ |
121 | 135 | $grupo = $valitem[$itemagruparel]; |
122 | 136 | } |
... | ... | @@ -133,6 +147,7 @@ for ($i = 0; $i < $res_count; $i++){ |
133 | 147 | } |
134 | 148 | } |
135 | 149 | $fechou = $layer->close(); |
150 | + | |
136 | 151 | restauraCon($map_file,$postgis_mapa); |
137 | 152 | |
138 | 153 | if(isset($tiporel) && $tiporel == "csv"){ | ... | ... |