예제 #1
0
파일: edit.php 프로젝트: hexti/troncal
 }
 if ($desenvolvimento->getFaseProjeto() == 0) {
     $msg_erro .= "<li>A fase do projeto não existe</li>";
 }
 if ($desenvolvimento->getDisciplina() == 0) {
     $msg_erro .= "<li>A disciplina não existe</li>";
 }
 if ($desenvolvimento->getTipoDocumento() == 0) {
     $msg_erro .= "<li>O tipo de documento não existe</li></ul>";
 }
 /*------------------------------------------------------------------------------*/
 $resultado = $DAO->Listar("SELECT file FROM " . MYSQL_BASE_PROJETO_DESENVOLVIMENTO . " WHERE dat_excluido IS NULL AND id=" . $desenvolvimento->getId());
 if ($resultado->rowCount() > 0) {
     foreach ($resultado as $row) {
         if (!empty($row['file'])) {
             $desenvolvimento->setFile('<a href="' . EXTERNAL_ROOT_PORTAL . '/arquivos/desenvolvimento/' . $row['file'] . '" target="_blank">Ver arquivo</a>');
             $nome = substr($row['file'], 0, 35);
         } else {
             $desenvolvimento->setFile("Sem arquivo");
         }
     }
 } else {
     $desenvolvimento->setFile("Sem arquivo");
 }
 /*------------------------------------------------------------------------------*/
 if (empty($msg_erro)) {
     $revisao = substr($desenvolvimento->getRevisao(), 0, 1);
     if ($revisao == '0') {
         if ($nome == substr($new_name, 0, 35)) {
             //Verifica se o nome foi preenchido
             if (!empty($id) && $_FILES['file']['error'] != 4) {