Commit 1038535d176ba662fbdcaa0df4ba7f78f7933c8b
1 parent
4366d29d
Exists in
master
and in
7 other branches
Remoção de arquivos depreciados. Teste de gravação ao tentar compactar os códigos.
Showing
1 changed file
with
10 additions
and
3 deletions
Show diff stats
admin/php/criabanco.php
| ... | ... | @@ -38,6 +38,7 @@ i3geo/admin/php/criabanco.php |
| 38 | 38 | */ |
| 39 | 39 | $funcao = ""; |
| 40 | 40 | include_once("admin.php"); |
| 41 | + | |
| 41 | 42 | error_reporting(E_ALL); |
| 42 | 43 | if(verificaEditores($editores) == "nao") |
| 43 | 44 | {echo "Vc nao e um editor cadastrado. Apenas os editores definidos em i3geo/ms_configura.php podem acessar o sistema de administracao.";exit;} |
| ... | ... | @@ -68,9 +69,15 @@ if($conexaoadmin == "") |
| 68 | 69 | { |
| 69 | 70 | if(file_exists("../../admin/admin.db")) |
| 70 | 71 | {echo "Arquivo admin/admin.db ja existe. Vc deve apagá-lo para poder criar novamente";exit;} |
| 71 | - $banco = sqlite_open("../../admin/admin.db",0666); | |
| 72 | - $banco = null; | |
| 73 | - $dbhw = new PDO('sqlite:../../admin/admin.db'); | |
| 72 | + if(function_exists("sqlite_open")){ | |
| 73 | + $banco = sqlite_open("../../admin/admin.db",0666); | |
| 74 | + $banco = null; | |
| 75 | + $dbhw = new PDO('sqlite:../../admin/admin.db'); | |
| 76 | + } | |
| 77 | + else{ | |
| 78 | + echo "A função de criação do banco sqlite não existe no PHP. Vc pode usar o arquivo i3geo/admin/adminvazio.db e renomeá-lo para admin.db."; | |
| 79 | + exit; | |
| 80 | + } | |
| 74 | 81 | } |
| 75 | 82 | else |
| 76 | 83 | { | ... | ... |