Commit 2c5cd4572b3fe23322dd4913423a7bb7cc7e4dd3
1 parent
84a87d28
Exists in
master
by Eriksen: Atualizado arquivos que listam dados da tabela public.uf:
* Por padrão, a classe clsUf carrega os registros referentes ao valor padrão de app.locale.country do arquivo ieducar.ini * Arquivos que utilizam a classe foram atualizados para usarem ao máximo o comportamento padrão da classe
Showing
6 changed files
with
314 additions
and
298 deletions
Show diff stats
ieducar/configuration/ieducar.ini
| ... | ... | @@ -64,6 +64,14 @@ app.template.vars.instituicao = i-Educar |
| 64 | 64 | app.template.pdf.titulo = Relatório i-Educar |
| 65 | 65 | app.template.pdf.logo = |
| 66 | 66 | |
| 67 | +; Configurações de localização | |
| 68 | +; Define valores padrão para algumas das tarefas de endereçamento como listagem | |
| 69 | +; de municípios e de estados. | |
| 70 | +; 45 = Brasil | |
| 71 | +; SP = Estado de São Paulo | |
| 72 | +app.locale.country = 45 | |
| 73 | +app.locale.province = SP | |
| 74 | + | |
| 67 | 75 | ; Configurações de administração |
| 68 | 76 | ; sql_tempo e pagina_tempo são valores em segundo que ao serem excedidos, |
| 69 | 77 | ; enviaram um e-mail com um pequeno relatório sobre a página que excedeu |
| ... | ... | @@ -83,4 +91,4 @@ app.admin.reports.emails[] = seu.email@example.com |
| 83 | 91 | |
| 84 | 92 | |
| 85 | 93 | [testing : development] |
| 86 | -; Herda todas as configurações de desenvolvimento | |
| 87 | 94 | \ No newline at end of file |
| 95 | +; Herda todas as configurações de desenvolvimento | ... | ... |
ieducar/intranet/educar_aluno_cad.php
| ... | ... | @@ -175,7 +175,7 @@ class indice extends clsCadastro |
| 175 | 175 | var $sem_cpf; |
| 176 | 176 | |
| 177 | 177 | var $ref_cod_sistema; |
| 178 | - | |
| 178 | + | |
| 179 | 179 | var $retorno; |
| 180 | 180 | var $tab_habilitado; |
| 181 | 181 | |
| ... | ... | @@ -186,9 +186,9 @@ class indice extends clsCadastro |
| 186 | 186 | @session_write_close(); |
| 187 | 187 | |
| 188 | 188 | $this->tab_habilitado = true; |
| 189 | - | |
| 189 | + | |
| 190 | 190 | $this->cod_aluno= $_GET["cod_aluno"]; |
| 191 | - | |
| 191 | + | |
| 192 | 192 | $this->retorno = "Novo"; |
| 193 | 193 | |
| 194 | 194 | $obj_permissoes = new clsPermissoes(); |
| ... | ... | @@ -219,8 +219,8 @@ class indice extends clsCadastro |
| 219 | 219 | } |
| 220 | 220 | $this->url_cancelar = ($this->cod_aluno) ? "educar_aluno_det.php?cod_aluno={$this->cod_aluno}" : "educar_aluno_lst.php"; |
| 221 | 221 | $this->nome_url_cancelar = "Cancelar"; |
| 222 | - | |
| 223 | - return $this->retorno; | |
| 222 | + | |
| 223 | + return $this->retorno; | |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | function Gerar() |
| ... | ... | @@ -228,9 +228,9 @@ class indice extends clsCadastro |
| 228 | 228 | $this->fexcluir = false; |
| 229 | 229 | $this->campoTabInicio("educar_cad", "", true); |
| 230 | 230 | $this->campoOculto("retorno",$this->retorno); |
| 231 | - | |
| 231 | + | |
| 232 | 232 | $this->campoOculto("bloqueado", 1); |
| 233 | - | |
| 233 | + | |
| 234 | 234 | if(is_int((int)$this->cpf) && !empty($this->cpf)) |
| 235 | 235 | { |
| 236 | 236 | $cpf = int2CPF($this->cpf); |
| ... | ... | @@ -241,7 +241,7 @@ class indice extends clsCadastro |
| 241 | 241 | } |
| 242 | 242 | if (!$this->cod_aluno) |
| 243 | 243 | { |
| 244 | - $this->campoAdicionaTab("CPF", $this->tab_habilitado); | |
| 244 | + $this->campoAdicionaTab("CPF", $this->tab_habilitado); | |
| 245 | 245 | $opcoes = array( "" => "Pesquise a pessoa clicando na lupa ao lado" ); |
| 246 | 246 | $this->campoCpf("cpf_","CPF",$cpf,false,"<img border='0' onclick=\"pesquisa_valores_popless('educar_pesquisa_aluno_lst2.php?campo1=ref_idpes&campo3=cpf&campo4=cpf_', 'nome')\" src=\"imagens/lupa.png\">"); |
| 247 | 247 | } |
| ... | ... | @@ -250,9 +250,9 @@ class indice extends clsCadastro |
| 250 | 250 | if( $this->cod_aluno) |
| 251 | 251 | { |
| 252 | 252 | $obj_matricula = new clsPmieducarMatricula(); |
| 253 | - | |
| 253 | + | |
| 254 | 254 | $lst_matricula = $obj_matricula->lista( null, null, null, null, null, null, $this->cod_aluno ); |
| 255 | - | |
| 255 | + | |
| 256 | 256 | } |
| 257 | 257 | if(!empty($this->ref_idpes)) |
| 258 | 258 | { |
| ... | ... | @@ -263,7 +263,7 @@ class indice extends clsCadastro |
| 263 | 263 | $det_aluno = array_shift($lista_aluno); |
| 264 | 264 | } |
| 265 | 265 | } |
| 266 | - | |
| 266 | + | |
| 267 | 267 | if($det_aluno['cod_aluno'] ) |
| 268 | 268 | { |
| 269 | 269 | $this->cod_aluno = $det_aluno['cod_aluno']; |
| ... | ... | @@ -271,7 +271,7 @@ class indice extends clsCadastro |
| 271 | 271 | $this->ref_cod_religiao = $det_aluno['ref_cod_religiao']; |
| 272 | 272 | $this->caminho_foto = $det_aluno['caminho_foto']; |
| 273 | 273 | } |
| 274 | - | |
| 274 | + | |
| 275 | 275 | $this->campoOculto("cod_aluno",$this->cod_aluno); |
| 276 | 276 | $this->campoOculto("ref_idpes",$this->ref_idpes); |
| 277 | 277 | if( $this->ref_idpes != "NULL") |
| ... | ... | @@ -280,53 +280,53 @@ class indice extends clsCadastro |
| 280 | 280 | { |
| 281 | 281 | $obj_pessoa = new clsPessoaFj($this->ref_idpes); |
| 282 | 282 | $det_pessoa = $obj_pessoa->detalhe(); |
| 283 | - | |
| 283 | + | |
| 284 | 284 | $obj_fisica = new clsFisica($this->ref_idpes); |
| 285 | 285 | $det_fisica = $obj_fisica->detalhe(); |
| 286 | - | |
| 286 | + | |
| 287 | 287 | $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes ); |
| 288 | 288 | $det_fisica_raca = $obj_fisica_raca->detalhe(); |
| 289 | 289 | $this->ref_cod_raca = $det_fisica_raca['ref_cod_raca']; |
| 290 | - | |
| 290 | + | |
| 291 | 291 | $this->nome = $det_pessoa["nome"]; |
| 292 | - | |
| 292 | + | |
| 293 | 293 | $this->email = $det_pessoa["email"]; |
| 294 | - | |
| 294 | + | |
| 295 | 295 | $this->ideciv = $det_fisica["ideciv"]->ideciv; |
| 296 | - | |
| 296 | + | |
| 297 | 297 | $this->data_nascimento = dataToBrasil($det_fisica["data_nasc"]); |
| 298 | - | |
| 298 | + | |
| 299 | 299 | $this->cpf = $det_fisica["cpf"]; |
| 300 | 300 | $obj_documento = new clsDocumento($this->ref_idpes); |
| 301 | 301 | $obj_documento_det = $obj_documento->detalhe(); |
| 302 | - | |
| 302 | + | |
| 303 | 303 | $this->ddd_fone_1 = $det_pessoa["ddd_1"]; |
| 304 | 304 | $this->fone_1 = $det_pessoa["fone_1"]; |
| 305 | - | |
| 305 | + | |
| 306 | 306 | $this->ddd_fone_2 = $det_pessoa["ddd_2"]; |
| 307 | 307 | $this->fone_2 = $det_pessoa["fone_2"]; |
| 308 | - | |
| 308 | + | |
| 309 | 309 | $this->ddd_fax = $det_pessoa["ddd_fax"]; |
| 310 | 310 | $this->fone_fax= $det_pessoa["fone_fax"]; |
| 311 | - | |
| 311 | + | |
| 312 | 312 | $this->ddd_mov = $det_pessoa["ddd_mov"]; |
| 313 | 313 | $this->fone_mov = $det_pessoa["fone_mov"]; |
| 314 | - | |
| 314 | + | |
| 315 | 315 | $this->email = $det_pessoa["email"]; |
| 316 | 316 | $this->url = $det_pessoa["url"]; |
| 317 | - | |
| 317 | + | |
| 318 | 318 | $this->sexo = $det_fisica["sexo"]; |
| 319 | - | |
| 319 | + | |
| 320 | 320 | $this->nacionalidade = $det_fisica["nacionalidade"]; |
| 321 | 321 | $this->idmun_nascimento = $det_fisica["idmun_nascimento"]->idmun; |
| 322 | - | |
| 322 | + | |
| 323 | 323 | $detalhe_pais_origem = $det_fisica["idpais_estrangeiro"]->detalhe(); |
| 324 | 324 | $this->pais_origem = $detalhe_pais_origem["idpais"]; |
| 325 | - | |
| 325 | + | |
| 326 | 326 | $this->ref_idpes_responsavel = $det_fisica["idpes_responsavel"]; |
| 327 | 327 | $this->idpes_pai = $det_fisica["idpes_pai"]; |
| 328 | 328 | $this->idpes_mae = $det_fisica["idpes_mae"]; |
| 329 | - | |
| 329 | + | |
| 330 | 330 | $obj_aluno = new clsPmieducarAluno(null,null,null,null,null,$this->ref_idpes ); |
| 331 | 331 | $detalhe_aluno = $obj_aluno->detalhe(); |
| 332 | 332 | if( $detalhe_aluno ) |
| ... | ... | @@ -334,13 +334,13 @@ class indice extends clsCadastro |
| 334 | 334 | $this->nm_pai = $detalhe_aluno["nm_pai"]; |
| 335 | 335 | $this->nm_mae = $detalhe_aluno["nm_mae"]; |
| 336 | 336 | } |
| 337 | - | |
| 337 | + | |
| 338 | 338 | $obj_endereco = new clsPessoaEndereco($this->ref_idpes); |
| 339 | - | |
| 339 | + | |
| 340 | 340 | if($obj_endereco_det = $obj_endereco->detalhe()) |
| 341 | 341 | { |
| 342 | 342 | $this->isEnderecoExterno = 0; |
| 343 | - | |
| 343 | + | |
| 344 | 344 | $this->id_cep = $obj_endereco_det['cep']->cep; |
| 345 | 345 | //$this->cep_ = $obj_endereco_det['ref_cep']; |
| 346 | 346 | $this->id_bairro = $obj_endereco_det['idbai']->idbai; |
| ... | ... | @@ -351,30 +351,30 @@ class indice extends clsCadastro |
| 351 | 351 | $this->andar = $obj_endereco_det['andar']; |
| 352 | 352 | $this->apartamento = $obj_endereco_det['apartamento']; |
| 353 | 353 | $this->bloco = $obj_endereco_det['bloco']; |
| 354 | - | |
| 354 | + | |
| 355 | 355 | $this->ref_idtlog = $obj_endereco_det['idtlog']; |
| 356 | 356 | $this->nm_bairro = $obj_endereco_det['bairro']; |
| 357 | 357 | $this->nm_logradouro = $obj_endereco_det['logradouro']; |
| 358 | - | |
| 358 | + | |
| 359 | 359 | $this->cep_ = int2CEP($this->id_cep); |
| 360 | - | |
| 361 | - | |
| 360 | + | |
| 361 | + | |
| 362 | 362 | } |
| 363 | 363 | else |
| 364 | 364 | { |
| 365 | - | |
| 365 | + | |
| 366 | 366 | $obj_endereco = new clsEnderecoExterno($this->ref_idpes); |
| 367 | - | |
| 367 | + | |
| 368 | 368 | if($obj_endereco_det = $obj_endereco->detalhe()) |
| 369 | 369 | { |
| 370 | - | |
| 370 | + | |
| 371 | 371 | $this->isEnderecoExterno = 1; |
| 372 | - | |
| 372 | + | |
| 373 | 373 | $this->id_cep = $obj_endereco_det['cep']; |
| 374 | 374 | $this->cidade = $obj_endereco_det['cidade']; |
| 375 | 375 | $this->nm_bairro = $obj_endereco_det['bairro']; |
| 376 | 376 | $this->nm_logradouro = $obj_endereco_det['logradouro']; |
| 377 | - | |
| 377 | + | |
| 378 | 378 | $this->id_bairro = null; |
| 379 | 379 | $this->id_logradouro = null; |
| 380 | 380 | $this->numero = $obj_endereco_det['numero']; |
| ... | ... | @@ -383,7 +383,7 @@ class indice extends clsCadastro |
| 383 | 383 | $this->andar = $obj_endereco_det['andar']; |
| 384 | 384 | $this->apartamento = $obj_endereco_det['apartamento']; |
| 385 | 385 | $this->bloco = $obj_endereco_det['bloco']; |
| 386 | - | |
| 386 | + | |
| 387 | 387 | $this->ref_idtlog = $this->idtlog = $obj_endereco_det['idtlog']->idtlog; |
| 388 | 388 | $this->ref_sigla_uf = $this->ref_sigla_uf_ = $obj_endereco_det['sigla_uf']->sigla_uf; |
| 389 | 389 | $this->cep_ = int2CEP($this->id_cep); |
| ... | ... | @@ -391,52 +391,52 @@ class indice extends clsCadastro |
| 391 | 391 | } |
| 392 | 392 | } |
| 393 | 393 | } |
| 394 | - | |
| 394 | + | |
| 395 | 395 | if($this->isEnderecoExterno == 0) |
| 396 | 396 | { |
| 397 | - | |
| 397 | + | |
| 398 | 398 | $obj_bairro = new clsBairro($this->id_bairro); |
| 399 | 399 | $this->cep_ = int2CEP($this->id_cep); |
| 400 | - | |
| 400 | + | |
| 401 | 401 | $obj_bairro_det = $obj_bairro->detalhe(); |
| 402 | - | |
| 402 | + | |
| 403 | 403 | if($obj_bairro_det) |
| 404 | 404 | { |
| 405 | - | |
| 405 | + | |
| 406 | 406 | $this->nm_bairro = $obj_bairro_det["nome"]; |
| 407 | 407 | } |
| 408 | - | |
| 408 | + | |
| 409 | 409 | $obj_log = new clsLogradouro($this->id_logradouro); |
| 410 | 410 | $obj_log_det = $obj_log->detalhe(); |
| 411 | - | |
| 411 | + | |
| 412 | 412 | if($obj_log_det) |
| 413 | 413 | { |
| 414 | - | |
| 414 | + | |
| 415 | 415 | $this->nm_logradouro = $obj_log_det["nome"]; |
| 416 | - | |
| 416 | + | |
| 417 | 417 | $this->ref_idtlog = $obj_log_det["idtlog"]->idtlog; |
| 418 | 418 | $obj_mun = new clsMunicipio( $obj_log_det["idmun"]); |
| 419 | 419 | $det_mun = $obj_mun->detalhe(); |
| 420 | - | |
| 420 | + | |
| 421 | 421 | if($det_mun) |
| 422 | 422 | { |
| 423 | 423 | $this->cidade = ucfirst(strtolower($det_mun["nome"])); |
| 424 | 424 | } |
| 425 | - | |
| 425 | + | |
| 426 | 426 | $this->ref_sigla_uf = $this->ref_sigla_uf_ = $det_mun['sigla_uf']->sigla_uf; |
| 427 | 427 | } |
| 428 | - | |
| 428 | + | |
| 429 | 429 | $obj_bairro = new clsBairro($obj_endereco_det["ref_idbai"]); |
| 430 | 430 | $obj_bairro_det = $obj_bairro->detalhe(); |
| 431 | - | |
| 431 | + | |
| 432 | 432 | if($obj_bairro_det) |
| 433 | 433 | { |
| 434 | - | |
| 434 | + | |
| 435 | 435 | $this->nm_bairro = $obj_bairro_det["nome"]; |
| 436 | 436 | } |
| 437 | 437 | } |
| 438 | 438 | $this->campoTexto("nome","Nome",$this->nome,30,100,true); |
| 439 | - | |
| 439 | + | |
| 440 | 440 | if($this->cpf && $this->ref_idpes) |
| 441 | 441 | { |
| 442 | 442 | if(!$this->cpf) |
| ... | ... | @@ -447,7 +447,7 @@ class indice extends clsCadastro |
| 447 | 447 | { |
| 448 | 448 | $this->campoRotulo("cpf_2","CPF",int2CPF($this->cpf)); |
| 449 | 449 | } |
| 450 | - | |
| 450 | + | |
| 451 | 451 | } |
| 452 | 452 | else |
| 453 | 453 | { |
| ... | ... | @@ -460,46 +460,46 @@ class indice extends clsCadastro |
| 460 | 460 | { |
| 461 | 461 | $this->campoCpf("cpf_2","CPF",int2CPF($this->cpf),false); |
| 462 | 462 | } |
| 463 | - | |
| 463 | + | |
| 464 | 464 | } |
| 465 | - | |
| 465 | + | |
| 466 | 466 | $this->campoData("data_nascimento","Data de Nascimento",$this->data_nascimento,true); |
| 467 | - | |
| 467 | + | |
| 468 | 468 | $lista = array('' => "Selecione", 'F' => "Feminino", 'M' => "Masculino"); |
| 469 | 469 | $this->campoLista("sexo","Sexo",$lista,$this->sexo); |
| 470 | - | |
| 470 | + | |
| 471 | 471 | $obj_estado_civil = new clsEstadoCivil(); |
| 472 | 472 | $obj_estado_civil_lista = $obj_estado_civil->lista(); |
| 473 | - | |
| 473 | + | |
| 474 | 474 | $lista_estado_civil = array('' => "Selecione"); |
| 475 | - | |
| 475 | + | |
| 476 | 476 | if($obj_estado_civil_lista) |
| 477 | 477 | { |
| 478 | - | |
| 478 | + | |
| 479 | 479 | foreach ($obj_estado_civil_lista as $estado_civil) |
| 480 | 480 | { |
| 481 | 481 | $lista_estado_civil[$estado_civil["ideciv"]] = $estado_civil["descricao"]; |
| 482 | 482 | } |
| 483 | - | |
| 483 | + | |
| 484 | 484 | } |
| 485 | - | |
| 485 | + | |
| 486 | 486 | $this->campoLista("ideciv","Estado Civil",$lista_estado_civil,$this->ideciv); |
| 487 | - | |
| 487 | + | |
| 488 | 488 | $obj_religiao = new clsPmieducarReligiao(); |
| 489 | 489 | $obj_religia_lista = $obj_religiao->lista(null,null,null,null,null,null,null,null,1); |
| 490 | - | |
| 490 | + | |
| 491 | 491 | $lista_religiao = array('NULL' => "Selecione"); |
| 492 | 492 | if($obj_religia_lista) |
| 493 | 493 | { |
| 494 | - | |
| 494 | + | |
| 495 | 495 | foreach ($obj_religia_lista as $religiao) |
| 496 | 496 | { |
| 497 | 497 | $lista_religiao[$religiao["cod_religiao"]] = $religiao["nm_religiao"]; |
| 498 | 498 | } |
| 499 | - | |
| 499 | + | |
| 500 | 500 | } |
| 501 | 501 | $this->campoLista("ref_cod_religiao","Religião",$lista_religiao,$this->ref_cod_religiao,"",false,"","","",false); |
| 502 | - | |
| 502 | + | |
| 503 | 503 | $opcoes_raca = array( "" => "Selecione" ); |
| 504 | 504 | $obj_raca = new clsCadastroRaca(); |
| 505 | 505 | $lst_raca = $obj_raca->lista( null,null,null,null,null,null,null,true ); |
| ... | ... | @@ -511,9 +511,9 @@ class indice extends clsCadastro |
| 511 | 511 | } |
| 512 | 512 | } |
| 513 | 513 | $this->campoLista("ref_cod_raca","Raça",$opcoes_raca,$this->ref_cod_raca,"",false,"","","",false); |
| 514 | - | |
| 514 | + | |
| 515 | 515 | $this->campoQuebra2("#224488"); |
| 516 | - | |
| 516 | + | |
| 517 | 517 | if($this->idpes_pai) |
| 518 | 518 | { |
| 519 | 519 | $obj_pessoa_pai = new clsPessoaFj($this->idpes_pai); |
| ... | ... | @@ -544,17 +544,17 @@ class indice extends clsCadastro |
| 544 | 544 | { |
| 545 | 545 | $this->cpf_mae = int2CPF( $det_cpf["cpf"] ); |
| 546 | 546 | } |
| 547 | - } | |
| 547 | + } | |
| 548 | 548 | } |
| 549 | 549 | $this->campoTexto("nm_pai","Nome do Pai",$this->nm_pai,30,255,false); |
| 550 | 550 | |
| 551 | 551 | $this->campoCpf("cpf_pai","CPF pai",$this->cpf_pai, false, $this->cpf_pai ? "": " (preencher sempre que possível)"); |
| 552 | - | |
| 552 | + | |
| 553 | 553 | $this->campoTexto("nm_mae","Nome da Mãe",$this->nm_mae,30,255,false); |
| 554 | 554 | $this->campoCpf("cpf_mae","CPF mãe",$this->cpf_mae, false, $this->cpf_mae ? "": " (preencher sempre que possível)"); |
| 555 | - | |
| 555 | + | |
| 556 | 556 | $lista = array('' => "Responsável"); |
| 557 | - | |
| 557 | + | |
| 558 | 558 | if($this->ref_idpes_responsavel != "NULL") |
| 559 | 559 | { |
| 560 | 560 | $obj_pessoa_resp = new clsPessoaFj($this->ref_idpes_responsavel); |
| ... | ... | @@ -573,9 +573,9 @@ class indice extends clsCadastro |
| 573 | 573 | $parametros->setPessoaTela('frame'); |
| 574 | 574 | $parametros->setCodSistema(1); |
| 575 | 575 | $this->campoListaPesq( "ref_idpes_responsavel", "Responsavel", $lista, $this->ref_idpes_responsavel, "pesquisa_pessoa_lst.php", "", false, "", "", null, null, "", false, $parametros->serializaCampos(), false); |
| 576 | - | |
| 576 | + | |
| 577 | 577 | $this->campoQuebra2("#224488"); |
| 578 | - | |
| 578 | + | |
| 579 | 579 | if($this->tipo_responsavel) |
| 580 | 580 | { |
| 581 | 581 | if($this->nm_pai) |
| ... | ... | @@ -585,34 +585,34 @@ class indice extends clsCadastro |
| 585 | 585 | elseif($this->ref_idpes_responsavel) |
| 586 | 586 | $this->tipo_responsavel = 'r'; |
| 587 | 587 | } |
| 588 | - | |
| 588 | + | |
| 589 | 589 | $this->campoRadio("tipo_responsavel","Responsável",array('p' => "Pai",'m' => "Mãe",'r' => "Responsável",),$this->tipo_responsavel); |
| 590 | - | |
| 590 | + | |
| 591 | 591 | |
| 592 | 592 | $this->campoQuebra2("#224488"); |
| 593 | - | |
| 593 | + | |
| 594 | 594 | $disabled = $this->isEnderecoExterno ? false : true ; |
| 595 | - | |
| 595 | + | |
| 596 | 596 | $this->campoOculto("isEnderecoExterno",$this->isEnderecoExterno); |
| 597 | - | |
| 597 | + | |
| 598 | 598 | $this->campoCep("cep_", "CEP", $this->cep_, true, "-", "<img id='lupa' src=\"imagens/lupa.png\" border=\"0\" onclick=\"showExpansivel( 500,500, '<iframe name=\'miolo\' id=\'miolo\' frameborder=\'0\' height=\'100%\' width=\'500\' marginheight=\'0\' marginwidth=\'0\' src=\'educar_pesquisa_cep_log_bairro.php?campo1=nm_bairro&campo2=id_bairro&campo3=id_cep&campo4=nm_logradouro&campo5=id_logradouro&campo6=ref_sigla_uf&campo7=cidade&campo8=ref_idtlog_&campo9=isEnderecoExterno&campo10=cep_&campo11=ref_sigla_uf_&campo12=ref_idtlog&campo13=id_cidade\'></iframe>');\">", $disabled); |
| 599 | - | |
| 599 | + | |
| 600 | 600 | $this->campoTexto( "cidade", "Cidade", $this->cidade, 30, 255, true,false,true,"","","","",$disabled); |
| 601 | - | |
| 601 | + | |
| 602 | 602 | $obj_uf = new clsUf(false, false, 1); |
| 603 | - $lst_uf = $obj_uf->lista(false, false, 1, false, false, "sigla_uf"); | |
| 603 | + $lst_uf = $obj_uf->lista(false, false, false, false, false, "sigla_uf"); | |
| 604 | 604 | $array_uf = Array('' => "Selecione um estado"); |
| 605 | 605 | foreach ($lst_uf as $uf) |
| 606 | 606 | { |
| 607 | 607 | $array_uf[$uf['sigla_uf']] = $uf['nome']; |
| 608 | 608 | } |
| 609 | - | |
| 609 | + | |
| 610 | 610 | $this->campoLista("ref_sigla_uf_", " Estado", $array_uf, $this->ref_sigla_uf, "", false, "","", $disabled); |
| 611 | - | |
| 611 | + | |
| 612 | 612 | $this->campoTexto( "nm_bairro", "Bairro", $this->nm_bairro, 30, 255, true ,false,false,"","","","",$disabled); |
| 613 | - | |
| 613 | + | |
| 614 | 614 | $tipo_logradouro_array = array('' => "Tipo de Logradouro"); |
| 615 | - | |
| 615 | + | |
| 616 | 616 | $obj_tipo_logradouro = new clsTipoLogradouro(); |
| 617 | 617 | $obj_tipo_logradouro_lista = $obj_tipo_logradouro->lista(); |
| 618 | 618 | if($obj_tipo_logradouro_lista) |
| ... | ... | @@ -624,32 +624,32 @@ class indice extends clsCadastro |
| 624 | 624 | } |
| 625 | 625 | $this->campoLista("ref_idtlog","Logradouro",$tipo_logradouro_array,$this->ref_idtlog,"",true,"","",$this->isEnderecoExterno?false:true,true); |
| 626 | 626 | // $this->campoLista("ref_idtlog","Logradouro",$tipo_logradouro_array,$this->ref_idtlog,"",true,"","",false,true); |
| 627 | - | |
| 627 | + | |
| 628 | 628 | $this->campoTexto( "nm_logradouro", "Logradouro", $this->nm_logradouro, 30, 255, true ,false,false,"","","","",$disabled ); |
| 629 | - | |
| 629 | + | |
| 630 | 630 | $this->campoNumero( "numero", "Número", $this->numero, 4, 6, false, "", "", false, false, true ); |
| 631 | 631 | $this->campoTexto( "letra", " Letra", $this->letra, 4, 1, false ); |
| 632 | 632 | $this->campoTexto( "complemento", "Complemento", $this->complemento, 30, 50, false ); |
| 633 | 633 | $this->campoTexto( "bloco", "Bloco", $this->bloco, 30, 50, false ); |
| 634 | 634 | $this->campoNumero( "andar", "Andar", $this->andar, 4, 2, false, "", "", false, false, true ); |
| 635 | 635 | $this->campoNumero( "apartamento", " Apartamento", $this->apartamento, 4, 6, false ); |
| 636 | - | |
| 636 | + | |
| 637 | 637 | $lista_mun_nasc = array('NULL' => "Selecione a cidade"); |
| 638 | - | |
| 638 | + | |
| 639 | 639 | $obj_mun_nasc = new clsMunicipio($this->idmun_nascimento); |
| 640 | 640 | $det_mun_nasc = $obj_mun_nasc->detalhe(); |
| 641 | - | |
| 641 | + | |
| 642 | 642 | if($det_mun_nasc["nome"]) |
| 643 | 643 | { |
| 644 | 644 | $lista_mun_nasc[$det_mun_nasc["idmun"]] = $det_mun_nasc["nome"]; |
| 645 | 645 | } |
| 646 | - | |
| 646 | + | |
| 647 | 647 | $this->campoListaPesq( "idmun_nascimento", "Naturalidade", $lista_mun_nasc, $this->idmun_nascimento, "educar_pesquisa_municipio_lst.php?campo1=idmun_nascimento", "", false, "", "", null, null, "",true ); |
| 648 | - | |
| 648 | + | |
| 649 | 649 | $this->nacionalidade =($this->nacionalidade)?$this->nacionalidade:1; |
| 650 | 650 | $lista_nacionalidade = array('NULL' => "Selecione", '1' => "Brasileiro", '2' => "Naturalizado Brasileiro", '3' => "Estrangeiro"); |
| 651 | 651 | $this->campoLista("nacionalidade","Nacionalidade",$lista_nacionalidade,$this->nacionalidade,"tmpObj = document.getElementById('pais_origem');if(this.value!=1){tmpObj.disabled=false;}else{tmpObj.selectedIndex = 27;tmpObj.disabled=true;}",true,"","","",false); |
| 652 | - | |
| 652 | + | |
| 653 | 653 | $lista_pais_origem = array('NULL' => "País de origem"); |
| 654 | 654 | $obj_pais = new clsPais(); |
| 655 | 655 | $obj_pais_lista = $obj_pais->lista(null,null,null,"","","nome asc"); |
| ... | ... | @@ -660,38 +660,38 @@ class indice extends clsCadastro |
| 660 | 660 | $lista_pais_origem[$pais["idpais"]] = $pais["nome"]; |
| 661 | 661 | } |
| 662 | 662 | } |
| 663 | - | |
| 663 | + | |
| 664 | 664 | // se a nacionalidade for "BRASILEIRO" seleciona o brasil e deixa inativo |
| 665 | 665 | $this->pais_origem = ($this->nacionalidade == 1)?1:$this->pais_origem; |
| 666 | 666 | $this->campoLista("pais_origem"," País de Origem",$lista_pais_origem,$this->pais_origem,"","","","",($this->nacionalidade == 1),false); |
| 667 | - | |
| 667 | + | |
| 668 | 668 | $this->campoQuebra2("#224488"); |
| 669 | - | |
| 669 | + | |
| 670 | 670 | $obj_beneficio = new clsPmieducarAlunoBeneficio(); |
| 671 | 671 | $obj_beneficio_lista = $obj_beneficio->lista(null,null,null,null,null,null,null,null,null,1); |
| 672 | - | |
| 672 | + | |
| 673 | 673 | $lista_beneficio = array('NULL' => "Selecione"); |
| 674 | - | |
| 674 | + | |
| 675 | 675 | if($obj_beneficio_lista) |
| 676 | 676 | { |
| 677 | - | |
| 677 | + | |
| 678 | 678 | foreach ($obj_beneficio_lista as $beneficio) |
| 679 | 679 | { |
| 680 | 680 | $lista_beneficio[$beneficio["cod_aluno_beneficio"]] = $beneficio["nm_beneficio"]; |
| 681 | 681 | } |
| 682 | - | |
| 682 | + | |
| 683 | 683 | } |
| 684 | - | |
| 684 | + | |
| 685 | 685 | $this->campoLista("ref_cod_aluno_beneficio","Benefício",$lista_beneficio,$this->ref_cod_aluno_beneficio,"",false,"","",false,false); |
| 686 | - | |
| 686 | + | |
| 687 | 687 | $lista_analfabeto = array( '1' => 'Não' , 0 => "Sim"); |
| 688 | 688 | $this->campoLista("analfabeto","Alfabetizado",$lista_analfabeto,$this->analfabeto,"",false,"","",false,false); |
| 689 | - | |
| 689 | + | |
| 690 | 690 | $this->campoNumero("ddd_fone_1", "Telefone", $this->ddd_fone_1, 1, 3, false, "", "", false, false, true); |
| 691 | 691 | $this->campoNumero("fone_1", "Telefone", $this->fone_1, 11, 11); |
| 692 | 692 | $this->campoNumero("ddd_mov", "Celular", $this->ddd_mov, 1, 3, false, "", "", false, false, true); |
| 693 | 693 | $this->campoNumero("fone_mov", "Celular", $this->fone_mov, 11, 11); |
| 694 | - | |
| 694 | + | |
| 695 | 695 | $this->campoEmail("email","Email",$this->email,30,255,false); |
| 696 | 696 | if(!empty($this->caminho_foto)) |
| 697 | 697 | { |
| ... | ... | @@ -699,16 +699,16 @@ class indice extends clsCadastro |
| 699 | 699 | } |
| 700 | 700 | $this->campoOculto("foto_excluida", 0); |
| 701 | 701 | $this->campoArquivo("foto", "Foto","", "20","",false); |
| 702 | - | |
| 702 | + | |
| 703 | 703 | $this->campoOculto( "id_bairro", $this->id_bairro); |
| 704 | 704 | $this->campoOculto( "id_cep", $this->id_cep); |
| 705 | 705 | $this->campoOculto( "id_logradouro", $this->id_logradouro); |
| 706 | 706 | $this->campoOculto( "id_cidade", $this->id_cidade); |
| 707 | 707 | $this->campoOculto("ref_idtlog_", $this->ref_idtlog); |
| 708 | 708 | $this->campoOculto("ref_sigla_uf", $this->ref_sigla_uf); |
| 709 | - | |
| 709 | + | |
| 710 | 710 | $this->campoTexto("nome","Nome",$this->nome,30,100,true); |
| 711 | - | |
| 711 | + | |
| 712 | 712 | if($this->cpf && $this->ref_idpes) |
| 713 | 713 | { |
| 714 | 714 | if(!$this->cpf) |
| ... | ... | @@ -727,44 +727,44 @@ class indice extends clsCadastro |
| 727 | 727 | $this->campoOculto("sem_cpf",1); |
| 728 | 728 | } |
| 729 | 729 | } |
| 730 | - | |
| 730 | + | |
| 731 | 731 | $this->campoData("data_nascimento","Data de Nascimento",$this->data_nascimento,true); |
| 732 | - | |
| 732 | + | |
| 733 | 733 | $lista = array('' => "Selecione", 'F' => "Feminino", 'M' => "Masculino"); |
| 734 | 734 | $this->campoLista("sexo","Sexo",$lista,$this->sexo); |
| 735 | - | |
| 735 | + | |
| 736 | 736 | $obj_estado_civil = new clsEstadoCivil(); |
| 737 | 737 | $obj_estado_civil_lista = $obj_estado_civil->lista(); |
| 738 | - | |
| 738 | + | |
| 739 | 739 | $lista_estado_civil = array('' => "Selecione"); |
| 740 | - | |
| 740 | + | |
| 741 | 741 | if($obj_estado_civil_lista) |
| 742 | 742 | { |
| 743 | - | |
| 743 | + | |
| 744 | 744 | foreach ($obj_estado_civil_lista as $estado_civil) |
| 745 | 745 | { |
| 746 | 746 | $lista_estado_civil[$estado_civil["ideciv"]] = $estado_civil["descricao"]; |
| 747 | 747 | } |
| 748 | - | |
| 748 | + | |
| 749 | 749 | } |
| 750 | - | |
| 750 | + | |
| 751 | 751 | $this->campoLista("ideciv","Estado Civil",$lista_estado_civil,$this->ideciv); |
| 752 | - | |
| 752 | + | |
| 753 | 753 | $obj_religiao = new clsPmieducarReligiao(); |
| 754 | 754 | $obj_religia_lista = $obj_religiao->lista(null,null,null,null,null,null,null,null,1); |
| 755 | - | |
| 755 | + | |
| 756 | 756 | $lista_religiao = array('NULL' => "Selecione"); |
| 757 | 757 | if($obj_religia_lista) |
| 758 | 758 | { |
| 759 | - | |
| 759 | + | |
| 760 | 760 | foreach ($obj_religia_lista as $religiao) |
| 761 | 761 | { |
| 762 | 762 | $lista_religiao[$religiao["cod_religiao"]] = $religiao["nm_religiao"]; |
| 763 | 763 | } |
| 764 | - | |
| 764 | + | |
| 765 | 765 | } |
| 766 | 766 | $this->campoLista("ref_cod_religiao","Religião",$lista_religiao,$this->ref_cod_religiao,"",false,"","","",false); |
| 767 | - | |
| 767 | + | |
| 768 | 768 | $opcoes_raca = array( "" => "Selecione" ); |
| 769 | 769 | $obj_raca = new clsCadastroRaca(); |
| 770 | 770 | $lst_raca = $obj_raca->lista( null,null,null,null,null,null,null,true ); |
| ... | ... | @@ -776,9 +776,9 @@ class indice extends clsCadastro |
| 776 | 776 | } |
| 777 | 777 | } |
| 778 | 778 | $this->campoLista("ref_cod_raca","Raça",$opcoes_raca,$this->ref_cod_raca,"",false,"","","",false); |
| 779 | - | |
| 779 | + | |
| 780 | 780 | $this->campoQuebra2("#224488"); |
| 781 | - | |
| 781 | + | |
| 782 | 782 | if($this->idpes_pai) |
| 783 | 783 | { |
| 784 | 784 | $obj_pessoa_pai = new clsPessoaFj($this->idpes_pai); |
| ... | ... | @@ -813,12 +813,12 @@ class indice extends clsCadastro |
| 813 | 813 | } |
| 814 | 814 | $this->campoTexto("nm_pai","Nome do Pai",$this->nm_pai,30,255,false); |
| 815 | 815 | $this->campoCpf("cpf_pai","CPF pai",$this->cpf_pai, false, $this->cpf_pai ? "": " (preencher sempre que possível)"); |
| 816 | - | |
| 816 | + | |
| 817 | 817 | $this->campoTexto("nm_mae","Nome da Mãe",$this->nm_mae,30,255,false); |
| 818 | 818 | $this->campoCpf("cpf_mae","CPF mãe",$this->cpf_mae, false, $this->cpf_mae ? "": " (preencher sempre que possível)"); |
| 819 | - | |
| 819 | + | |
| 820 | 820 | $lista = array('' => "Responsável"); |
| 821 | - | |
| 821 | + | |
| 822 | 822 | if($this->ref_idpes_responsavel != "NULL") |
| 823 | 823 | { |
| 824 | 824 | $obj_pessoa_resp = new clsPessoaFj($this->ref_idpes_responsavel); |
| ... | ... | @@ -837,7 +837,7 @@ class indice extends clsCadastro |
| 837 | 837 | $parametros->setPessoaTela('frame'); |
| 838 | 838 | $parametros->setCodSistema(1); |
| 839 | 839 | $this->campoListaPesq( "ref_idpes_responsavel", "Responsavel", $lista, $this->ref_idpes_responsavel, "pesquisa_pessoa_lst.php", "", false, "", "", null, null, "", false, $parametros->serializaCampos(), false); |
| 840 | - | |
| 840 | + | |
| 841 | 841 | $this->campoQuebra2("#224488"); |
| 842 | 842 | if(!$this->tipo_responsavel) |
| 843 | 843 | { |
| ... | ... | @@ -850,31 +850,31 @@ class indice extends clsCadastro |
| 850 | 850 | } |
| 851 | 851 | |
| 852 | 852 | $this->campoRadio("tipo_responsavel","Responsável",array('' => "Sem Responsável",'p' => "Pai",'m' => "Mãe",'r' => "Responsável",),$this->tipo_responsavel); |
| 853 | - | |
| 853 | + | |
| 854 | 854 | $this->campoQuebra2("#224488"); |
| 855 | - | |
| 855 | + | |
| 856 | 856 | $disabled = $this->isEnderecoExterno ? false : true ; |
| 857 | - | |
| 857 | + | |
| 858 | 858 | $this->campoOculto("isEnderecoExterno",$this->isEnderecoExterno); |
| 859 | - | |
| 859 | + | |
| 860 | 860 | $this->campoCep("cep_", "CEP", $this->cep_, true, "-", "<img id='lupa' src=\"imagens/lupa.png\" border=\"0\" onclick=\"showExpansivel( 500,500, '<iframe name=\'miolo\' id=\'miolo\' frameborder=\'0\' height=\'100%\' width=\'500\' marginheight=\'0\' marginwidth=\'0\' src=\'educar_pesquisa_cep_log_bairro.php?campo1=nm_bairro&campo2=id_bairro&campo3=id_cep&campo4=nm_logradouro&campo5=id_logradouro&campo6=ref_sigla_uf&campo7=cidade&campo8=ref_idtlog_&campo9=isEnderecoExterno&campo10=cep_&campo11=ref_sigla_uf_&campo12=ref_idtlog&campo13=id_cidade\'></iframe>');\">", $disabled); |
| 861 | - | |
| 861 | + | |
| 862 | 862 | $this->campoTexto( "cidade", "Cidade", $this->cidade, 30, 255, true,false,true,"","","","",$disabled); |
| 863 | - | |
| 863 | + | |
| 864 | 864 | $obj_uf = new clsUf(false, false, 1); |
| 865 | - $lst_uf = $obj_uf->lista(false, false, 1, false, false, "sigla_uf"); | |
| 865 | + $lst_uf = $obj_uf->lista(false, false, false, false, false, "sigla_uf"); | |
| 866 | 866 | $array_uf = Array('' => "Selecione um estado"); |
| 867 | 867 | foreach ($lst_uf as $uf) |
| 868 | 868 | { |
| 869 | 869 | $array_uf[$uf['sigla_uf']] = $uf['nome']; |
| 870 | 870 | } |
| 871 | - | |
| 871 | + | |
| 872 | 872 | $this->campoLista("ref_sigla_uf_", " Estado", $array_uf, $this->ref_sigla_uf, "", false, "","", $disabled); |
| 873 | - | |
| 873 | + | |
| 874 | 874 | $this->campoTexto( "nm_bairro", "Bairro", $this->nm_bairro, 30, 255, true ,false,false,"","","","",$disabled); |
| 875 | - | |
| 875 | + | |
| 876 | 876 | $tipo_logradouro_array = array('' => "Tipo de Logradouro"); |
| 877 | - | |
| 877 | + | |
| 878 | 878 | $obj_tipo_logradouro = new clsTipoLogradouro(); |
| 879 | 879 | $obj_tipo_logradouro_lista = $obj_tipo_logradouro->lista(); |
| 880 | 880 | if($obj_tipo_logradouro_lista) |
| ... | ... | @@ -885,32 +885,32 @@ class indice extends clsCadastro |
| 885 | 885 | } |
| 886 | 886 | } |
| 887 | 887 | $this->campoLista("ref_idtlog","Logradouro",$tipo_logradouro_array,$this->ref_idtlog,"",true,"","",$this->isEnderecoExterno?false:true,true); |
| 888 | - | |
| 888 | + | |
| 889 | 889 | $this->campoTexto( "nm_logradouro", "Logradouro", $this->nm_logradouro, 30, 255, true ,false,false,"","","","",$disabled ); |
| 890 | - | |
| 890 | + | |
| 891 | 891 | $this->campoNumero( "numero", "Número", $this->numero, 4, 6, false, "", "", false, false, true ); |
| 892 | 892 | $this->campoTexto( "letra", " Letra", $this->letra, 4, 1, false ); |
| 893 | 893 | $this->campoTexto( "complemento", "Complemento", $this->complemento, 30, 50, false ); |
| 894 | 894 | $this->campoTexto( "bloco", "Bloco", $this->bloco, 30, 50, false ); |
| 895 | 895 | $this->campoNumero( "andar", "Andar", $this->andar, 4, 2, false, "", "", false, false, true ); |
| 896 | 896 | $this->campoNumero( "apartamento", " Apartamento", $this->apartamento, 4, 6, false ); |
| 897 | - | |
| 897 | + | |
| 898 | 898 | $lista_mun_nasc = array('NULL' => "Selecione a cidade"); |
| 899 | - | |
| 899 | + | |
| 900 | 900 | $obj_mun_nasc = new clsMunicipio($this->idmun_nascimento); |
| 901 | 901 | $det_mun_nasc = $obj_mun_nasc->detalhe(); |
| 902 | - | |
| 902 | + | |
| 903 | 903 | if($det_mun_nasc["nome"]) |
| 904 | 904 | { |
| 905 | 905 | $lista_mun_nasc[$det_mun_nasc["idmun"]] = $det_mun_nasc["nome"]; |
| 906 | 906 | } |
| 907 | - | |
| 907 | + | |
| 908 | 908 | $this->campoListaPesq( "idmun_nascimento", "Naturalidade", $lista_mun_nasc, $this->idmun_nascimento, "educar_pesquisa_municipio_lst.php?campo1=idmun_nascimento", "", false, "", "", null, null, "",true ); |
| 909 | - | |
| 909 | + | |
| 910 | 910 | $this->nacionalidade =($this->nacionalidade)?$this->nacionalidade:1; |
| 911 | 911 | $lista_nacionalidade = array('NULL' => "Selecione", '1' => "Brasileiro", '2' => "Naturalizado Brasileiro", '3' => "Estrangeiro"); |
| 912 | 912 | $this->campoLista("nacionalidade","Nacionalidade",$lista_nacionalidade,$this->nacionalidade,"tmpObj = document.getElementById('pais_origem');if(this.value!=1){tmpObj.disabled=false;}else{tmpObj.selectedIndex = 27;tmpObj.disabled=true;}",true,"","","",false); |
| 913 | - | |
| 913 | + | |
| 914 | 914 | $lista_pais_origem = array('NULL' => "País de origem"); |
| 915 | 915 | $obj_pais = new clsPais(); |
| 916 | 916 | $obj_pais_lista = $obj_pais->lista(null,null,null,"","","nome asc"); |
| ... | ... | @@ -921,54 +921,54 @@ class indice extends clsCadastro |
| 921 | 921 | $lista_pais_origem[$pais["idpais"]] = $pais["nome"]; |
| 922 | 922 | } |
| 923 | 923 | } |
| 924 | - | |
| 924 | + | |
| 925 | 925 | // se a nacionalidade for "BRASILEIRO" seleciona o brasil e deixa inativo |
| 926 | 926 | $this->pais_origem = ($this->nacionalidade == 1)?1:$this->pais_origem; |
| 927 | 927 | $this->campoLista("pais_origem"," País de Origem",$lista_pais_origem,$this->pais_origem,"","","","",($this->nacionalidade == 1),false); |
| 928 | - | |
| 928 | + | |
| 929 | 929 | $this->campoQuebra2("#224488"); |
| 930 | - | |
| 930 | + | |
| 931 | 931 | $obj_beneficio = new clsPmieducarAlunoBeneficio(); |
| 932 | 932 | $obj_beneficio_lista = $obj_beneficio->lista(null,null,null,null,null,null,null,null,null,1); |
| 933 | - | |
| 933 | + | |
| 934 | 934 | $lista_beneficio = array('NULL' => "Selecione"); |
| 935 | - | |
| 935 | + | |
| 936 | 936 | if($obj_beneficio_lista) |
| 937 | 937 | { |
| 938 | - | |
| 938 | + | |
| 939 | 939 | foreach ($obj_beneficio_lista as $beneficio) |
| 940 | 940 | { |
| 941 | 941 | $lista_beneficio[$beneficio["cod_aluno_beneficio"]] = $beneficio["nm_beneficio"]; |
| 942 | 942 | } |
| 943 | - | |
| 943 | + | |
| 944 | 944 | } |
| 945 | - | |
| 945 | + | |
| 946 | 946 | $this->campoLista("ref_cod_aluno_beneficio","Benefício",$lista_beneficio,$this->ref_cod_aluno_beneficio,"",false,"","",false,false); |
| 947 | - | |
| 947 | + | |
| 948 | 948 | $lista_analfabeto = array( '1' => 'Não' , 0 => "Sim"); |
| 949 | 949 | $this->campoLista("analfabeto","Alfabetizado",$lista_analfabeto,$this->analfabeto,"",false,"","",false,false); |
| 950 | - | |
| 950 | + | |
| 951 | 951 | $this->campoNumero("ddd_fone_1", "Telefone", $this->ddd_fone_1, 1, 3, false, "", "", false, false, true); |
| 952 | 952 | $this->campoNumero("fone_1", "Telefone", $this->fone_1, 11, 11); |
| 953 | 953 | $this->campoNumero("ddd_mov", "Celular", $this->ddd_mov, 1, 3, false, "", "", false, false, true); |
| 954 | 954 | $this->campoNumero("fone_mov", "Celular", $this->fone_mov, 11, 11); |
| 955 | - | |
| 955 | + | |
| 956 | 956 | $this->campoEmail("email","Email",$this->email,30,255,false); |
| 957 | 957 | if(!empty($this->caminho_foto)) |
| 958 | 958 | { |
| 959 | 959 | $this->campoRotulo("foto_antiga_","Arquivo","<img src='arquivos/educar/aluno/small/{$this->caminho_foto}' border='0'> <a href='javascript:void(0);' onclick=\"document.getElementById('foto_excluida').value=1;setVisibility('tr_foto_antiga_',false);setVisibility('tr_foto',true);\"> <img src=\"imagens/nvp_bola_xis.gif\" border=\"0\"></a>"); |
| 960 | 960 | } |
| 961 | - | |
| 961 | + | |
| 962 | 962 | $this->campoArquivo("foto", "Foto","", "20","",false); |
| 963 | - | |
| 963 | + | |
| 964 | 964 | $this->campoOculto( "id_bairro", $this->id_bairro); |
| 965 | 965 | $this->campoOculto( "id_cep", $this->id_cep); |
| 966 | 966 | $this->campoOculto( "id_logradouro", $this->id_logradouro); |
| 967 | 967 | $this->campoOculto( "id_cidade", $this->id_cidade); |
| 968 | 968 | $this->campoOculto("ref_idtlog_", $this->ref_idtlog); |
| 969 | 969 | $this->campoOculto("ref_sigla_uf", $this->ref_sigla_uf); |
| 970 | - $this->campoOculto("cpf",$this->cpf); | |
| 971 | - | |
| 970 | + $this->campoOculto("cpf",$this->cpf); | |
| 971 | + | |
| 972 | 972 | $this->campoAdicionaTab("Deficiência", $this->tab_habilitado); |
| 973 | 973 | |
| 974 | 974 | if($this->ref_idpes) |
| ... | ... | @@ -1012,29 +1012,29 @@ class indice extends clsCadastro |
| 1012 | 1012 | |
| 1013 | 1013 | $oculto = $tabela = ""; |
| 1014 | 1014 | if($deficiencia_aluno) |
| 1015 | - { | |
| 1015 | + { | |
| 1016 | 1016 | foreach ($deficiencia_aluno as $indice => $valor) |
| 1017 | 1017 | { |
| 1018 | 1018 | $cor_fundo = $cor_fundo == "#D1DADF" ? "#E4E9ED" : "#D1DADF"; |
| 1019 | 1019 | $tabela .= "<tr id=\"tr_{$indice}\" bgcolor=\"{$cor_fundo}\" style=\"padding-right: 10px;\">"; |
| 1020 | 1020 | $tabela .= "<td>{$valor}</td>"; |
| 1021 | 1021 | $tabela .= "<td align=\"right\" style=\"padding-right: 10px;\">"; |
| 1022 | - $tabela .= "<img border=\"0\" onclick=\"excluirLinhaDeficiencia({$indice})\" | |
| 1022 | + $tabela .= "<img border=\"0\" onclick=\"excluirLinhaDeficiencia({$indice})\" | |
| 1023 | 1023 | style=\"cursor: pointer;\" src=\"imagens/banco_imagens/excluirrr.gif\" |
| 1024 | 1024 | title=\"Excluir\">"; |
| 1025 | 1025 | $tabela .= "</td></tr>"; |
| 1026 | 1026 | $oculto .= "<input type=\"hidden\" id=\"oc_defic[{$indice}]\" name=\"oc_defic[{$indice}]\" value=\"{$indice}\">"; |
| 1027 | 1027 | } |
| 1028 | - } | |
| 1028 | + } | |
| 1029 | 1029 | $this->campoLista("ref_cod_pessoa_deficiencia","Deficiência",$lista,$this->ref_cod_pessoa_deficiencia,"",false,"","",false,$obrigatorio); |
| 1030 | 1030 | $this->campoRotulo("incluir2", "Incluir deficiência", "<a href='#' onclick=\"adicionaDeficiencia();\"><img src='imagens/banco_imagens/entrada2.gif' title='Incluir' border=0></a>"); |
| 1031 | - $this->campoRotulo("tab_defic", "Deficiências", "<table id='tabela_deficiencia' cellspacing='0' cellpadding='2'><tbody>{$tabela}</tbody></table><div id='ocultos_defic'>{$oculto}</div>"); | |
| 1032 | - | |
| 1031 | + $this->campoRotulo("tab_defic", "Deficiências", "<table id='tabela_deficiencia' cellspacing='0' cellpadding='2'><tbody>{$tabela}</tbody></table><div id='ocultos_defic'>{$oculto}</div>"); | |
| 1032 | + | |
| 1033 | 1033 | $this->campoOculto("inc", ""); |
| 1034 | 1034 | $this->campoOculto("exc", ""); |
| 1035 | - | |
| 1035 | + | |
| 1036 | 1036 | $this->campoAdicionaTab("Outros Dados", $this->tab_habilitado); |
| 1037 | - | |
| 1037 | + | |
| 1038 | 1038 | if($this->ref_idpes) |
| 1039 | 1039 | { |
| 1040 | 1040 | $ObjDocumento = new clsDocumento($this->ref_idpes); |
| ... | ... | @@ -1119,7 +1119,7 @@ class indice extends clsCadastro |
| 1119 | 1119 | $this->campoTexto("num_tit_eleitor", "Título de Eleitor", $this->num_tit_eleitor, "13", "13", false); |
| 1120 | 1120 | $this->campoTexto("zona_tit_eleitor", "Zona", $this->zona_tit_eleitor, "4", "4", false); |
| 1121 | 1121 | $this->campoTexto("secao_tit_eleitor", "Seção", $this->secao_tit_eleitor, "10", "10", false); |
| 1122 | - | |
| 1122 | + | |
| 1123 | 1123 | $this->campoTabFim(); |
| 1124 | 1124 | } |
| 1125 | 1125 | |
| ... | ... | @@ -1128,7 +1128,7 @@ class indice extends clsCadastro |
| 1128 | 1128 | @session_start(); |
| 1129 | 1129 | $this->pessoa_logada = $_SESSION['id_pessoa']; |
| 1130 | 1130 | @session_write_close(); |
| 1131 | - | |
| 1131 | + | |
| 1132 | 1132 | if (!$this->cpf && $this->cpf_2) |
| 1133 | 1133 | { |
| 1134 | 1134 | $cpf = idFederal2int($this->cpf_2); |
| ... | ... | @@ -1140,7 +1140,7 @@ class indice extends clsCadastro |
| 1140 | 1140 | return false; |
| 1141 | 1141 | die(); |
| 1142 | 1142 | } |
| 1143 | - else | |
| 1143 | + else | |
| 1144 | 1144 | die("CPF Não Existente"); |
| 1145 | 1145 | } |
| 1146 | 1146 | $obj_pessoa = new clsPessoa_($this->ref_idpes); |
| ... | ... | @@ -1160,7 +1160,7 @@ class indice extends clsCadastro |
| 1160 | 1160 | return false; |
| 1161 | 1161 | } |
| 1162 | 1162 | } |
| 1163 | - | |
| 1163 | + | |
| 1164 | 1164 | if(!$this->cpf) |
| 1165 | 1165 | { |
| 1166 | 1166 | $this->ref_cod_sistema = 1; |
| ... | ... | @@ -1169,10 +1169,10 @@ class indice extends clsCadastro |
| 1169 | 1169 | { |
| 1170 | 1170 | $this->ref_cod_sistema = "NULL"; |
| 1171 | 1171 | } |
| 1172 | - | |
| 1172 | + | |
| 1173 | 1173 | if( is_string( $this->cpf_pai ) && $this->cpf_pai != "") |
| 1174 | 1174 | { |
| 1175 | - | |
| 1175 | + | |
| 1176 | 1176 | $this->cpf_pai = idFederal2int($this->cpf_pai); |
| 1177 | 1177 | $obj_cpf = new clsFisica(false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,$this->cpf_pai); |
| 1178 | 1178 | $detalhe_cpf = $obj_cpf->detalheCPF(); |
| ... | ... | @@ -1190,9 +1190,9 @@ class indice extends clsCadastro |
| 1190 | 1190 | } |
| 1191 | 1191 | else |
| 1192 | 1192 | { |
| 1193 | - | |
| 1193 | + | |
| 1194 | 1194 | $this->nm_pai = $det_pessoa["nome"]; |
| 1195 | - | |
| 1195 | + | |
| 1196 | 1196 | } |
| 1197 | 1197 | } |
| 1198 | 1198 | } |
| ... | ... | @@ -1214,7 +1214,7 @@ class indice extends clsCadastro |
| 1214 | 1214 | { |
| 1215 | 1215 | $this->idpes_pai = "NULL"; |
| 1216 | 1216 | } |
| 1217 | - | |
| 1217 | + | |
| 1218 | 1218 | if( is_string( $this->cpf_mae ) && $this->cpf_mae != "") |
| 1219 | 1219 | { |
| 1220 | 1220 | $this->cpf_mae = idFederal2int($this->cpf_mae); |
| ... | ... | @@ -1234,12 +1234,12 @@ class indice extends clsCadastro |
| 1234 | 1234 | } |
| 1235 | 1235 | else |
| 1236 | 1236 | { |
| 1237 | - | |
| 1237 | + | |
| 1238 | 1238 | $this->nm_mae = $det_pessoa["nome"]; |
| 1239 | - | |
| 1239 | + | |
| 1240 | 1240 | } |
| 1241 | 1241 | } |
| 1242 | - | |
| 1242 | + | |
| 1243 | 1243 | } |
| 1244 | 1244 | else |
| 1245 | 1245 | { |
| ... | ... | @@ -1259,13 +1259,13 @@ class indice extends clsCadastro |
| 1259 | 1259 | { |
| 1260 | 1260 | $this->idpes_mae = "NULL"; |
| 1261 | 1261 | } |
| 1262 | - | |
| 1262 | + | |
| 1263 | 1263 | $obj_fisica = new clsFisica($this->ref_idpes,dataToBanco($this->data_nascimento),$this->sexo,$this->idpes_mae,$this->idpes_pai,$this->ref_idpes_responsavel,null,$this->ideciv,null,null,null,$this->nacionalidade,$this->pais_origem,null,$this->idmun_nascimento,null,null,null,null,null,null,null,null,$this->pessoa_logada,$this->ref_cod_sistema,$this->cpf); |
| 1264 | 1264 | if($obj_fisica->detalhe()) |
| 1265 | 1265 | { |
| 1266 | 1266 | if(!$this->ref_idpes_responsavel) |
| 1267 | 1267 | $this->ref_idpes_responsavel = "NULL"; |
| 1268 | - | |
| 1268 | + | |
| 1269 | 1269 | $obj_fisica = new clsFisica($this->ref_idpes,dataToBanco($this->data_nascimento),$this->sexo,$this->idpes_mae,$this->idpes_pai,$this->ref_idpes_responsavel,null,$this->ideciv,null,null,null,$this->nacionalidade,$this->pais_origem,null,$this->idmun_nascimento,null,null,null,null,null,null,null,null,$this->pessoa_logada,$this->ref_cod_sistema); |
| 1270 | 1270 | if(!$obj_fisica->edita()) |
| 1271 | 1271 | { |
| ... | ... | @@ -1280,23 +1280,23 @@ class indice extends clsCadastro |
| 1280 | 1280 | return false; |
| 1281 | 1281 | } |
| 1282 | 1282 | } |
| 1283 | - | |
| 1283 | + | |
| 1284 | 1284 | if(is_numeric($this->ref_cod_raca)) |
| 1285 | 1285 | { |
| 1286 | 1286 | $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes ); |
| 1287 | 1287 | if ($obj_fisica_raca->existe()) |
| 1288 | 1288 | { |
| 1289 | - | |
| 1289 | + | |
| 1290 | 1290 | $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes, $this->ref_cod_raca ); |
| 1291 | 1291 | $obj_fisica_raca->edita(); |
| 1292 | - | |
| 1292 | + | |
| 1293 | 1293 | } |
| 1294 | 1294 | else |
| 1295 | 1295 | { |
| 1296 | - | |
| 1296 | + | |
| 1297 | 1297 | $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes, $this->ref_cod_raca ); |
| 1298 | 1298 | $obj_fisica_raca->cadastra(); |
| 1299 | - | |
| 1299 | + | |
| 1300 | 1300 | } |
| 1301 | 1301 | } |
| 1302 | 1302 | else |
| ... | ... | @@ -1304,7 +1304,7 @@ class indice extends clsCadastro |
| 1304 | 1304 | $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes, $this->ref_cod_raca ); |
| 1305 | 1305 | $obj_fisica_raca->excluir(); |
| 1306 | 1306 | } |
| 1307 | - | |
| 1307 | + | |
| 1308 | 1308 | $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 1, $this->fone_1, $this->ddd_fone_1 ); |
| 1309 | 1309 | if ( $objTelefone->detalhe() ) |
| 1310 | 1310 | { |
| ... | ... | @@ -1314,7 +1314,7 @@ class indice extends clsCadastro |
| 1314 | 1314 | { |
| 1315 | 1315 | $objTelefone->cadastra(); |
| 1316 | 1316 | } |
| 1317 | - | |
| 1317 | + | |
| 1318 | 1318 | $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 2, $this->fone_2, $this->ddd_fone_2 ); |
| 1319 | 1319 | if ( $objTelefone->detalhe() ) |
| 1320 | 1320 | { |
| ... | ... | @@ -1324,7 +1324,7 @@ class indice extends clsCadastro |
| 1324 | 1324 | { |
| 1325 | 1325 | $objTelefone->cadastra(); |
| 1326 | 1326 | } |
| 1327 | - | |
| 1327 | + | |
| 1328 | 1328 | $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 3, $this->fone_mov, $this->ddd_mov ); |
| 1329 | 1329 | if ( $objTelefone->detalhe() ) |
| 1330 | 1330 | { |
| ... | ... | @@ -1334,7 +1334,7 @@ class indice extends clsCadastro |
| 1334 | 1334 | { |
| 1335 | 1335 | $objTelefone->cadastra(); |
| 1336 | 1336 | } |
| 1337 | - | |
| 1337 | + | |
| 1338 | 1338 | $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 4, $this->fone_fax, $this->ddd_fax ); |
| 1339 | 1339 | if ( $objTelefone->detalhe() ) |
| 1340 | 1340 | { |
| ... | ... | @@ -1344,12 +1344,12 @@ class indice extends clsCadastro |
| 1344 | 1344 | { |
| 1345 | 1345 | $objTelefone->cadastra(); |
| 1346 | 1346 | } |
| 1347 | - | |
| 1347 | + | |
| 1348 | 1348 | if($this->isEnderecoExterno) |
| 1349 | 1349 | { |
| 1350 | 1350 | $this->cep_ = str_replace("-","",$this->cep_); |
| 1351 | 1351 | $obj_endereco = new clsEnderecoExterno($this->ref_idpes,1,$this->ref_idtlog,$this->nm_logradouro,$this->numero,$this->letra,$this->complemento,$this->nm_bairro, $this->cep_,$this->cidade,$this->ref_sigla_uf_,null,$this->bloco,$this->apartamento,$this->andar,null,$this->pessoa_logada); |
| 1352 | - | |
| 1352 | + | |
| 1353 | 1353 | if($obj_endereco->existe()) |
| 1354 | 1354 | { |
| 1355 | 1355 | if(!$obj_endereco->edita()) |
| ... | ... | @@ -1359,19 +1359,19 @@ class indice extends clsCadastro |
| 1359 | 1359 | } |
| 1360 | 1360 | else |
| 1361 | 1361 | { |
| 1362 | - | |
| 1362 | + | |
| 1363 | 1363 | if(!$obj_endereco->cadastra()) |
| 1364 | 1364 | { |
| 1365 | 1365 | return false; |
| 1366 | 1366 | } |
| 1367 | 1367 | } |
| 1368 | - | |
| 1368 | + | |
| 1369 | 1369 | if($this->endereco_original_is_externo != $this->isEnderecoExterno) |
| 1370 | 1370 | { |
| 1371 | 1371 | $obj_endereco = new clsPessoaEndereco($this->ref_idpes); |
| 1372 | 1372 | $obj_endereco->exclui(); |
| 1373 | 1373 | } |
| 1374 | - | |
| 1374 | + | |
| 1375 | 1375 | } |
| 1376 | 1376 | else |
| 1377 | 1377 | { |
| ... | ... | @@ -1396,8 +1396,8 @@ class indice extends clsCadastro |
| 1396 | 1396 | $obj_endereco->exclui(); |
| 1397 | 1397 | } |
| 1398 | 1398 | } |
| 1399 | - | |
| 1400 | - | |
| 1399 | + | |
| 1400 | + | |
| 1401 | 1401 | $this->deficiencia_exc = $_POST['oc_defic_exc']; |
| 1402 | 1402 | if($this->deficiencia_exc) |
| 1403 | 1403 | { |
| ... | ... | @@ -1422,8 +1422,8 @@ class indice extends clsCadastro |
| 1422 | 1422 | } |
| 1423 | 1423 | } |
| 1424 | 1424 | } |
| 1425 | - | |
| 1426 | - | |
| 1425 | + | |
| 1426 | + | |
| 1427 | 1427 | if($this->data_emissao_cart_trabalho) |
| 1428 | 1428 | { |
| 1429 | 1429 | $this->data_emissao_cart_trabalho = explode("/",$this->data_emissao_cart_trabalho); |
| ... | ... | @@ -1438,9 +1438,9 @@ class indice extends clsCadastro |
| 1438 | 1438 | { |
| 1439 | 1439 | $this->data_exp_rg = explode("/",$this->data_exp_rg); |
| 1440 | 1440 | $this->data_exp_rg = "{$this->data_exp_rg[2]}/{$this->data_exp_rg[1]}/{$this->data_exp_rg[0]}"; |
| 1441 | - | |
| 1441 | + | |
| 1442 | 1442 | } |
| 1443 | - | |
| 1443 | + | |
| 1444 | 1444 | $ObjDocumento = new clsDocumento($this->ref_idpes, $this->rg, $this->data_exp_rg, $this->sigla_uf_exp_rg, $this->tipo_cert_civil, $this->num_termo, $this->num_livro, $this->num_folha, $this->data_emissao_cert_civil, $this->sigla_uf_cert_civil, $this->cartorio_cert_civil, $this->num_cart_trabalho, $this->serie_cart_trabalho, $this->data_emissao_cart_trabalho, $this->sigla_uf_cart_trabalho, $this->num_tit_eleitor, $this->zona_tit_eleitor, $this->secao_tit_eleitor, $this->idorg_exp_rg ); |
| 1445 | 1445 | if($ObjDocumento->detalhe()) |
| 1446 | 1446 | { |
| ... | ... | @@ -1474,39 +1474,39 @@ class indice extends clsCadastro |
| 1474 | 1474 | } |
| 1475 | 1475 | elseif($this->foto_excluida == 1) |
| 1476 | 1476 | { |
| 1477 | - $this->foto = "NULL"; | |
| 1477 | + $this->foto = "NULL"; | |
| 1478 | 1478 | } |
| 1479 | 1479 | elseif (!$this->foto_excluida) |
| 1480 | 1480 | { |
| 1481 | 1481 | $this->foto = $this->foto_antiga; |
| 1482 | 1482 | } |
| 1483 | - | |
| 1484 | - | |
| 1483 | + | |
| 1484 | + | |
| 1485 | 1485 | if($this->foto_excluida) |
| 1486 | 1486 | { |
| 1487 | 1487 | if(file_exists("arquivos/educar/aluno/big/{$this->caminho_foto}")) |
| 1488 | 1488 | { |
| 1489 | 1489 | unlink("arquivos/educar/aluno/big/{$this->caminho_foto}"); |
| 1490 | 1490 | } |
| 1491 | - | |
| 1491 | + | |
| 1492 | 1492 | if(file_exists("arquivos/educar/aluno/small/{$this->caminho_foto}")) |
| 1493 | 1493 | { |
| 1494 | 1494 | unlink("arquivos/educar/aluno/small/{$this->caminho_foto}"); |
| 1495 | 1495 | } |
| 1496 | - | |
| 1496 | + | |
| 1497 | 1497 | if(file_exists("arquivos/educar/aluno/original/{$this->caminho_foto}")) |
| 1498 | 1498 | { |
| 1499 | 1499 | unlink("arquivos/educar/aluno/original/{$this->caminho_foto}"); |
| 1500 | 1500 | } |
| 1501 | - | |
| 1501 | + | |
| 1502 | 1502 | } |
| 1503 | - | |
| 1503 | + | |
| 1504 | 1504 | if(is_numeric($this->idpes_mae) && $this->idpes_mae != "NULL") |
| 1505 | 1505 | $this->nm_mae = "NULL"; |
| 1506 | - | |
| 1506 | + | |
| 1507 | 1507 | if(is_numeric($this->idpes_pai) && $this->idpes_pai != "NULL") |
| 1508 | 1508 | $this->nm_pai = "NULL"; |
| 1509 | - | |
| 1509 | + | |
| 1510 | 1510 | if(!$this->cod_aluno) |
| 1511 | 1511 | { |
| 1512 | 1512 | $obj = new clsPmieducarAluno(null,$this->ref_cod_aluno_beneficio,$this->ref_cod_religiao,$this->pessoa_logada,$this->pessoa_logada,$this->ref_idpes,null,null,1,$this->foto, $this->analfabeto, $this->nm_pai,$this->nm_mae, $this->tipo_responsavel ); |
| ... | ... | @@ -1520,7 +1520,7 @@ class indice extends clsCadastro |
| 1520 | 1520 | { |
| 1521 | 1521 | $obj->cadastra(); |
| 1522 | 1522 | } |
| 1523 | - | |
| 1523 | + | |
| 1524 | 1524 | } |
| 1525 | 1525 | } |
| 1526 | 1526 | else |
| ... | ... | @@ -1806,7 +1806,7 @@ $pagina->MakeAll(); |
| 1806 | 1806 | campos[0].checked = true; |
| 1807 | 1807 | |
| 1808 | 1808 | } |
| 1809 | - | |
| 1809 | + | |
| 1810 | 1810 | var cor_fundo; |
| 1811 | 1811 | function adicionaDeficiencia() |
| 1812 | 1812 | { |
| ... | ... | @@ -1828,30 +1828,30 @@ $pagina->MakeAll(); |
| 1828 | 1828 | row.setAttribute('id', 'tr_'+cod_deficiencia); |
| 1829 | 1829 | row.setAttribute('align', 'center'); |
| 1830 | 1830 | row.style.backgroundColor = cor_fundo; |
| 1831 | - | |
| 1831 | + | |
| 1832 | 1832 | var cell1 = document.createElement('td'); |
| 1833 | 1833 | cell1.setAttribute('align', 'right'); |
| 1834 | 1834 | cell1.setAttribute('style', 'padding-right:10px;'); |
| 1835 | - | |
| 1835 | + | |
| 1836 | 1836 | var cell2 = document.createElement('td'); |
| 1837 | - | |
| 1837 | + | |
| 1838 | 1838 | var img = "<img border='0' title='Excluir' src='imagens/banco_imagens/excluirrr.gif' style='cursor:pointer' onclick='excluirLinhaDeficiencia("+cod_deficiencia+")'>"; |
| 1839 | - | |
| 1839 | + | |
| 1840 | 1840 | var text = document.createTextNode(nm_deficiencia); |
| 1841 | - | |
| 1841 | + | |
| 1842 | 1842 | cell1.innerHTML = img; |
| 1843 | 1843 | cell2.appendChild(text); |
| 1844 | 1844 | row.appendChild(cell2); |
| 1845 | 1845 | row.appendChild(cell1); |
| 1846 | 1846 | tabela.firstChild.appendChild(row); |
| 1847 | - | |
| 1847 | + | |
| 1848 | 1848 | var area = document.getElementById('ocultos_defic'); |
| 1849 | 1849 | var input = document.createElement('input'); |
| 1850 | 1850 | input.setAttribute('type', 'hidden'); |
| 1851 | 1851 | input.setAttribute('id', 'oc_defic['+cod_deficiencia+']'); |
| 1852 | 1852 | input.setAttribute('name', 'oc_defic['+cod_deficiencia+']'); |
| 1853 | 1853 | input.setAttribute('value', cod_deficiencia); |
| 1854 | - area.appendChild(input); | |
| 1854 | + area.appendChild(input); | |
| 1855 | 1855 | } |
| 1856 | 1856 | else |
| 1857 | 1857 | { |
| ... | ... | @@ -1859,7 +1859,7 @@ $pagina->MakeAll(); |
| 1859 | 1859 | } |
| 1860 | 1860 | } |
| 1861 | 1861 | } |
| 1862 | - | |
| 1862 | + | |
| 1863 | 1863 | function excluirLinhaDeficiencia(cod_deficiencia) |
| 1864 | 1864 | { |
| 1865 | 1865 | var cor = ""; |
| ... | ... | @@ -1886,7 +1886,7 @@ $pagina->MakeAll(); |
| 1886 | 1886 | for(var i=0; i<area.childNodes.length; i++ ) |
| 1887 | 1887 | { |
| 1888 | 1888 | if(area.childNodes[i]) |
| 1889 | - { | |
| 1889 | + { | |
| 1890 | 1890 | if(area.childNodes[i].id == deficiencia) |
| 1891 | 1891 | { |
| 1892 | 1892 | area.removeChild(area.childNodes[i]); |
| ... | ... | @@ -1896,17 +1896,17 @@ $pagina->MakeAll(); |
| 1896 | 1896 | inputExc.setAttribute('id', 'oc_defic_exc['+cod_deficiencia+']'); |
| 1897 | 1897 | inputExc.setAttribute('name', 'oc_defic_exc['+cod_deficiencia+']'); |
| 1898 | 1898 | inputExc.setAttribute('value', cod_deficiencia); |
| 1899 | - areaExc.appendChild(inputExc); | |
| 1900 | - | |
| 1899 | + areaExc.appendChild(inputExc); | |
| 1900 | + | |
| 1901 | 1901 | } |
| 1902 | 1902 | } |
| 1903 | 1903 | } |
| 1904 | 1904 | } |
| 1905 | - | |
| 1905 | + | |
| 1906 | 1906 | <? if (!$_GET["cod_aluno"]) { ?> |
| 1907 | 1907 | |
| 1908 | 1908 | Event.observe(window, 'load', Init, false); |
| 1909 | - | |
| 1909 | + | |
| 1910 | 1910 | function Init() |
| 1911 | 1911 | { |
| 1912 | 1912 | elemento = $$("div#content1 img"); |
| ... | ... | @@ -1914,12 +1914,12 @@ $pagina->MakeAll(); |
| 1914 | 1914 | $('btn_enviar').disabled = true; |
| 1915 | 1915 | $('btn_enviar').className='botaolistagemdisabled'; |
| 1916 | 1916 | } |
| 1917 | - | |
| 1917 | + | |
| 1918 | 1918 | function passaPagina() |
| 1919 | 1919 | { |
| 1920 | 1920 | LTb0("0", "2"); |
| 1921 | 1921 | } |
| 1922 | - | |
| 1922 | + | |
| 1923 | 1923 | function bloqueia() |
| 1924 | 1924 | { |
| 1925 | 1925 | if (($F('cpf_') != '' && $F('cpf') == '' && $F('bloqueado') == 1) || $F('cpf_') != $F('cpf_2')) |
| ... | ... | @@ -1930,11 +1930,11 @@ $pagina->MakeAll(); |
| 1930 | 1930 | var cpf = $('cpf_').value; |
| 1931 | 1931 | var xml_dados_pessoa = new ajax(getDados); |
| 1932 | 1932 | xml_dados_pessoa.envia("educar_aluno_cad_xml.php?cpf="+cpf); |
| 1933 | - | |
| 1933 | + | |
| 1934 | 1934 | } |
| 1935 | 1935 | else if ($F('cpf') != '' || $F('bloqueado') == 0) |
| 1936 | 1936 | { |
| 1937 | - validaTab(1); | |
| 1937 | + validaTab(1); | |
| 1938 | 1938 | LTb0("0", "2"); |
| 1939 | 1939 | $('btn_enviar').disabled = false; |
| 1940 | 1940 | $('btn_enviar').className = 'botaolistagem'; |
| ... | ... | @@ -1944,15 +1944,15 @@ $pagina->MakeAll(); |
| 1944 | 1944 | alert('Você deve preencher o campo CPF'); |
| 1945 | 1945 | } |
| 1946 | 1946 | } |
| 1947 | - | |
| 1947 | + | |
| 1948 | 1948 | function getDados(xml_dados) |
| 1949 | 1949 | { |
| 1950 | 1950 | var DOM_array = xml_dados.getElementsByTagName( 'dados' ); |
| 1951 | - | |
| 1951 | + | |
| 1952 | 1952 | if(DOM_array.length) |
| 1953 | 1953 | { |
| 1954 | 1954 | var elementos; |
| 1955 | - for (var i = 1; i <5; i++) | |
| 1955 | + for (var i = 1; i <5; i++) | |
| 1956 | 1956 | { |
| 1957 | 1957 | elementos = $$("div#content"+i+" input"); |
| 1958 | 1958 | for (var j = 0; j < elementos.length; j++) |
| ... | ... | @@ -1966,7 +1966,7 @@ $pagina->MakeAll(); |
| 1966 | 1966 | { |
| 1967 | 1967 | if (DOM_array[0].childNodes[i].nodeType == 1) |
| 1968 | 1968 | { |
| 1969 | - try | |
| 1969 | + try | |
| 1970 | 1970 | { |
| 1971 | 1971 | libera = true; |
| 1972 | 1972 | if (DOM_array[0].childNodes[i].firstChild.nodeValue != '') |
| ... | ... | @@ -1979,10 +1979,10 @@ $pagina->MakeAll(); |
| 1979 | 1979 | } |
| 1980 | 1980 | } |
| 1981 | 1981 | $('cpf_2').disabled = true; |
| 1982 | - | |
| 1983 | - if (libera) | |
| 1982 | + | |
| 1983 | + if (libera) | |
| 1984 | 1984 | { |
| 1985 | - validaTab(1); | |
| 1985 | + validaTab(1); | |
| 1986 | 1986 | LTb0("0", "2"); |
| 1987 | 1987 | $('btn_enviar').disabled = false; |
| 1988 | 1988 | $('bloqueado').value = 0; |
| ... | ... | @@ -1990,7 +1990,7 @@ $pagina->MakeAll(); |
| 1990 | 1990 | } |
| 1991 | 1991 | else |
| 1992 | 1992 | { |
| 1993 | - validaTab(1); | |
| 1993 | + validaTab(1); | |
| 1994 | 1994 | LTb0("0", "2"); |
| 1995 | 1995 | $('btn_enviar').disabled = false; |
| 1996 | 1996 | $('bloqueado').value = 0; |
| ... | ... | @@ -2006,7 +2006,7 @@ $pagina->MakeAll(); |
| 2006 | 2006 | } |
| 2007 | 2007 | $('btn_enviar').value = 'Salvar'; |
| 2008 | 2008 | } |
| 2009 | - | |
| 2009 | + | |
| 2010 | 2010 | <?}?> |
| 2011 | 2011 | |
| 2012 | 2012 | </script> | ... | ... |
ieducar/intranet/educar_instituicao_cad.php
| ... | ... | @@ -79,7 +79,7 @@ class indice extends clsCadastro |
| 79 | 79 | $obj_permissoes->permissao_cadastra( 559, $this->pessoa_logada, 1, "educar_instituicao_lst.php" ); |
| 80 | 80 | |
| 81 | 81 | $this->cod_instituicao=$_GET["cod_instituicao"]; |
| 82 | - | |
| 82 | + | |
| 83 | 83 | if( is_numeric( $this->cod_instituicao ) ) |
| 84 | 84 | { |
| 85 | 85 | |
| ... | ... | @@ -142,6 +142,7 @@ class indice extends clsCadastro |
| 142 | 142 | $lista = $objTemp->lista(); |
| 143 | 143 | if ( is_array( $lista ) && count( $lista ) ) |
| 144 | 144 | { |
| 145 | + asort($lista); | |
| 145 | 146 | foreach ( $lista as $registro ) |
| 146 | 147 | { |
| 147 | 148 | $opcoes["{$registro['sigla_uf']}"] = "{$registro['sigla_uf']}"; | ... | ... |
ieducar/intranet/educar_pesquisa_cep_log_bairro.php
| ... | ... | @@ -62,11 +62,11 @@ class miolo1 extends clsListagem |
| 62 | 62 | $_SESSION["campo12"] = $_GET["campo12"] ? $_GET["campo12"] : $_SESSION["campo12"]; |
| 63 | 63 | $_SESSION["campo13"] = $_GET["campo13"] ? $_GET["campo13"] : $_SESSION["campo13"]; |
| 64 | 64 | $this->nome = "form1"; |
| 65 | - | |
| 65 | + | |
| 66 | 66 | $this->funcao_js = "cv_libera_campos('{$_SESSION["campo10"]}', '{$_SESSION["campo11"]}', '{$_SESSION["campo7"]}', '{$_SESSION["campo1"]}', '{$_SESSION["campo12"]}', '{$_SESSION["campo4"]}', '{$_SESSION["campo9"]}')"; |
| 67 | 67 | |
| 68 | 68 | $this->titulo = "Endereço"; |
| 69 | - | |
| 69 | + | |
| 70 | 70 | // Paginador |
| 71 | 71 | $limite = 7; |
| 72 | 72 | $iniciolimit = ( $_GET["pagina_{$this->nome}"] ) ? $_GET["pagina_{$this->nome}"]*$limite-$limite: 0; |
| ... | ... | @@ -78,7 +78,7 @@ class miolo1 extends clsListagem |
| 78 | 78 | $this->campoTexto("nm_logradouro", "Logradouro", $_GET["nm_logradouro"], 50, 255); |
| 79 | 79 | $this->campoTexto("cidade", "Cidade", $_GET["cidade"], 60, 60); |
| 80 | 80 | $obj_uf = new clsUf(false, false, 1); |
| 81 | - $lst_uf = $obj_uf->lista(false, false, 1, false, false, "sigla_uf"); | |
| 81 | + $lst_uf = $obj_uf->lista(false, false, false, false, false, "sigla_uf"); | |
| 82 | 82 | $array_uf; |
| 83 | 83 | foreach ($lst_uf as $uf) |
| 84 | 84 | { |
| ... | ... | @@ -147,8 +147,8 @@ class miolo1 extends clsListagem |
| 147 | 147 | |
| 148 | 148 | if($_GET["param"]) |
| 149 | 149 | { |
| 150 | - | |
| 151 | - | |
| 150 | + | |
| 151 | + | |
| 152 | 152 | $this->addLinhas(array("<a href='javascript:void(0);' onclick=\"setaCamposOuvidoria('{$cep}', '{$cep2}', '{$uf}', '{$uf}', '{$id_mun}', '{$cidade}', '{$detalhe_bairro["idbai"]}', '{$detalhe_bairro["nome"]}', '{$descricao}', '{$descricao}', '{$detalhe_logradouro["idlog"]}', '{$detalhe_logradouro["nome"]}')\">{$detalhe_bairro["nome"]}</a>", |
| 153 | 153 | "<a href='javascript:void(0);' onclick=\"setaCamposOuvidoria('{$cep}', '{$cep2}', '{$uf}', '{$uf}', '{$id_mun}', '{$cidade}', '{$detalhe_bairro["idbai"]}', '{$detalhe_bairro["nome"]}', '{$descricao}', '{$descricao}', '{$detalhe_logradouro["idlog"]}', '{$detalhe_logradouro["nome"]}')\">{$cep2}</a>", |
| 154 | 154 | "<a href='javascript:void(0);' onclick=\"setaCamposOuvidoria('{$cep}', '{$cep2}', '{$uf}', '{$uf}', '{$id_mun}', '{$cidade}', '{$detalhe_bairro["idbai"]}', '{$detalhe_bairro["nome"]}', '{$descricao}', '{$descricao}', '{$detalhe_logradouro["idlog"]}', '{$detalhe_logradouro["nome"]}')\">{$detalhe_logradouro["nome"]}</a>", |
| ... | ... | @@ -180,9 +180,9 @@ class miolo1 extends clsListagem |
| 180 | 180 | </td> |
| 181 | 181 | </tr> |
| 182 | 182 | </table>"; |
| 183 | - | |
| 183 | + | |
| 184 | 184 | } else { |
| 185 | - | |
| 185 | + | |
| 186 | 186 | $this->rodape = " |
| 187 | 187 | <table border='0' cellspacing='0' cellpadding='0' width=\"100%\" align=\"center\"> |
| 188 | 188 | <tr width='100%'> |
| ... | ... | @@ -229,18 +229,18 @@ function setFiltro() |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | /* |
| 232 | - Função especifica para Ouvidoria Atendimento Completo Cad | |
| 232 | + Função especifica para Ouvidoria Atendimento Completo Cad | |
| 233 | 233 | */ |
| 234 | 234 | function setaCamposOuvidoria(valor1, valor2, valor3, valor4, valor5, valor6, valor7, valor8, valor9, valor10, valor11, valor12) |
| 235 | 235 | { |
| 236 | 236 | // Campo Oculto flag atualiza |
| 237 | - parent.document.getElementById("atualiza").value = "false"; | |
| 238 | - parent.document.getElementById("nendereco").value = "false"; | |
| 239 | - | |
| 237 | + parent.document.getElementById("atualiza").value = "false"; | |
| 238 | + parent.document.getElementById("nendereco").value = "false"; | |
| 239 | + | |
| 240 | 240 | // Campo Oculto Cep |
| 241 | 241 | obj1 = parent.document.getElementById("cep"); |
| 242 | 242 | obj1.value = valor1; |
| 243 | - | |
| 243 | + | |
| 244 | 244 | // Campo Visivel Cep |
| 245 | 245 | obj2 = parent.document.getElementById("cep_"); |
| 246 | 246 | obj2.value = valor2; |
| ... | ... | @@ -249,55 +249,55 @@ function setaCamposOuvidoria(valor1, valor2, valor3, valor4, valor5, valor6, val |
| 249 | 249 | // Campo Oculto Sigla_uf |
| 250 | 250 | obj3 = parent.document.getElementById("sigla_uf"); |
| 251 | 251 | obj3.value = valor3; |
| 252 | - | |
| 252 | + | |
| 253 | 253 | // Campo Visivel Sigla_uf |
| 254 | 254 | obj4 = parent.document.getElementById("sigla_uf_"); |
| 255 | 255 | obj4.value = valor4; |
| 256 | 256 | obj4.disabled = true; |
| 257 | - | |
| 257 | + | |
| 258 | 258 | // Campo Oculto Cidade |
| 259 | 259 | obj5 = parent.document.getElementById("cidade"); |
| 260 | 260 | obj5.value = valor5; |
| 261 | - | |
| 261 | + | |
| 262 | 262 | // Campo Visivel Cidade |
| 263 | 263 | obj6 = parent.document.getElementById("cidade_"); |
| 264 | 264 | obj6.value = valor6; |
| 265 | - obj6.disabled = true; | |
| 266 | - | |
| 265 | + obj6.disabled = true; | |
| 266 | + | |
| 267 | 267 | // Campo Oculto NMCidade |
| 268 | 268 | obj14 = parent.document.getElementById("nmCidade"); |
| 269 | 269 | obj14.value = valor6; |
| 270 | - | |
| 270 | + | |
| 271 | 271 | // Campo Oculto Bairro |
| 272 | 272 | obj7 = parent.document.getElementById("idbai"); |
| 273 | 273 | obj7.value = valor7; |
| 274 | - | |
| 274 | + | |
| 275 | 275 | // Campo Visivel Bairro |
| 276 | 276 | obj8 = parent.document.getElementById("bairro_"); |
| 277 | 277 | obj8.value = valor8; |
| 278 | - obj8.disabled = true; | |
| 279 | - | |
| 278 | + obj8.disabled = true; | |
| 279 | + | |
| 280 | 280 | obj13 = parent.document.getElementById("bairro"); |
| 281 | 281 | obj13.value = valor8; |
| 282 | - | |
| 282 | + | |
| 283 | 283 | // Campo Oculto Tipo Logradouro |
| 284 | 284 | obj9 = parent.document.getElementById("idtlog"); |
| 285 | 285 | obj9.value = valor9; |
| 286 | - | |
| 286 | + | |
| 287 | 287 | // Campo Visivel Tipo Logradouro |
| 288 | 288 | obj10 = parent.document.getElementById("idtlog_"); |
| 289 | 289 | obj10.value = valor10; |
| 290 | - obj10.disabled = true; | |
| 291 | - | |
| 290 | + obj10.disabled = true; | |
| 291 | + | |
| 292 | 292 | // Campo Oculto Logradouro |
| 293 | 293 | obj11 = parent.document.getElementById("idlog"); |
| 294 | 294 | obj11.value = valor11; |
| 295 | - | |
| 295 | + | |
| 296 | 296 | // Campo Visivel Logradouro |
| 297 | 297 | obj12 = parent.document.getElementById("logradouro_"); |
| 298 | 298 | obj12.value = valor12; |
| 299 | - obj12.disabled = true; | |
| 300 | - | |
| 299 | + obj12.disabled = true; | |
| 300 | + | |
| 301 | 301 | obj14 = parent.document.getElementById("logradouro"); |
| 302 | 302 | obj14.value = valor12; |
| 303 | 303 | |
| ... | ... | @@ -306,12 +306,12 @@ function setaCamposOuvidoria(valor1, valor2, valor3, valor4, valor5, valor6, val |
| 306 | 306 | |
| 307 | 307 | function liberaCamposOuvidoria() |
| 308 | 308 | { |
| 309 | - parent.document.getElementById("atualiza").value = "false"; | |
| 310 | - parent.document.getElementById("nendereco").value = "true"; | |
| 309 | + parent.document.getElementById("atualiza").value = "false"; | |
| 310 | + parent.document.getElementById("nendereco").value = "true"; | |
| 311 | 311 | // Campo Oculto Cep |
| 312 | 312 | obj1 = parent.document.getElementById("cep"); |
| 313 | 313 | obj1.value = null; |
| 314 | - | |
| 314 | + | |
| 315 | 315 | // Campo Visivel Cep |
| 316 | 316 | obj2 = parent.document.getElementById("cep_"); |
| 317 | 317 | obj2.value = null; |
| ... | ... | @@ -320,54 +320,54 @@ function liberaCamposOuvidoria() |
| 320 | 320 | // Campo Oculto Sigla_uf |
| 321 | 321 | obj3 = parent.document.getElementById("sigla_uf"); |
| 322 | 322 | obj3.value = null; |
| 323 | - | |
| 323 | + | |
| 324 | 324 | // Campo Visivel Sigla_uf |
| 325 | 325 | obj4 = parent.document.getElementById("sigla_uf_"); |
| 326 | 326 | obj4.value = null; |
| 327 | 327 | obj4.disabled = false; |
| 328 | - | |
| 328 | + | |
| 329 | 329 | // Campo Oculto Cidade |
| 330 | 330 | obj5 = parent.document.getElementById("cidade"); |
| 331 | 331 | obj5.value = null; |
| 332 | - | |
| 332 | + | |
| 333 | 333 | // Campo Visivel Cidade |
| 334 | 334 | obj6 = parent.document.getElementById("cidade_"); |
| 335 | 335 | obj6.value = null; |
| 336 | - obj6.disabled = false; | |
| 337 | - | |
| 336 | + obj6.disabled = false; | |
| 337 | + | |
| 338 | 338 | // Campo Oculto Bairro |
| 339 | 339 | obj7 = parent.document.getElementById("idbai"); |
| 340 | 340 | obj7.value = null; |
| 341 | - | |
| 341 | + | |
| 342 | 342 | // Campo Visivel Bairro |
| 343 | 343 | obj8 = parent.document.getElementById("bairro_"); |
| 344 | 344 | obj8.value = null; |
| 345 | - obj8.disabled = false; | |
| 346 | - | |
| 345 | + obj8.disabled = false; | |
| 346 | + | |
| 347 | 347 | obj13 = parent.document.getElementById("bairro"); |
| 348 | 348 | obj13.value = null; |
| 349 | - | |
| 349 | + | |
| 350 | 350 | // Campo Oculto Tipo Logradouro |
| 351 | 351 | obj9 = parent.document.getElementById("idtlog"); |
| 352 | 352 | obj9.value = null; |
| 353 | - | |
| 353 | + | |
| 354 | 354 | // Campo Visivel Tipo Logradouro |
| 355 | 355 | obj10 = parent.document.getElementById("idtlog_"); |
| 356 | 356 | obj10.value = null; |
| 357 | - obj10.disabled = false; | |
| 358 | - | |
| 357 | + obj10.disabled = false; | |
| 358 | + | |
| 359 | 359 | // Campo Oculto Logradouro |
| 360 | 360 | obj11 = parent.document.getElementById("idlog"); |
| 361 | 361 | obj11.value = null; |
| 362 | - | |
| 362 | + | |
| 363 | 363 | // Campo Visivel Logradouro |
| 364 | 364 | obj12 = parent.document.getElementById("logradouro_"); |
| 365 | 365 | obj12.value = null; |
| 366 | - obj12.disabled = false; | |
| 367 | - | |
| 366 | + obj12.disabled = false; | |
| 367 | + | |
| 368 | 368 | obj14 = parent.document.getElementById("logradouro"); |
| 369 | - obj14.value = null; | |
| 370 | - | |
| 369 | + obj14.value = null; | |
| 370 | + | |
| 371 | 371 | window.parent.fechaExpansivel('div_dinamico_'+(parent.DOM_divs.length*1-1)); |
| 372 | 372 | } |
| 373 | 373 | </script> | ... | ... |
ieducar/intranet/educar_pesquisa_municipio_lst.php
| ... | ... | @@ -77,6 +77,9 @@ class indice extends clsListagem |
| 77 | 77 | |
| 78 | 78 | function Gerar() |
| 79 | 79 | { |
| 80 | + global $coreExt; | |
| 81 | + $config = $coreExt['Config']->app->locale; | |
| 82 | + | |
| 80 | 83 | @session_start(); |
| 81 | 84 | $this->pessoa_logada = $_SESSION['id_pessoa']; |
| 82 | 85 | $_SESSION["campo1"] = $_GET["campo1"] ? $_GET["campo1"] : $_SESSION["campo1"]; |
| ... | ... | @@ -97,7 +100,7 @@ class indice extends clsListagem |
| 97 | 100 | |
| 98 | 101 | |
| 99 | 102 | $obj_uf = new clsUf(false, false, 1); |
| 100 | - $lst_uf = $obj_uf->lista(false, false, 1, false, false, "sigla_uf"); | |
| 103 | + $lst_uf = $obj_uf->lista(false, false, false, false, false, "sigla_uf"); | |
| 101 | 104 | $array_uf = array('' => 'Todos'); |
| 102 | 105 | foreach ($lst_uf as $uf) |
| 103 | 106 | { |
| ... | ... | @@ -105,7 +108,7 @@ class indice extends clsListagem |
| 105 | 108 | } |
| 106 | 109 | if(!isset($this->sigla_uf)) |
| 107 | 110 | { |
| 108 | - $this->sigla_uf = "SC"; | |
| 111 | + $this->sigla_uf = $config->province ? $config->province : ''; | |
| 109 | 112 | } |
| 110 | 113 | |
| 111 | 114 | ... | ... |
ieducar/intranet/include/pessoa/clsUf.inc.php
| ... | ... | @@ -46,6 +46,9 @@ class clsUf |
| 46 | 46 | */ |
| 47 | 47 | function clsUf( $str_sigla_uf=false, $str_nome=false, $str_geom=false, $int_idpais=false ) |
| 48 | 48 | { |
| 49 | + global $coreExt; | |
| 50 | + $this->config = $coreExt['Config']; | |
| 51 | + | |
| 49 | 52 | $this->sigla_uf = $str_sigla_uf; |
| 50 | 53 | $this->nome = $str_nome; |
| 51 | 54 | $this->geom = $str_geom; |
| ... | ... | @@ -178,7 +181,8 @@ class clsUf |
| 178 | 181 | } |
| 179 | 182 | else |
| 180 | 183 | { //brasil |
| 181 | - $where .= "{$whereAnd}idpais = '1'"; | |
| 184 | + $idpais = $this->config->app->locale->country; | |
| 185 | + $where .= "{$whereAnd}idpais = '$idpais'"; | |
| 182 | 186 | $whereAnd = " AND "; |
| 183 | 187 | } |
| 184 | 188 | ... | ... |