function create_pdf_submit_file() { global $dd, $include, $ged; $destino = 'document/' . date("Y") . '/' . date("m") . '/'; $fdestino .= $this->protocolo_submission . '-' . substr(md5($this->protocolo_submission . date("Ymdhis")), 0, 5) . '-' . $this->versao . '-project.pdf'; $destino = $destino . $fdestino; $dd[0] = $this->protocolo_submission; require "submit_pdf_projeto.php"; $ged = new ged(); $ged->tabela = 'cep_ged_documento'; $ged->protocol = $this->protocolo_submission; $ged->file_type = 'PROJ'; $ged->file_name = 'Proposal_' . $this->protocolo . '_v' . $this->versao . '.pdf'; $ged->file_data = date("Ymd"); $ged->file_time = date("H:i"); $ged->file_saved = $destino; $ged->file_size = filesize($destino); $ged->save(); return $destino; }
/****/ if (strlen($dd[91]) > 0) { $_SESSION['proj_page'] = $dd[91]; redirecina('submit.php?time' . date("dmYhis")); } $pag_id = round($_SESSION['proj_id']); $pag_page = round($_SESSION['proj_page']); //if ($pag_id == 0) { $pag_page = 1; } //if ($pag_page == 0) { $pag_page = 1; } $pag_id = $_SESSION['proj_id']; $dd[0] = $pag_id; $protocolo = strzero($dd[0], 7); echo '<H2>' . msg('submission_end_title') . '</h2>'; echo '<BR><BR>'; /* Checa diretorio de submissão do pdf */ $ged = new ged(); $ged->dir('document'); $ged->dir('document/' . date("Y")); $ged->dir('document/' . date("Y") . '/' . date("m")); $proj->le($dd[0]); /* Step 1 */ $ok = $cep->cadastra_protocolo($protocolo, '[]' . $proj->doc_1_titulo, $autor); if ($ok == 1) { /* Step 2 */ $protocolo_cep = $cep->recupera_protocolo_submissao($protocolo, '1'); $cep->protocolo = $protocolo_cep; $cep->protocolo_submission = $protocolo; $cep->versao = 1; /* Step 3 */ $cep->limpa_projetos_anteriores(); /* Step 4 */