<?php
include 'conexao.php';
header('Content-type: text/html; charset=utf-8');

$sql = "select distinct i.*, initcap(i.nome) inscrito, u.nome nome_unidade, case"
        . " when i.horario='T' then "
        . " 'Tarde' "
        . " when i.horario='M' then 'Manhã'"
        . " end turno"
        . "  from inscricoes i left join unidade u on u.id=i.unidade "
        . " where i.id in(" . $_GET['id'].')  order by i.serie_ano, i.nome';
//echo $sql;
$res = mysqli_query($conexao, $sql);
$seqBolsao=$_GET['b'];

$sqlBolsao="select * from bolsao where id=$seqBolsao";
$resBolsao= mysqli_query($conexao, $sqlBolsao);
$rowBolsao= mysqli_fetch_array($resBolsao);

?><!DOCTYPE html>
<html lang="pt-BR">
    <head>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
        <meta name="description" content="Administração do Bolsão Força Máxima">
        <meta name="author" content="Vinícius">
        <!--    <link rel="icon" href="../../favicon.ico">-->

        <title>Administração do <?php echo $rowBolsao["descricao"] ?></title>
        <link rel="icon" href="../images/favicon.ico" >

        <!-- Bootstrap core CSS -->
        <link href="../css/bootstrap.css" rel="stylesheet">
        <link href="../css/bootstrap-theme.min.css" rel="stylesheet">
        <link href="../css/bootstrap.min.css" rel="stylesheet">



        <!-- IE10 viewport hack for Surface/desktop Windows 8 bug 
        <link href="../../assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">-->

        <!-- Custom styles for this template -->
        <link href="../css/main.css" rel="stylesheet">
        <link href="../style.css" rel="stylesheet">
        <script  language="javascript" type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
        <script  language="javascript" type="text/javascript" src="../js/main.js"></script>
        <script  language="javascript" type="text/javascript" src="../js/bootstrap.js"></script>
         

    </head>


        <body style="margin:0px;">
            <?php while ($row = mysqli_fetch_array($res)){ ?>
            <div class="col-md-6" style="width: 330px;height: 950px; border:2px #333 solid; float: left; margin-left: 15px;">
        <div style="text-align:center">
            <img style="margin-top: 2px;" src="../images/logo.png" width="170" height="80"></img>
        <p><h3> <?php echo $rowBolsao["descricao"] ?></h3></p>
        </div>
        <div style="margin-left: 0px;margin-right: 0px;" >
        <span style="font-height:bold;margin-left: 10px;">Unidade:</span> <?php echo $row['nome_unidade']?><br>
        <span style="font-height:bold;margin-left: 10px;">Inscrição:</span> <?php echo $row['inscricao']?><br>
        <span style="font-height:bold;margin-left: 10px;">Nome:</span> <?php echo  $row['inscrito']?><br>
        <span style="font-height:bold;margin-left: 10px;">Série/Ano Pretendida:</span> <?php echo  $row['serie_ano']?><br>
<!--        <span style="font-height:bold;margin-left: 10px;">Turno:</span> <?php echo  $row['turno']?><br>-->
        <img style="margin-left: 0px;margin-right: 0px;" width="120%" src="../images/cartao_resposta.jpg" ></img><br>
        </br> <strong>Port:______   Mat:______  CG:______  </strong>
             </div>
            </div>
            <?php next($row);}?> 
            </body>
 


      


</html>