

<!DOCTYPE html>
<html lang="PT-br">
    <?php include_once '../paginas/header.php';?>
<body>
    <?php include_once '../paginas/menuroteiro.php';?>

    <form  method="POST" action="../aplicacao/salvarrespostas.php">
    
    
    <?php
    
     // Include config file
    require_once "../banco/config.php";
    // Attempt select query execution
    $sql = "SELECT * FROM  perguntas";
    if($result = mysqli_query($link, $sql, $sql1)){
        if(mysqli_num_rows($result) > 0){
            while($row = mysqli_fetch_array($result)){
                          
    ?>
    


<!-- Start Blog============================================= -->


    <div class="blog-area single full-blog full-blog default-padding-forms">
        <div class="container">

        <?php include_once '../paginas/headerperguntas.php';?>
        
            <div class="blog-items">
                <div class="row">
                    <div class="blog-content col-lg-10 offset-lg-1 col-md-12">
                        <div class="blog-item-box">

                            <div class="item">
                                
                                <!-- Start Post Thumb -->

                                <div class="info">
                                
                                
                              
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "apto" name = "apto[]"  value = "Apto"><span><strong> Apto    </strong></span>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "apto" name = "apto[]"  value = "Não apto"><span><strong> Não apto</strong></span>

                                <h2><?php echo $row['titulo']; ?></h2>
                                
                                <h3><?php echo $row['subtitulo']; ?></h3> 
                                
                                <p>Conceito: <?php echo $row['conceito'];?></p>

                                <h4>Pergunta</h4>



                                <h5><?php echo $row['perguntas']; ?></h5>

                                <h4>Escala de Nota</h4>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "nota" name = "nota[]"  value = "0" >  <span><strong>0</strong></span>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "nota" name = "nota[]"  value = "1" >  <span><strong>1</strong></span>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "nota" name = "nota[]"  value = "2" >  <span><strong>2</strong></span>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "nota" name = "nota[]"  value = "3" >  <span><strong>3</strong></span>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "nota" name = "nota[]"  value = "4" >  <span><strong>4</strong></span>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "nota" name = "nota[]"  value = "5" >  <span><strong>5</strong></span>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "nota" name = "nota[]"  value = "6" >  <span><strong>6</strong></span>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "nota" name = "nota[]"  value = "7" >  <span><strong>7</strong></span>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "nota" name = "nota[]"  value = "8" >  <span><strong>8</strong></span>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "nota" name = "nota[]"  value = "9" >  <span><strong>9</strong></span>
                                <input class="btn circle btn-theme border btn-sm" type= "checkbox" id = "nota" name = "nota[]"  value = "10">  <span><strong>10</strong></span>
                                <h4>Observações</h4>

                                <input class="form-control" type= "text" name = "observacao[]">   
                                    <br>
                                <?php 
                                
                                $dados = $_REQUEST['cliente_id'];

                                date_default_timezone_set('America/Sao_Paulo');
                                $date = date('Y-m-d H:i');
                                

                                echo '<input type="hidden" name="pergunta_id[]" value='. $row['id'] .'>';

                                echo '<input type="hidden" name="cliente_id[]" value='. $dados .'>';

                                echo '<input type="hidden" name="data[]" value='. $date .'>';

                                 ?>


                                
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>




    <?php 
    
}
// Free result set
mysqli_free_result($result);
} else{
    echo '<div class="alert alert-danger"><em>No records were found.</em></div>';
}
} else{
echo "Oops! Something went wrong. Please try again later.";
}

// Close connection
mysqli_close($link);
?>
                  
    <?php include_once '../paginas/footerroteiro.php';?>

</body>
</html>
