当前位置: 首页>>代码示例>>PHP>>正文


PHP idFederal2int函数代码示例

本文整理汇总了PHP中idFederal2int函数的典型用法代码示例。如果您正苦于以下问题:PHP idFederal2int函数的具体用法?PHP idFederal2int怎么用?PHP idFederal2int使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了idFederal2int函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getPrimeiroEnderecoCep

 protected function getPrimeiroEnderecoCep()
 {
     $cep = idFederal2int($this->getRequest()->cep);
     // consulta dados
     $select = "\n      SELECT\n        c.idlog, c.cep, c.idbai, b.nome as nome_bairro, l.nome as nome_logradouro, u.sigla_uf, m.nome, t.idtlog, t.descricao as tipo_logradouro, m.idmun, b.zona_localizacao \n   \n      FROM\n        urbano.cep_logradouro_bairro c, public.bairro b, public.logradouro l,\n        public.municipio m, public.uf u, urbano.tipo_logradouro t\n      WHERE\n        c.idlog = l.idlog AND\n        c.idbai = b.idbai AND\n        l.idmun = b.idmun AND\n        l.idmun = m.idmun AND\n        l.idtlog = t.idtlog AND\n        m.sigla_uf = u.sigla_uf AND \n        c.cep = {$cep} LIMIT 1";
     $result = Portabilis_Utils_Database::fetchPreparedQuery($select, array('return_only' => 'first-line'));
     $return;
     if (is_array($result)) {
         $return = array();
         foreach ($result as $name => $value) {
             $return[$name] = Portabilis_String_Utils::toUtf8($value);
         }
     }
     return $return;
 }
开发者ID:secteofilandia,项目名称:ieducar,代码行数:15,代码来源:EnderecoController.php

示例2: _createOrUpdateEnderecoExterno

 protected function _createOrUpdateEnderecoExterno($pessoaId)
 {
     $endereco = new clsEnderecoExterno($pessoaId, '1', $this->idtlog, addslashes($this->logradouro), $this->numero, addslashes($this->letra), addslashes($this->complemento), addslashes($this->bairro), idFederal2int($this->cep_), addslashes($this->cidade), $this->sigla_uf, FALSE, addslashes($this->bloco), $this->apartamento, $this->andar, FALSE, FALSE, $this->zona_localizacao);
     // forçado exclusão, assim ao cadastrar endereco_externo novamente,
     // será excluido endereco_pessoa (por meio da trigger fcn_aft_ins_endereco_externo).
     $endereco->exclui();
     $endereco->cadastra();
 }
开发者ID:secteofilandia,项目名称:ieducar,代码行数:8,代码来源:atendidos_cad.php

示例3: Novo

 function Novo()
 {
     @session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     @session_write_close();
     $obj_permissoes = new clsPermissoes();
     $obj_permissoes->permissao_cadastra(595, $this->pessoa_logada, 11, "educar_acervo_editora_lst.php");
     $this->cep = idFederal2int($this->cep);
     $obj = new clsPmieducarAcervoEditora(null, $this->pessoa_logada, null, $this->ref_idtlog, $this->ref_sigla_uf, $this->nm_editora, $this->cep, $this->cidade, $this->bairro, $this->logradouro, $this->numero, $this->telefone, $this->ddd_telefone, null, null, 1, $this->ref_cod_biblioteca);
     $cadastrou = $obj->cadastra();
     if ($cadastrou) {
         $this->mensagem .= "Cadastro efetuado com sucesso.<br>";
         //header( "Location: educar_acervo_editora_lst.php" );
         echo "<script>\n\t\t\t\t\tparent.document.getElementById('editora').value = '{$cadastrou}';\n\t\t\t\t\tparent.document.getElementById('tipoacao').value = '';\n\t\t\t\t\tparent.document.getElementById('ref_cod_acervo_editora').disabled = false;\n\t\t\t\t\tparent.document.getElementById('formcadastro').submit();\n\t\t\t     </script>";
         die;
         return true;
     }
     $this->mensagem = "Cadastro n&atilde;o realizado.<br>";
     echo "<!--\nErro ao cadastrar clsPmieducarAcervoEditora\nvalores obrigat&oacute;rios\nis_numeric( {$this->pessoa_logada} ) && is_string( {$this->ref_idtlog} ) && is_string( {$this->ref_sigla_uf} ) && is_string( {$this->nm_editora} ) && is_numeric( {$this->cep} ) && is_string( {$this->cidade} ) && is_string( {$this->bairro} ) && is_string( {$this->logradouro} ) && is_numeric( {$this->numero} )\n-->";
     return false;
 }
开发者ID:eritter-ti,项目名称:ieducar,代码行数:21,代码来源:educar_acervo_editora_cad_pop.php

