Commit 56228768ea9f252defc00faefa967a1194ace13d
1 parent
43456221
Exists in
master
and in
7 other branches
Correção no uso da variável $conexaoadmin para ativar conexões com o sistema de …
…administração diferentes do default
Showing
4 changed files
with
9 additions
and
3 deletions
Show diff stats
admin1/index.php
| ... | ... | @@ -31,6 +31,11 @@ if($esquemaadmin != ""){ |
| 31 | 31 | $_SESSION["esquemaadmin"] = str_replace(".","",$esquemaadmin)."."; |
| 32 | 32 | } |
| 33 | 33 | unset ($esquemaadmin); |
| 34 | +$_SESSION["conexaoadmin"] = ""; | |
| 35 | +if($conexaoadmin != ""){ | |
| 36 | + $_SESSION["conexaoadmin"] = $conexaoadmin; | |
| 37 | +} | |
| 38 | +unset ($conexaoadmin); | |
| 34 | 39 | $_SESSION["postgis_mapa"] = $postgis_mapa; |
| 35 | 40 | unset($postgis_mapa); |
| 36 | 41 | $_SESSION["logTransacoes"] = $logTransacoes; | ... | ... |
admin1/php/conexao.php
admin1/php/funcoesAdmin.php
| ... | ... | @@ -180,12 +180,12 @@ Array originada de fetchAll |
| 180 | 180 | */ |
| 181 | 181 | function pegaDados($sql,$dbh="",$close=true) |
| 182 | 182 | { |
| 183 | + //error_reporting (E_ALL); | |
| 183 | 184 | $resultado = array(); |
| 184 | 185 | //is_string para efeitos de compatibilidade |
| 185 | 186 | if($dbh == "" || is_string($dbh)){ |
| 186 | 187 | include(dirname(__FILE__)."/conexao.php"); |
| 187 | 188 | } |
| 188 | - //error_reporting (E_ALL); | |
| 189 | 189 | //$dbh deve ser definido com somente leitura, mas por prevencao: |
| 190 | 190 | $sql = str_ireplace(array("update","delete","insert","--","drop",";"),"",$sql); |
| 191 | 191 | $q = $dbh->query($sql,PDO::FETCH_ASSOC); |
| ... | ... | @@ -202,7 +202,7 @@ function pegaDados($sql,$dbh="",$close=true) |
| 202 | 202 | $dbh = null; |
| 203 | 203 | $dbhw = null; |
| 204 | 204 | } |
| 205 | - throw new Exception(" erro admin.php funcao \admin\php\funcoesAdmin\pegaDados"); | |
| 205 | + //throw new Exception(" erro admin.php funcao \admin\php\funcoesAdmin\pegaDados"); | |
| 206 | 206 | } |
| 207 | 207 | } |
| 208 | 208 | /** | ... | ... |