SetTitulo( "{$this->_instituicao} i-Educar - Obras" ); $this->processoAp = "598"; $this->addEstilo('localizacaoSistema'); } } class indice extends clsDetalhe { /** * Titulo no topo da pagina * * @var int */ var $titulo; var $cod_acervo; var $ref_cod_exemplar_tipo; var $ref_cod_acervo; var $ref_usuario_exc; var $ref_usuario_cad; var $ref_cod_acervo_colecao; var $ref_cod_acervo_idioma; var $ref_cod_acervo_editora; var $sub_titulo; var $cdu; var $cutter; var $volume; var $num_edicao; var $ano; var $num_paginas; var $isbn; var $data_cadastro; var $data_exclusao; var $ativo; var $ref_cod_biblioteca; function Gerar() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $this->titulo = "Obras - Detalhe"; $this->addBanner( "imagens/nvp_top_intranet.jpg", "imagens/nvp_vert_intranet.jpg", "Intranet" ); $this->cod_acervo=$_GET["cod_acervo"]; $tmp_obj = new clsPmieducarAcervo( $this->cod_acervo ); $registro = $tmp_obj->detalhe(); if( ! $registro ) { header( "location: educar_acervo_lst.php" ); die(); } if( class_exists( "clsPmieducarBiblioteca" ) ) { $obj_ref_cod_biblioteca = new clsPmieducarBiblioteca( $registro["ref_cod_biblioteca"] ); $det_ref_cod_biblioteca = $obj_ref_cod_biblioteca->detalhe(); $registro["ref_cod_biblioteca"] = $det_ref_cod_biblioteca["nm_biblioteca"]; if( class_exists( "clsPmieducarInstituicao" ) ) { $registro["ref_cod_instituicao"] = $det_ref_cod_biblioteca["ref_cod_instituicao"]; $obj_ref_cod_instituicao = new clsPmieducarInstituicao( $registro["ref_cod_instituicao"] ); $det_ref_cod_instituicao = $obj_ref_cod_instituicao->detalhe(); $registro["ref_cod_instituicao"] = $det_ref_cod_instituicao["nm_instituicao"]; } else { $registro["ref_cod_instituicao"] = "Erro na geracao"; echo ""; } if( class_exists( "clsPmieducarEscola" ) ) { $registro["ref_cod_escola"] = $det_ref_cod_biblioteca["ref_cod_escola"]; $obj_ref_cod_escola = new clsPmieducarEscola( $registro["ref_cod_escola"] ); $det_ref_cod_escola = $obj_ref_cod_escola->detalhe(); $idpes = $det_ref_cod_escola["ref_idpes"]; if ($idpes) { $obj_escola = new clsPessoaJuridica( $idpes ); $obj_escola_det = $obj_escola->detalhe(); $registro["ref_cod_escola"] = $obj_escola_det["fantasia"]; } else { $obj_escola = new clsPmieducarEscolaComplemento( $registro["ref_cod_escola"] ); $obj_escola_det = $obj_escola->detalhe(); $registro["ref_cod_escola"] = $obj_escola_det["nm_escola"]; } } } else { $registro["ref_cod_biblioteca"] = "Erro na geracao"; echo ""; } if( class_exists( "clsPmieducarExemplarTipo" ) ) { $obj_ref_cod_exemplar_tipo = new clsPmieducarExemplarTipo( $registro["ref_cod_exemplar_tipo"] ); $det_ref_cod_exemplar_tipo = $obj_ref_cod_exemplar_tipo->detalhe(); $registro["ref_cod_exemplar_tipo"] = $det_ref_cod_exemplar_tipo["nm_tipo"]; } else { $registro["ref_cod_exemplar_tipo"] = "Erro na geracao"; echo ""; } if( class_exists( "clsPmieducarAcervo" ) ) { $obj_ref_cod_acervo = new clsPmieducarAcervo( $registro["ref_cod_acervo"] ); $det_ref_cod_acervo = $obj_ref_cod_acervo->detalhe(); $registro["ref_cod_acervo"] = $det_ref_cod_acervo["titulo"]; } else { $registro["ref_cod_acervo"] = "Erro na geracao"; echo ""; } if( class_exists( "clsPmieducarAcervoColecao" ) ) { $obj_ref_cod_acervo_colecao = new clsPmieducarAcervoColecao( $registro["ref_cod_acervo_colecao"] ); $det_ref_cod_acervo_colecao = $obj_ref_cod_acervo_colecao->detalhe(); $registro["ref_cod_acervo_colecao"] = $det_ref_cod_acervo_colecao["nm_colecao"]; } else { $registro["ref_cod_acervo_colecao"] = "Erro na geracao"; echo ""; } if( class_exists( "clsPmieducarAcervoIdioma" ) ) { $obj_ref_cod_acervo_idioma = new clsPmieducarAcervoIdioma( $registro["ref_cod_acervo_idioma"] ); $det_ref_cod_acervo_idioma = $obj_ref_cod_acervo_idioma->detalhe(); $registro["ref_cod_acervo_idioma"] = $det_ref_cod_acervo_idioma["nm_idioma"]; } else { $registro["ref_cod_acervo_idioma"] = "Erro na geracao"; echo ""; } if( class_exists( "clsPmieducarAcervoEditora" ) ) { $obj_ref_cod_acervo_editora = new clsPmieducarAcervoEditora( $registro["ref_cod_acervo_editora"] ); $det_ref_cod_acervo_editora = $obj_ref_cod_acervo_editora->detalhe(); $registro["ref_cod_acervo_editora"] = $det_ref_cod_acervo_editora["nm_editora"]; } else { $registro["ref_cod_acervo_editora"] = "Erro na geracao"; echo ""; } $obj_permissoes = new clsPermissoes(); $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada); if ($nivel_usuario == 1) { if( $registro["ref_cod_instituicao"] ) { $this->addDetalhe( array( "Instituição", "{$registro["ref_cod_instituicao"]}") ); } } if ($nivel_usuario == 1 || $nivel_usuario == 2) { if( $registro["ref_cod_escola"] ) { $this->addDetalhe( array( "Escola", "{$registro["ref_cod_escola"]}") ); } } if( $registro["ref_cod_biblioteca"] ) { $this->addDetalhe( array( "Biblioteca", "{$registro["ref_cod_biblioteca"]}") ); } if( $registro["titulo"] ) { $this->addDetalhe( array( "Título", "{$registro["titulo"]}") ); } if( $registro["sub_titulo"] ) { $this->addDetalhe( array( "Subtítulo", "{$registro["sub_titulo"]}") ); } if( $registro["ref_cod_exemplar_tipo"] ) { $this->addDetalhe( array( "Tipo", "{$registro["ref_cod_exemplar_tipo"]}") ); } if( $registro["ref_cod_acervo"] ) { $this->addDetalhe( array( "Obra Referência", "{$registro["ref_cod_acervo"]}") ); } if( $registro["ref_cod_acervo_colecao"] ) { $this->addDetalhe( array( "Coleção", "{$registro["ref_cod_acervo_colecao"]}") ); } if( $registro["ref_cod_acervo_idioma"] ) { $this->addDetalhe( array( "Idioma", "{$registro["ref_cod_acervo_idioma"]}") ); } if( $registro["ref_cod_acervo_editora"] ) { $this->addDetalhe( array( "Editora", "{$registro["ref_cod_acervo_editora"]}") ); } $obj = new clsPmieducarAcervoAcervoAutor(); $obj->setOrderby("principal DESC"); $lst = $obj->lista( null,$this->cod_acervo ); if ($lst) { $tabela = "
| Nome | Principal |
| {$nm_autor} | {$principal} |