From 2c5cd4572b3fe23322dd4913423a7bb7cc7e4dd3 Mon Sep 17 00:00:00 2001 From: Eriksen Costa Paixão Date: Fri, 17 Jul 2009 18:58:42 +0000 Subject: [PATCH] by Eriksen: Atualizado arquivos que listam dados da tabela public.uf: --- ieducar/configuration/ieducar.ini | 10 +++++++++- ieducar/intranet/educar_aluno_cad.php | 490 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ieducar/intranet/educar_instituicao_cad.php | 3 ++- ieducar/intranet/educar_pesquisa_cep_log_bairro.php | 96 ++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------ ieducar/intranet/educar_pesquisa_municipio_lst.php | 7 +++++-- ieducar/intranet/include/pessoa/clsUf.inc.php | 6 +++++- 6 files changed, 314 insertions(+), 298 deletions(-) diff --git a/ieducar/configuration/ieducar.ini b/ieducar/configuration/ieducar.ini index d7e19b9..3b258f4 100644 --- a/ieducar/configuration/ieducar.ini +++ b/ieducar/configuration/ieducar.ini @@ -64,6 +64,14 @@ app.template.vars.instituicao = i-Educar app.template.pdf.titulo = Relatório i-Educar app.template.pdf.logo = +; Configurações de localização +; Define valores padrão para algumas das tarefas de endereçamento como listagem +; de municípios e de estados. +; 45 = Brasil +; SP = Estado de São Paulo +app.locale.country = 45 +app.locale.province = SP + ; Configurações de administração ; sql_tempo e pagina_tempo são valores em segundo que ao serem excedidos, ; 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 [testing : development] -; Herda todas as configurações de desenvolvimento \ No newline at end of file +; Herda todas as configurações de desenvolvimento diff --git a/ieducar/intranet/educar_aluno_cad.php b/ieducar/intranet/educar_aluno_cad.php index d2baa41..8dd9506 100644 --- a/ieducar/intranet/educar_aluno_cad.php +++ b/ieducar/intranet/educar_aluno_cad.php @@ -175,7 +175,7 @@ class indice extends clsCadastro var $sem_cpf; var $ref_cod_sistema; - + var $retorno; var $tab_habilitado; @@ -186,9 +186,9 @@ class indice extends clsCadastro @session_write_close(); $this->tab_habilitado = true; - + $this->cod_aluno= $_GET["cod_aluno"]; - + $this->retorno = "Novo"; $obj_permissoes = new clsPermissoes(); @@ -219,8 +219,8 @@ class indice extends clsCadastro } $this->url_cancelar = ($this->cod_aluno) ? "educar_aluno_det.php?cod_aluno={$this->cod_aluno}" : "educar_aluno_lst.php"; $this->nome_url_cancelar = "Cancelar"; - - return $this->retorno; + + return $this->retorno; } function Gerar() @@ -228,9 +228,9 @@ class indice extends clsCadastro $this->fexcluir = false; $this->campoTabInicio("educar_cad", "", true); $this->campoOculto("retorno",$this->retorno); - + $this->campoOculto("bloqueado", 1); - + if(is_int((int)$this->cpf) && !empty($this->cpf)) { $cpf = int2CPF($this->cpf); @@ -241,7 +241,7 @@ class indice extends clsCadastro } if (!$this->cod_aluno) { - $this->campoAdicionaTab("CPF", $this->tab_habilitado); + $this->campoAdicionaTab("CPF", $this->tab_habilitado); $opcoes = array( "" => "Pesquise a pessoa clicando na lupa ao lado" ); $this->campoCpf("cpf_","CPF",$cpf,false,""); } @@ -250,9 +250,9 @@ class indice extends clsCadastro if( $this->cod_aluno) { $obj_matricula = new clsPmieducarMatricula(); - + $lst_matricula = $obj_matricula->lista( null, null, null, null, null, null, $this->cod_aluno ); - + } if(!empty($this->ref_idpes)) { @@ -263,7 +263,7 @@ class indice extends clsCadastro $det_aluno = array_shift($lista_aluno); } } - + if($det_aluno['cod_aluno'] ) { $this->cod_aluno = $det_aluno['cod_aluno']; @@ -271,7 +271,7 @@ class indice extends clsCadastro $this->ref_cod_religiao = $det_aluno['ref_cod_religiao']; $this->caminho_foto = $det_aluno['caminho_foto']; } - + $this->campoOculto("cod_aluno",$this->cod_aluno); $this->campoOculto("ref_idpes",$this->ref_idpes); if( $this->ref_idpes != "NULL") @@ -280,53 +280,53 @@ class indice extends clsCadastro { $obj_pessoa = new clsPessoaFj($this->ref_idpes); $det_pessoa = $obj_pessoa->detalhe(); - + $obj_fisica = new clsFisica($this->ref_idpes); $det_fisica = $obj_fisica->detalhe(); - + $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes ); $det_fisica_raca = $obj_fisica_raca->detalhe(); $this->ref_cod_raca = $det_fisica_raca['ref_cod_raca']; - + $this->nome = $det_pessoa["nome"]; - + $this->email = $det_pessoa["email"]; - + $this->ideciv = $det_fisica["ideciv"]->ideciv; - + $this->data_nascimento = dataToBrasil($det_fisica["data_nasc"]); - + $this->cpf = $det_fisica["cpf"]; $obj_documento = new clsDocumento($this->ref_idpes); $obj_documento_det = $obj_documento->detalhe(); - + $this->ddd_fone_1 = $det_pessoa["ddd_1"]; $this->fone_1 = $det_pessoa["fone_1"]; - + $this->ddd_fone_2 = $det_pessoa["ddd_2"]; $this->fone_2 = $det_pessoa["fone_2"]; - + $this->ddd_fax = $det_pessoa["ddd_fax"]; $this->fone_fax= $det_pessoa["fone_fax"]; - + $this->ddd_mov = $det_pessoa["ddd_mov"]; $this->fone_mov = $det_pessoa["fone_mov"]; - + $this->email = $det_pessoa["email"]; $this->url = $det_pessoa["url"]; - + $this->sexo = $det_fisica["sexo"]; - + $this->nacionalidade = $det_fisica["nacionalidade"]; $this->idmun_nascimento = $det_fisica["idmun_nascimento"]->idmun; - + $detalhe_pais_origem = $det_fisica["idpais_estrangeiro"]->detalhe(); $this->pais_origem = $detalhe_pais_origem["idpais"]; - + $this->ref_idpes_responsavel = $det_fisica["idpes_responsavel"]; $this->idpes_pai = $det_fisica["idpes_pai"]; $this->idpes_mae = $det_fisica["idpes_mae"]; - + $obj_aluno = new clsPmieducarAluno(null,null,null,null,null,$this->ref_idpes ); $detalhe_aluno = $obj_aluno->detalhe(); if( $detalhe_aluno ) @@ -334,13 +334,13 @@ class indice extends clsCadastro $this->nm_pai = $detalhe_aluno["nm_pai"]; $this->nm_mae = $detalhe_aluno["nm_mae"]; } - + $obj_endereco = new clsPessoaEndereco($this->ref_idpes); - + if($obj_endereco_det = $obj_endereco->detalhe()) { $this->isEnderecoExterno = 0; - + $this->id_cep = $obj_endereco_det['cep']->cep; //$this->cep_ = $obj_endereco_det['ref_cep']; $this->id_bairro = $obj_endereco_det['idbai']->idbai; @@ -351,30 +351,30 @@ class indice extends clsCadastro $this->andar = $obj_endereco_det['andar']; $this->apartamento = $obj_endereco_det['apartamento']; $this->bloco = $obj_endereco_det['bloco']; - + $this->ref_idtlog = $obj_endereco_det['idtlog']; $this->nm_bairro = $obj_endereco_det['bairro']; $this->nm_logradouro = $obj_endereco_det['logradouro']; - + $this->cep_ = int2CEP($this->id_cep); - - + + } else { - + $obj_endereco = new clsEnderecoExterno($this->ref_idpes); - + if($obj_endereco_det = $obj_endereco->detalhe()) { - + $this->isEnderecoExterno = 1; - + $this->id_cep = $obj_endereco_det['cep']; $this->cidade = $obj_endereco_det['cidade']; $this->nm_bairro = $obj_endereco_det['bairro']; $this->nm_logradouro = $obj_endereco_det['logradouro']; - + $this->id_bairro = null; $this->id_logradouro = null; $this->numero = $obj_endereco_det['numero']; @@ -383,7 +383,7 @@ class indice extends clsCadastro $this->andar = $obj_endereco_det['andar']; $this->apartamento = $obj_endereco_det['apartamento']; $this->bloco = $obj_endereco_det['bloco']; - + $this->ref_idtlog = $this->idtlog = $obj_endereco_det['idtlog']->idtlog; $this->ref_sigla_uf = $this->ref_sigla_uf_ = $obj_endereco_det['sigla_uf']->sigla_uf; $this->cep_ = int2CEP($this->id_cep); @@ -391,52 +391,52 @@ class indice extends clsCadastro } } } - + if($this->isEnderecoExterno == 0) { - + $obj_bairro = new clsBairro($this->id_bairro); $this->cep_ = int2CEP($this->id_cep); - + $obj_bairro_det = $obj_bairro->detalhe(); - + if($obj_bairro_det) { - + $this->nm_bairro = $obj_bairro_det["nome"]; } - + $obj_log = new clsLogradouro($this->id_logradouro); $obj_log_det = $obj_log->detalhe(); - + if($obj_log_det) { - + $this->nm_logradouro = $obj_log_det["nome"]; - + $this->ref_idtlog = $obj_log_det["idtlog"]->idtlog; $obj_mun = new clsMunicipio( $obj_log_det["idmun"]); $det_mun = $obj_mun->detalhe(); - + if($det_mun) { $this->cidade = ucfirst(strtolower($det_mun["nome"])); } - + $this->ref_sigla_uf = $this->ref_sigla_uf_ = $det_mun['sigla_uf']->sigla_uf; } - + $obj_bairro = new clsBairro($obj_endereco_det["ref_idbai"]); $obj_bairro_det = $obj_bairro->detalhe(); - + if($obj_bairro_det) { - + $this->nm_bairro = $obj_bairro_det["nome"]; } } $this->campoTexto("nome","Nome",$this->nome,30,100,true); - + if($this->cpf && $this->ref_idpes) { if(!$this->cpf) @@ -447,7 +447,7 @@ class indice extends clsCadastro { $this->campoRotulo("cpf_2","CPF",int2CPF($this->cpf)); } - + } else { @@ -460,46 +460,46 @@ class indice extends clsCadastro { $this->campoCpf("cpf_2","CPF",int2CPF($this->cpf),false); } - + } - + $this->campoData("data_nascimento","Data de Nascimento",$this->data_nascimento,true); - + $lista = array('' => "Selecione", 'F' => "Feminino", 'M' => "Masculino"); $this->campoLista("sexo","Sexo",$lista,$this->sexo); - + $obj_estado_civil = new clsEstadoCivil(); $obj_estado_civil_lista = $obj_estado_civil->lista(); - + $lista_estado_civil = array('' => "Selecione"); - + if($obj_estado_civil_lista) { - + foreach ($obj_estado_civil_lista as $estado_civil) { $lista_estado_civil[$estado_civil["ideciv"]] = $estado_civil["descricao"]; } - + } - + $this->campoLista("ideciv","Estado Civil",$lista_estado_civil,$this->ideciv); - + $obj_religiao = new clsPmieducarReligiao(); $obj_religia_lista = $obj_religiao->lista(null,null,null,null,null,null,null,null,1); - + $lista_religiao = array('NULL' => "Selecione"); if($obj_religia_lista) { - + foreach ($obj_religia_lista as $religiao) { $lista_religiao[$religiao["cod_religiao"]] = $religiao["nm_religiao"]; } - + } $this->campoLista("ref_cod_religiao","Religião",$lista_religiao,$this->ref_cod_religiao,"",false,"","","",false); - + $opcoes_raca = array( "" => "Selecione" ); $obj_raca = new clsCadastroRaca(); $lst_raca = $obj_raca->lista( null,null,null,null,null,null,null,true ); @@ -511,9 +511,9 @@ class indice extends clsCadastro } } $this->campoLista("ref_cod_raca","Raça",$opcoes_raca,$this->ref_cod_raca,"",false,"","","",false); - + $this->campoQuebra2("#224488"); - + if($this->idpes_pai) { $obj_pessoa_pai = new clsPessoaFj($this->idpes_pai); @@ -544,17 +544,17 @@ class indice extends clsCadastro { $this->cpf_mae = int2CPF( $det_cpf["cpf"] ); } - } + } } $this->campoTexto("nm_pai","Nome do Pai",$this->nm_pai,30,255,false); $this->campoCpf("cpf_pai","CPF pai",$this->cpf_pai, false, $this->cpf_pai ? "": "     (preencher sempre que possível)"); - + $this->campoTexto("nm_mae","Nome da Mãe",$this->nm_mae,30,255,false); $this->campoCpf("cpf_mae","CPF mãe",$this->cpf_mae, false, $this->cpf_mae ? "": "     (preencher sempre que possível)"); - + $lista = array('' => "Responsável"); - + if($this->ref_idpes_responsavel != "NULL") { $obj_pessoa_resp = new clsPessoaFj($this->ref_idpes_responsavel); @@ -573,9 +573,9 @@ class indice extends clsCadastro $parametros->setPessoaTela('frame'); $parametros->setCodSistema(1); $this->campoListaPesq( "ref_idpes_responsavel", "Responsavel", $lista, $this->ref_idpes_responsavel, "pesquisa_pessoa_lst.php", "", false, "", "", null, null, "", false, $parametros->serializaCampos(), false); - + $this->campoQuebra2("#224488"); - + if($this->tipo_responsavel) { if($this->nm_pai) @@ -585,34 +585,34 @@ class indice extends clsCadastro elseif($this->ref_idpes_responsavel) $this->tipo_responsavel = 'r'; } - + $this->campoRadio("tipo_responsavel","Responsável",array('p' => "Pai",'m' => "Mãe",'r' => "Responsável",),$this->tipo_responsavel); - + $this->campoQuebra2("#224488"); - + $disabled = $this->isEnderecoExterno ? false : true ; - + $this->campoOculto("isEnderecoExterno",$this->isEnderecoExterno); - + $this->campoCep("cep_", "CEP", $this->cep_, true, "-", "');\">", $disabled); - + $this->campoTexto( "cidade", "Cidade", $this->cidade, 30, 255, true,false,true,"","","","",$disabled); - + $obj_uf = new clsUf(false, false, 1); - $lst_uf = $obj_uf->lista(false, false, 1, false, false, "sigla_uf"); + $lst_uf = $obj_uf->lista(false, false, false, false, false, "sigla_uf"); $array_uf = Array('' => "Selecione um estado"); foreach ($lst_uf as $uf) { $array_uf[$uf['sigla_uf']] = $uf['nome']; } - + $this->campoLista("ref_sigla_uf_", "   Estado", $array_uf, $this->ref_sigla_uf, "", false, "","", $disabled); - + $this->campoTexto( "nm_bairro", "Bairro", $this->nm_bairro, 30, 255, true ,false,false,"","","","",$disabled); - + $tipo_logradouro_array = array('' => "Tipo de Logradouro"); - + $obj_tipo_logradouro = new clsTipoLogradouro(); $obj_tipo_logradouro_lista = $obj_tipo_logradouro->lista(); if($obj_tipo_logradouro_lista) @@ -624,32 +624,32 @@ class indice extends clsCadastro } $this->campoLista("ref_idtlog","Logradouro",$tipo_logradouro_array,$this->ref_idtlog,"",true,"","",$this->isEnderecoExterno?false:true,true); // $this->campoLista("ref_idtlog","Logradouro",$tipo_logradouro_array,$this->ref_idtlog,"",true,"","",false,true); - + $this->campoTexto( "nm_logradouro", "Logradouro", $this->nm_logradouro, 30, 255, true ,false,false,"","","","",$disabled ); - + $this->campoNumero( "numero", "Número", $this->numero, 4, 6, false, "", "", false, false, true ); $this->campoTexto( "letra", "   Letra", $this->letra, 4, 1, false ); $this->campoTexto( "complemento", "Complemento", $this->complemento, 30, 50, false ); $this->campoTexto( "bloco", "Bloco", $this->bloco, 30, 50, false ); $this->campoNumero( "andar", "Andar", $this->andar, 4, 2, false, "", "", false, false, true ); $this->campoNumero( "apartamento", "   Apartamento", $this->apartamento, 4, 6, false ); - + $lista_mun_nasc = array('NULL' => "Selecione a cidade"); - + $obj_mun_nasc = new clsMunicipio($this->idmun_nascimento); $det_mun_nasc = $obj_mun_nasc->detalhe(); - + if($det_mun_nasc["nome"]) { $lista_mun_nasc[$det_mun_nasc["idmun"]] = $det_mun_nasc["nome"]; } - + $this->campoListaPesq( "idmun_nascimento", "Naturalidade", $lista_mun_nasc, $this->idmun_nascimento, "educar_pesquisa_municipio_lst.php?campo1=idmun_nascimento", "", false, "", "", null, null, "",true ); - + $this->nacionalidade =($this->nacionalidade)?$this->nacionalidade:1; $lista_nacionalidade = array('NULL' => "Selecione", '1' => "Brasileiro", '2' => "Naturalizado Brasileiro", '3' => "Estrangeiro"); $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); - + $lista_pais_origem = array('NULL' => "País de origem"); $obj_pais = new clsPais(); $obj_pais_lista = $obj_pais->lista(null,null,null,"","","nome asc"); @@ -660,38 +660,38 @@ class indice extends clsCadastro $lista_pais_origem[$pais["idpais"]] = $pais["nome"]; } } - + // se a nacionalidade for "BRASILEIRO" seleciona o brasil e deixa inativo $this->pais_origem = ($this->nacionalidade == 1)?1:$this->pais_origem; $this->campoLista("pais_origem","   País de Origem",$lista_pais_origem,$this->pais_origem,"","","","",($this->nacionalidade == 1),false); - + $this->campoQuebra2("#224488"); - + $obj_beneficio = new clsPmieducarAlunoBeneficio(); $obj_beneficio_lista = $obj_beneficio->lista(null,null,null,null,null,null,null,null,null,1); - + $lista_beneficio = array('NULL' => "Selecione"); - + if($obj_beneficio_lista) { - + foreach ($obj_beneficio_lista as $beneficio) { $lista_beneficio[$beneficio["cod_aluno_beneficio"]] = $beneficio["nm_beneficio"]; } - + } - + $this->campoLista("ref_cod_aluno_beneficio","Benefício",$lista_beneficio,$this->ref_cod_aluno_beneficio,"",false,"","",false,false); - + $lista_analfabeto = array( '1' => 'Não' , 0 => "Sim"); $this->campoLista("analfabeto","Alfabetizado",$lista_analfabeto,$this->analfabeto,"",false,"","",false,false); - + $this->campoNumero("ddd_fone_1", "Telefone", $this->ddd_fone_1, 1, 3, false, "", "", false, false, true); $this->campoNumero("fone_1", "Telefone", $this->fone_1, 11, 11); $this->campoNumero("ddd_mov", "Celular", $this->ddd_mov, 1, 3, false, "", "", false, false, true); $this->campoNumero("fone_mov", "Celular", $this->fone_mov, 11, 11); - + $this->campoEmail("email","Email",$this->email,30,255,false); if(!empty($this->caminho_foto)) { @@ -699,16 +699,16 @@ class indice extends clsCadastro } $this->campoOculto("foto_excluida", 0); $this->campoArquivo("foto", "Foto","", "20","",false); - + $this->campoOculto( "id_bairro", $this->id_bairro); $this->campoOculto( "id_cep", $this->id_cep); $this->campoOculto( "id_logradouro", $this->id_logradouro); $this->campoOculto( "id_cidade", $this->id_cidade); $this->campoOculto("ref_idtlog_", $this->ref_idtlog); $this->campoOculto("ref_sigla_uf", $this->ref_sigla_uf); - + $this->campoTexto("nome","Nome",$this->nome,30,100,true); - + if($this->cpf && $this->ref_idpes) { if(!$this->cpf) @@ -727,44 +727,44 @@ class indice extends clsCadastro $this->campoOculto("sem_cpf",1); } } - + $this->campoData("data_nascimento","Data de Nascimento",$this->data_nascimento,true); - + $lista = array('' => "Selecione", 'F' => "Feminino", 'M' => "Masculino"); $this->campoLista("sexo","Sexo",$lista,$this->sexo); - + $obj_estado_civil = new clsEstadoCivil(); $obj_estado_civil_lista = $obj_estado_civil->lista(); - + $lista_estado_civil = array('' => "Selecione"); - + if($obj_estado_civil_lista) { - + foreach ($obj_estado_civil_lista as $estado_civil) { $lista_estado_civil[$estado_civil["ideciv"]] = $estado_civil["descricao"]; } - + } - + $this->campoLista("ideciv","Estado Civil",$lista_estado_civil,$this->ideciv); - + $obj_religiao = new clsPmieducarReligiao(); $obj_religia_lista = $obj_religiao->lista(null,null,null,null,null,null,null,null,1); - + $lista_religiao = array('NULL' => "Selecione"); if($obj_religia_lista) { - + foreach ($obj_religia_lista as $religiao) { $lista_religiao[$religiao["cod_religiao"]] = $religiao["nm_religiao"]; } - + } $this->campoLista("ref_cod_religiao","Religião",$lista_religiao,$this->ref_cod_religiao,"",false,"","","",false); - + $opcoes_raca = array( "" => "Selecione" ); $obj_raca = new clsCadastroRaca(); $lst_raca = $obj_raca->lista( null,null,null,null,null,null,null,true ); @@ -776,9 +776,9 @@ class indice extends clsCadastro } } $this->campoLista("ref_cod_raca","Raça",$opcoes_raca,$this->ref_cod_raca,"",false,"","","",false); - + $this->campoQuebra2("#224488"); - + if($this->idpes_pai) { $obj_pessoa_pai = new clsPessoaFj($this->idpes_pai); @@ -813,12 +813,12 @@ class indice extends clsCadastro } $this->campoTexto("nm_pai","Nome do Pai",$this->nm_pai,30,255,false); $this->campoCpf("cpf_pai","CPF pai",$this->cpf_pai, false, $this->cpf_pai ? "": "     (preencher sempre que possível)"); - + $this->campoTexto("nm_mae","Nome da Mãe",$this->nm_mae,30,255,false); $this->campoCpf("cpf_mae","CPF mãe",$this->cpf_mae, false, $this->cpf_mae ? "": "     (preencher sempre que possível)"); - + $lista = array('' => "Responsável"); - + if($this->ref_idpes_responsavel != "NULL") { $obj_pessoa_resp = new clsPessoaFj($this->ref_idpes_responsavel); @@ -837,7 +837,7 @@ class indice extends clsCadastro $parametros->setPessoaTela('frame'); $parametros->setCodSistema(1); $this->campoListaPesq( "ref_idpes_responsavel", "Responsavel", $lista, $this->ref_idpes_responsavel, "pesquisa_pessoa_lst.php", "", false, "", "", null, null, "", false, $parametros->serializaCampos(), false); - + $this->campoQuebra2("#224488"); if(!$this->tipo_responsavel) { @@ -850,31 +850,31 @@ class indice extends clsCadastro } $this->campoRadio("tipo_responsavel","Responsável",array('' => "Sem Responsável",'p' => "Pai",'m' => "Mãe",'r' => "Responsável",),$this->tipo_responsavel); - + $this->campoQuebra2("#224488"); - + $disabled = $this->isEnderecoExterno ? false : true ; - + $this->campoOculto("isEnderecoExterno",$this->isEnderecoExterno); - + $this->campoCep("cep_", "CEP", $this->cep_, true, "-", "');\">", $disabled); - + $this->campoTexto( "cidade", "Cidade", $this->cidade, 30, 255, true,false,true,"","","","",$disabled); - + $obj_uf = new clsUf(false, false, 1); - $lst_uf = $obj_uf->lista(false, false, 1, false, false, "sigla_uf"); + $lst_uf = $obj_uf->lista(false, false, false, false, false, "sigla_uf"); $array_uf = Array('' => "Selecione um estado"); foreach ($lst_uf as $uf) { $array_uf[$uf['sigla_uf']] = $uf['nome']; } - + $this->campoLista("ref_sigla_uf_", "   Estado", $array_uf, $this->ref_sigla_uf, "", false, "","", $disabled); - + $this->campoTexto( "nm_bairro", "Bairro", $this->nm_bairro, 30, 255, true ,false,false,"","","","",$disabled); - + $tipo_logradouro_array = array('' => "Tipo de Logradouro"); - + $obj_tipo_logradouro = new clsTipoLogradouro(); $obj_tipo_logradouro_lista = $obj_tipo_logradouro->lista(); if($obj_tipo_logradouro_lista) @@ -885,32 +885,32 @@ class indice extends clsCadastro } } $this->campoLista("ref_idtlog","Logradouro",$tipo_logradouro_array,$this->ref_idtlog,"",true,"","",$this->isEnderecoExterno?false:true,true); - + $this->campoTexto( "nm_logradouro", "Logradouro", $this->nm_logradouro, 30, 255, true ,false,false,"","","","",$disabled ); - + $this->campoNumero( "numero", "Número", $this->numero, 4, 6, false, "", "", false, false, true ); $this->campoTexto( "letra", "   Letra", $this->letra, 4, 1, false ); $this->campoTexto( "complemento", "Complemento", $this->complemento, 30, 50, false ); $this->campoTexto( "bloco", "Bloco", $this->bloco, 30, 50, false ); $this->campoNumero( "andar", "Andar", $this->andar, 4, 2, false, "", "", false, false, true ); $this->campoNumero( "apartamento", "   Apartamento", $this->apartamento, 4, 6, false ); - + $lista_mun_nasc = array('NULL' => "Selecione a cidade"); - + $obj_mun_nasc = new clsMunicipio($this->idmun_nascimento); $det_mun_nasc = $obj_mun_nasc->detalhe(); - + if($det_mun_nasc["nome"]) { $lista_mun_nasc[$det_mun_nasc["idmun"]] = $det_mun_nasc["nome"]; } - + $this->campoListaPesq( "idmun_nascimento", "Naturalidade", $lista_mun_nasc, $this->idmun_nascimento, "educar_pesquisa_municipio_lst.php?campo1=idmun_nascimento", "", false, "", "", null, null, "",true ); - + $this->nacionalidade =($this->nacionalidade)?$this->nacionalidade:1; $lista_nacionalidade = array('NULL' => "Selecione", '1' => "Brasileiro", '2' => "Naturalizado Brasileiro", '3' => "Estrangeiro"); $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); - + $lista_pais_origem = array('NULL' => "País de origem"); $obj_pais = new clsPais(); $obj_pais_lista = $obj_pais->lista(null,null,null,"","","nome asc"); @@ -921,54 +921,54 @@ class indice extends clsCadastro $lista_pais_origem[$pais["idpais"]] = $pais["nome"]; } } - + // se a nacionalidade for "BRASILEIRO" seleciona o brasil e deixa inativo $this->pais_origem = ($this->nacionalidade == 1)?1:$this->pais_origem; $this->campoLista("pais_origem","   País de Origem",$lista_pais_origem,$this->pais_origem,"","","","",($this->nacionalidade == 1),false); - + $this->campoQuebra2("#224488"); - + $obj_beneficio = new clsPmieducarAlunoBeneficio(); $obj_beneficio_lista = $obj_beneficio->lista(null,null,null,null,null,null,null,null,null,1); - + $lista_beneficio = array('NULL' => "Selecione"); - + if($obj_beneficio_lista) { - + foreach ($obj_beneficio_lista as $beneficio) { $lista_beneficio[$beneficio["cod_aluno_beneficio"]] = $beneficio["nm_beneficio"]; } - + } - + $this->campoLista("ref_cod_aluno_beneficio","Benefício",$lista_beneficio,$this->ref_cod_aluno_beneficio,"",false,"","",false,false); - + $lista_analfabeto = array( '1' => 'Não' , 0 => "Sim"); $this->campoLista("analfabeto","Alfabetizado",$lista_analfabeto,$this->analfabeto,"",false,"","",false,false); - + $this->campoNumero("ddd_fone_1", "Telefone", $this->ddd_fone_1, 1, 3, false, "", "", false, false, true); $this->campoNumero("fone_1", "Telefone", $this->fone_1, 11, 11); $this->campoNumero("ddd_mov", "Celular", $this->ddd_mov, 1, 3, false, "", "", false, false, true); $this->campoNumero("fone_mov", "Celular", $this->fone_mov, 11, 11); - + $this->campoEmail("email","Email",$this->email,30,255,false); if(!empty($this->caminho_foto)) { $this->campoRotulo("foto_antiga_","Arquivo"," "); } - + $this->campoArquivo("foto", "Foto","", "20","",false); - + $this->campoOculto( "id_bairro", $this->id_bairro); $this->campoOculto( "id_cep", $this->id_cep); $this->campoOculto( "id_logradouro", $this->id_logradouro); $this->campoOculto( "id_cidade", $this->id_cidade); $this->campoOculto("ref_idtlog_", $this->ref_idtlog); $this->campoOculto("ref_sigla_uf", $this->ref_sigla_uf); - $this->campoOculto("cpf",$this->cpf); - + $this->campoOculto("cpf",$this->cpf); + $this->campoAdicionaTab("Deficiência", $this->tab_habilitado); if($this->ref_idpes) @@ -1012,29 +1012,29 @@ class indice extends clsCadastro $oculto = $tabela = ""; if($deficiencia_aluno) - { + { foreach ($deficiencia_aluno as $indice => $valor) { $cor_fundo = $cor_fundo == "#D1DADF" ? "#E4E9ED" : "#D1DADF"; $tabela .= ""; $tabela .= "{$valor}"; $tabela .= ""; - $tabela .= ""; $tabela .= ""; $oculto .= ""; } - } + } $this->campoLista("ref_cod_pessoa_deficiencia","Deficiência",$lista,$this->ref_cod_pessoa_deficiencia,"",false,"","",false,$obrigatorio); $this->campoRotulo("incluir2", "Incluir deficiência", ""); - $this->campoRotulo("tab_defic", "Deficiências", "{$tabela}
{$oculto}
"); - + $this->campoRotulo("tab_defic", "Deficiências", "{$tabela}
{$oculto}
"); + $this->campoOculto("inc", ""); $this->campoOculto("exc", ""); - + $this->campoAdicionaTab("Outros Dados", $this->tab_habilitado); - + if($this->ref_idpes) { $ObjDocumento = new clsDocumento($this->ref_idpes); @@ -1119,7 +1119,7 @@ class indice extends clsCadastro $this->campoTexto("num_tit_eleitor", "Título de Eleitor", $this->num_tit_eleitor, "13", "13", false); $this->campoTexto("zona_tit_eleitor", "Zona", $this->zona_tit_eleitor, "4", "4", false); $this->campoTexto("secao_tit_eleitor", "Seção", $this->secao_tit_eleitor, "10", "10", false); - + $this->campoTabFim(); } @@ -1128,7 +1128,7 @@ class indice extends clsCadastro @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); - + if (!$this->cpf && $this->cpf_2) { $cpf = idFederal2int($this->cpf_2); @@ -1140,7 +1140,7 @@ class indice extends clsCadastro return false; die(); } - else + else die("CPF Não Existente"); } $obj_pessoa = new clsPessoa_($this->ref_idpes); @@ -1160,7 +1160,7 @@ class indice extends clsCadastro return false; } } - + if(!$this->cpf) { $this->ref_cod_sistema = 1; @@ -1169,10 +1169,10 @@ class indice extends clsCadastro { $this->ref_cod_sistema = "NULL"; } - + if( is_string( $this->cpf_pai ) && $this->cpf_pai != "") { - + $this->cpf_pai = idFederal2int($this->cpf_pai); $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); $detalhe_cpf = $obj_cpf->detalheCPF(); @@ -1190,9 +1190,9 @@ class indice extends clsCadastro } else { - + $this->nm_pai = $det_pessoa["nome"]; - + } } } @@ -1214,7 +1214,7 @@ class indice extends clsCadastro { $this->idpes_pai = "NULL"; } - + if( is_string( $this->cpf_mae ) && $this->cpf_mae != "") { $this->cpf_mae = idFederal2int($this->cpf_mae); @@ -1234,12 +1234,12 @@ class indice extends clsCadastro } else { - + $this->nm_mae = $det_pessoa["nome"]; - + } } - + } else { @@ -1259,13 +1259,13 @@ class indice extends clsCadastro { $this->idpes_mae = "NULL"; } - + $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); if($obj_fisica->detalhe()) { if(!$this->ref_idpes_responsavel) $this->ref_idpes_responsavel = "NULL"; - + $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); if(!$obj_fisica->edita()) { @@ -1280,23 +1280,23 @@ class indice extends clsCadastro return false; } } - + if(is_numeric($this->ref_cod_raca)) { $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes ); if ($obj_fisica_raca->existe()) { - + $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes, $this->ref_cod_raca ); $obj_fisica_raca->edita(); - + } else { - + $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes, $this->ref_cod_raca ); $obj_fisica_raca->cadastra(); - + } } else @@ -1304,7 +1304,7 @@ class indice extends clsCadastro $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes, $this->ref_cod_raca ); $obj_fisica_raca->excluir(); } - + $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 1, $this->fone_1, $this->ddd_fone_1 ); if ( $objTelefone->detalhe() ) { @@ -1314,7 +1314,7 @@ class indice extends clsCadastro { $objTelefone->cadastra(); } - + $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 2, $this->fone_2, $this->ddd_fone_2 ); if ( $objTelefone->detalhe() ) { @@ -1324,7 +1324,7 @@ class indice extends clsCadastro { $objTelefone->cadastra(); } - + $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 3, $this->fone_mov, $this->ddd_mov ); if ( $objTelefone->detalhe() ) { @@ -1334,7 +1334,7 @@ class indice extends clsCadastro { $objTelefone->cadastra(); } - + $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 4, $this->fone_fax, $this->ddd_fax ); if ( $objTelefone->detalhe() ) { @@ -1344,12 +1344,12 @@ class indice extends clsCadastro { $objTelefone->cadastra(); } - + if($this->isEnderecoExterno) { $this->cep_ = str_replace("-","",$this->cep_); $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); - + if($obj_endereco->existe()) { if(!$obj_endereco->edita()) @@ -1359,19 +1359,19 @@ class indice extends clsCadastro } else { - + if(!$obj_endereco->cadastra()) { return false; } } - + if($this->endereco_original_is_externo != $this->isEnderecoExterno) { $obj_endereco = new clsPessoaEndereco($this->ref_idpes); $obj_endereco->exclui(); } - + } else { @@ -1396,8 +1396,8 @@ class indice extends clsCadastro $obj_endereco->exclui(); } } - - + + $this->deficiencia_exc = $_POST['oc_defic_exc']; if($this->deficiencia_exc) { @@ -1422,8 +1422,8 @@ class indice extends clsCadastro } } } - - + + if($this->data_emissao_cart_trabalho) { $this->data_emissao_cart_trabalho = explode("/",$this->data_emissao_cart_trabalho); @@ -1438,9 +1438,9 @@ class indice extends clsCadastro { $this->data_exp_rg = explode("/",$this->data_exp_rg); $this->data_exp_rg = "{$this->data_exp_rg[2]}/{$this->data_exp_rg[1]}/{$this->data_exp_rg[0]}"; - + } - + $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 ); if($ObjDocumento->detalhe()) { @@ -1474,39 +1474,39 @@ class indice extends clsCadastro } elseif($this->foto_excluida == 1) { - $this->foto = "NULL"; + $this->foto = "NULL"; } elseif (!$this->foto_excluida) { $this->foto = $this->foto_antiga; } - - + + if($this->foto_excluida) { if(file_exists("arquivos/educar/aluno/big/{$this->caminho_foto}")) { unlink("arquivos/educar/aluno/big/{$this->caminho_foto}"); } - + if(file_exists("arquivos/educar/aluno/small/{$this->caminho_foto}")) { unlink("arquivos/educar/aluno/small/{$this->caminho_foto}"); } - + if(file_exists("arquivos/educar/aluno/original/{$this->caminho_foto}")) { unlink("arquivos/educar/aluno/original/{$this->caminho_foto}"); } - + } - + if(is_numeric($this->idpes_mae) && $this->idpes_mae != "NULL") $this->nm_mae = "NULL"; - + if(is_numeric($this->idpes_pai) && $this->idpes_pai != "NULL") $this->nm_pai = "NULL"; - + if(!$this->cod_aluno) { $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 { $obj->cadastra(); } - + } } else @@ -1806,7 +1806,7 @@ $pagina->MakeAll(); campos[0].checked = true; } - + var cor_fundo; function adicionaDeficiencia() { @@ -1828,30 +1828,30 @@ $pagina->MakeAll(); row.setAttribute('id', 'tr_'+cod_deficiencia); row.setAttribute('align', 'center'); row.style.backgroundColor = cor_fundo; - + var cell1 = document.createElement('td'); cell1.setAttribute('align', 'right'); cell1.setAttribute('style', 'padding-right:10px;'); - + var cell2 = document.createElement('td'); - + var img = ""; - + var text = document.createTextNode(nm_deficiencia); - + cell1.innerHTML = img; cell2.appendChild(text); row.appendChild(cell2); row.appendChild(cell1); tabela.firstChild.appendChild(row); - + var area = document.getElementById('ocultos_defic'); var input = document.createElement('input'); input.setAttribute('type', 'hidden'); input.setAttribute('id', 'oc_defic['+cod_deficiencia+']'); input.setAttribute('name', 'oc_defic['+cod_deficiencia+']'); input.setAttribute('value', cod_deficiencia); - area.appendChild(input); + area.appendChild(input); } else { @@ -1859,7 +1859,7 @@ $pagina->MakeAll(); } } } - + function excluirLinhaDeficiencia(cod_deficiencia) { var cor = ""; @@ -1886,7 +1886,7 @@ $pagina->MakeAll(); for(var i=0; iMakeAll(); inputExc.setAttribute('id', 'oc_defic_exc['+cod_deficiencia+']'); inputExc.setAttribute('name', 'oc_defic_exc['+cod_deficiencia+']'); inputExc.setAttribute('value', cod_deficiencia); - areaExc.appendChild(inputExc); - + areaExc.appendChild(inputExc); + } } } } - + Event.observe(window, 'load', Init, false); - + function Init() { elemento = $$("div#content1 img"); @@ -1914,12 +1914,12 @@ $pagina->MakeAll(); $('btn_enviar').disabled = true; $('btn_enviar').className='botaolistagemdisabled'; } - + function passaPagina() { LTb0("0", "2"); } - + function bloqueia() { if (($F('cpf_') != '' && $F('cpf') == '' && $F('bloqueado') == 1) || $F('cpf_') != $F('cpf_2')) @@ -1930,11 +1930,11 @@ $pagina->MakeAll(); var cpf = $('cpf_').value; var xml_dados_pessoa = new ajax(getDados); xml_dados_pessoa.envia("educar_aluno_cad_xml.php?cpf="+cpf); - + } else if ($F('cpf') != '' || $F('bloqueado') == 0) { - validaTab(1); + validaTab(1); LTb0("0", "2"); $('btn_enviar').disabled = false; $('btn_enviar').className = 'botaolistagem'; @@ -1944,15 +1944,15 @@ $pagina->MakeAll(); alert('Você deve preencher o campo CPF'); } } - + function getDados(xml_dados) { var DOM_array = xml_dados.getElementsByTagName( 'dados' ); - + if(DOM_array.length) { var elementos; - for (var i = 1; i <5; i++) + for (var i = 1; i <5; i++) { elementos = $$("div#content"+i+" input"); for (var j = 0; j < elementos.length; j++) @@ -1966,7 +1966,7 @@ $pagina->MakeAll(); { if (DOM_array[0].childNodes[i].nodeType == 1) { - try + try { libera = true; if (DOM_array[0].childNodes[i].firstChild.nodeValue != '') @@ -1979,10 +1979,10 @@ $pagina->MakeAll(); } } $('cpf_2').disabled = true; - - if (libera) + + if (libera) { - validaTab(1); + validaTab(1); LTb0("0", "2"); $('btn_enviar').disabled = false; $('bloqueado').value = 0; @@ -1990,7 +1990,7 @@ $pagina->MakeAll(); } else { - validaTab(1); + validaTab(1); LTb0("0", "2"); $('btn_enviar').disabled = false; $('bloqueado').value = 0; @@ -2006,7 +2006,7 @@ $pagina->MakeAll(); } $('btn_enviar').value = 'Salvar'; } - + diff --git a/ieducar/intranet/educar_instituicao_cad.php b/ieducar/intranet/educar_instituicao_cad.php index f23080c..0b7eddb 100644 --- a/ieducar/intranet/educar_instituicao_cad.php +++ b/ieducar/intranet/educar_instituicao_cad.php @@ -79,7 +79,7 @@ class indice extends clsCadastro $obj_permissoes->permissao_cadastra( 559, $this->pessoa_logada, 1, "educar_instituicao_lst.php" ); $this->cod_instituicao=$_GET["cod_instituicao"]; - + if( is_numeric( $this->cod_instituicao ) ) { @@ -142,6 +142,7 @@ class indice extends clsCadastro $lista = $objTemp->lista(); if ( is_array( $lista ) && count( $lista ) ) { + asort($lista); foreach ( $lista as $registro ) { $opcoes["{$registro['sigla_uf']}"] = "{$registro['sigla_uf']}"; diff --git a/ieducar/intranet/educar_pesquisa_cep_log_bairro.php b/ieducar/intranet/educar_pesquisa_cep_log_bairro.php index 192f4dc..b0a3388 100644 --- a/ieducar/intranet/educar_pesquisa_cep_log_bairro.php +++ b/ieducar/intranet/educar_pesquisa_cep_log_bairro.php @@ -62,11 +62,11 @@ class miolo1 extends clsListagem $_SESSION["campo12"] = $_GET["campo12"] ? $_GET["campo12"] : $_SESSION["campo12"]; $_SESSION["campo13"] = $_GET["campo13"] ? $_GET["campo13"] : $_SESSION["campo13"]; $this->nome = "form1"; - + $this->funcao_js = "cv_libera_campos('{$_SESSION["campo10"]}', '{$_SESSION["campo11"]}', '{$_SESSION["campo7"]}', '{$_SESSION["campo1"]}', '{$_SESSION["campo12"]}', '{$_SESSION["campo4"]}', '{$_SESSION["campo9"]}')"; $this->titulo = "Endereço"; - + // Paginador $limite = 7; $iniciolimit = ( $_GET["pagina_{$this->nome}"] ) ? $_GET["pagina_{$this->nome}"]*$limite-$limite: 0; @@ -78,7 +78,7 @@ class miolo1 extends clsListagem $this->campoTexto("nm_logradouro", "Logradouro", $_GET["nm_logradouro"], 50, 255); $this->campoTexto("cidade", "Cidade", $_GET["cidade"], 60, 60); $obj_uf = new clsUf(false, false, 1); - $lst_uf = $obj_uf->lista(false, false, 1, false, false, "sigla_uf"); + $lst_uf = $obj_uf->lista(false, false, false, false, false, "sigla_uf"); $array_uf; foreach ($lst_uf as $uf) { @@ -147,8 +147,8 @@ class miolo1 extends clsListagem if($_GET["param"]) { - - + + $this->addLinhas(array("{$detalhe_bairro["nome"]}", "{$cep2}", "{$detalhe_logradouro["nome"]}", @@ -180,9 +180,9 @@ class miolo1 extends clsListagem "; - + } else { - + $this->rodape = " @@ -229,18 +229,18 @@ function setFiltro() } /* - Função especifica para Ouvidoria Atendimento Completo Cad + Função especifica para Ouvidoria Atendimento Completo Cad */ function setaCamposOuvidoria(valor1, valor2, valor3, valor4, valor5, valor6, valor7, valor8, valor9, valor10, valor11, valor12) { // Campo Oculto flag atualiza - parent.document.getElementById("atualiza").value = "false"; - parent.document.getElementById("nendereco").value = "false"; - + parent.document.getElementById("atualiza").value = "false"; + parent.document.getElementById("nendereco").value = "false"; + // Campo Oculto Cep obj1 = parent.document.getElementById("cep"); obj1.value = valor1; - + // Campo Visivel Cep obj2 = parent.document.getElementById("cep_"); obj2.value = valor2; @@ -249,55 +249,55 @@ function setaCamposOuvidoria(valor1, valor2, valor3, valor4, valor5, valor6, val // Campo Oculto Sigla_uf obj3 = parent.document.getElementById("sigla_uf"); obj3.value = valor3; - + // Campo Visivel Sigla_uf obj4 = parent.document.getElementById("sigla_uf_"); obj4.value = valor4; obj4.disabled = true; - + // Campo Oculto Cidade obj5 = parent.document.getElementById("cidade"); obj5.value = valor5; - + // Campo Visivel Cidade obj6 = parent.document.getElementById("cidade_"); obj6.value = valor6; - obj6.disabled = true; - + obj6.disabled = true; + // Campo Oculto NMCidade obj14 = parent.document.getElementById("nmCidade"); obj14.value = valor6; - + // Campo Oculto Bairro obj7 = parent.document.getElementById("idbai"); obj7.value = valor7; - + // Campo Visivel Bairro obj8 = parent.document.getElementById("bairro_"); obj8.value = valor8; - obj8.disabled = true; - + obj8.disabled = true; + obj13 = parent.document.getElementById("bairro"); obj13.value = valor8; - + // Campo Oculto Tipo Logradouro obj9 = parent.document.getElementById("idtlog"); obj9.value = valor9; - + // Campo Visivel Tipo Logradouro obj10 = parent.document.getElementById("idtlog_"); obj10.value = valor10; - obj10.disabled = true; - + obj10.disabled = true; + // Campo Oculto Logradouro obj11 = parent.document.getElementById("idlog"); obj11.value = valor11; - + // Campo Visivel Logradouro obj12 = parent.document.getElementById("logradouro_"); obj12.value = valor12; - obj12.disabled = true; - + obj12.disabled = true; + obj14 = parent.document.getElementById("logradouro"); obj14.value = valor12; @@ -306,12 +306,12 @@ function setaCamposOuvidoria(valor1, valor2, valor3, valor4, valor5, valor6, val function liberaCamposOuvidoria() { - parent.document.getElementById("atualiza").value = "false"; - parent.document.getElementById("nendereco").value = "true"; + parent.document.getElementById("atualiza").value = "false"; + parent.document.getElementById("nendereco").value = "true"; // Campo Oculto Cep obj1 = parent.document.getElementById("cep"); obj1.value = null; - + // Campo Visivel Cep obj2 = parent.document.getElementById("cep_"); obj2.value = null; @@ -320,54 +320,54 @@ function liberaCamposOuvidoria() // Campo Oculto Sigla_uf obj3 = parent.document.getElementById("sigla_uf"); obj3.value = null; - + // Campo Visivel Sigla_uf obj4 = parent.document.getElementById("sigla_uf_"); obj4.value = null; obj4.disabled = false; - + // Campo Oculto Cidade obj5 = parent.document.getElementById("cidade"); obj5.value = null; - + // Campo Visivel Cidade obj6 = parent.document.getElementById("cidade_"); obj6.value = null; - obj6.disabled = false; - + obj6.disabled = false; + // Campo Oculto Bairro obj7 = parent.document.getElementById("idbai"); obj7.value = null; - + // Campo Visivel Bairro obj8 = parent.document.getElementById("bairro_"); obj8.value = null; - obj8.disabled = false; - + obj8.disabled = false; + obj13 = parent.document.getElementById("bairro"); obj13.value = null; - + // Campo Oculto Tipo Logradouro obj9 = parent.document.getElementById("idtlog"); obj9.value = null; - + // Campo Visivel Tipo Logradouro obj10 = parent.document.getElementById("idtlog_"); obj10.value = null; - obj10.disabled = false; - + obj10.disabled = false; + // Campo Oculto Logradouro obj11 = parent.document.getElementById("idlog"); obj11.value = null; - + // Campo Visivel Logradouro obj12 = parent.document.getElementById("logradouro_"); obj12.value = null; - obj12.disabled = false; - + obj12.disabled = false; + obj14 = parent.document.getElementById("logradouro"); - obj14.value = null; - + obj14.value = null; + window.parent.fechaExpansivel('div_dinamico_'+(parent.DOM_divs.length*1-1)); } diff --git a/ieducar/intranet/educar_pesquisa_municipio_lst.php b/ieducar/intranet/educar_pesquisa_municipio_lst.php index 6b685a1..91a704f 100644 --- a/ieducar/intranet/educar_pesquisa_municipio_lst.php +++ b/ieducar/intranet/educar_pesquisa_municipio_lst.php @@ -77,6 +77,9 @@ class indice extends clsListagem function Gerar() { + global $coreExt; + $config = $coreExt['Config']->app->locale; + @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; $_SESSION["campo1"] = $_GET["campo1"] ? $_GET["campo1"] : $_SESSION["campo1"]; @@ -97,7 +100,7 @@ class indice extends clsListagem $obj_uf = new clsUf(false, false, 1); - $lst_uf = $obj_uf->lista(false, false, 1, false, false, "sigla_uf"); + $lst_uf = $obj_uf->lista(false, false, false, false, false, "sigla_uf"); $array_uf = array('' => 'Todos'); foreach ($lst_uf as $uf) { @@ -105,7 +108,7 @@ class indice extends clsListagem } if(!isset($this->sigla_uf)) { - $this->sigla_uf = "SC"; + $this->sigla_uf = $config->province ? $config->province : ''; } diff --git a/ieducar/intranet/include/pessoa/clsUf.inc.php b/ieducar/intranet/include/pessoa/clsUf.inc.php index 603975e..b60bc2f 100755 --- a/ieducar/intranet/include/pessoa/clsUf.inc.php +++ b/ieducar/intranet/include/pessoa/clsUf.inc.php @@ -46,6 +46,9 @@ class clsUf */ function clsUf( $str_sigla_uf=false, $str_nome=false, $str_geom=false, $int_idpais=false ) { + global $coreExt; + $this->config = $coreExt['Config']; + $this->sigla_uf = $str_sigla_uf; $this->nome = $str_nome; $this->geom = $str_geom; @@ -178,7 +181,8 @@ class clsUf } else { //brasil - $where .= "{$whereAnd}idpais = '1'"; + $idpais = $this->config->app->locale->country; + $where .= "{$whereAnd}idpais = '$idpais'"; $whereAnd = " AND "; } -- libgit2 0.21.2