<?php include('../fncr-geral/configuracao_geral.php');

$id_registro = $_GET['reg'];

// SORTEIOS - REGISTROS
$sql_sorteio = $bd->getConexao()->prepare('SELECT * FROM sorteios WHERE id = :id');
$sql_sorteio->bindValue(':id', $id_registro, PDO::PARAM_STR);
if( $sql_sorteio->execute() ) { $resul_sorteio = $sql_sorteio->fetch(PDO::FETCH_ASSOC);}

@header("Content-Type: text/html; charset=ISO-8859-1",true);
?>
    <input type="hidden" class="id" name="id" value="<?php echo $id_registro?>"/>
      <div class="modal-content">
        <div class="modal-header bg-info">
          <button type="button" class="close" data-dismiss="modal"><i class="fa fa-times"></i></button>
          <h4 class="modal-title" id="myModalLabel">Novo Sorteio</h4>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="col-lg-12">
              <section class="panel">
                <table class="table table-striped b-t text-small">
                  <thead>
                  <tr>
                    <th width="200"></th>
                    <th class="text-center" width="400"></th>
                  </tr>
                  </thead>
                  <tbody>
                  <tr>
                    <td class="text-info"><div style="margin-top: 5px">Per&iacute;odo (Mes)</div></td>
                    <td class="text-info text-center">
                      <input type="text" class="form-control" value="<?php echo $resul_sorteio['periodo_mes']?>" name="periodo_mes" data-required="true">
                    </td>
                  </tr>
                  <tr>
                    <td class="text-info"><div style="margin-top: 5px">Per&iacute;odo (Ano)</div></td>
                    <td class="text-info text-center">
                      <input type="text" class="form-control" value="<?php echo $resul_sorteio['periodo_ano']?>" name="periodo_ano" data-required="true">
                    </td>
                  </tr>
                  <tr>
                    <td class="text-info"><div style="margin-top: 5px">Concurso N.</div></td>
                    <td class="text-info text-center"><input type="text" class="form-control" name="concurso" value="<?php echo $resul_sorteio['concurso']?>" data-required="true"></td>
                  </tr>
                  <tr>
                    <td class="text-info"><div style="margin-top: 5px">Data Sorteio</div></td>
                    <td class="text-info text-center">
                      <input type="text" class="form-control" value="<?php echo $resul_sorteio['data_sorteio']?>" name="data" data-required="true">
                    </td>
                  </tr>
                  <tr>
                    <td class="text-info"><div style="margin-top: 5px">Bilhete Sorteado</div></td>
                    <td class="text-info text-center"><input type="text" class="form-control" name="bilhete" value="<?php echo $resul_sorteio['bilhete_sorteado']?>"></td>
                  </tr>
                  <tr>
                    <td class="text-info"><div style="margin-top: 5px">Destaque Bilhete</div></td>
                    <td class="text-info text-center"><input type="text" class="form-control" name="bilhete_destaque" value="<?php echo $resul_sorteio['bilhete_destaque']?>"></td>
                  </tr>
                  </tbody>
                </table>
              </section>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-sm btn-default" data-dismiss="modal">Cancelar</button>
          <button type="submit" class="btn btn-sm btn-info">Cadastrar</button>
        </div>
      </div>
<?php $bd = null; $bd_fn = null;?>