function AdicionaAlteracao($userID, $arquivoID)
{
    $sol = new Solicitacao();
    $perguntas = "";
    // Pega as perguntas enviadas
    if (isset($_POST['pergunta1']) && $_POST['pergunta1'] != "") {
        $perguntas .= $_POST['pergunta1'];
        $perguntas .= ",";
    }
    if (isset($_POST['pergunta2']) && $_POST['pergunta2'] != "") {
        $perguntas .= $_POST['pergunta2'];
        $perguntas .= ",";
    }
    if (isset($_POST['pergunta3']) && $_POST['pergunta3'] != "") {
        $perguntas .= $_POST['pergunta3'];
        $perguntas .= ",";
    }
    if (isset($_POST['pergunta4']) && $_POST['pergunta4'] != "") {
        $perguntas .= $_POST['pergunta4'];
        $perguntas .= ",";
    }
    if (isset($_POST['pergunta5']) && $_POST['pergunta5'] != "") {
        $perguntas .= $_POST['pergunta5'];
        $perguntas .= ",";
    }
    if ($perguntas != "") {
        // Remove a virgula do final
        $perguntas = substr_replace($perguntas, "", -1);
    }
    $file1 = $_FILES['tempFile1'];
    $file2 = $_FILES['tempFile2'];
    $file3 = $_FILES['tempFile3'];
    $id = $sol->AdicionarAlteracao($userID, $perguntas, null, $arquivoID);
    // Pega os arquivos enviados, e armazena em uma pasta temporária.
    $prefix = CreateTempPrefix($userID, $id);
    $caminho = "";
    // Pegar arquivos
    if (isset($file1) && $file1['size'] > 0) {
        $img1 = Arquivos::UpdateArquivo($prefix, $file1);
        $img1 = $prefix . $img1;
        $caminho .= $img1 . ',';
    }
    if (isset($file2) && $file2['size'] > 0) {
        $img2 = Arquivos::UpdateArquivo($prefix, $file2);
        $img2 = $prefix . $img2;
        $caminho .= $img2 . ',';
    }
    if (isset($file3) && $file3['size'] > 0) {
        $img3 = Arquivos::UpdateArquivo($prefix, $file3);
        $img3 = $prefix . $img3;
        $caminho .= $img3 . ',';
    }
    if ($caminho != "") {
        $caminho = substr_replace($caminho, "", -1);
    }
    // Alterar entrada no banco de dados com os caminhos dos arquivos
    $ret = $sol->AdicionarCaminhosSolicitacao($id, $caminho);
    if ($ret) {
        header("location: ../home.php?solicitacao=1");
    } else {
        header("location: ../home.php?solicitacao=0");
    }
}