Пример #1
0
$classPromocao = new Funcoes();
if (isset($_GET['qtd'])) {
    $value = $_GET['qtd'];
    $bool = !is_int($value) ? ctype_digit($value) : true;
    if ($bool) {
        if (trim($_SESSION['carregar']) == "") {
            $_SESSION['carregar'] = $_GET[qtd];
        } else {
            $_SESSION['carregar'] = $_SESSION['carregar'] + 1;
        }
    } else {
        if (trim($_SESSION['carregar']) == "") {
            $_SESSION['carregar'] = 1;
        }
    }
    $resu = $classPromocao->listarOfertaComum(6 * $_SESSION['carregar']);
} else {
    $_SESSION['carregar'] = 1;
    $resu = $classPromocao->listarOfertaComum(6 * $_SESSION['carregar']);
}
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');
Пример #2
0
<?php

$classPromocao = new Funcoes();
$resu = $classPromocao->listarOfertaComum(6);
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-sm-4 col-lg-4 col-md-4" style="position: relative;  min-height: 1px;  padding-right: 0px; padding-left: 0px;">
                        <div class="thumbnail" style="height: 450px;width: ">
                            <img src="<?php 
    echo 'imagem/fotos/' . $imagem1;
    ?>
"
                                 alt="" class="img-rounded">