Commit aa467d53a5ddf62c9ab8d4c297320c2c03a28054
1 parent
8405f8f5
Exists in
master
and in
7 other branches
Correções no uso de xbase
Showing
10 changed files
with
218 additions
and
40 deletions
Show diff stats
classesphp/classe_analise.php
| ... | ... | @@ -669,10 +669,9 @@ $locaplic - diretório da aplicação i3geo |
| 669 | 669 | $def[] = array("ind1","N","5","0"); |
| 670 | 670 | $def[] = array("ind2","N","5","0"); |
| 671 | 671 | if(!function_exists(dbase_create)) |
| 672 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 672 | + {$db = xbase_create($nomeshp.".dbf", $def);} | |
| 673 | 673 | else |
| 674 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 675 | - | |
| 674 | + {$db = dbase_create($nomeshp.".dbf", $def);} | |
| 676 | 675 | $dbname = $nomeshp.".dbf"; |
| 677 | 676 | //le o arquivo linha a linha, pulando a primeira |
| 678 | 677 | //acrescenta os pontos no shape file formando as linhas |
| ... | ... | @@ -702,14 +701,20 @@ $locaplic - diretório da aplicação i3geo |
| 702 | 701 | $ShapeObj->add($linha); |
| 703 | 702 | $novoshpf->addShape($ShapeObj); |
| 704 | 703 | $registro = array($i1,$i2,$i3,$i4,$i5,$i6); |
| 704 | + if(!function_exists(dbase_create)) | |
| 705 | 705 | xbase_add_record($db,$registro); |
| 706 | + else | |
| 707 | + dbase_add_record($db,$registro); | |
| 706 | 708 | $linha->free(); |
| 707 | 709 | $ShapeObj->free(); |
| 708 | 710 | } |
| 709 | 711 | } |
| 710 | 712 | $novoshpf->free(); |
| 713 | + if(!function_exists(dbase_create)) | |
| 711 | 714 | xbase_close($db); |
| 712 | - fclose($abre); | |
| 715 | + else | |
| 716 | + dbase_close($db); | |
| 717 | + fclose($abre); | |
| 713 | 718 | //adiciona no mapa atual o novo tema |
| 714 | 719 | $novolayer = criaLayer($this->mapa,MS_LAYER_LINE,MS_DEFAULT,("Delaunay (".$nomefinal.")"),$metaClasse="SIM"); |
| 715 | 720 | $novolayer->set("data",$nomeshp.".shp"); |
| ... | ... | @@ -767,7 +772,6 @@ $locaplic - diretório da aplicação i3geo |
| 767 | 772 | $def[] = array("ind2","N","5","0"); |
| 768 | 773 | $def[] = array("b1","C","6"); |
| 769 | 774 | $def[] = array("b2","C","6"); |
| 770 | - $dbLinhas = xbase_create($nomeshpLinhas.".dbf", $def); | |
| 771 | 775 | if(!function_exists(dbase_create)) |
| 772 | 776 | {$dbLinhas = xbase_create($nomeshpLinhas.".dbf", $def);} |
| 773 | 777 | else |
| ... | ... | @@ -829,7 +833,10 @@ $locaplic - diretório da aplicação i3geo |
| 829 | 833 | $ShapeObj->add($linha); |
| 830 | 834 | $novoshpLinhas->addShape($ShapeObj); |
| 831 | 835 | $registro = array($i1,$i2,$i3,$i4,$i5,$i6,$i[7],$i[8]); |
| 836 | + if(!function_exists(dbase_create)) | |
| 832 | 837 | xbase_add_record($dbLinhas,$registro); |
| 838 | + else | |
| 839 | + dbase_add_record($dbLinhas,$registro); | |
| 833 | 840 | $ShapeObj->free(); |
| 834 | 841 | } |
| 835 | 842 | } |
| ... | ... | @@ -844,11 +851,17 @@ $locaplic - diretório da aplicação i3geo |
| 844 | 851 | $ns = $ShapeObjp->convexhull(); |
| 845 | 852 | $novoshpPoligonos->addShape($ns); |
| 846 | 853 | $registro = array($ns->getArea()); |
| 854 | + if(!function_exists(dbase_create)) | |
| 847 | 855 | xbase_add_record($dbPoligonos,$registro); |
| 856 | + else | |
| 857 | + dbase_add_record($dbPoligonos,$registro); | |
| 848 | 858 | $ShapeObjp->free(); |
| 849 | 859 | } |
| 850 | 860 | $novoshpPoligonos->free(); |
| 861 | + if(!function_exists(dbase_create)) | |
| 851 | 862 | xbase_close($dbPoligonos); |
| 863 | + else | |
| 864 | + dbase_close($dbPoligonos); | |
| 852 | 865 | // |
| 853 | 866 | //adiciona o layer com os polígonos no mapa |
| 854 | 867 | // |
| ... | ... | @@ -874,12 +887,18 @@ $locaplic - diretório da aplicação i3geo |
| 874 | 887 | $ShapeObj->add($linha); |
| 875 | 888 | $novoshpLinhas->addShape($ShapeObj->convexhull()); |
| 876 | 889 | $registro = array(0,0,0,0,0,0,0,0); |
| 890 | + if(!function_exists(dbase_create)) | |
| 877 | 891 | xbase_add_record($dbLinhas,$registro); |
| 892 | + else | |
| 893 | + dbase_add_record($dbLinhas,$registro); | |
| 878 | 894 | $linha->free(); |
| 879 | 895 | $ShapeObj->free(); |
| 880 | 896 | } |
| 881 | 897 | $novoshpLinhas->free(); |
| 898 | + if(!function_exists(dbase_create)) | |
| 882 | 899 | xbase_close($dbLinhas); |
| 900 | + else | |
| 901 | + dbase_close($dbLinhas); | |
| 883 | 902 | fclose($abre); |
| 884 | 903 | $novolayer = criaLayer($this->mapa,MS_LAYER_LINE,MS_DEFAULT,("Voronoi (".$nomeLinhas.")"),$metaClasse="SIM"); |
| 885 | 904 | $novolayer->set("data",$nomeshpLinhas.".shp"); |
| ... | ... | @@ -978,11 +997,12 @@ $locaplic - Localização do I3geo. |
| 978 | 997 | } |
| 979 | 998 | } |
| 980 | 999 | if(!function_exists(dbase_create)) |
| 981 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 1000 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 982 | 1001 | else |
| 983 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 1002 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 984 | 1003 | //acrescenta os pontos no novo shapefile |
| 985 | 1004 | $dbname = $nomeshp.".dbf"; |
| 1005 | + $db=xbase_open($dbname,2); | |
| 986 | 1006 | foreach($pontos as $ponto) |
| 987 | 1007 | { |
| 988 | 1008 | $sopen = $layerPt->open(); |
| ... | ... | @@ -1115,11 +1135,12 @@ function distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorig |
| 1115 | 1135 | $def[] = array("origem","C","255"); |
| 1116 | 1136 | $def[] = array("destino","C","255"); |
| 1117 | 1137 | if(!function_exists(dbase_create)) |
| 1118 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 1138 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 1119 | 1139 | else |
| 1120 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 1140 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 1121 | 1141 | //acrescenta os pontos no novo shapefile |
| 1122 | 1142 | $dbname = $nomeshp.".dbf"; |
| 1143 | + $db=xbase_open($dbname,2); | |
| 1123 | 1144 | foreach ($shapesorigem as $sorigem) |
| 1124 | 1145 | { |
| 1125 | 1146 | $valororigem = $sorigem->values[$itemorigem]; |
| ... | ... | @@ -1246,11 +1267,12 @@ nome do layer criado com o buffer. |
| 1246 | 1267 | foreach ($items as $ni) |
| 1247 | 1268 | {$def[] = array($ni,"C","254");} |
| 1248 | 1269 | if(!function_exists(dbase_create)) |
| 1249 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 1270 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 1250 | 1271 | else |
| 1251 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 1272 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 1252 | 1273 | //acrescenta os pontos no novo shapefile |
| 1253 | 1274 | $dbname = $nomeshp.".dbf"; |
| 1275 | + $db=xbase_open($dbname,2); | |
| 1254 | 1276 | for($i = 0;$i < count($buffers);++$i) |
| 1255 | 1277 | { |
| 1256 | 1278 | $reg[] = $i; |
| ... | ... | @@ -1336,11 +1358,12 @@ $locaplic - Localização do I3geo. |
| 1336 | 1358 | foreach ($items as $ni) |
| 1337 | 1359 | {$def[] = array($ni,"C","254");} |
| 1338 | 1360 | if(!function_exists(dbase_create)) |
| 1339 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 1361 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 1340 | 1362 | else |
| 1341 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 1363 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 1342 | 1364 | //acrescenta os pontos no novo shapefile |
| 1343 | 1365 | $dbname = $nomeshp.".dbf"; |
| 1366 | + $db=xbase_open($dbname,2); | |
| 1344 | 1367 | for($i = 0;$i < count($centroides);++$i) |
| 1345 | 1368 | { |
| 1346 | 1369 | foreach ($items as $ni) |
| ... | ... | @@ -1416,11 +1439,12 @@ $npty - Número de pontos em Y (opcional) |
| 1416 | 1439 | $def[] = array("x","C","20"); |
| 1417 | 1440 | $def[] = array("y","C","20"); |
| 1418 | 1441 | if(!function_exists(dbase_create)) |
| 1419 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 1442 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 1420 | 1443 | else |
| 1421 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 1444 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 1422 | 1445 | //acrescenta os pontos no novo shapefile |
| 1423 | 1446 | $dbname = $nomeshp.".dbf"; |
| 1447 | + $db=xbase_open($dbname,2); | |
| 1424 | 1448 | $reg = array(); |
| 1425 | 1449 | $w = $this->mapa->width; |
| 1426 | 1450 | $h = $this->mapa->height; |
| ... | ... | @@ -1531,11 +1555,12 @@ $npty - Número de pontos em Y (opcional) |
| 1531 | 1555 | $def = array(); |
| 1532 | 1556 | $def[] = array("id","C","20"); |
| 1533 | 1557 | if(!function_exists(dbase_create)) |
| 1534 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 1558 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 1535 | 1559 | else |
| 1536 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 1560 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 1537 | 1561 | //acrescenta os pontos no novo shapefile |
| 1538 | 1562 | $dbname = $nomeshp.".dbf"; |
| 1563 | + $db=xbase_open($dbname,2); | |
| 1539 | 1564 | $reg = array(); |
| 1540 | 1565 | $w = $this->mapa->width; |
| 1541 | 1566 | $h = $this->mapa->height; |
| ... | ... | @@ -1672,11 +1697,12 @@ $npty - Número de pontos em Y (opcional) |
| 1672 | 1697 | $def = array(); |
| 1673 | 1698 | $def[] = array("id","C","20"); |
| 1674 | 1699 | if(!function_exists(dbase_create)) |
| 1675 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 1700 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 1676 | 1701 | else |
| 1677 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 1702 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 1678 | 1703 | //acrescenta os pontos no novo shapefile |
| 1679 | 1704 | $dbname = $nomeshp.".dbf"; |
| 1705 | + $db=xbase_open($dbname,2); | |
| 1680 | 1706 | $reg = array(); |
| 1681 | 1707 | $w = $this->mapa->width; |
| 1682 | 1708 | $h = $this->mapa->height; |
| ... | ... | @@ -1811,10 +1837,12 @@ $locaplic - Localização do I3geo |
| 1811 | 1837 | {$def[] = array($ni,"C","254");} |
| 1812 | 1838 | $def[] = array("npontos","N","10","0"); |
| 1813 | 1839 | if(!function_exists(dbase_create)) |
| 1814 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 1840 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 1815 | 1841 | else |
| 1816 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 1842 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 1843 | + //acrescenta os pontos no novo shapefile | |
| 1817 | 1844 | $dbname = $nomeshp.".dbf"; |
| 1845 | + $db=xbase_open($dbname,2); | |
| 1818 | 1846 | $sopen = $layerPo->open(); |
| 1819 | 1847 | if($sopen == MS_FAILURE){return "erro";} |
| 1820 | 1848 | $layerPo->whichShapes($this->mapa->extent); |
| ... | ... | @@ -1928,10 +1956,12 @@ Salva o mapa acrescentando um novo layer com o resultado. |
| 1928 | 1956 | if($item==""){$item="nenhum";} |
| 1929 | 1957 | $def[] = array($item,"C","254"); |
| 1930 | 1958 | if(!function_exists(dbase_create)) |
| 1931 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 1959 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 1932 | 1960 | else |
| 1933 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 1961 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 1962 | + //acrescenta os pontos no novo shapefile | |
| 1934 | 1963 | $dbname = $nomeshp.".dbf"; |
| 1964 | + $db=xbase_open($dbname,2); | |
| 1935 | 1965 | $classes = array_keys($dissolve); |
| 1936 | 1966 | foreach ($classes as $classe) |
| 1937 | 1967 | { |
| ... | ... | @@ -2035,10 +2065,12 @@ $locaplic - Localização do I3geo |
| 2035 | 2065 | if($item==""){$item="nenhum";} |
| 2036 | 2066 | $def[] = array($item,"C","254"); |
| 2037 | 2067 | if(!function_exists(dbase_create)) |
| 2038 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 2068 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 2039 | 2069 | else |
| 2040 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 2070 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 2071 | + //acrescenta os pontos no novo shapefile | |
| 2041 | 2072 | $dbname = $nomeshp.".dbf"; |
| 2073 | + $db=xbase_open($dbname,2); | |
| 2042 | 2074 | $classes = array_keys($dissolve); |
| 2043 | 2075 | foreach ($classes as $classe) |
| 2044 | 2076 | { |
| ... | ... | @@ -2303,9 +2335,12 @@ $operacao - Tipo de análise. |
| 2303 | 2335 | $novoshpf = ms_newShapefileObj($nomeshp, $tiposhapefile); |
| 2304 | 2336 | $def[] = array("ID","C","250"); |
| 2305 | 2337 | if(!function_exists(dbase_create)) |
| 2306 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 2338 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 2307 | 2339 | else |
| 2308 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 2340 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 2341 | + //acrescenta os pontos no novo shapefile | |
| 2342 | + $dbname = $nomeshp.".dbf"; | |
| 2343 | + $db=xbase_open($dbname,2); | |
| 2309 | 2344 | $conta = 0; |
| 2310 | 2345 | foreach ($shapes as $s) |
| 2311 | 2346 | { | ... | ... |
classesphp/classe_mapa.php
| ... | ... | @@ -1314,10 +1314,12 @@ $canal - Identificador do canal (ordem em que está no RSS) |
| 1314 | 1314 | $def[] = array("DESC","C","254"); |
| 1315 | 1315 | $def[] = array("CATEGORIA","C","254"); |
| 1316 | 1316 | if(!function_exists(dbase_create)) |
| 1317 | - {xbase_create($nomeshp.".dbf", $def);} | |
| 1317 | + {$db = xbase_create($nomeshp.".dbf", $def);xbase_close($db);} | |
| 1318 | 1318 | else |
| 1319 | - {dbase_create($nomeshp.".dbf", $def);} | |
| 1319 | + {$db = dbase_create($nomeshp.".dbf", $def);dbase_close($db);} | |
| 1320 | + //acrescenta os pontos no novo shapefile | |
| 1320 | 1321 | $dbname = $nomeshp.".dbf"; |
| 1322 | + $db=xbase_open($dbname,2); | |
| 1321 | 1323 | $reg = array(); |
| 1322 | 1324 | $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); |
| 1323 | 1325 | //acrescenta os shapes | ... | ... |
ferramentas/funcoes.js
| ... | ... | @@ -154,6 +154,8 @@ function cor(obj) |
| 154 | 154 | {window.parent.i3GEO.util.abreCor("wdocai",obj);} |
| 155 | 155 | //mostra uma nova opcao quando o usuário clica em proximo ou anterior. |
| 156 | 156 | //É utilizado nos menus de análise |
| 157 | +//i3geo.util.proximoAnterior | |
| 158 | +// | |
| 157 | 159 | function mostraOpcao(anterior,proxima,texto,idatual) |
| 158 | 160 | { |
| 159 | 161 | if(document.getElementById(idatual)){document.getElementById("resultado").removeChild(document.getElementById(idatual))} | ... | ... |
ferramentas/funcoes_compacto.js
| ... | ... | @@ -19,7 +19,7 @@ document.body.style.backgroundColor="#F0F0F0";$tradAjuda=function(tipo,id){ eval |
| 19 | 19 | else{novoel.style.filter='alpha(opacity=45)';} |
| 20 | 20 | if(!g_locaplic){g_locaplic="..";} |
| 21 | 21 | var i="<div id=aguardeTotal1 style='display:none;padding:5px;border:1px solid black;text-align:center;background-color:white;position:absolute;z-index:10001;left:"+w/2+"px;top:"+((h/2)-200)+"px;'><img src='"+g_locaplic+"/imagens/aguarde.gif'/><span style=color:red > <b>Aguarde...</b></span></div>"; document.body.appendChild(novoel); document.body.innerHTML+=i;} |
| 22 | - document.getElementById("aguardeTotal").style.display=tipo; document.getElementById("aguardeTotal1").style.display=tipo;}function cor(obj){window.parent.i3GEO.util.abreCor("wdocai",obj);} function mostraOpcao(anterior,proxima,texto,idatual){ if(document.getElementById(idatual)){document.getElementById("resultado").removeChild(document.getElementById(idatual))} | |
| 22 | + document.getElementById("aguardeTotal").style.display=tipo; document.getElementById("aguardeTotal1").style.display=tipo;}function cor(obj){window.parent.i3GEO.util.abreCor("wdocai",obj);} function mostraOpcao(anterior,proxima,texto,idatual){ if(document.getElementById(idatual)){document.getElementById("resultado").removeChild(document.getElementById(idatual))} | |
| 23 | 23 | if(!document.getElementById(idatual)){ var ndiv=document.createElement("div"); ndiv.id=idatual; texto+="<br><br><table style='width:100%;background-color:#F2F2F2;' ><tr style='width:100%'>"; if(anterior !=""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:#F2F2F2;'><input id="+idatual+"anterior_ onclick='"+anterior+"' type='button' value=' '/></td>";} |
| 24 | 24 | if(proxima !=""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:#F2F2F2;'><input id="+idatual+"proxima_ onclick='"+proxima+"' type='button' value=' '/></td>";} |
| 25 | 25 | ndiv.innerHTML=texto+"</tr></table>"; document.getElementById("resultado").appendChild(ndiv); new YAHOO.widget.Button(idatual+"anterior_",{ onclick:{fn: function(){ eval(anterior+"()");}, lazyloadmenu:true }}); new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn: function(){ eval(proxima+"()");}, lazyloadmenu:true }}); var i=$i(idatual+"proxima_-button"); if(i){ i.style.backgroundImage="url('../../imagens/player_avanca.png')"; i.style.backgroundRepeat="no-repeat"; i.style.backgroundPosition="center center";} | ... | ... |
ferramentas/i3geo_tudo_compacto.js
| ... | ... | @@ -20,7 +20,7 @@ document.body.style.backgroundColor="#F0F0F0";$tradAjuda=function(tipo,id){ eval |
| 20 | 20 | else{novoel.style.filter='alpha(opacity=45)';} |
| 21 | 21 | if(!g_locaplic){g_locaplic="..";} |
| 22 | 22 | var i="<div id=aguardeTotal1 style='display:none;padding:5px;border:1px solid black;text-align:center;background-color:white;position:absolute;z-index:10001;left:"+w/2+"px;top:"+((h/2)-200)+"px;'><img src='"+g_locaplic+"/imagens/aguarde.gif'/><span style=color:red > <b>Aguarde...</b></span></div>"; document.body.appendChild(novoel); document.body.innerHTML+=i;} |
| 23 | - document.getElementById("aguardeTotal").style.display=tipo; document.getElementById("aguardeTotal1").style.display=tipo;}function cor(obj){window.parent.i3GEO.util.abreCor("wdocai",obj);} function mostraOpcao(anterior,proxima,texto,idatual){ if(document.getElementById(idatual)){document.getElementById("resultado").removeChild(document.getElementById(idatual))} | |
| 23 | + document.getElementById("aguardeTotal").style.display=tipo; document.getElementById("aguardeTotal1").style.display=tipo;}function cor(obj){window.parent.i3GEO.util.abreCor("wdocai",obj);} function mostraOpcao(anterior,proxima,texto,idatual){ if(document.getElementById(idatual)){document.getElementById("resultado").removeChild(document.getElementById(idatual))} | |
| 24 | 24 | if(!document.getElementById(idatual)){ var ndiv=document.createElement("div"); ndiv.id=idatual; texto+="<br><br><table style='width:100%;background-color:#F2F2F2;' ><tr style='width:100%'>"; if(anterior !=""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:#F2F2F2;'><input id="+idatual+"anterior_ onclick='"+anterior+"' type='button' value=' '/></td>";} |
| 25 | 25 | if(proxima !=""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:#F2F2F2;'><input id="+idatual+"proxima_ onclick='"+proxima+"' type='button' value=' '/></td>";} |
| 26 | 26 | ndiv.innerHTML=texto+"</tr></table>"; document.getElementById("resultado").appendChild(ndiv); new YAHOO.widget.Button(idatual+"anterior_",{ onclick:{fn: function(){ eval(anterior+"()");}, lazyloadmenu:true }}); new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn: function(){ eval(proxima+"()");}, lazyloadmenu:true }}); var i=$i(idatual+"proxima_-button"); if(i){ i.style.backgroundImage="url('../../imagens/player_avanca.png')"; i.style.backgroundRepeat="no-repeat"; i.style.backgroundPosition="center center";} |
| ... | ... | @@ -6896,7 +6896,7 @@ i3GEO.util = { |
| 6896 | 6896 | do { |
| 6897 | 6897 | curleft += obj.offsetLeft-obj.scrollLeft; |
| 6898 | 6898 | curtop += obj.offsetTop-obj.scrollTop; |
| 6899 | - } while (obj === obj.offsetParent); | |
| 6899 | + } while (obj = obj.offsetParent); | |
| 6900 | 6900 | } |
| 6901 | 6901 | } |
| 6902 | 6902 | return [curleft+document.body.scrollLeft,curtop+document.body.scrollTop]; |
| ... | ... | @@ -7758,7 +7758,77 @@ i3GEO.util = { |
| 7758 | 7758 | } |
| 7759 | 7759 | else |
| 7760 | 7760 | {i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid);} |
| 7761 | - } | |
| 7761 | + }, | |
| 7762 | + /* | |
| 7763 | + Function: proximoAnterior | |
| 7764 | + | |
| 7765 | + Cria uma sequência de opções com botão de anterior e próximo. É utilizado principalmente pelas | |
| 7766 | + ferramentas de análise espacial, onde o usuário segue uma sequência de operações de escolha | |
| 7767 | + de parâmetros. | |
| 7768 | + | |
| 7769 | + Parametros: | |
| 7770 | + | |
| 7771 | + anterior {String} - nome da função que é executada para voltar à tela anterior. Pode ser "". | |
| 7772 | + | |
| 7773 | + proxima {String} - nome da função que é executada para avançar para a próxima tela. Pode ser "". | |
| 7774 | + | |
| 7775 | + texto {String} - texto que comporá a tela atual | |
| 7776 | + | |
| 7777 | + idatual {String} - id do elemento DIV que será criado para inserir o conteúdo definido em 'texto" | |
| 7778 | + | |
| 7779 | + container {String} - id do elemento DIV já existente que receberá as telas. | |
| 7780 | + */ | |
| 7781 | + proximoAnterior: function(anterior,proxima,texto,idatual,container){ | |
| 7782 | + var temp = $i(idatual), | |
| 7783 | + ndiv = document.createElement("div"), | |
| 7784 | + nids, | |
| 7785 | + i; | |
| 7786 | + | |
| 7787 | + if(temp){$i(container).removeChild(temp);} | |
| 7788 | + if (!document.getElementById(idatual)) | |
| 7789 | + { | |
| 7790 | + ndiv.id = idatual; | |
| 7791 | + texto += "<br><br><table style='width:100%;background-color:#F2F2F2;' ><tr style='width:100%'>"; | |
| 7792 | + if (anterior !== "") | |
| 7793 | + {texto += "<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:#F2F2F2;'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>";} | |
| 7794 | + if (proxima !== "") | |
| 7795 | + {texto += "<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:#F2F2F2;'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>";} | |
| 7796 | + ndiv.innerHTML = texto+"</tr></table>"; | |
| 7797 | + | |
| 7798 | + $i(container).appendChild(ndiv); | |
| 7799 | + | |
| 7800 | + new YAHOO.widget.Button(idatual+"anterior_",{ | |
| 7801 | + onclick:{fn: function(){ | |
| 7802 | + eval(anterior+"()"); | |
| 7803 | + }, | |
| 7804 | + lazyloadmenu:true | |
| 7805 | + }}); | |
| 7806 | + new YAHOO.widget.Button(idatual+"proxima_", | |
| 7807 | + {onclick:{fn: function(){ | |
| 7808 | + eval(proxima+"()"); | |
| 7809 | + }, | |
| 7810 | + lazyloadmenu:true | |
| 7811 | + }}); | |
| 7812 | + i = $i(idatual+"proxima_-button"); | |
| 7813 | + if(i){ | |
| 7814 | + i.style.backgroundImage = "url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')"; | |
| 7815 | + i.style.backgroundRepeat = "no-repeat"; | |
| 7816 | + i.style.backgroundPosition = "center center"; | |
| 7817 | + } | |
| 7818 | + i = $i(idatual+"anterior_-button"); | |
| 7819 | + if(i){ | |
| 7820 | + i.style.backgroundImage = "url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')"; | |
| 7821 | + i.style.backgroundRepeat = "no-repeat"; | |
| 7822 | + i.style.backgroundPosition = "center center"; | |
| 7823 | + } | |
| 7824 | + } | |
| 7825 | + temp = $i(container).getElementsByTagName("div"); | |
| 7826 | + nids = temp.length; | |
| 7827 | + for (i=0;i<nids;i++){ | |
| 7828 | + temp[i].style.display="none"; | |
| 7829 | + } | |
| 7830 | + $i(idatual).style.display="block"; | |
| 7831 | + } | |
| 7762 | 7832 | }; |
| 7763 | 7833 | // |
| 7764 | 7834 | //alias | ... | ... |
ferramentas/i3geo_tudo_compacto.js.php
| ... | ... | @@ -20,7 +20,7 @@ document.body.style.backgroundColor="#F0F0F0";$tradAjuda=function(tipo,id){ eval |
| 20 | 20 | else{novoel.style.filter='alpha(opacity=45)';} |
| 21 | 21 | if(!g_locaplic){g_locaplic="..";} |
| 22 | 22 | var i="<div id=aguardeTotal1 style='display:none;padding:5px;border:1px solid black;text-align:center;background-color:white;position:absolute;z-index:10001;left:"+w/2+"px;top:"+((h/2)-200)+"px;'><img src='"+g_locaplic+"/imagens/aguarde.gif'/><span style=color:red > <b>Aguarde...</b></span></div>"; document.body.appendChild(novoel); document.body.innerHTML+=i;} |
| 23 | - document.getElementById("aguardeTotal").style.display=tipo; document.getElementById("aguardeTotal1").style.display=tipo;}function cor(obj){window.parent.i3GEO.util.abreCor("wdocai",obj);} function mostraOpcao(anterior,proxima,texto,idatual){ if(document.getElementById(idatual)){document.getElementById("resultado").removeChild(document.getElementById(idatual))} | |
| 23 | + document.getElementById("aguardeTotal").style.display=tipo; document.getElementById("aguardeTotal1").style.display=tipo;}function cor(obj){window.parent.i3GEO.util.abreCor("wdocai",obj);} function mostraOpcao(anterior,proxima,texto,idatual){ if(document.getElementById(idatual)){document.getElementById("resultado").removeChild(document.getElementById(idatual))} | |
| 24 | 24 | if(!document.getElementById(idatual)){ var ndiv=document.createElement("div"); ndiv.id=idatual; texto+="<br><br><table style='width:100%;background-color:#F2F2F2;' ><tr style='width:100%'>"; if(anterior !=""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:#F2F2F2;'><input id="+idatual+"anterior_ onclick='"+anterior+"' type='button' value=' '/></td>";} |
| 25 | 25 | if(proxima !=""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:#F2F2F2;'><input id="+idatual+"proxima_ onclick='"+proxima+"' type='button' value=' '/></td>";} |
| 26 | 26 | ndiv.innerHTML=texto+"</tr></table>"; document.getElementById("resultado").appendChild(ndiv); new YAHOO.widget.Button(idatual+"anterior_",{ onclick:{fn: function(){ eval(anterior+"()");}, lazyloadmenu:true }}); new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn: function(){ eval(proxima+"()");}, lazyloadmenu:true }}); var i=$i(idatual+"proxima_-button"); if(i){ i.style.backgroundImage="url('../../imagens/player_avanca.png')"; i.style.backgroundRepeat="no-repeat"; i.style.backgroundPosition="center center";} |
| ... | ... | @@ -6896,7 +6896,7 @@ i3GEO.util = { |
| 6896 | 6896 | do { |
| 6897 | 6897 | curleft += obj.offsetLeft-obj.scrollLeft; |
| 6898 | 6898 | curtop += obj.offsetTop-obj.scrollTop; |
| 6899 | - } while (obj === obj.offsetParent); | |
| 6899 | + } while (obj = obj.offsetParent); | |
| 6900 | 6900 | } |
| 6901 | 6901 | } |
| 6902 | 6902 | return [curleft+document.body.scrollLeft,curtop+document.body.scrollTop]; |
| ... | ... | @@ -7758,7 +7758,77 @@ i3GEO.util = { |
| 7758 | 7758 | } |
| 7759 | 7759 | else |
| 7760 | 7760 | {i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid);} |
| 7761 | - } | |
| 7761 | + }, | |
| 7762 | + /* | |
| 7763 | + Function: proximoAnterior | |
| 7764 | + | |
| 7765 | + Cria uma sequência de opções com botão de anterior e próximo. É utilizado principalmente pelas | |
| 7766 | + ferramentas de análise espacial, onde o usuário segue uma sequência de operações de escolha | |
| 7767 | + de parâmetros. | |
| 7768 | + | |
| 7769 | + Parametros: | |
| 7770 | + | |
| 7771 | + anterior {String} - nome da função que é executada para voltar à tela anterior. Pode ser "". | |
| 7772 | + | |
| 7773 | + proxima {String} - nome da função que é executada para avançar para a próxima tela. Pode ser "". | |
| 7774 | + | |
| 7775 | + texto {String} - texto que comporá a tela atual | |
| 7776 | + | |
| 7777 | + idatual {String} - id do elemento DIV que será criado para inserir o conteúdo definido em 'texto" | |
| 7778 | + | |
| 7779 | + container {String} - id do elemento DIV já existente que receberá as telas. | |
| 7780 | + */ | |
| 7781 | + proximoAnterior: function(anterior,proxima,texto,idatual,container){ | |
| 7782 | + var temp = $i(idatual), | |
| 7783 | + ndiv = document.createElement("div"), | |
| 7784 | + nids, | |
| 7785 | + i; | |
| 7786 | + | |
| 7787 | + if(temp){$i(container).removeChild(temp);} | |
| 7788 | + if (!document.getElementById(idatual)) | |
| 7789 | + { | |
| 7790 | + ndiv.id = idatual; | |
| 7791 | + texto += "<br><br><table style='width:100%;background-color:#F2F2F2;' ><tr style='width:100%'>"; | |
| 7792 | + if (anterior !== "") | |
| 7793 | + {texto += "<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:#F2F2F2;'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>";} | |
| 7794 | + if (proxima !== "") | |
| 7795 | + {texto += "<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:#F2F2F2;'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>";} | |
| 7796 | + ndiv.innerHTML = texto+"</tr></table>"; | |
| 7797 | + | |
| 7798 | + $i(container).appendChild(ndiv); | |
| 7799 | + | |
| 7800 | + new YAHOO.widget.Button(idatual+"anterior_",{ | |
| 7801 | + onclick:{fn: function(){ | |
| 7802 | + eval(anterior+"()"); | |
| 7803 | + }, | |
| 7804 | + lazyloadmenu:true | |
| 7805 | + }}); | |
| 7806 | + new YAHOO.widget.Button(idatual+"proxima_", | |
| 7807 | + {onclick:{fn: function(){ | |
| 7808 | + eval(proxima+"()"); | |
| 7809 | + }, | |
| 7810 | + lazyloadmenu:true | |
| 7811 | + }}); | |
| 7812 | + i = $i(idatual+"proxima_-button"); | |
| 7813 | + if(i){ | |
| 7814 | + i.style.backgroundImage = "url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')"; | |
| 7815 | + i.style.backgroundRepeat = "no-repeat"; | |
| 7816 | + i.style.backgroundPosition = "center center"; | |
| 7817 | + } | |
| 7818 | + i = $i(idatual+"anterior_-button"); | |
| 7819 | + if(i){ | |
| 7820 | + i.style.backgroundImage = "url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')"; | |
| 7821 | + i.style.backgroundRepeat = "no-repeat"; | |
| 7822 | + i.style.backgroundPosition = "center center"; | |
| 7823 | + } | |
| 7824 | + } | |
| 7825 | + temp = $i(container).getElementsByTagName("div"); | |
| 7826 | + nids = temp.length; | |
| 7827 | + for (i=0;i<nids;i++){ | |
| 7828 | + temp[i].style.display="none"; | |
| 7829 | + } | |
| 7830 | + $i(idatual).style.display="block"; | |
| 7831 | + } | |
| 7762 | 7832 | }; |
| 7763 | 7833 | // |
| 7764 | 7834 | //alias | ... | ... |
ferramentas/uploaddbf/upload.php
| ... | ... | @@ -88,11 +88,10 @@ if (isset($_FILES['filedbf']['name'])) |
| 88 | 88 | $conta++; |
| 89 | 89 | } |
| 90 | 90 | if(!function_exists(dbase_create)) |
| 91 | - {xbase_create($dirmap."/".$nome.".dbf", $def);} | |
| 91 | + {xbase_create($dirmap."/".$nome.".dbf", $def);xbase_close($db);} | |
| 92 | 92 | else |
| 93 | - {dbase_create($dirmap."/".$nome.".dbf", $def);} | |
| 94 | - //xbase_close($db); | |
| 95 | - //$db=xbase_open($dirmap."/".$nome.".dbf",2); | |
| 93 | + {dbase_create($dirmap."/".$nome.".dbf", $def);dbase_close($db);} | |
| 94 | + $db=xbase_open($dirmap."/".$nome.".dbf",2); | |
| 96 | 95 | foreach($dados as $d){ |
| 97 | 96 | $reg = array(); |
| 98 | 97 | foreach($d as $i) | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type