コード例 #1
0
ファイル: meusCupons.php プロジェクト: njr1466/akipom
            <br>

        </div>

        <br>
<div class="container">
		<div class="row">
			<div>
				<ul class="event-list">
					
                                    <?php 
$codigoUsuario = DAOFactory::getUsuariosDAO()->queryByEmail($_SESSION['EMAIL']);
$array = DAOFactory::getCuponsDAO()->queryByIdCliente($codigoUsuario[0]->id);
$count = count($array);
for ($i = 0; $i < $count; $i++) {
    $oferta = DAOFactory::getOfertasDAO()->load($array[$i]->idOferta);
    $date = new DateTime($oferta->datafinal);
    $dia = $date->format('d');
    $mes = $date->format('m');
    $ano = $date->format('Y');
    $empresa = DAOFactory::getEmpresasDAO()->load($oferta->idCliente);
    ?>
                                    
                                    
                                    

					<li>
						<time datetime="2014-07-20 0000">
                                                    <span class="texto">Usar Ate</span>
							<span class="day"><?php 
    echo $dia;
コード例 #2
0
ファイル: inserirCupom.php プロジェクト: njr1466/akipom
        $transaction = new Transaction();
        $cupom = new Cupon();
        $cupom->idOferta = $_GET['oferta'];
        $usuario = DAOFactory::getUsuariosDAO()->queryByEmail($_SESSION['EMAIL']);
        $cupom->idCliente = $usuario[0]->id;
        $date = date_create();
        $numero = date_timestamp_get($date);
        $numeroinvertido = strrev($numero);
        $numero = $cupom->idCliente . $numeroinvertido;
        $cupom->numero = substr($numero, 0, 9);
        $cupom->data = date("Y-m-d");
        // echo $cupom->data . $cupom->id . $cupom->idCliente . $cupom->idOferta . $cupom->numero;
        $cupomid = DAOFactory::getCuponsDAO()->insert($cupom);
        $transaction->commit();
        $cupomgerado = DAOFactory::getCuponsDAO()->load($cupomid);
        $oferta = DAOFactory::getOfertasDAO()->load($cupomgerado->idOferta);
        $empresa = DAOFactory::getEmpresasDAO()->load($oferta->idCliente);
    } catch (Exception $exc) {
        echo $exc->getTraceAsString();
    }
    ?>


    <!DOCTYPE html>
    <html>

        <head>
            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <meta name="description" content="">
コード例 #3
0
ファイル: leoferta.php プロジェクト: njr1466/akipom
        if (trim($foto2) == "") {
            $Oferta->foto2 = $_POST['foto2only'];
        } else {
            $Oferta->foto2 = $foto2;
        }
        if (trim($foto3) == "") {
            $Oferta->foto3 = $_POST['foto3only'];
        } else {
            $Oferta->foto3 = $foto3;
        }
        if (trim($mapa) == "") {
            $Oferta->mapa = $_POST['mapaonly'];
        } else {
            $Oferta->mapa = $mapa;
        }
        DAOFactory::getOfertasDAO()->update($Oferta);
        $transaction->commit();
    } catch (Exception $exc) {
        //header('location: login.php?msg=error');
        echo $exc;
    }
    echo "<meta http-equiv='refresh' content=3;url='oferta.php'>";
}
if (isset($_GET['acao'])) {
    echo $class->excluirCategoria($id);
    //   echo"<meta http-equiv='refresh' content=3;url='categoria.php'>";
}
?>


<!DOCTYPE html>
コード例 #4
0
<?php

$classPromocao = new Funcoes();
$resu = DAOFactory::getOfertasDAO()->queryByIdCategoria($_GET['categoria']);
$categoria = DAOFactory::getCategoriasDAO()->load($_GET['categoria']);
?>

<h5> Recife > <?php 
echo $categoria->nome;
?>
</h5>
<?php 
for ($i = 0; $i < count($resu); $i++) {
    if (isset($_GET['categoria'])) {
        if ($resu[$i]->principalcategoria == 1) {
            $id = $resu[$i]->id;
            $id_cliente = $resu[$i]->idCliente;
            $valorantigo = (double) $resu[$i]->valorantigo;
            $valor = (double) $resu[$i]->valor;
            $desconto = $resu[$i]->desconto;
            $qtd = $resu[$i]->qtd;
            $descricao = $resu[$i]->descricao;
            $promocao = $resu[$i]->promocao;
            $date = new DateTime($resu[$i]->datainicial);
            $datainicial = $date->format('d.m.Y');
            $date = new DateTime($resu[$i]->datafinal);
            $datafinal = $date->format('d.m.Y');
            $principal = $resu[$i]->principal;
            $ativo = $resu[$i]->ativo;
            $imagem1 = $resu[$i]->foto1;
            $imagem2 = $resu[$i]->foto2;
コード例 #5
0
ファイル: editoferta.php プロジェクト: njr1466/akipom
<?php

include 'sessao.php';
require_once 'conexao.php';
include '../generated/include_dao.php';
$transaction = new Transaction();
$resultado = DAOFactory::getOfertasDAO()->load($_GET['codigo']);
$date = new DateTime($resultado->datainicial);
$datainicial = $date->format('d/m/Y');
$date = new DateTime($resultado->datafinal);
$datafinal = $date->format('d/m/Y');
if (isset($_GET['codigo'])) {
    $class = new Funcoes();
    $result = $class->consultarOferta($_GET['codigo']);
    //echo mysqli_num_rows($result);
    while ($row = mysqli_fetch_assoc($result)) {
        $nome = $row['nome'];
        $descricao = $row['descricao'];
    }
}
?>

<!DOCTYPE html>
<html>

    <head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


        <title>Área Administrativa AKIPOM</title>
        <meta name="generator" content="Bootply">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">