if ($_FILES["archivo"]["size"] <= 10000000) { if ($_FILES["archivo"]["error"] > 0) { echo $_FILES["archivo"]["error"] . "<br />"; Forms::setMessage('ERROR', 'Transaccion erronea!!', 'No se pudo realizar la transaccion, error en la carga del Archivo!'); } else { if (file_exists("/upload/task/student/" . $filename)) { unlink("upload/task/student/" . $filename); } move_uploaded_file($_FILES["archivo"]["tmp_name"], "upload/task/student/" . $filename); $archivo = new File($registry[$nameDataBase]); if ($_POST['proceso_editar'] == 'true' && isset($_POST['pk_id_file']) && $_POST['pk_id_file'] != '') { $data_file = array($_POST['title_file'], $_POST['description_file_contents'], $filename, $file_type, $file_ext, 75, $_POST['pk_id_file']); $id_file = $archivo->updateFile($data_file, $idTransaction); } else { $data_file = array($_POST['title_file'], $_POST['description_file_contents'], $filename, $file_type, $file_ext, 75); $id_file = $archivo->insertFile($data_file, $idTransaction); } if ($res > 0 && $id_file > 0) { $student_file = new StudentTaskFile($registry[$nameDataBase]); if ($_POST['proceso_editar'] == 'true' && isset($_POST['pk_id_matter_task_file']) && $_POST['pk_id_matter_task_file'] != '') { $data_tfile = array($_POST['description_file_contents'], $res, $id_file, $_POST['pk_id_matter_task_file']); $id_tfile = $studnet_file->updateStudentTaskFile($data_tfile, $idTransaction); } else { $data_tfile = array($_POST['description_file_contents'], $res, $id_file); $id_tfile = $student_file->insertStudentTaskFile($data_tfile, $idTransaction); } if ($id_tfile > 0) { Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'La Tarea se actualizo exitosamente!'); } else { Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la Tarea no se pudieron actualizar!'); }