Commit fa2b2685fddd8caa638cf1ae075dedd23963248d
1 parent
103e1fc1
Exists in
master
and in
7 other branches
Melhoria no testainstal.php
Showing
2 changed files
with
39 additions
and
11 deletions
Show diff stats
admin/js/editormapfile_layer.js
1 | -//XODO incluir opcao de controle do modo tile | |
2 | 1 | function montaNoLayer(codigo,indice){ |
3 | 2 | var conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('sobe','layer','"+codigo+"','"+indice+"')\" title=sobe src=\"../imagens/34.png\" />"; |
4 | 3 | conteudo += " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"sobeDesce('desce','layer','"+codigo+"','"+indice+"')\" title=desce src=\"../imagens/33.png\" />"; | ... | ... |
testainstal.php
... | ... | @@ -304,22 +304,51 @@ catch(ee) |
304 | 304 | $enderecocgi = $proto.$server.$locmapserv; |
305 | 305 | echo "Você pode testar o CGI clicando <a href='".$enderecocgi."' target='_blank'>aqui</a>, se o programa responder corretamente, deverá aparecer na tela algo como 'No query information to decode. QUERY_STRING is set, but empty.'\n" ; |
306 | 306 | |
307 | - $f = @fopen("temas/teste.txt",w); | |
308 | - @fclose($f); | |
309 | - if (!file_exists("temas/teste.txt")){ | |
307 | + if (file_exists("temas/teste.txt")){ | |
308 | + echo "<br><br>Removendo arquivo de testes temas/teste.txt"; | |
309 | + unlink("temas/teste.txt"); | |
310 | + } | |
311 | + if (file_exists("temas/teste.txt")){ | |
310 | 312 | echo "<br><span style='color:red'>Não foi possivel escrever na pasta temas. O sistema de administracao pode nao funcionar corretamente</span><br>"; |
311 | 313 | } |
312 | - | |
313 | - echo "<br>Escrevendo nos diretórios temporários...<br>"; | |
314 | + else{ | |
315 | + echo "<br><br>Testando criar arquivo temas/teste.txt"; | |
316 | + $f = @fopen("temas/teste.txt",w); | |
317 | + @fclose($f); | |
318 | + if (!file_exists("temas/teste.txt")){ | |
319 | + echo "<br><span style='color:red'>Não foi possivel escrever na pasta temas. O sistema de administracao pode nao funcionar corretamente</span><br>"; | |
320 | + } | |
321 | + else{ | |
322 | + unlink("temas/teste.txt"); | |
323 | + echo "<br>ok."; | |
324 | + } | |
325 | + } | |
326 | + echo "<br><br>Escrevendo nos diretórios temporários...<br><br>"; | |
327 | + if (file_exists($dir_tmp."/teste.txt")){ | |
328 | + //echo "<br><br>Removendo arquivo de testes $dir_tmp/teste.txt<br>"; | |
329 | + unlink($dir_tmp."/teste.txt"); | |
330 | + } | |
331 | + if (file_exists($dir_tmp."/teste.txt")){ | |
332 | + saindo("\nNão foi possível testar o diretório temporário $dir_tmp"); | |
333 | + } | |
314 | 334 | $f = @fopen($dir_tmp."/teste.txt",w); |
315 | 335 | @fclose($f); |
316 | - if (file_exists($dir_tmp."/teste.txt")) echo "do Mapserver ok<br>\n"; else saindo("\nNão foi possível gravar no diretório temporário $dir_tmp"); | |
317 | - | |
336 | + if (file_exists($dir_tmp."/teste.txt")) { | |
337 | + echo " do Mapserver <br>ok<br>\n"; | |
338 | + } | |
339 | + else { | |
340 | + saindo("\nNão foi possível gravar no diretório temporário $dir_tmp"); | |
341 | + } | |
318 | 342 | $f = @fopen(session_save_path()."/teste.txt",w); |
319 | 343 | @fclose($f); |
320 | - if (file_exists(session_save_path()."/teste.txt")) echo "da SESSION PHP ok<br>\n"; else saindo("\nNão foi possível gravar no diretório temporário da SESSION"); | |
344 | + if (file_exists(session_save_path()."/teste.txt")) { | |
345 | + echo " da SESSION PHP <br>ok<br>\n"; | |
346 | + } | |
347 | + else { | |
348 | + saindo("\nNão foi possível gravar no diretório temporário da SESSION"); | |
349 | + } | |
321 | 350 | |
322 | - echo " \n"; | |
351 | + echo " <br>\n"; | |
323 | 352 | echo "Carregando o map_file base...\n"; |
324 | 353 | $versao = versao(); |
325 | 354 | $versao = $versao["principal"]; |
... | ... | @@ -373,7 +402,7 @@ catch(ee) |
373 | 402 | } |
374 | 403 | |
375 | 404 | echo "<br>O arquivo mapfile de inicilização é: $f<br>\n"; |
376 | - echo "<b>E agora..desenhando o mapa (se o mapa não aparecer é um problema...\nverifique os caminhos no ms_configura.php e no $f):</b>\n"; | |
405 | + echo "<br><b>E agora..desenhando o mapa (se o mapa não aparecer é um problema...\nverifique os caminhos no ms_configura.php e no $f):</b>\n"; | |
377 | 406 | $imgo = @$mapa->draw(); |
378 | 407 | $nome = ($imgo->imagepath)."teste.png"; |
379 | 408 | echo "<p>Nome da imagem gerada: $nome </p>"; | ... | ... |