<?php require_once('topo.php');?>
<?php require_once('lateral.php');?>
      <!-- Right side column. Contains the navbar and content of the page -->
      <div class="content-wrapper" style="<?php if($_GET['Box'] != ""){ echo "margin-left: 0px;"; }?>">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            Lista de Espera Gerada Pelo Site
            <small>listagem de lista de espera cadastradas</small>
          </h1>
          <ol class="breadcrumb">
            <li><a href="index.php?Box=<?php echo $_GET['Box'];?>"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="listar_reservas.php?Box=<?php echo $_GET['Box'];?>">Lista de Espera</a></li>
            <li class="active">Listagem</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">
          <div class="row">
            <div class="col-xs-12"><!-- /.box -->

              <div class="box">
                <div class="box-header">
                  <h3 class="box-title">Listagem de Esperas do Site</h3>                  
                </div><!-- /.box-header -->
                <div class="box-body">
                  <table id="example1" class="table table-bordered table-striped">
                    <thead>
                      <tr>
                        <th style="cursor:pointer">Código</th>
                        <th style="cursor:pointer">Pacote</th>
                        <th style="cursor:pointer">Saída</th>
                        <th style="cursor:pointer">Data Saída</th>
                        <th style="cursor:pointer">Nome</th>
                        <th style="cursor:pointer">E-mail</th>
                        <th style="cursor:pointer">Telefone</th>
                        <th style="cursor:pointer">Data Reserva</th>
                      </tr>
                    </thead>
                    <tbody>
                    <?php

						$Seleciona = Seleciona("reservas", "", "ORDER BY idreserva DESC");	
					while($linha = mysql_fetch_array($Seleciona)){
					?>
                      <tr style="cursor:pointer" onclick="location.href='manutencao_reservas.php?idreserva=<?php echo $linha['idreserva'];?>&Box=<?php echo $_GET['Box'];?>';">
                        <td><?php echo $linha['idreserva'];?></td>
                        <td><?php echo $linha['titulo_pacote'];?></td>
                        <td><?php echo $linha['titulo_saida'];?></td>                                             
                        <td><?php echo $linha['data_saida'];?></td>
                        <td><?php echo $linha['nome'];?></td>
                        <td><?php echo $linha['email'];?></td>
                        <td><?php echo $linha['telefone'];?></td>
                        <td><?php echo $linha['data_envio'];?></td>
                      </tr>
                      <?php }?>
                    </tbody>                    
                  </table>
                </div><!-- /.box-body -->
              </div><!-- /.box -->
            </div><!-- /.col -->
          </div><!-- /.row -->
        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->
<?php require_once('rodape.php');?>