</h2> <div class="box-icon"></div> </div> <div class="box-content"> <form class="form-horizontal" method="post" action="finaliza.php?id=<?php echo $cadastro->getId(); ?> " enctype="multipart/form-data"> <fieldset> <div class="control-group"> <label class="control-label"><b>Disciplina</b></label> <div class="controls"> <?php echo $cadastro->getDisciplina(); ?> </div> </div> <div class="control-group"> <label class="control-label"><b>Arquivo</b></label> <div class="controls"> <?php echo $cadastro->getNomeArquivo(); ?> - <?php echo $arquivo_atual; ?> </div> </div>
include_once '../Cadastro.class.php'; checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true'); include_once '../../head.php'; if (!in_array(282, listarAcesso())) { echo '<script language= "JavaScript">location.href="index.php";</script>'; } $cadastro = new Cadastro(); $DAO = new CadastroDAO(); $cadastro->setId($_GET['id']); $resultado = $DAO->Listar("SELECT \t\r\n\t\t\t\t\t\t\t\t\tA.id, \r\n\t\t\t\t\t\t\t\t\tSUBSTRING(B.nome_arquivo, 1, 35) AS nome_arquivo, \r\n\t\t\t\t\t\t\t\t\tA.traducao,\r\n\t\t\t\t\t\t\t\t\tB.nome_arquivo AS arquivo_atual,\r\n\t\t\t\t\t\t\t\t\tA.arquivo_ingles,\r\n\t\t\t\t\t\t\t\t\tC.comentario,\r\n\t\t\t\t\t\t\t\t\tC.id AS id_comentario,\r\n\t\t\t\t\t\t\t\t\tD.nome AS disciplina\r\n\t\t\t\t\t\t\t\tFROM " . MYSQL_BASE_TRADUCAO_DOCUMENTOS . " A\r\n\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_CHECK_LISTS . " B ON A.id_check_list = B.id\r\n\t\t\t\t\t\t\t\tLEFT JOIN " . MYSQL_BASE_TRADUCAO_COMENTARIOS . " C ON A.id = C.id_documento\r\n\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_DISCIPLINAS . " D ON B.id_disciplina = D.id\r\n\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\tA.excluido IS NULL\r\n\t\t\t\t\t\t\t\tAND B.status IN ('A', 'AC')\r\n\t\t\t\t\t\t\t\tAND C.pertence = 'U'\r\n\t\t\t\t\t\t\t\tAND A.id=" . $cadastro->getId() . "\r\n\t\t\t\t\t\t\t\tUNION ALL\r\n\t\t\t\t\t\t\t\tSELECT \t\r\n\t\t\t\t\t\t\t\t\tA.id, \r\n\t\t\t\t\t\t\t\t\tB.nome AS nome_arquivo, \r\n\t\t\t\t\t\t\t\t\tA.traducao,\r\n\t\t\t\t\t\t\t\t\tB.arquivo AS arquivo_atual,\r\n\t\t\t\t\t\t\t\t\tA.arquivo_ingles,\r\n\t\t\t\t\t\t\t\t\tC.comentario,\r\n\t\t\t\t\t\t\t\t\tC.id AS id_comentario,\r\n\t\t\t\t\t\t\t\t\t'' AS disciplina\r\n\t\t\t\t\t\t\t\tFROM " . MYSQL_BASE_TRADUCAO_DOCUMENTOS . " A\r\n\t\t\t\t\t\t\t\tINNER JOIN " . MYSQL_BASE_TRADUCAO_ARQUIVOS . " B ON SUBSTRING(A.id_check_list, 3, 11) = B.id\r\n\t\t\t\t\t\t\t\tLEFT JOIN " . MYSQL_BASE_TRADUCAO_COMENTARIOS . " C ON A.id = C.id_documento\r\n\t\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\t\tA.excluido IS NULL\r\n\t\t\t\t\t\t\t\tAND C.pertence = 'U'\r\n\t\t\t\t\t\t\t\tAND A.id=" . $cadastro->getId() . "\r\n\t\t\t\t\t\t\t\tGROUP BY A.id"); if ($resultado) { foreach ($resultado as $item) { $cadastro->setProjetoRelacionado($item['nome_arquivo']); $cadastro->setDisciplina($item['disciplina']); if ($item['arquivo_atual'] != null) { if ($cadastro->getDisciplina() == '') { $pasta_traducao = 'traducao_docs/'; } else { $pasta_traducao = ''; } $arquivo_atual = '<a href="' . EXTERNAL_ROOT_PORTAL . '/arquivos/' . $pasta_traducao . $item['arquivo_atual'] . '" target="_blank">Baixar</a>'; } else { $arquivo_atual = ''; } if ($item['arquivo_ingles'] != null) { $arquivo_ingles = '<a href="' . EXTERNAL_ROOT_PORTAL . '/arquivos/' . $item['arquivo_ingles'] . '" target="_blank">Baixar</a>'; /*Edicao do nome, pra permanecer o mesmo quando for salvar*/ } else { $arquivo_ingles = ''; } $cadastro->setTraducao($item['traducao']);