Commit ee163b27bd9f36ec26b41f0e58e67b90b9af7568
1 parent
b3122a4b
Exists in
master
and in
7 other branches
Teste: Inclusao de log de operações
Showing
3 changed files
with
224 additions
and
87 deletions
Show diff stats
admin/php/admin.php
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | |
| 5 | 5 | Funções utilizadas por outros programas do sistema de administração. |
| 6 | 6 | |
| 7 | -No iní�cio do programa é feita a inclusão do i3geo/ms_configura.php e i3geo/classesphp/funcoes_gerais.php | |
| 7 | +No inicio do programa é feita a inclusão do i3geo/ms_configura.php e i3geo/classesphp/funcoes_gerais.php | |
| 8 | 8 | |
| 9 | 9 | Licenca: |
| 10 | 10 | |
| ... | ... | @@ -218,6 +218,139 @@ function pegaDados($sql,$locaplic="") |
| 218 | 218 | throw new Exception(" erro admin.php funcao pegaDados: <br><span style=color:red >".$e[2]."<br><span style=color:green >"); |
| 219 | 219 | } |
| 220 | 220 | } |
| 221 | +/** | |
| 222 | + * Faz o update dos dados de um registro em uma tabela do sistema de administracao | |
| 223 | + * | |
| 224 | + * @param obj $pdo - objeto pdo | |
| 225 | + * @param string $tabela - nome da tabela que sofrera o update | |
| 226 | + * @param array $data - array com os nomes dos campos da tabela e os valores | |
| 227 | + * @param string $filtro - filtro WHERE que sera utilizado para selecionar os registros que sofrerao o update | |
| 228 | + * @return boolean | |
| 229 | + */ | |
| 230 | +function i3GeoAdminUpdate($pdo,$tabela,$data,$filtro=""){ | |
| 231 | + global $esquemaadmin; | |
| 232 | + $keys = array_keys($data); | |
| 233 | + $sset = array(); | |
| 234 | + foreach($keys as $k){ | |
| 235 | + $sset[] = $k."=?"; | |
| 236 | + } | |
| 237 | + $sql = "UPDATE ".$esquemaadmin."$tabela SET ".implode($sset,",")." ".$filtro; | |
| 238 | + $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
| 239 | + try { | |
| 240 | + $prep = $pdo->prepare($sql); | |
| 241 | + } catch (PDOException $e) { | |
| 242 | + return $e->getMessage(); | |
| 243 | + } | |
| 244 | + try { | |
| 245 | + $exec = $prep->execute(array_values($data)); | |
| 246 | + i3GeoAdminInsertLog($pdo,$sql,array_values($data)); | |
| 247 | + return true; | |
| 248 | + } catch (PDOException $e) { | |
| 249 | + return $e->getMessage(); | |
| 250 | + } | |
| 251 | +} | |
| 252 | +/** | |
| 253 | + * Faz o insert de um novo registro em uma tabela do sistema de administracao | |
| 254 | + * | |
| 255 | + * @param obj $pdo - objeto pdo | |
| 256 | + * @param string $tabela - nome da tabela que sofreara o insert | |
| 257 | + * @param array $data - array com os nomes dos campos da tabela e os valores | |
| 258 | + * @return boolean | |
| 259 | + */ | |
| 260 | +function i3GeoAdminInsert($pdo,$tabela,$data){ | |
| 261 | + global $esquemaadmin; | |
| 262 | + $keys = array_keys($data); | |
| 263 | + //$fields = "'".implode("','",$keys)."'"; | |
| 264 | + $fields = implode(",",$keys); | |
| 265 | + $placeholder = str_repeat("?,",count($keys)); | |
| 266 | + $placeholder = trim($placeholder,","); | |
| 267 | + $sql = "INSERT INTO ".$esquemaadmin."$tabela($fields) VALUES ($placeholder)"; | |
| 268 | + //echo $sql;exit; | |
| 269 | + //var_dump($data);exit; | |
| 270 | + $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
| 271 | + try { | |
| 272 | + $prep = $pdo->prepare($sql); | |
| 273 | + } catch (PDOException $e) { | |
| 274 | + return "prepare ".$e->getMessage(); | |
| 275 | + } | |
| 276 | + try { | |
| 277 | + $exec = $prep->execute(array_values($data)); | |
| 278 | + //atualiza o log | |
| 279 | + i3GeoAdminInsertLog($pdo,$sql,array_values($data)); | |
| 280 | + return true; | |
| 281 | + } catch (PDOException $e) { | |
| 282 | + return "execute ".$e->getMessage(); | |
| 283 | + } | |
| 284 | +} | |
| 285 | +/** | |
| 286 | + * Faz o insert de um registro e retorna o ID unico criado | |
| 287 | + * | |
| 288 | + * @param obj $pdo - objeto pdo | |
| 289 | + * @param string $tabela - nome da tabela que sofreara o insert | |
| 290 | + * @param array $data - array com os nomes dos campos da tabela e os valores | |
| 291 | + * @param string $colTemp - coluna do tipo text que recebera um valor temporario para poder recuperar o registro inserido | |
| 292 | + * @param string $colId - coluna com id unico, cujo calculo e automatico | |
| 293 | + * @return string | |
| 294 | + */ | |
| 295 | +function i3GeoAdminInsertUnico($pdo,$tabela,$data,$colTemp,$colId){ | |
| 296 | + global $esquemaadmin; | |
| 297 | + $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
| 298 | + $idtemp = (rand (9000,10000)) * -1; | |
| 299 | + $data[$colTemp] = $idtemp; | |
| 300 | + $q = i3GeoAdminInsert( | |
| 301 | + $pdo, | |
| 302 | + $tabela, | |
| 303 | + $data | |
| 304 | + ); | |
| 305 | + if($q !== true){ | |
| 306 | + echo "Error! insert: " . $q; exit; | |
| 307 | + } | |
| 308 | + try { | |
| 309 | + $id = $pdo->query("SELECT $colId FROM ".$esquemaadmin."$tabela WHERE $colTemp = '$idtemp'"); | |
| 310 | + } catch (PDOException $e) { | |
| 311 | + return "SELECT ID ".$e->getMessage(); | |
| 312 | + } | |
| 313 | + try { | |
| 314 | + $id = $id->fetchAll(); | |
| 315 | + $id = $id[0][$colId]; | |
| 316 | + $sql = "UPDATE ".$esquemaadmin."$tabela SET $colTemp = '' WHERE $colId = $id AND $colTemp = '$idtemp'"; | |
| 317 | + $pdo->query($sql); | |
| 318 | + i3GeoAdminInsertLog($pdo,$sql); | |
| 319 | + return $id; | |
| 320 | + } catch (PDOException $e) { | |
| 321 | + return "UPDATE ID ".$e->getMessage(); | |
| 322 | + } | |
| 323 | +} | |
| 324 | +function i3GeoAdminInsertLog($pdo,$sql,$data=array()){ | |
| 325 | + global $esquemaadmin; | |
| 326 | + $s = "INSERT INTO ".$esquemaadmin."i3geoadmin_log(sql,serializedata,usuario,ip,timestamp,outros) VALUES (?,?,?,?,?,?)"; | |
| 327 | + $ip = "UNKNOWN"; | |
| 328 | + if (getenv("HTTP_CLIENT_IP")){ | |
| 329 | + $ip = getenv("HTTP_CLIENT_IP"); | |
| 330 | + } | |
| 331 | + else if(getenv("HTTP_X_FORWARDED_FOR")){ | |
| 332 | + $ip = getenv("HTTP_X_FORWARDED_FOR"); | |
| 333 | + } | |
| 334 | + else if(getenv("REMOTE_ADDR")) { | |
| 335 | + $ip = getenv("REMOTE_ADDR"); | |
| 336 | + } | |
| 337 | + try { | |
| 338 | + $prep = $pdo->prepare($s); | |
| 339 | + $exec = $prep->execute( | |
| 340 | + array( | |
| 341 | + $sql, | |
| 342 | + serialize($data), | |
| 343 | + $_SESSION["usuario"], | |
| 344 | + $ip, | |
| 345 | + time()."(".date('r').")", | |
| 346 | + "" | |
| 347 | + ) | |
| 348 | + ); | |
| 349 | + return true; | |
| 350 | + } catch (PDOException $e) { | |
| 351 | + echo $e->getMessage();exit; | |
| 352 | + } | |
| 353 | +} | |
| 221 | 354 | /* |
| 222 | 355 | Function: verificaFilhos |
| 223 | 356 | |
| ... | ... | @@ -225,7 +358,7 @@ Verifica se o pai tem filhos nos componentes hier&Atilde;�rquicos do banco de |
| 225 | 358 | |
| 226 | 359 | Por exemplo, pode-se verificar se um grupo possu� subgrupos, indicando-se como tabela i3geoadmin_grupos e o id do grupo |
| 227 | 360 | |
| 228 | -Vari�veis globais: | |
| 361 | +Variaveis globais: | |
| 229 | 362 | |
| 230 | 363 | tabela {string} - tabela do banco de dados |
| 231 | 364 | ... | ... |
admin/php/atlas.php
| ... | ... | @@ -426,134 +426,137 @@ function dadosAtlas() |
| 426 | 426 | function alterarAtlas() |
| 427 | 427 | { |
| 428 | 428 | global $esquemaadmin,$publicado_atlas,$id_atlas,$basemapfile_atlas,$desc_atlas,$h_atlas,$w_atlas,$icone_atlas,$link_atlas,$pranchadefault_atlas,$template_atlas,$tipoguias_atlas,$titulo_atlas,$ordem_atlas; |
| 429 | - try | |
| 430 | - { | |
| 429 | + try{ | |
| 431 | 430 | include("conexao.php"); |
| 432 | - if($h_atlas == "") | |
| 433 | - { | |
| 434 | - $h_atlas = 0; | |
| 435 | - } | |
| 436 | - if($h_atlas == "") | |
| 437 | - { | |
| 438 | - $w_atlas = 0; | |
| 439 | - } | |
| 440 | - if($ordem_atlas == "") | |
| 441 | - { | |
| 442 | - $ordem_atlas = 0; | |
| 443 | - } | |
| 444 | - if($convUTF) | |
| 445 | - { | |
| 446 | - $desc_atlas = utf8_encode($desc_atlas); | |
| 447 | - $titulo_atlas = utf8_encode($titulo_atlas); | |
| 448 | - } | |
| 449 | - if($id_atlas != "") | |
| 450 | - { | |
| 451 | - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_atlas SET publicado_atlas='$publicado_atlas',ordem_atlas=$ordem_atlas,basemapfile_atlas='$basemapfile_atlas',desc_atlas='$desc_atlas',h_atlas=$h_atlas,w_atlas=$w_atlas,icone_atlas='$icone_atlas',link_atlas='$link_atlas',pranchadefault_atlas='$pranchadefault_atlas',template_atlas='$template_atlas',tipoguias_atlas='$tipoguias_atlas',titulo_atlas='$titulo_atlas' WHERE id_atlas = $id_atlas"); | |
| 431 | + if($id_atlas != ""){ | |
| 432 | + if($convUTF){ | |
| 433 | + $desc_atlas = utf8_encode($desc_atlas); | |
| 434 | + $titulo_atlas = utf8_encode($titulo_atlas); | |
| 435 | + } | |
| 436 | + $dataCol = array( | |
| 437 | + "publicado_atlas"=>$publicado_atlas, | |
| 438 | + "ordem_atlas"=>$ordem_atlas == "" ? 0 : $ordem_atlas, | |
| 439 | + "basemapfile_atlas"=>$basemapfile_atlas, | |
| 440 | + "desc_atlas"=>$desc_atlas, | |
| 441 | + "h_atlas"=>$h_atlas == "" ? 0 : $h_atlas, | |
| 442 | + "w_atlas"=>$w_atlas == "" ? 0 : $w_atlas, | |
| 443 | + "icone_atlas"=>$icone_atlas, | |
| 444 | + "link_atlas"=>$link_atlas, | |
| 445 | + "pranchadefault_atlas"=>$pranchadefault_atlas, | |
| 446 | + "template_atlas"=>$template_atlas, | |
| 447 | + "tipoguias_atlas"=>$tipoguias_atlas, | |
| 448 | + "titulo_atlas"=>$titulo_atlas | |
| 449 | + ); | |
| 450 | + i3GeoAdminUpdate($dbhw,"i3geoadmin_atlas",$dataCol,"WHERE id_atlas = $id_atlas"); | |
| 452 | 451 | $retorna = $id_atlas; |
| 453 | 452 | } |
| 454 | - else | |
| 455 | - { | |
| 453 | + else{ | |
| 456 | 454 | $o = $dbh->query("SELECT MAX(ordem_atlas) as o FROM ".$esquemaadmin."i3geoadmin_atlas"); |
| 457 | 455 | $o = $o->fetchAll(); |
| 458 | 456 | $o = $o[0]['o'] + 1; |
| 459 | - $idtemp = (rand (9000,10000)) * -1; | |
| 460 | - $dbhw->query("INSERT INTO ".$esquemaadmin."i3geoadmin_atlas (publicado_atlas,ordem_atlas,basemapfile_atlas,desc_atlas,h_atlas,w_atlas,icone_atlas,link_atlas,pranchadefault_atlas,template_atlas,tipoguias_atlas,titulo_atlas) VALUES ('',$o,'','',null,null,'','','','','','$idtemp')"); | |
| 461 | - $id = $dbh->query("SELECT id_atlas FROM ".$esquemaadmin."i3geoadmin_atlas WHERE titulo_atlas = '$idtemp'"); | |
| 462 | - $id = $id->fetchAll(); | |
| 463 | - $id = $id[0]['id_atlas']; | |
| 464 | - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_atlas SET titulo_atlas = '' WHERE id_atlas = $id AND titulo_atlas = '$idtemp'"); | |
| 465 | - $retorna = $id; | |
| 457 | + $dataCol = array( | |
| 458 | + "publicado_atlas"=>'', | |
| 459 | + "basemapfile_atlas"=>'', | |
| 460 | + "desc_atlas"=>'', | |
| 461 | + "h_atlas"=>null, | |
| 462 | + "w_atlas"=>null, | |
| 463 | + "icone_atlas"=>'', | |
| 464 | + "link_atlas"=>'', | |
| 465 | + "pranchadefault_atlas"=>'', | |
| 466 | + "template_atlas"=>'', | |
| 467 | + "tipoguias_atlas"=>'', | |
| 468 | + "ordem_atlas"=>$o, | |
| 469 | + "titulo_atlas"=>'' | |
| 470 | + ); | |
| 471 | + $retorna = i3GeoAdminInsertUnico($dbhw,"i3geoadmin_atlas",$dataCol,"titulo_atlas","id_atlas"); | |
| 466 | 472 | } |
| 467 | 473 | $dbhw = null; |
| 468 | 474 | $dbh = null; |
| 469 | 475 | return $retorna; |
| 470 | 476 | } |
| 471 | - catch (PDOException $e) | |
| 472 | - { | |
| 477 | + catch (PDOException $e){ | |
| 473 | 478 | return "Error!: " . $e->getMessage(); |
| 474 | 479 | } |
| 475 | 480 | } |
| 476 | 481 | function alterarPrancha() |
| 477 | 482 | { |
| 478 | 483 | global $esquemaadmin,$mapext_prancha,$id_atlas,$id_prancha,$desc_prancha,$h_prancha,$w_prancha,$icone_prancha,$link_prancha,$titulo_prancha,$ordem_prancha; |
| 479 | - try | |
| 480 | - { | |
| 484 | + try{ | |
| 481 | 485 | include("conexao.php"); |
| 482 | - if($h_prancha == "") | |
| 483 | - { | |
| 484 | - $h_prancha = 0; | |
| 485 | - } | |
| 486 | - if($h_prancha == "") | |
| 487 | - { | |
| 488 | - $w_prancha = 0; | |
| 489 | - } | |
| 490 | - if($ordem_prancha == "") | |
| 491 | - { | |
| 492 | - $ordem_prancha = 0; | |
| 493 | - } | |
| 494 | - | |
| 495 | - if($convUTF) | |
| 496 | - { | |
| 497 | - $desc_prancha = utf8_encode($desc_prancha); | |
| 498 | - $titulo_prancha = utf8_encode($titulo_prancha); | |
| 499 | - } | |
| 500 | - if($id_prancha != "") | |
| 501 | - { | |
| 502 | - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_atlasp SET ordem_prancha='$ordem_prancha', mapext_prancha='$mapext_prancha',desc_prancha='$desc_prancha',h_prancha='$h_prancha',w_prancha='$w_prancha',icone_prancha='$icone_prancha',link_prancha='$link_prancha',titulo_prancha='$titulo_prancha' WHERE id_prancha = '$id_prancha'"); | |
| 486 | + if($id_prancha != ""){ | |
| 487 | + if($convUTF){ | |
| 488 | + $desc_prancha = utf8_encode($desc_prancha); | |
| 489 | + $titulo_prancha = utf8_encode($titulo_prancha); | |
| 490 | + } | |
| 491 | + $dataCol = array( | |
| 492 | + "ordem_prancha"=>$ordem_prancha, | |
| 493 | + "mapext_prancha"=>$mapext_prancha, | |
| 494 | + "desc_prancha"=>$desc_prancha, | |
| 495 | + "h_prancha"=>$h_prancha == "" ? 0 : $h_prancha, | |
| 496 | + "w_prancha"=>$w_prancha == "" ? 0 : $w_prancha, | |
| 497 | + "icone_prancha"=>$icone_prancha, | |
| 498 | + "link_prancha"=>$link_prancha, | |
| 499 | + "titulo_prancha"=>$titulo_prancha | |
| 500 | + ); | |
| 501 | + i3GeoAdminUpdate($dbhw,"i3geoadmin_atlasp",$dataCol,"WHERE id_prancha = $id_prancha"); | |
| 503 | 502 | $retorna = $id_prancha; |
| 504 | 503 | } |
| 505 | - else | |
| 506 | - { | |
| 504 | + else{ | |
| 507 | 505 | $o = $dbh->query("SELECT MAX(ordem_prancha) as o FROM ".$esquemaadmin."i3geoadmin_atlasp WHERE id_atlas = '$id_atlas'"); |
| 508 | 506 | $o = $o->fetchAll(); |
| 509 | 507 | $o = $o[0]['o'] + 1; |
| 510 | - $idtemp = (rand (9000,10000)) * -1; | |
| 511 | - $dbhw->query("INSERT INTO ".$esquemaadmin."i3geoadmin_atlasp (ordem_prancha,mapext_prancha,desc_prancha,h_prancha,w_prancha,icone_prancha,link_prancha,titulo_prancha,id_atlas) VALUES ($o,'','','$h_prancha','$w_prancha','','','$idtemp','$id_atlas')"); | |
| 512 | - $id = $dbh->query("SELECT id_prancha FROM ".$esquemaadmin."i3geoadmin_atlasp WHERE titulo_prancha = '$idtemp'"); | |
| 513 | - $id = $id->fetchAll(); | |
| 514 | - $id = $id[0]['id_prancha']; | |
| 515 | - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_atlasp SET titulo_prancha = '' WHERE id_prancha = $id AND titulo_prancha = '$idtemp'"); | |
| 516 | - $retorna = $id; | |
| 508 | + | |
| 509 | + $dataCol = array( | |
| 510 | + "ordem_prancha"=>$o, | |
| 511 | + "mapext_prancha"=>'', | |
| 512 | + "desc_prancha"=>'', | |
| 513 | + "h_prancha"=>$h_prancha == "" ? 0 : $h_prancha, | |
| 514 | + "w_prancha"=>$w_prancha == "" ? 0 : $w_prancha, | |
| 515 | + "icone_prancha"=>'', | |
| 516 | + "link_prancha"=>'', | |
| 517 | + "titulo_prancha"=>'', | |
| 518 | + "id_atlas"=>$id_atlas | |
| 519 | + ); | |
| 520 | + $retorna = i3GeoAdminInsertUnico($dbhw,"i3geoadmin_atlasp",$dataCol,"titulo_prancha","id_prancha"); | |
| 517 | 521 | } |
| 518 | 522 | $dbhw = null; |
| 519 | 523 | $dbh = null; |
| 520 | 524 | return $retorna; |
| 521 | 525 | } |
| 522 | - catch (PDOException $e) | |
| 523 | - { | |
| 526 | + catch (PDOException $e){ | |
| 524 | 527 | return "Error!: " . $e->getMessage(); |
| 525 | 528 | } |
| 526 | 529 | } |
| 527 | -function alterarTema() | |
| 528 | -{ | |
| 530 | +function alterarTema(){ | |
| 529 | 531 | global $esquemaadmin,$id_tema,$id_prancha,$codigo_tema,$ligado_tema,$ordem_tema; |
| 530 | - try | |
| 531 | - { | |
| 532 | + try{ | |
| 532 | 533 | include("conexao.php"); |
| 533 | - if($id_tema != "") | |
| 534 | - { | |
| 535 | - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_atlast SET ordem_tema='$ordem_tema',codigo_tema='$codigo_tema',ligado_tema='$ligado_tema' WHERE id_tema='$id_tema'"); | |
| 534 | + if($id_tema != ""){ | |
| 535 | + $dataCol = array( | |
| 536 | + "ordem_tema"=>$ordem_tema, | |
| 537 | + "codigo_tema"=>$codigo_tema, | |
| 538 | + "ligado_tema"=>$ligado_tema | |
| 539 | + ); | |
| 540 | + i3GeoAdminUpdate($dbhw,"i3geoadmin_atlast",$dataCol,"WHERE id_tema = $id_tema"); | |
| 536 | 541 | $retorna = $id_tema; |
| 537 | 542 | } |
| 538 | - else | |
| 539 | - { | |
| 543 | + else{ | |
| 540 | 544 | $o = $dbh->query("SELECT MAX(ordem_tema) as o FROM ".$esquemaadmin."i3geoadmin_atlast where id_prancha = '$id_prancha'"); |
| 541 | 545 | $o = $o->fetchAll(); |
| 542 | 546 | $o = $o[0]['o'] + 1; |
| 543 | - $idtemp = (rand (9000,10000)) * -1; | |
| 544 | - $dbhw->query("INSERT INTO ".$esquemaadmin."i3geoadmin_atlast (ordem_tema,codigo_tema,ligado_tema,id_prancha) VALUES ($o,'$idtemp','','$id_prancha')"); | |
| 545 | - $id = $dbh->query("SELECT id_tema FROM ".$esquemaadmin."i3geoadmin_atlast WHERE codigo_tema = '$idtemp'"); | |
| 546 | - $id = $id->fetchAll(); | |
| 547 | - $id = $id[0]['id_tema']; | |
| 548 | - $dbhw->query("UPDATE ".$esquemaadmin."i3geoadmin_atlast SET codigo_tema = '' WHERE id_tema = $id AND codigo_tema = '$idtemp'"); | |
| 549 | - $retorna = $id; | |
| 547 | + $dataCol = array( | |
| 548 | + "ordem_tema"=>$o, | |
| 549 | + "codigo_tema"=>$codigo_tema, | |
| 550 | + "ligado_tema"=>$ligado_tema, | |
| 551 | + "id_prancha"=>$id_prancha | |
| 552 | + ); | |
| 553 | + $retorna = i3GeoAdminInsertUnico($dbhw,"i3geoadmin_atlast",$dataCol,"codigo_tema","id_tema"); | |
| 550 | 554 | } |
| 551 | 555 | $dbhw = null; |
| 552 | 556 | $dbh = null; |
| 553 | 557 | return $retorna; |
| 554 | 558 | } |
| 555 | - catch (PDOException $e) | |
| 556 | - { | |
| 559 | + catch (PDOException $e){ | |
| 557 | 560 | return "Error!: " . $e->getMessage(); |
| 558 | 561 | } |
| 559 | 562 | } | ... | ... |
admin/php/criabanco.php
| ... | ... | @@ -73,6 +73,7 @@ |
| 73 | 73 | "CREATE TABLE ".$esquemaadmin."i3geoadmin_n3 (publicado TEXT, ordem NUMERIC, id_n2 NUMERIC, id_n3 INTEGER PRIMARY KEY, id_tema NUMERIC, n3_perfil TEXT)", |
| 74 | 74 | "CREATE TABLE ".$esquemaadmin."i3geoadmin_comentarios (comentario TEXT, data TEXT, openidnome TEXT, openidimagem TEXT, openidservico TEXT, openidusuario TEXT, openidurl TEXT, id_tema NUMERIC)", |
| 75 | 75 | "CREATE TABLE ".$esquemaadmin."i3geoadmin_acessostema (codigo_tema TEXT, nacessos NUMERIC,dia NUMERIC, mes NUMERIC, ano NUMERIC)", |
| 76 | + "CREATE TABLE ".$esquemaadmin."i3geoadmin_log (id_log INTEGER PRIMARY KEY,sql TEXT,serializedata TEXT,usuario TEXT,ip TEXT,timestamp TEXT,outros TEXT)", | |
| 76 | 77 | //tabelas do sistema de controle de usuarios |
| 77 | 78 | "CREATE TABLE ".$esquemaadmin."i3geousr_usuarios (ativo NUMERIC, data_cadastro TEXT, email TEXT, id_usuario INTEGER PRIMARY KEY, login TEXT, nome_usuario TEXT, senha TEXT)", |
| 78 | 79 | "CREATE TABLE ".$esquemaadmin."i3geousr_papelusuario (id_papel NUMERIC, id_usuario NUMERIC)", | ... | ... |