<?php $classPromocao = new Funcoes(); $resu = $classPromocao->listarOferta(); while ($row = mysqli_fetch_assoc($resu)) { $id = $row['id']; $id_cliente = $row['id_cliente']; $valorantigo = (double) $row['valorantigo']; $valor = (double) $row['valor']; $desconto = $row['desconto']; $qtd = $row['qtd']; $descricao = $row['descricao']; $promocao = $row['promocao']; $date = new DateTime($row['datainicial']); $datainicial = $date->format('d.m.Y'); $date = new DateTime($row['datafinal']); $datafinal = $date->format('d.m.Y'); $principal = $row['principal']; $ativo = $row['ativo']; $imagem1 = $row['foto1']; $imagem2 = $row['foto2']; $imagem3 = $row['foto3']; $mapa = $row['mapa']; ?> <div class="col-md-4" style="padding-left: 0px;"> <div class="thumbnail" > <a href="ofertaexibida.php?oferta=<?php echo $id; ?> " style="color: #885521"> <img src="<?php echo 'imagem/fotos/' . $imagem1;
<i class="glyphicon glyphicon-th-list"></i> <br> Listar </a> </div> <table class="table table-striped custab"> <thead> <tr> <th>Código</th> <th>Categoria</th> <th class="text-center">Ações</th> </tr> </thead> <?php $result = $class->listarOferta(); while ($row = mysqli_fetch_assoc($result)) { $id = $row['id']; $promocao = $row['promocao']; ?> <tr> <td><?php echo $id; ?> </td> <td><?php echo $promocao; ?> </td> <td class="text-center"><a class='btn btn-info btn-xs' href="editoferta.php?codigo=<?php