<?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>
            Passeios
            <small>listagem de passeios</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_passeios.php?Box=<?php echo $_GET['Box'];?>">Passeios</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 Passeios</h3>
                  <button type="button" class="btn btn-primary" style=" float:right;" onclick="location.href='manutencao_passeios.php?Box=<?php echo $_GET['Box'];?>';">Novo Passeio</button>
                <!-- /.box-header -->
                <div class="box-body">
                  <table id="example1" class="table table-bordered table-striped">
                    <thead>
                      <tr>
                        <th style="cursor:pointer">Cód.</th>
                        <th style="cursor:pointer">Titulo</th>
                        <th style="cursor:pointer">Pacote</th>
                        <th style="cursor:pointer">Valor</th>
                      </tr>
                    </thead>
                    <tbody>
					<?php
                    $cor_fundo = "#FFFFFF";		                                         
                    $seleciona = Seleciona("passeios", "", "ORDER BY idpasseio DESC");                    
                    while($linha=mysql_fetch_array($seleciona)){	
					
					$SelecionaPacote = Seleciona("pacotes", "WHERE idpacote='".$linha['idpacote']."'", "LIMIT 0,1");
					while($pacote = mysql_fetch_array($SelecionaPacote)){
						$NomePacote = $pacote['titulo'];	
					}				
					
                    ?>
                      <tr style="cursor:pointer" onclick="location.href='manutencao_passeios.php?idpasseio=<?php echo $linha['idpasseio'];?>&Box=<?php echo $_GET['Box'];?>';">
                        <td><strong><?php echo $linha['idpasseio'];?></strong></td>
                        <td style="font-size:11px;"><strong><?php echo $linha['titulo'];?></strong></td>
                        <td style="font-size:11px;"><?php echo $NomePacote;?></td>
                        <td style="font-size:11px;"><strong><?php echo $linha['valor'];?></strong></td>
                      </tr>
                      <?php 		  
					  $NomePacote = "";
					  }?>
                    </tbody>
                  </table>
                </div><!-- /.box-body -->
              </div><!-- /.box -->
            </div><!-- /.col -->
          </div><!-- /.row -->
        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->
<?php require_once('rodape.php');?>