function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; $this->ref_cod_cliente = $_SESSION['emprestimo']['cod_cliente']; $this->ref_cod_biblioteca = $_SESSION['emprestimo']['ref_cod_biblioteca']; @session_write_close(); $this->cod_emprestimo = $_GET["cod_emprestimo"]; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(610, $this->pessoa_logada, 11, "educar_exemplar_emprestimo_lst.php"); if (is_numeric($this->cod_emprestimo)) { $obj = new clsPmieducarExemplarEmprestimo($this->cod_emprestimo); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } } } $this->url_cancelar = "educar_exemplar_emprestimo_lst.php"; $this->nome_url_cancelar = "Cancelar"; return $retorno; }
function Inicializar() { $retorno = "Novo"; @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; @session_write_close(); $this->cod_emprestimo = $_GET["cod_emprestimo"]; $obj_permissoes = new clsPermissoes(); $obj_permissoes->permissao_cadastra(628, $this->pessoa_logada, 11, "educar_exemplar_devolucao_lst.php"); if (is_numeric($this->cod_emprestimo)) { $obj = new clsPmieducarExemplarEmprestimo($this->cod_emprestimo); $registro = $obj->detalhe(); if ($registro) { foreach ($registro as $campo => $val) { // passa todos os valores obtidos no registro para atributos do objeto $this->{$campo} = $val; } } } $this->url_cancelar = "educar_exemplar_devolucao_lst.php"; $this->nome_url_cancelar = "Cancelar"; $localizacao = new LocalizacaoSistema(); $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "Início", "educar_biblioteca_index.php" => "i-Educar - Biblioteca", "" => "Realizar devolução")); $this->enviaLocalizacao($localizacao->montar()); return $retorno; }
function Gerar() { @session_start(); $this->pessoa_logada = $_SESSION['id_pessoa']; session_write_close(); $this->titulo = "Exemplar Empréstimo - Detalhe"; $this->addBanner("imagens/nvp_top_intranet.jpg", "imagens/nvp_vert_intranet.jpg", "Intranet"); $this->cod_emprestimo = $_GET["cod_emprestimo"]; $tmp_obj = new clsPmieducarExemplarEmprestimo($this->cod_emprestimo); $registro = $tmp_obj->detalhe(); if (!$registro) { header("location: educar_exemplar_emprestimo_lst.php"); die; } if (class_exists("clsPmieducarExemplar")) { $obj_ref_cod_exemplar = new clsPmieducarExemplar($registro["ref_cod_exemplar"]); $det_ref_cod_exemplar = $obj_ref_cod_exemplar->detalhe(); if (class_exists("clsPmieducarAcervo")) { $acervo = $det_ref_cod_exemplar["ref_cod_acervo"]; $obj_acervo = new clsPmieducarAcervo($acervo); $det_acervo = $obj_acervo->detalhe(); $titulo_exemplar = $det_acervo["titulo"]; } } else { $registro["ref_cod_exemplar"] = "Erro na geracao"; echo "<!--\nErro\nClasse nao existente: clsPmieducarExemplar\n-->"; } if (class_exists("clsPmieducarCliente")) { $obj_cliente = new clsPmieducarCliente($registro["ref_cod_cliente"]); $det_cliente = $obj_cliente->detalhe(); $ref_idpes = $det_cliente["ref_idpes"]; $obj_pessoa = new clsPessoa_($ref_idpes); $det_pessoa = $obj_pessoa->detalhe(); $registro["ref_cod_cliente"] = $det_pessoa["nome"]; } else { $registro["ref_cod_cliente"] = "Erro na geracao"; echo "<!--\nErro\nClasse nao existente: clsPmieducarCliente\n-->"; } if ($registro["ref_cod_cliente"]) { $this->addDetalhe(array("Cliente", "{$registro["ref_cod_cliente"]}")); } if ($titulo_exemplar) { $this->addDetalhe(array("Obra", "{$titulo_exemplar}")); } if ($registro["ref_cod_exemplar"]) { $this->addDetalhe(array("Tombo", "{$registro["ref_cod_exemplar"]}")); } if ($registro["data_retirada"]) { $this->addDetalhe(array("Data Retirada", dataFromPgToBr($registro["data_retirada"], "d/m/Y"))); } if ($registro["valor_multa"]) { $this->addDetalhe(array("Valor Multa", "{$registro["valor_multa"]}")); } $obj_permissoes = new clsPermissoes(); if ($obj_permissoes->permissao_cadastra(610, $this->pessoa_logada, 11)) { $this->url_novo = "educar_exemplar_emprestimo_login_cad.php"; } $this->url_cancelar = "educar_exemplar_emprestimo_lst.php"; $this->largura = "100%"; }