示例4: Gerar

 function Gerar()
 {
     @session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     session_write_close();
     $this->titulo = "Aluno - Listagem";
     foreach ($_GET as $var => $val) {
         // passa todos os valores obtidos no GET para atributos do objeto
         $this->{$var} = $val === "" ? null : $val;
     }
     $this->addBanner("imagens/nvp_top_intranet.jpg", "imagens/nvp_vert_intranet.jpg", "Intranet");
     $this->campoNumero("cod_aluno", "C&oacute;digo Aluno", $this->cod_aluno, 20, 255, false);
     $this->campoTexto("nome_aluno", "Nome do aluno", $this->nome_aluno, 50, 255, false);
     //		if ($this->pessoa_logada == 184580) {
     $this->campoData("data_nascimento", "Data de Nascimento", $this->data_nascimento);
     $this->campoTexto("nome_pai", "Nome do Pai", $this->nome_pai, 50, 255);
     $this->campoTexto("nome_mae", "Nome da Mãe", $this->nome_mae, 50, 255);
     $this->campoTexto("nome_responsavel", "Nome do Responsável", $this->nome_responsavel, 50, 255);
     //		}
     $obj_permissoes = new clsPermissoes();
     $cod_escola = $obj_permissoes->getEscola($this->pessoa_logada);
     if ($cod_escola) {
         $this->campoCheck("meus_alunos", "Meus Alunos", $_GET['meus_alunos']);
         $ref_cod_escola = false;
         if ($_GET['meus_alunos']) {
             $ref_cod_escola = $cod_escola;
         }
     }
     $array_matriculado = array('S' => "Sim", 'N' => 'N&atilde;o');
     $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada);
     $this->addCabecalhos(array("C&oacute;digo Aluno", "Nome do Aluno", "Nome do Respons&aacute;vel", "CPF Respons&aacute;vel"));
     // Paginador
     $this->limite = 20;
     $this->offset = $_GET["pagina_{$this->nome}"] ? $_GET["pagina_{$this->nome}"] * $this->limite - $this->limite : 0;
     $obj_aluno = new clsPmieducarAluno();
     //		$obj_aluno->setOrderby( "cod_aluno DESC" );
     $obj_aluno->setLimite($this->limite, $this->offset);
     /*$lista = $obj_aluno->lista(
     			$this->cod_aluno,
     			null,
     			null,
     			null,
     			null,
     			null,
     			null,
     			null,
     			null,
     			null,
     			1,
     			null,
     			$this->nome_aluno,
     			$this->nome_responsavel,
     			idFederal2int($this->cpf_responsavel),
     			null,
     			$this->nome_pai,
     			$this->nome_mae,
     			$ref_cod_escola
     		);*/
     //		if ($this->pessoa_logada == 184580) {
     $lista = $obj_aluno->lista2($this->cod_aluno, null, null, null, null, null, null, null, null, null, 1, null, $this->nome_aluno, null, idFederal2int($this->cpf_responsavel), null, null, null, $ref_cod_escola, null, $this->data_nascimento, $this->nome_pai, $this->nome_mae, $this->nome_responsavel);
     /*} else {
     			$lista = $obj_aluno->lista(
     					$this->cod_aluno,
     					null,
     					null,
     					null,
     					null,
     					null,
     					null,
     					null,
     					null,
     					null,
     					1,
     					null,
     					$this->nome_aluno,
     					null,
     					idFederal2int($this->cpf_responsavel),
     					null,
     					null,
     					null,
     					$ref_cod_escola
     				);
     		}*/
     $total = $obj_aluno->_total;
     // monta a lista
     if (is_array($lista) && count($lista)) {
         foreach ($lista as $registro) {
             $registro["nome_responsavel"] = null;
             $det_fisica_aluno = null;
             if ($registro['tipo_responsavel'] == 'p' || !$registro["nome_responsavel"] && $registro['tipo_responsavel'] == null) {
                 $obj_fisica = new clsFisica($registro["ref_idpes"]);
                 $det_fisica_aluno = $obj_fisica->detalhe();
                 if ($det_fisica_aluno["idpes_pai"]) {
                     $obj_ref_idpes = new clsPessoa_($det_fisica_aluno["idpes_pai"]);
                     $det_ref_idpes = $obj_ref_idpes->detalhe();
                     $obj_fisica = new clsFisica($det_fisica_aluno["idpes_pai"]);
                     $det_fisica = $obj_fisica->detalhe();
                     $registro["nome_responsavel"] = $det_ref_idpes['nome'];
                     if ($det_fisica["cpf"]) {
                         $registro["cpf_responsavel"] = int2CPF($det_fisica["cpf"]);
//.........这里部分代码省略.........
开发者ID:eritter-ti,项目名称:ieducar,代码行数:101,代码来源:educar_aluno_lst.php

示例5: Editar

 function Editar()
 {
     session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     session_write_close();
     if ($this->idbai[0] != '' && $this->cep[0] != '') {
         foreach ($this->cep as $id => $cep) {
             $cep = idFederal2int($cep);
             $obj = new clsUrbanoCepLogradouro($cep, $this->idlog, NULL, NULL, NULL, NULL, 'U', $this->pessoa_logada, NULL, 'I', NULL, 9);
             if (!$obj->existe()) {
                 if (!$obj->cadastra()) {
                     $this->mensagem = 'Cadastro n&atilde;o realizado.<br>';
                     echo "<!--\nErro ao editar clsUrbanoCepLogradouro\nvalores obrigatorios\nif( is_numeric( {$cep} ) && is_numeric( {$this->idlog} ) && is_numeric( {$this->pessoa_logada} ) )\n-->";
                     return FALSE;
                 }
             }
             $obj_cep_log_bairro = new clsUrbanoCepLogradouroBairro($this->idlog, $cep, $this->idbai[$id], NULL, NULL, 'U', $this->pessoa_logada, NULL, 'I', NULL, 9);
             if (!$obj_cep_log_bairro->existe()) {
                 if (!$obj_cep_log_bairro->cadastra()) {
                     $this->mensagem = 'Cadastro n&atilde;o realizado.<br>';
                     echo "<!--\nErro ao editar clsUrbanoCepLogradouroBairro\nvalores obrigatorios\nif( is_numeric( {$cep} ) && is_numeric( {$this->idlog} ) && is_numeric( {$this->idbai[$id]} ) && is_numeric( {$this->pessoa_logada} ) )\n-->";
                     return FALSE;
                 }
             }
         }
         $this->mensagem .= 'Edi&ccedil;&atilde;o efetuada com sucesso.<br>';
         header('Location: urbano_cep_logradouro_lst.php');
         die;
     } else {
         $this->mensagem = 'É necessario adicionar pelo menos um CEP e bairro.<br>';
         return FALSE;
     }
 }
开发者ID:eritter-ti,项目名称:ieducar,代码行数:33,代码来源:urbano_cep_logradouro_cad.php

示例6: Gerar


//.........这里部分代码省略.........
                 $det_uf = $obj_endereco_det['sigla_uf']->detalhe();
                 $registro['ref_sigla_uf'] = $det_uf['nome'];
                 $registro['cep_'] = int2CEP($registro['id_cep']);
             }
         }
     }
     // Adiciona a informação de zona de localização junto ao bairro do
     // endereço.
     $zona = App_Model_ZonaLocalizacao::getInstance();
     $registro['nm_bairro'] = sprintf('%s (Zona %s)', $registro['nm_bairro'], $zona->getValue($obj_endereco_det['zona_localizacao']));
     if ($registro['cod_aluno']) {
         $this->addDetalhe(array('Código Aluno', $registro['cod_aluno']));
     }
     // código inep
     $alunoMapper = new Educacenso_Model_AlunoDataMapper();
     $alunoInep = NULL;
     try {
         $alunoInep = $alunoMapper->find(array('aluno' => $this->cod_aluno));
         $this->addDetalhe(array('Código inep', $alunoInep->alunoInep));
     } catch (Exception $e) {
     }
     // código estado
     $this->addDetalhe(array('Código estado', $registro['aluno_estado_id']));
     if ($registro['caminho_foto']) {
         $this->addDetalhe(array('Foto', sprintf('<img src="arquivos/educar/aluno/small/%s" border="0">', $registro['caminho_foto'])));
     }
     if ($registro['nome_aluno']) {
         if ($caminhoFoto != null and $caminhoFoto != '') {
             $this->addDetalhe(array('Nome Aluno', $registro['nome_aluno'] . '<p><img height="117" src="' . $caminhoFoto . '"/></p>'));
         } else {
             $this->addDetalhe(array('Nome Aluno', $registro['nome_aluno']));
         }
     }
     if (idFederal2int($registro['cpf'])) {
         $this->addDetalhe(array('CPF', $registro['cpf']));
     }
     if ($registro['data_nasc']) {
         $this->addDetalhe(array('Data de Nascimento', $registro['data_nasc']));
     }
     /**
      * Analfabeto.
      */
     $this->addDetalhe(array('Analfabeto', $registro['analfabeto'] == 0 ? 'Não' : 'Sim'));
     if ($registro['sexo']) {
         $this->addDetalhe(array('Sexo', $registro['sexo']));
     }
     if ($registro['ideciv']) {
         $this->addDetalhe(array('Estado Civil', $registro['ideciv']));
     }
     if ($registro['id_cep']) {
         $this->addDetalhe(array('CEP', $registro['cep_']));
     }
     if ($registro['ref_sigla_uf']) {
         $this->addDetalhe(array('UF', $registro['ref_sigla_uf']));
     }
     if ($registro['cidade']) {
         $this->addDetalhe(array('Cidade', $registro['cidade']));
     }
     if ($registro['nm_bairro']) {
         $this->addDetalhe(array('Bairro', $registro['nm_bairro']));
     }
     if ($registro['nm_logradouro']) {
         $logradouro = '';
         if ($registro['idtlog']) {
             $logradouro .= $registro['idtlog'] . ' ';
         }
开发者ID:GilmaraNonato,项目名称:ieducar,代码行数:67,代码来源:educar_aluno_det.php

示例7: lista


//.........这里部分代码省略.........
         $whereAnd = " AND ";
     }
     if (is_string($str_ultima_empresa)) {
         $where .= "{$whereAnd}ultima_empresa =  '{$str_ultima_empresa}'";
         $whereAnd = " AND ";
     }
     if (is_numeric($int_idocup)) {
         $where .= "{$whereAnd}idocup = '{$int_idocup}'";
         $whereAnd = " AND ";
     }
     if (is_string($str_nome_mae)) {
         $where .= "{$whereAnd}nome_mae = '{$str_nome_mae}'";
         $whereAnd = " AND ";
     }
     if (is_string($str_nome_pai)) {
         $where .= "{$whereAnd}nome_pai = '{$str_nome_pai}'";
         $whereAnd = " AND ";
     }
     if (is_string($str_nome_conjuge)) {
         $where .= "{$whereAnd}nome_conjuge = '{$str_nome_conjuge}'";
         $whereAnd = " AND ";
     }
     if (is_string($str_nome_responsavel)) {
         $where .= "{$whereAnd}nome_responsavel = '{$str_nome_responsavel}'";
         $whereAnd = " AND ";
     }
     if (is_string($int_ref_cod_sistema)) {
         $where .= "{$whereAnd}ref_cod_sistema = '{$int_ref_cod_sistema}'";
         $whereAnd = " AND ";
     }
     if (is_string($str_justificativa_provisorio)) {
         $where .= "{$whereAnd}justificativa_provisorio = '{$str_justificativa_provisorio}'";
     }
     $int_cpf = idFederal2int($int_cpf);
     if (is_numeric($int_cpf)) {
         $where .= "{$whereAnd}cpf like '%{$int_cpf}%'";
     }
     if (is_array($arrayint_idisin)) {
         $ok = true;
         foreach ($arrayint_idisin as $val) {
             if (!is_numeric($val)) {
                 $ok = false;
             }
         }
         if ($ok) {
             $where .= "{$whereAnd}idpes IN ( " . implode(",", $arrayint_idisin) . " )";
             $whereAnd = " AND ";
         }
     }
     if (is_array($arrayint_idnotin)) {
         $ok = true;
         foreach ($arrayint_idnotin as $val) {
             if (!is_numeric($val)) {
                 $ok = false;
             }
         }
         if ($ok) {
             $where .= "{$whereAnd}idpes NOT IN ( " . implode(",", $arrayint_idnotin) . " )";
             $whereAnd = " AND ";
         }
     }
     if (is_string($str_data_nasc_ini)) {
         $dia = substr($str_data_nasc_ini, 8, 2);
         $mes = substr($str_data_nasc_ini, 5, 2);
         $ano = substr($str_data_nasc_ini, 0, 4);
         $operador = $str_data_nasc_fim ? ">=" : "=";
开发者ID:eritter-ti,项目名称:ieducar,代码行数:67,代码来源:clsFisica.inc.php

示例8: Editar

 function Editar()
 {
     @session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     @session_write_close();
     $obj_permissoes = new clsPermissoes();
     $obj_permissoes->permissao_cadastra(595, $this->pessoa_logada, 11, "educar_acervo_editora_lst.php");
     $this->cep = idFederal2int($this->cep);
     $obj = new clsPmieducarAcervoEditora($this->cod_acervo_editora, null, $this->pessoa_logada, $this->ref_idtlog, $this->ref_sigla_uf, $this->nm_editora, $this->cep, $this->cidade, $this->bairro, $this->logradouro, $this->numero, $this->telefone, $this->ddd_telefone, null, null, 1, $this->ref_cod_biblioteca);
     $editou = $obj->edita();
     if ($editou) {
         $this->mensagem .= "Edi&ccedil;&atilde;o efetuada com sucesso.<br>";
         header("Location: educar_acervo_editora_lst.php");
         die;
         return true;
     }
     $this->mensagem = "Edi&ccedil;&atilde;o n&atilde;o realizada.<br>";
     echo "<!--\nErro ao editar clsPmieducarAcervoEditora\nvalores obrigat&oacute;rios\nif( is_numeric( {$this->cod_acervo_editora} ) && is_numeric( {$this->pessoa_logada} ) )\n-->";
     return false;
 }
开发者ID:eritter-ti,项目名称:ieducar,代码行数:20,代码来源:educar_acervo_editora_cad.php

示例9: Gerar

 function Gerar()
 {
     @session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     session_write_close();
     $this->titulo = "Aluno - Listagem";
     // passa todos os valores obtidos no GET para atributos do objeto
     foreach ($_GET as $var => $val) {
         $this->{$var} = $val === "" ? null : $val;
     }
     $this->addCabecalhos(array("Nome", "CPF", "Nome Respons&aacute;vel", "CPF Respons&aacute;vel"));
     $this->campoOculto("campo1", $this->campo1);
     $this->campoOculto("campo3", $this->campo3);
     $this->campoOculto("campo4", $this->campo4);
     $this->campoTexto("nome_aluno", "Nome do Aluno", $this->nome_aluno, 20, 255, false);
     $this->campoCpf("cpf_aluno", "CPF do Aluno", $this->cpf_aluno, false);
     $this->campoTexto("nome_responsavel", "Nome do Respons&aacute;vel", $this->nome_responsavel, 20, false);
     $this->campoCpf("cpf_responsavel", "CPF do Respons&aacute;vel", $this->cpf_responsavel, false);
     // Paginador
     $this->limite = 10;
     $this->offset = $_GET["pagina_{$this->nome}"] ? $_GET["pagina_{$this->nome}"] * $this->limite - $this->limite : 0;
     $obj_aluno = new clsPmieducarAlunoCMF();
     $obj_aluno->setLimite($this->limite, $this->offset);
     $lista_aluno = $obj_aluno->lista($this->nome_aluno, idFederal2int($this->cpf_aluno), $this->nome_responsavel, idFederal2int($this->cpf_responsavel));
     $total = $obj_aluno->_total;
     if ($lista_aluno) {
         foreach ($lista_aluno as $registro) {
             if ($registro["cpf_aluno"]) {
                 $registro["cpf_aluno_"] = int2CPF($registro["cpf_aluno"]);
             }
             if ($registro["cpf_responsavel"]) {
                 $registro["cpf_responsavel_"] = int2CPF($registro["cpf_responsavel"]);
             }
             //						$script = " onclick=\"addVal1('{$_GET['campo3']}','{$registro['cpf_aluno']}'); addVal1('{$_GET['campo1']}','{$registro['cod_aluno']}');  addVal1('{$_SESSION['campo4']}','{$registro['cpf_aluno_']}'); fecha();\"";
             $script = " onclick=\"addVal1('{$this->campo3}','{$registro['cpf_aluno']}'); addVal1('{$this->campo1}','{$registro['cod_aluno']}');  addVal1('{$this->campo4}','{$registro['cpf_aluno_']}'); fecha();\"";
             $obj_det = "";
             $obj_cpf_det = "";
             if ($registro["idpes_responsavel"]) {
                 $obj_resp = new clsPessoa_($registro["idpes_responsavel"]);
                 $obj_det = $obj_resp->detalhe();
                 $obj_cpf = new clsFisica($registro["idpes_responsavel"]);
                 $obj_cpf_det = $obj_cpf->detalhe();
                 if ($obj_cpf_det["cpf"]) {
                     $obj_cpf_det["cpf"] = int2IdFederal($obj_cpf_det["cpf"]);
                 }
             }
             $this->addLinhas(array("<a href=\"javascript:void( 0 );\" {$script}>{$registro["nome_aluno"]}</a>", "<a href=\"javascript:void( 0 );\" {$script}>{$registro["cpf_aluno_"]}</a>", "<a href=\"javascript:void( 0 );\" {$script}>{$obj_det["nome"]}</a>", "<a href=\"javascript:void( 0 );\" {$script}>{$obj_cpf_det["cpf"]}</a>"));
         }
     }
     $this->addPaginador2("educar_pesquisa_aluno_lst2.php", $total, $_GET, $this->nome, $this->limite);
     //verifica se foi realizado pesquisa
     if (isset($_GET["nome_aluno"]) || isset($_GET["nome_responsavel"]) || isset($_GET["cpf_aluno"]) || isset($_GET["cpf_responsavel"])) {
         $ok = true;
     }
     //** Verificacao de permissao para cadastro
     $obj_permissao = new clsPermissoes();
     if ($obj_permissao->permissao_cadastra(578, $this->pessoa_logada, 7) && $ok) {
         $this->acao = "window.parent.document.getElementById(\"cpf_\").disabled = true;\n\t\t\t\t\t\t   window.parent.document.getElementById(\"cpf_\").value = \"\";\n\t\t\t\t\t\t   window.parent.document.getElementById(\"cpf_2\").disabled = true; \n\t\t\t\t\t\t   window.parent.document.getElementById(\"cpf_2\").value = \"\"; \n\t\t\t\t\t\t   window.parent.document.getElementById(\"ref_idpes\").value = \"\"; \n\t\t\t\t\t\t   window.parent.document.getElementById(\"cpf\").value = \"\";\n\t\t\t\t\t\t   window.parent.document.getElementById(\"cpf\").disabled = true;\n\t\t\t\t\t\t   window.parent.document.getElementById(\"cpf\").value = \"\";\n\t\t\t\t\t\t   window.parent.document.getElementById(\"bloqueado\").value = \"0\";\n\t\t\t\t\t\t   window.parent.passaPagina();\n\t\t\t\t\t\t   fecha1();";
         $this->nome_acao = "Novo";
     }
     //**
     $this->largura = "100%";
 }
开发者ID:secteofilandia,项目名称:ieducar,代码行数:63,代码来源:educar_pesquisa_aluno_lst2.php

示例10: Gerar

 function Gerar()
 {
     @session_start();
     $id_pessoa = $_SESSION['id_pessoa'];
     $this->nome = "form1";
     if ($_GET["campos"]) {
         $campos = str_replace("\\", null, $_GET["campos"]);
         $campos = unserialize($campos);
         $_SESSION['campos'] = $campos;
         unset($_GET["campos"]);
     } else {
         $campos = $_SESSION['campos'];
     }
     @session_write_close();
     $submit = false;
     $this->addCabecalhos(array("CEP", "Logradouro", "Bairro", "Cidade"));
     // Filtros de Busca
     $this->campoCep("cep", "CEP", "");
     $this->campoTexto("logradouro", "Logradouro", "", 30, 255);
     $this->campoTexto("cidade", "Cidade", "", 30, 255);
     if ($_GET["busca"] == "S") {
         $cep = @$_GET["cep"];
         $logradouro = @$_GET["logradouro"];
         $cidade = @$_GET["cidade"];
         $cep = idFederal2int($cep);
     }
     // Paginador
     $limite = 10;
     $iniciolimit = $_GET["pagina_{$this->nome}"] ? $_GET["pagina_{$this->nome}"] * $limite - $limite : 0;
     ################### BUSCA CIDADE E LOGRADOURO ##########
     if ($cidade && $logradouro) {
         $obj_mun = new clsMunicipio();
         $lista = $obj_mun->lista($cidade);
         $obj_logradouro = new clsLogradouro();
         $lista_logradouros = $obj_logradouro->lista(false, $logradouro, $lista[0]['idmun'], false, false);
         if ($lista_logradouros) {
             foreach ($lista_logradouros as $logradouro) {
                 $objCepLogBairro = new clsCepLogradouroBairro();
                 $listaCepLogBairro = $objCepLogBairro->lista($logradouro['idlog'], false, "", "idlog", $iniciolimit, $limite);
                 if ($listaCepLogBairro) {
                     foreach ($listaCepLogBairro as $id => $juncao) {
                         $det_cepLog = $juncao['idlog']->detalhe();
                         $det_log = $det_cepLog['idlog']->detalhe();
                         $det_TLog = $det_log['idtlog']->detalhe();
                         $det_bai = $juncao['idbai']->detalhe();
                         $det_mun = $det_bai['idmun']->detalhe();
                         $det_uf = $det_mun['sigla_uf']->detalhe();
                         $cep_formatado = int2CEP($det_cepLog['cep']);
                         //$funcao 	   = "set_campo_pesquisa( 'cidade', '".$det_mun["nome"]."', 'bairro', '".$det_bai["nome"]."', 'idbai', '".$det_bai["idbai"]."', 'logradouro', '".$det_log["nome"]."', 'idlog', '".$det_log["idlog"]."', 'cep', '".$det_cepLog['cep']."', 'cep_', '".$cep_formatado."', 'sigla_uf', '".$det_mun["sigla_uf"]."', 'idtlog', '".$det_TLog["idtlog"]."' )";
                         $funcao = "enviar( '{$det_cepLog["cep"]}', '{$det_bai["idbai"]}', '{$det_log["idlog"]}', '{$det_mun["nome"]}', '{$det_bai["nome"]}', '{$det_log["nome"]}', '{$det_uf["sigla_uf"]}', '{$det_TLog["idtlog"]}' )";
                         $this->addLinhas(array("<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$cep_formatado}</a>", "<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$det_log["nome"]}</a>", "<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$det_bai["nome"]}</a>", "<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$det_mun["nome"]}</a>"));
                         $total = $juncao['total'];
                     }
                 }
             }
         }
     }
     ######################################################################
     if ($cep || !$cep && !$logradouro && !$cidade) {
         $obj_cepLogBai = new clsCepLogradouroBairro();
         $lst_cepLogBai = $obj_cepLogBai->lista(false, $cep, false, "idlog", $iniciolimit, $limite);
         if ($lst_cepLogBai) {
             foreach ($lst_cepLogBai as $juncao) {
                 $det_bai = $juncao['idbai']->detalhe();
                 $det_mun = $det_bai['idmun']->detalhe();
                 $det_uf = $det_mun['sigla_uf']->detalhe();
                 $det_cepLog = $juncao['idlog']->detalhe();
                 $det_log = $det_cepLog['idlog']->detalhe();
                 $det_TLog = $det_log['idtlog']->detalhe();
                 $cep_formatado = int2CEP($det_cepLog["cep"]);
                 //$funcao 	   = "set_campo_pesquisa( 'cidade', '".$det_mun["nome"]."', 'bairro', '".$det_bai["nome"]."', 'idbai', '".$det_bai["idbai"]."', 'logradouro', '".$det_log["nome"]."', 'idlog', '".$det_log["idlog"]."', 'cep', '".$det_cepLog["cep"]."', 'cep_', '".$cep_formatado."', 'sigla_uf', '".$det_uf["sigla_uf"]."', 'idtlog', '".$det_TLog["idtlog"]."' )";
                 $funcao = "enviar( '{$det_cepLog["cep"]}', '{$det_bai["idbai"]}', '{$det_log["idlog"]}', '{$det_mun["nome"]}', '{$det_bai["nome"]}', '{$det_log["nome"]}', '{$det_uf["sigla_uf"]}', '{$det_TLog["idtlog"]}' )";
                 $this->addLinhas(array("<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$cep_formatado}</a>", "<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$det_log["nome"]}</a>", "<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$det_bai["nome"]}</a>", "<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$det_mun["nome"]}</a>"));
                 $total = $juncao['total'];
             }
         } else {
             $this->addLinhas(array("Não existe nenhum resultado a ser apresentado."));
         }
     } elseif ($logradouro) {
         $obj_logradouro = new clsLogradouro();
         $lista_logradouros = $obj_logradouro->lista(false, $logradouro, false, false, false);
         if ($lista_logradouros) {
             foreach ($lista_logradouros as $logradouro) {
                 $objCepLogBairro = new clsCepLogradouroBairro();
                 $listaCepLogBairro = $objCepLogBairro->lista($logradouro['idlog'], false, "", "idlog", $iniciolimit, $limite);
                 if ($listaCepLogBairro) {
                     foreach ($listaCepLogBairro as $id => $juncao) {
                         $det_cepLog = $juncao['idlog']->detalhe();
                         $det_log = $det_cepLog['idlog']->detalhe();
                         $det_TLog = $det_log['idtlog']->detalhe();
                         $det_bai = $juncao['idbai']->detalhe();
                         $det_mun = $det_bai['idmun']->detalhe();
                         $det_uf = $det_mun['sigla_uf']->detalhe();
                         $cep_formatado = int2CEP($det_cepLog['cep']);
                         //$funcao 	   = "set_campo_pesquisa( 'cidade', '".$det_mun["nome"]."', 'bairro', '".$det_bai["nome"]."', 'idbai', '".$det_bai["idbai"]."', 'logradouro', '".$det_log["nome"]."', 'idlog', '".$det_log["idlog"]."', 'cep', '".$det_cepLog['cep']."', 'cep_', '".$cep_formatado."', 'sigla_uf', '".$det_mun["sigla_uf"]."', 'idtlog', '".$det_TLog["idtlog"]."' )";
                         $funcao = "enviar( '{$det_cepLog["cep"]}', '{$det_bai["idbai"]}', '{$det_log["idlog"]}', '{$det_mun["nome"]}', '{$det_bai["nome"]}', '{$det_log["nome"]}', '{$det_uf["sigla_uf"]}', '{$det_TLog["idtlog"]}' )";
                         $this->addLinhas(array("<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$cep_formatado}</a>", "<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$det_log["nome"]}</a>", "<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$det_bai["nome"]}</a>", "<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$det_mun["nome"]}</a>"));
                         $total = $juncao['total'];
                     }
                 }
//.........这里部分代码省略.........
开发者ID:eritter-ti,项目名称:ieducar,代码行数:101,代码来源:pesquisa_cep_lst.php

示例11: Gerar


//.........这里部分代码省略.........
                 $registro['nm_bairro'] = $obj_bairro_det['nome'];
             }
         } else {
             $obj_endereco = new clsEnderecoExterno($this->ref_idpes);
             if ($obj_endereco_det = $obj_endereco->detalhe()) {
                 $registro['id_cep'] = $obj_endereco_det['cep'];
                 $registro['cidade'] = $obj_endereco_det['cidade'];
                 $registro['nm_bairro'] = $obj_endereco_det['bairro'];
                 $registro['nm_logradouro'] = $obj_endereco_det['logradouro'];
                 $registro['numero'] = $obj_endereco_det['numero'];
                 $registro['letra'] = $obj_endereco_det['letra'];
                 $registro['complemento'] = $obj_endereco_det['complemento'];
                 $registro['andar'] = $obj_endereco_det['andar'];
                 $registro['apartamento'] = $obj_endereco_det['apartamento'];
                 $registro['bloco'] = $obj_endereco_det['bloco'];
                 $registro['idtlog'] = $obj_endereco_det['idtlog']->detalhe();
                 $registro['idtlog'] = $registro['idtlog']['descricao'];
                 $det_uf = $obj_endereco_det['sigla_uf']->detalhe();
                 $registro['ref_sigla_uf'] = $det_uf['nome'];
                 $registro['cep_'] = int2CEP($registro['id_cep']);
             }
         }
     }
     // Adiciona a informação de zona de localização junto ao bairro do
     // endereço.
     $zona = App_Model_ZonaLocalizacao::getInstance();
     $registro['nm_bairro'] = sprintf('%s (Zona %s)', $registro['nm_bairro'], $zona->getValue($obj_endereco_det['zona_localizacao']));
     if ($registro['cod_aluno']) {
         $this->addDetalhe(array('Código Aluno', $registro['cod_aluno']));
     }
     if ($registro['nome_aluno']) {
         $this->addDetalhe(array('Nome Aluno', $registro['nome_aluno']));
     }
     if (idFederal2int($registro['cpf'])) {
         $this->addDetalhe(array('CPF', $registro['cpf']));
     }
     if ($registro['data_nasc']) {
         $this->addDetalhe(array('Data de Nascimento', $registro['data_nasc']));
     }
     /**
      * Analfabeto.
      */
     $this->addDetalhe(array('Analfabeto', $registro['analfabeto'] == 0 ? 'Não' : 'Sim'));
     if ($registro['sexo']) {
         $this->addDetalhe(array('Sexo', $registro['sexo']));
     }
     if ($registro['ideciv']) {
         $this->addDetalhe(array('Estado Civil', $registro['ideciv']));
     }
     if ($registro['id_cep']) {
         $this->addDetalhe(array('CEP', $registro['cep_']));
     }
     if ($registro['ref_sigla_uf']) {
         $this->addDetalhe(array('UF', $registro['ref_sigla_uf']));
     }
     if ($registro['cidade']) {
         $this->addDetalhe(array('Cidade', $registro['cidade']));
     }
     if ($registro['nm_bairro']) {
         $this->addDetalhe(array('Bairro', $registro['nm_bairro']));
     }
     if ($registro['nm_logradouro']) {
         $logradouro = '';
         if ($registro['idtlog']) {
             $logradouro .= $registro['idtlog'] . ' ';
         }
开发者ID:eritter-ti,项目名称:ieducar,代码行数:67,代码来源:educar_aluno_det.php

示例12: Gerar

 function Gerar()
 {
     @session_start();
     $id_pessoa = $_SESSION['id_pessoa'];
     $this->nome = "form1";
     $show = $_REQUEST['show'];
     $this->campoOculto("show", $show);
     if ($show == "todos") {
         $show = false;
     } else {
         $show = 1;
     }
     $this->chave_campo = $_GET['chave_campo'];
     if ($_GET["campos"]) {
         $parametros = new clsParametrosPesquisas();
         $parametros->deserializaCampos($_GET["campos"]);
         $_SESSION['campos'] = $parametros->geraArrayComAtributos();
         unset($_GET["campos"]);
     } else {
         $parametros = new clsParametrosPesquisas();
         $parametros->preencheAtributosComArray($_SESSION['campos']);
     }
     @session_write_close();
     $submit = false;
     foreach ($_GET as $key => $value) {
         $this->{$key} = $value;
     }
     if ($parametros->getPessoa() == 'F') {
         $this->addCabecalhos(array("CPF", "Nome"));
         // Filtros de Busca
         $this->campoTexto("campo_busca", "Pessoa", $this->campo_busca, 50, 255, false, false, false, "Código/Nome");
         $this->campoCpf("cpf", "CPF", $this->cpf ? int2CPF(idFederal2int($this->cpf)) : "");
         $chave_busca = @$_GET['campo_busca'];
         $cpf = @$_GET['cpf'];
         $busca = @$_GET['busca'];
         // Paginador
         $limite = 10;
         $iniciolimit = $_GET["pagina_{$this->nome}"] ? $_GET["pagina_{$this->nome}"] * $limite - $limite : 0;
         if (is_numeric($this->chave_campo)) {
             $chave = "[{$this->chave_campo}]";
         } else {
             $chave = "";
         }
         if ($busca == 'S') {
             if ($parametros->getPessoaNovo() == 'S') {
                 if ($parametros->getPessoaTela() == "window") {
                     $this->acao = "set_campo_pesquisa( \"" . $parametros->getPessoaCampo() . "\", \"0\", \"submit\" )";
                     $this->nome_acao = "Novo";
                 } elseif ($parametros->getPessoaTela() == "frame") {
                     $this->acao = "go( \"pesquisa_pessoa_cad.php?pessoa=F&cod=0&ref_cod_sistema=" . $parametros->getCodSistema() . "&pessoa_cpf=" . $parametros->getPessoaCPF() . "\" )";
                     $this->nome_acao = "Novo";
                 }
             }
             if (is_numeric($chave_busca)) {
                 $obj_pessoa = new clsPessoaFisica();
                 $lst_pessoa = $obj_pessoa->lista(null, $cpf ? idFederal2int($cpf) : null, $iniciolimit, $limite, false, $parametros->getCodSistema(), $chave_busca);
             } else {
                 $obj_pessoa = new clsPessoaFisica();
                 $lst_pessoa = $obj_pessoa->lista($chave_busca, $cpf ? idFederal2int($cpf) : null, $iniciolimit, $limite, false, $parametros->getCodSistema());
             }
         } else {
             $obj_pessoa = new clsPessoaFisica();
             $lst_pessoa = $obj_pessoa->lista(null, null, $iniciolimit, $limite, false, $parametros->getCodSistema());
         }
         if ($lst_pessoa) {
             foreach ($lst_pessoa as $pessoa) {
                 $funcao = " set_campo_pesquisa(";
                 $virgula = "";
                 $cont = 0;
                 $pessoa["cpf"] = is_numeric($pessoa["cpf"]) ? int2CPF($pessoa["cpf"]) : null;
                 foreach ($parametros->getCampoNome() as $campo) {
                     if ($parametros->getCampoTipo($cont) == "text") {
                         $funcao .= "{$virgula} '{$campo}{$chave}', '{$pessoa[$parametros->getCampoValor($cont)]}'";
                         $virgula = ",";
                     } elseif ($parametros->getCampoTipo($cont) == "select") {
                         $funcao .= "{$virgula} '{$campo}{$chave}', '{$pessoa[$parametros->getCampoIndice($cont)]}', '{$pessoa[$parametros->getCampoValor($cont)]}'";
                         $virgula = ",";
                     }
                     $cont++;
                 }
                 if ($parametros->getSubmit()) {
                     $funcao .= "{$virgula} 'submit' )";
                 } else {
                     $funcao .= " )";
                 }
                 if ($parametros->getPessoaEditar() == "S") {
                     if ($parametros->getPessoaTela() == "frame") {
                         $this->addLinhas(array("<a href='pesquisa_pessoa_cad.php?pessoa=F&cod={$pessoa["idpes"]}&ref_cod_sistema=" . $parametros->getCodSistema() . "'>{$pessoa["cpf"]}</a>", "<a href='pesquisa_pessoa_cad.php?pessoa=F&cod={$pessoa["idpes"]}&ref_cod_sistema=" . $parametros->getCodSistema() . "'>{$pessoa["nome"]}</a>"));
                     } else {
                         $this->addLinhas(array("<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$pessoa["cpf"]}</a>", "<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$pessoa["nome"]}</a>"));
                     }
                 } else {
                     $this->addLinhas(array("<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$pessoa["cpf"]}</a>", "<a href='javascript:void( 0 );' onclick=\"javascript:{$funcao}\">{$pessoa["nome"]}</a>"));
                 }
                 $total = $pessoa['total'];
             }
         } else {
             $this->addLinhas(array("Não existe nenhum resultado a ser apresentado."));
         }
     } elseif ($parametros->getPessoa() == 'J') {
//.........这里部分代码省略.........
开发者ID:secteofilandia,项目名称:ieducar,代码行数:101,代码来源:pesquisa_pessoa_lst.php

示例13: Editar

 function Editar()
 {
     @session_start();
     $pessoaFj = $_SESSION['id_pessoa'];
     $parametros = new clsParametrosPesquisas();
     if ($this->cep_) {
         $this->cep = idFederal2int($this->cep_);
     }
     if ($_SESSION["campos"]) {
         $parametros->preencheAtributosComArray($_SESSION['campos']);
     }
     session_write_close();
     if ($_POST["pessoa"] == "F") {
         if ($this->id_federal) {
             $this->id_federal = idFederal2int($this->id_federal);
             $objCPF = 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->id_federal);
             $detCPF = $objCPF->detalhe();
             if ($detCPF) {
                 if ($detCPF["idpes"] != $this->cod_pessoa_fj) {
                     $this->mensagem = "CPF j&aacute; cadastrado.";
                     $this->id_federal = false;
                     return false;
                 }
             }
         }
         $this->data_nasc = dataToBanco($this->data_nasc);
         $objPessoa = new clsPessoa_($this->cod_pessoa_fj, $this->nm_pessoa, false, $this->p_http, false, $pessoaFj, date("Y-m-d H:i:s", time()), $this->email);
         $objPessoa->edita();
         if ($this->id_federal) {
             $this->id_federal = idFederal2Int($this->id_federal);
             $objFisica = new clsFisica($this->cod_pessoa_fj, $this->data_nasc, $this->sexo, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, "NULL", $this->id_federal);
             $objFisica->edita();
         } else {
             $objFisica = new clsFisica($this->cod_pessoa_fj, $this->data_nasc, $this->sexo, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, $this->ref_cod_sistema, $this->id_federal);
             $objFisica->edita();
         }
         $objTelefone = new clsPessoaTelefone($this->cod_pessoa_fj, 1, $this->telefone_1, $this->ddd_telefone_1);
         if ($objTelefone->detalhe()) {
             $objTelefone->edita();
         } else {
             $objTelefone->cadastra();
         }
         $objTelefone = new clsPessoaTelefone($this->cod_pessoa_fj, 2, $this->telefone_2, $this->ddd_telefone_2);
         if ($objTelefone->detalhe()) {
             $objTelefone->edita();
         } else {
             $objTelefone->cadastra();
         }
         $objTelefone = new clsPessoaTelefone($this->cod_pessoa_fj, 3, $this->telefone_mov, $this->ddd_telefone_mov);
         if ($objTelefone->detalhe()) {
             $objTelefone->edita();
         } else {
             $objTelefone->cadastra();
         }
         $objTelefone = new clsPessoaTelefone($this->cod_pessoa_fj, 4, $this->telefone_fax, $this->ddd_telefone_fax);
         if ($objTelefone->detalhe()) {
             $objTelefone->edita();
         } else {
             $objTelefone->cadastra();
         }
         $objEndereco = new clsPessoaEndereco($this->cod_pessoa_fj);
         $detEndereco = $objEndereco->detalhe();
         $objEndereco2 = new clsPessoaEndereco($this->cod_pessoa_fj, $this->cep, $this->idlog, $this->idbai, $this->numero, $this->complemento, false, $this->letra, $this->bloco, $this->apartamento, $this->andar);
         if ($detEndereco && $this->cep && $this->idlog && $this->idbai) {
             $objEndereco2->edita();
         } elseif ($this->cep && $this->idlog && $this->idbai) {
             $objEndereco2->cadastra();
             $objEnderecoExterno = new clsEnderecoExterno($this->cod_pessoa_fj);
             if ($objEnderecoExterno->detalhe()) {
                 $objEnderecoExterno->exclui();
             }
         } elseif ($detEndereco) {
             $objEndereco2->exclui();
             $this->cep = $this->cep;
             $objEnderecoExterno = new clsEnderecoExterno($this->cod_pessoa_fj);
             $detEnderecoExterno = $objEnderecoExterno->detalhe();
             $objEnderecoExterno2 = new clsEnderecoExterno($this->cod_pessoa_fj, "1", $this->idtlog, $this->logradouro, $this->numero, $this->letra, $this->complemento, $this->bairro, $this->cep, $this->cidade, $this->sigla_uf, false, $this->bloco, $this->apartamento, $this->andar);
             if ($detEnderecoExterno) {
                 $objEnderecoExterno2->edita();
                 if ($detEndereco) {
                     $objEndereco->exclui();
                 }
             } else {
                 $objEnderecoExterno2->cadastra();
                 if ($detEndereco) {
                     $objEndereco->exclui();
                 }
             }
         } else {
             $this->cep = idFederal2int($this->cep);
             $objEnderecoExterno = new clsEnderecoExterno($this->cod_pessoa_fj);
             $objEnderecoExterno2 = new clsEnderecoExterno($this->cod_pessoa_fj, "1", $this->idtlog, $this->logradouro, $this->numero, $this->letra, $this->complemento, $this->bairro, $this->cep, $this->cidade, $this->sigla_uf, false, $this->bloco, $this->apartamento, $this->andar);
             if ($objEnderecoExterno->detalhe()) {
                 $objEnderecoExterno2->edita();
             } else {
                 $objEnderecoExterno2->cadastra();
                 if ($detEndereco) {
                     $objEndereco->exclui();
                 }
             }
//.........这里部分代码省略.........
开发者ID:secteofilandia,项目名称:ieducar,代码行数:101,代码来源:pesquisa_pessoa_cad.php

示例14: header

 * @since     Arquivo disponível desde a versão 1.0.0
 * @version   $Id$
 */
header('Content-type: text/xml');
require_once 'include/clsBanco.inc.php';
require_once 'include/funcoes.inc.php';
require_once 'include/pmieducar/geral.inc.php';
if ($_GET['cpf'] || $_GET['idpes']) {
    $xml = '<?xml version="1.0" encoding="ISO-8859-15"?>' . PHP_EOL;
    $xml .= '<query xmlns="sugestoes">' . PHP_EOL;
    $xml .= '<dados>' . PHP_EOL;
    $cpf = $_GET['cpf'];
    if ($_GET['idpes']) {
        $ref_idpes = $_GET['idpes'];
    } else {
        $cpf = idFederal2int($_GET['cpf']);
        $obj_pessoa_fisica = new clsPessoaFisica(NULL, $cpf);
        $lst_pessoa_fisica = $obj_pessoa_fisica->lista(NULL, $cpf);
        if (!$lst_pessoa_fisica) {
            echo $xml . '</dados></query>';
            die;
        }
        $ref_idpes = $lst_pessoa_fisica[0]['idpes'];
        $xml .= sprintf('<ref_idpes>%d</ref_idpes>', $ref_idpes) . PHP_EOL;
        $xml .= sprintf('<cpf>%s</cpf>', $cpf) . PHP_EOL;
    }
    if ($cod_aluno) {
        $obj_matricula = new clsPmieducarMatricula();
        $lst_matricula = $obj_matricula->lista(NULL, NULL, NULL, NULL, NULL, NULL, $cod_aluno);
    }
    if (!empty($ref_idpes)) {
开发者ID:eritter-ti,项目名称:ieducar,代码行数:31,代码来源:educar_aluno_cad_xml.php

示例15: Editar

 function Editar()
 {
     @session_start();
     $pessoaFj = $_SESSION['id_pessoa'];
     session_write_close();
     $obj = new clsGrupoModerador($this->cod_pessoa_fj, $this->cod_grupo);
     $detalhe = $obj->detalhe();
     if ($detalhe && $detalhe['ativo'] == 1) {
         header("Location: otopic_meus_grupos_det.php?cod_grupo={$this->cod_grupo}");
     }
     $objPessoa = new clsPessoa_($this->cod_pessoa_fj, $this->p_nm_pessoa, false, $this->http, false, $pessoaFj, date("Y-m-d H:i:s", time()), $this->email);
     $objPessoa->edita();
     $objFisica = new clsFisica($this->cod_pessoa_fj, false, $this->sexo);
     $objFisica->edita();
     $objTelefone = new clsPessoaTelefone($this->cod_pessoa_fj, 1, $this->telefone_1, $this->ddd_telefone_1);
     $objTelefone->cadastra();
     $objTelefone = new clsPessoaTelefone($this->cod_pessoa_fj, 2, $this->telefone_2, $this->ddd_telefone_2);
     $objTelefone->cadastra();
     $objTelefone = new clsPessoaTelefone($this->cod_pessoa_fj, 3, $this->telefone_mov, $this->ddd_telefone_mov);
     $objTelefone->cadastra();
     $objTelefone = new clsPessoaTelefone($this->cod_pessoa_fj, 4, $this->telefone_fax, $this->ddd_telefone_fax);
     $objTelefone->cadastra();
     if ($this->cep && $this->idbai && $this->idlog) {
         $objEndereco = new clsPessoaEndereco($this->cod_pessoa_fj);
         $objEndereco2 = new clsPessoaEndereco($this->cod_pessoa_fj, $this->cep, $this->idlog, $this->idbai, $this->numero, $this->complemento, false, $this->letra, $this->bloco, $this->apartamento, $this->andar);
         if ($objEndereco->detalhe()) {
             $objEndereco2->edita();
         } else {
             $objEndereco2->cadastra();
         }
     } else {
         $this->cep_ = idFederal2int($this->cep_);
         $objEnderecoExterno = new clsEnderecoExterno($this->cod_pessoa_fj);
         $objEnderecoExterno2 = new clsEnderecoExterno($this->cod_pessoa_fj, "1", $this->idtlog, $this->logradouro, $this->numero, $this->letra, $this->complemento, $this->bairro, $this->cep_, $this->cidade, $this->sigla_uf, false, $this->bloco, $this->apartamento, $this->andar);
         if ($objEnderecoExterno->detalhe()) {
             $objEnderecoExterno2->edita();
         } else {
             $objEnderecoExterno2->cadastra();
         }
     }
     $obj = new clsGrupoPessoa($this->cod_pessoa_fj, $this->cod_grupo);
     if (!$obj->detalhe()) {
         $obj = new clsGrupoPessoa($this->cod_pessoa_fj, $this->cod_grupo, $pessoaFj, false, $this->cod_grupo);
         if ($obj->cadastra()) {
             header("Location: otopic_meus_grupos_det.php?cod_grupo={$this->cod_grupo}");
         }
     } else {
         $obj = new clsGrupoPessoa($this->cod_pessoa_fj, $this->cod_grupo, $pessoaFj, false, $this->cod_grupo, false, 1);
         if ($obj->edita()) {
             header("Location: otopic_meus_grupos_det.php?cod_grupo={$this->cod_grupo}");
         }
     }
     return true;
 }
开发者ID:secteofilandia,项目名称:ieducar,代码行数:54,代码来源:otopic_membros_cad.php


注:本文中的idFederal2int函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。