コード例 #1
0
ファイル: SolpeController.php プロジェクト: hipogea/zega
 public function actionpideoferta()
 {
     $autoIdAll = $_POST['cajita'];
     $mensajeerror = "";
     if (count($autoIdAll) > 0) {
         foreach ($autoIdAll as $autoId) {
             $modelo = Desolpe::model()->findByPk($autoId);
             if (!is_null($modelo)) {
                 $registros = Maestroclipro::model()->findAll("codart=:vcodigo", array(":vcodigo" => $modelo->codart));
                 foreach ($registros as $fila) {
                     ///datos de los usuarios a enviar
                     $mensajeerror .= yii::app()->correo->correo_simple(Contactos::getListMailEmpresa($fila->codpro, '210'), Yii::app()->user->email, 'SOLICITUD DE COTIZACION', 'Este es un correo automatico, hay nuevas peticiones de oferta, revisar tu buzon');
                     if ($mensajeerror == "") {
                         echo " Se ha enviado las peticiones de oferta correspondientes";
                     }
                     $modelito = Ofertas::model()->find("id=:vid", array(":vid" => $modelo->id));
                     if (is_null($modelito)) {
                         $modelito = new Ofertas();
                         $modelito->setAttributes(array('hidmaestroclipro' => $fila->id, 'fechaprog' => $modelo->fechaent, 'iduser' => Yii::app()->user->id, 'fechadoc' => date('Y-m-d', time()), 'cant' => $registros->cant, 'iddesolpe' => $modelo->id));
                         $modelito->save();
                     }
                 }
             }
         }
     }
     if ($mensajeerror == "") {
         echo " Se ha enviado las peticiones de oferta correspondientes";
     }
 }
コード例 #2
0
<?php

include_once 'core/ofertas-core.php';
$Oferta = new Ofertas();
$Oferta->novaOferta();
?>

<br />
<form action="" method="post" enctype="multipart/form-data">
    <table class="wp-list-table widefat fixed pages" cellspacing="0" style="width:95%;">
            <thead>
                <tr>
                    <th>
                        <h3>Bem vindo(a) ao cadastro de ofertas, forneça os dados abaixo.</h3>
                    </th>
                 </tr>
            </thead>
            <tbody>
                <tr>
                    <td>
                        Mês
                        <br />
                        <input type="text" name="mes" maxlength="255" style="width: 90%"/>
                        <br />
                        <br />
                        Ciclo (opcional)
                        <br />
                        <input type="text" name="ciclo" maxlength="255" style="width: 90%"/>
                        <br /><br />
                        <b>Imagens</b>
                        <br />
コード例 #3
0
ファイル: ofertas.php プロジェクト: redsuns/wordpressplugins
<?php

include_once 'core/ofertas-core.php';
$Ofertas = new Ofertas();
$Ofertas->listaOfertasAdmin();
if ($dadosOfertas = $Ofertas->obterOfertas()) {
    ?>

<h3>Listando ciclos de ofertas já cadastrados</h3>
<br />
    <table class="wp-list-table widefat fixed pages" cellspacing="0" style="width:95%;">
            <thead>
                <tr>
                    <th>
                        Informações
                    </th>
                    <th>
                        Mês
                    </th>
                    <th>
                        Ciclo
                    </th>
                    <th>
                        Ações
                    </th>
                 </tr>
            </thead>
            <tbody>
                <?php 
    foreach ($dadosOfertas as $dadosOfertas) {
        ?>
コード例 #4
0
<?php

/**
 * Template Name: Ofertas
 */
get_header();
include_once 'wp-content/plugins/ofertas/core/ofertas-core.php';
$Ofertas = new Ofertas();
$dadosOfertas = $Ofertas->obterOfertas('', 'ativa');
?>

        <div class="meio clearfix">
	        <div class="conteudo-1005">
	        <?php 
while (have_posts()) {
    the_post();
    ?>
	        	<div class="titulo-ofertas">
		        	<h2>Tablóide de Ofertas</h2>
	        	</div>
	        	<div class="conteudo clearfix">
	        	
               <?php 
    if ($dadosOfertas) {
        foreach ($dadosOfertas as $ofertas) {
            ?>
                      <div class="oferta">
                          <div class="mes-atual" style="display:none;">
                                <?php 
            echo $ofertas->mes;
            ?>