SetTitulo( "{$this->_instituicao} Licitações!" ); $this->processoAp = "137"; } } class indice extends clsCadastro { var $cod_pessoa_fj; var $nm_pessoa; function Inicializar() { @session_start(); $this->id_pessoa = $_SESSION['id_pessoa']; session_write_close(); $retorno = "Novo"; if (@$_GET['cod_pessoa_fj']) { $this->fexcluir = true; $this->cod_pessoa_fj = @$_GET['cod_pessoa_fj']; $objPessoa = new clsPessoaFisica(); $db = new clsBanco(); list( $this->nome_pessoa ) = $objPessoa->queryRapida( $this->cod_pessoa_fj, "nome" ); $retorno = "Editar"; } if( isset( $_POST["cod_pessoa_fj"] ) ) { $this->cod_pessoa_fj = $_POST["cod_pessoa_fj"]; $this->nm_pessoa = $_POST["nm_pessoa"]; } $this->url_cancelar = "compras_funcionarios_lst.php"; $this->nome_url_cancelar = "Cancelar"; return $retorno; } function Gerar() { $lista = array(); if( $this->nome_pessoa ) { $lista[$this->cod_pessoa_fj] = $this->nome_pessoa; } else { $lista[""] = "Pesquise a pessoa clicando no botão ao lado"; } $parametros = new clsParametrosPesquisas(); $parametros->setSubmit( 0 ); $parametros->adicionaCampoSelect( "ref_ref_cod_pessoa_fj", "ref_cod_pessoa_fj", "nome" ); $this->campoListaPesq( "ref_ref_cod_pessoa_fj", "Funcionario", $lista, $this->ref_ref_cod_pessoa_fj, "pesquisa_funcionario_lst.php", "", false, "", "", null, null, "", false, $parametros->serializaCampos() ); } function Novo() { $db = new clsBanco(); $db->Consulta( "INSERT INTO compras_funcionarios (ref_ref_cod_pessoa_fj) VALUES ('{$this->ref_ref_cod_pessoa_fj}')" ); echo ""; return true; } function Editar() { return false; } function Excluir() { $db = new clsBanco(); $db->Consulta( "DELETE FROM compras_funcionarios WHERE ref_ref_cod_pessoa_fj = '{$this->ref_ref_cod_pessoa_fj}'" ); echo ""; return false; } } $pagina = new clsIndex(); $miolo = new indice(); $pagina->addForm( $miolo ); $pagina->MakeAll(); ?>