当前位置: 首页>>代码示例>>PHP>>正文


PHP DAOFactory::getOfertasDAO方法代码示例

本文整理汇总了PHP中DAOFactory::getOfertasDAO方法的典型用法代码示例。如果您正苦于以下问题:PHP DAOFactory::getOfertasDAO方法的具体用法?PHP DAOFactory::getOfertasDAO怎么用?PHP DAOFactory::getOfertasDAO使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DAOFactory的用法示例。


在下文中一共展示了DAOFactory::getOfertasDAO方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: count

            <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;
开发者ID:njr1466,项目名称:akipom,代码行数:31,代码来源:meusCupons.php

示例2: Transaction

        $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="">
开发者ID:njr1466,项目名称:akipom,代码行数:31,代码来源:inserirCupom.php

示例3: catch

        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>
开发者ID:njr1466,项目名称:akipom,代码行数:31,代码来源:leoferta.php

示例4: Funcoes

<?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;
开发者ID:njr1466,项目名称:akipom,代码行数:31,代码来源:promocaoprincipalcategoria.php

示例5: Transaction

<?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">
开发者ID:njr1466,项目名称:akipom,代码行数:31,代码来源:editoferta.php


注:本文中的DAOFactory::getOfertasDAO方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。