public function run() { $fecha = Carbon\Carbon::now(); DB::table('noticias')->delete(); Noticias::create(array('titulo' => 'Bienvenidos', 'contenido' => 'Tenemos el agrado de presentarte tu nuevo sistema web de control e información de condominios <br> Echa Un vistazo a traves de las opciones presentadas, ven uestros videos demostrativos o lee nuestro manual del usuario', 'persona' => 'Sistema', 'fecha' => $fecha)); Noticias::create(array('titulo' => 'Informacion', 'contenido' => 'Puedes agregar tus propias noticias para compartirlas con el resto de los usuarios, aprovecha y promociona tus productos, o comparte imagenes de tus juntas de condominio, Se precavido', 'persona' => 'Sistema', 'fecha' => $fecha)); DB::table('eventos')->delete(); Eventos::create(array('razon' => 'Junta de Condominio', 'fecha_ini' => $fecha, 'fecha_fin' => $fecha, 'tiempo_ini' => $fecha->format('H:i:s'), 'tiempo_fin' => $fecha->addHours(2)->format('H:i:s'))); db::Table('portadas')->delete(); db::Table('portadas')->insert(array("id" => 1, "titulo" => "Mi Residencia esta la WEB!!", "media" => "slider1.jpg", "contenido" => "ResidenciasOnline.com")); db::Table('portadas')->insert(array("id" => 2, "titulo" => Config::get('var.nombre'), "media" => "slider0.jpg", "contenido" => "Bienvenido")); $this->command->info('Noticias Table Seed!'); }
public static function dispatcher() { Eventos::getInstance()->init(); $action = $_GET['action']; $id = $_GET['id']; $registro = null; if ($id != null) { $registro = Pessoas::getInstance()->getById($id); } if ($action == null) { self::showList(); } if ($action == 'add-new' || $action == 'edit') { self::showForm($action, $registro); } if ($action == 'add-extra') { self::showFormAddExtra($registro); } if ($action == 'delete') { self::delete($registro); } if ($action == 'view') { self::view($registro); } if ($action == 'extras') { self::extras(); } if ($action == 'genderize') { self::genderize(); } }
public static function dispatcher() { $action = $_GET['action']; $desconto = null; if (isset($_GET['id'])) { $desconto = Descontos::getInstance()->getById($_GET['id']); } $evento = null; if (isset($_GET['id_evento'])) { $id_evento = $_GET['id_evento']; } if (isset($_POST['id_evento'])) { $id_evento = $_POST['id_evento']; } if ($id_evento != null) { $evento = Eventos::getInstance()->getById($id_evento); } if ($action == null && $evento != null) { self::showListEvento($evento); } if ($action == null && $evento == null) { self::showListGeral(); } if ($action == 'add-new' || $action == 'edit') { self::showForm($action, $desconto, $evento); } if ($action == 'delete') { self::delete($evento); } if ($action == 'view') { self::view($evento); } }
/** * Porção visível do widget * Exibir eventos atuais e numeros */ public static function widget() { $eventos = Eventos::getInstance()->getFuturos(); foreach ($eventos as $evento) { /* @var $evento Evento */ echo "<span style='font-size: 15px;'><a href='admin.php?page=Eventos&action=view&id={$evento->id}'>{$evento->titulo}</a></span><br>"; if ($evento->data) { echo "<span style='font-size: 11px;'><i>" . PLib::days_between_dates($evento->data) . " dias para o evento</i></span><br>"; } // Pré-inscritos $pre = $evento->qtdPreInscritos(); // Inscritos $ins = $evento->qtdInscritos(); // Confirmados $con = $evento->qtdConfirmados(); if ($con != null && $con > 0) { echo "<b>Confirmados: {$con} - {$evento->conversaoInscritosConfirmados}</b><br>"; } if ($ins != null && $ins > 0) { echo "Inscritos: {$ins} - {$evento->conversaoVisitantesInscritos}<br>"; } if ($pre != null && $pre > 0) { echo "Pré-inscritos: {$pre}<br>"; } echo "<br>"; } }
public static function import() { die("Ops! Apagar tudo?"); try { $gamification = Gamification::getInstance(); echo "<H1>Importando dados...</H1>"; // Resetar Gamification $gamification->clearAllData(); // Modelo GDG // Obter todos usuários // Obter eventos de 1 de agosto em diante $eventos = Eventos::getInstance()->getPassados(); foreach ($eventos as $evento) { if (strtotime($evento->data) < strtotime('2015-08-01')) { continue; } // Obter todas presenças - pontuar echo "Evento {$evento->id} - {$evento->titulo} - {$evento->data} - "; $inscricoes = Inscricoes::getInstance()->getPresentes($evento->id); echo count($inscricoes) . " presentes <br>"; foreach ($inscricoes as $inscricao) { // if ($inscricao->id_pessoa!=23) continue; /* @var @inscricao Inscricao */ $gamification->setUserId($inscricao->id_pessoa); $dino = false; $inicio = $evento->data . ($evento->hora ? " " . $evento->hora : ''); // Clean Code if ($evento->id == 1065) { // var_dump("dino?"); // Dino? if ($inscricao->pessoa()->getCountConfirmadoAntesCleanCode() > 0) { $gamification->executeEvent('before_gamification', $inscricao, $inicio); $dino = true; } } // Primeira presença? if (!$dino && $inscricao->pessoa()->getCountPresentes() == 1 && $inscricao->pessoa()->getCountConfirmados() <= 2) { $gamification->executeEvent('first_presence', $inscricao, $inicio); } else { // Só esteve presente, pontuar $gamification->executeEvent('event_presence', $inscricao, $inicio); } // Se respondeu pesquisa, pontuar if ($inscricao->hasAvaliacao()) { $gamification->executeEvent('event_feedback', $inscricao, $inscricao->getAvaliacaoResposta(1)->dat_resposta); } } } // The End echo "<br>Gamification points fully updated!<br>"; self::showLevelRanking(); } catch (Exception $e) { echo "Exception: " . $e->getMessage(); } }
public static function dispatcher() { $action = $_GET['action']; $evento = null; $inscricao = null; if (isset($_GET['id_evento'])) { $evento = Eventos::getInstance()->getById($_GET['id_evento']); } if (isset($_GET['id'])) { $inscricao = Inscricoes::getInstance()->getById($_GET['id']); } $filter = null; if (isset($_GET['filter'])) { $filter = $_GET['filter']; } if ($action == null) { self::showList($evento, $filter); } if ($action == 'delete') { self::delete($inscricao, $evento); } if ($action == 'extras') { self::extras($evento); } if ($action == 'inscricao-confirmar') { self::confirmar($inscricao); } if ($action == 'inscricao-cancelar') { self::cancelar($inscricao); } if ($action == 'inscricao-informar-valor') { self::informarValor($inscricao); } if ($action == 'inscricao-presenca') { self::presenca($inscricao); } if ($action == 'exportarCsv') { self::exportarCsv($evento, $filter); } if ($action == 'exportarCsvFullContacts') { self::exportarCsvFullContacts($evento, $filter); } if ($action == 'importarCsv') { self::importarCsv($evento); } if ($action == 'cancelarNaoConfirmados') { self::cancelarNaoConfirmados($evento); } if ($action == 'add') { self::add($evento); } }
public function postCambiarestado() { if (Request::ajax()) { //$eventoid = Input::get('id'); $eventos = Eventos::find(Input::get('id')); $eventos['estado'] = Input::get('estado'); $tipotabla = Input::get('tipotabla'); $eventos['usuario_updated_at'] = Auth::user()->id; // $eventos->save(); if ($tipotabla == '1') { DB::table('evento_consulta')->where('id', Input::get('id'))->update(array('estado' => $eventos['estado'], 'usuario_updated_at' => $eventos['usuario_updated_at'], 'updated_at' => date('Y-m-d H:i:s'))); } if ($tipotabla == '2') { DB::table('evento_metodo')->where('id', Input::get('id'))->update(array('estado' => $eventos['estado'], 'usuario_updated_at' => $eventos['usuario_updated_at'], 'updated_at' => date('Y-m-d H:i:s'))); } return Response::json(array('rst' => 1, 'msj' => 'Registro actualizado correctamente')); } }
/** * http://url/crontab/hora/ */ public static function hora() { require 'wp-includes/pluggable.php'; // Eventos futuros $eventos = Eventos::getInstance()->getFuturos(); /* @var $evento Evento */ foreach ($eventos as $evento) { // Apenas eventos pagos if ($evento->pago != 'pago' || $evento->preInscricao()) { continue; } echo "<h1>{$evento->titulo}</h1>"; // Notificar inscrições ainda não pagas $inscricoesVencer = Inscricoes::getInstance()->getPagueAgora($evento->id); // var_dump($inscricoesVencer); // \TiagoGouvea\PLib::var_dump($inscricoesVencer); if (count($inscricoesVencer) > 0) { /* @var $inscricao Inscricao */ foreach ($inscricoesVencer as $inscricao) { if ($inscricao->pre_inscricao) { continue; } echo "Pedir que confirme agora " . $inscricao->id . "<br>"; $inscricao->confirmeAgora(); } } // Notificar inscrições vencidas por hora $inscricoesVencer = Inscricoes::getInstance()->getVencerHora($evento->id); // var_dump($inscricoesVencer); // \TiagoGouvea\PLib::var_dump($inscricoesVencer); if (count($inscricoesVencer) > 0) { /* @var $inscricao Inscricao */ foreach ($inscricoesVencer as $inscricao) { if ($inscricao->pre_inscricao) { continue; } echo "Vencer " . $inscricao->id . "<br>"; $inscricao->vencer(); } } } }
private static function showForm($action, $categoria, $evento) { // Postando? if (count($_POST) > 0) { // Validar $categoria = Categorias::getInstance()->populate($_POST); // Salvar ou incluir? if ($_POST['id'] == null) { $categoria = Categorias::getInstance()->insert($categoria); } else { $categoria = Categorias::getInstance()->save($_POST['id'], $categoria); } if ($evento == null) { $evento = Eventos::getInstance()->getById($categoria->id_evento); } self::showList($evento); } else { require_once PLUGINPATH . '/view/categorias/form.php'; } }
public static function dispatcher() { $action = $_GET['action']; $filter = $_GET['filter']; $evento = null; if (isset($_GET['id_evento'])) { $id_evento = $_GET['id_evento']; } if (isset($_POST['id_evento'])) { $id_evento = $_POST['id_evento']; } if ($id_evento != null) { $evento = Eventos::getInstance()->getById($id_evento); } if ($action == 'email') { self::showForm($action, $filter, $evento); } if ($action == 'sms') { self::showFormSms($filter, $evento); } }
public function Calendar($action) { if (isset($action)) { if ($action == "create") { $evento = Eventos::firstOrCreate(Input::all()); foreach ($evento->areas() as $area) { $evento->area .= $area->nombre . ","; } return $respuesta = array('Record' => $evento, 'Result' => "OK"); } if ($action == "edit") { $evento = Eventos::find(Input::get("id")); $evento->fill(Input::all()); $evento->save(); foreach ($evento->areas() as $area) { $evento->area .= $area->nombre . ","; } return $respuesta = array('Record' => $evento, 'Result' => "OK"); } if ($action == "remove") { Eventos::where('id', Input::get("id"))->delete(); return '{"Result":"OK"}'; } if ($action == "list") { $Records = Eventos::get(); $Records->each(function ($evento) { foreach ($evento->areas() as $area) { $evento->area .= $area->nombre . ","; } }); $respuesta = array('Records' => $Records, 'Result' => "OK"); return json_encode($respuesta); } if ($action == "areas") { $nulos = DB::table('areas')->select(DB::raw("'Ninguna' as DisplayText,'null' as value")); $respuesta = Areas::select("nombre as DisplayText", "id as Value")->union($nulos)->orderby('value', 'asc')->distinct()->get(); return "var opciones=" . json_encode($respuesta); } } }
public function save() { $post = $this->_post(NULL, TRUE); try { if (is_array($post)) { $entidad = NomEntidadTable::getInstance()->find($post['entidad_id']); if (!$entidad) { //Si la entidad no existe devuelvo un error $msg = "Entidad no encontrada."; return $this->_jsonResponse(array("msg" => $msg), 404, $msg); } $prod = NomProductoTable::getInstance()->find($post['producto_id']); if (!$prod) { //Si el producto no existe devuelvo un error $msg = "Producto no encontrado."; return $this->_jsonResponse(array("msg" => $msg), 404, $msg); } if ($post['id']) { $evento = $this->_getTable()->find($post['id']); if (!$evento) { //Si el evento no existe devuelvo un error $msg = "Evento no encontrado."; return $this->_jsonResponse(array("msg" => $msg), 404, $msg); } } else { $evento = new Eventos(); } $evento->fromArray($post, false); $evento->set('Entidad', $entidad); $evento->set('Producto', $prod); $evento->save(); $this->_jsonResponse($evento->toArray()); } } catch (Exception $exc) { log_message('error', $exc->getMessage()); log_message('error', $exc->getTraceAsString()); $this->_jsonResponse(array("msg" => "Ha ocurrido un error mientras se intentaba guardar un producto."), 500); } }
<?php $tpl = new TemplatePower('template/codigos/consultaCodigos.tpl'); $tpl->prepare(); $objcodigo = new Codigos($conn); $objevento = new Eventos($conn); foreach ($_POST as $nombre_campo => $valor) { $asignacion = '$' . $nombre_campo . '=\'' . $valor . '\';'; if (!is_numeric($nombre_campo)) { eval($asignacion); } } $str = ''; if (!empty($_POST['codigo'])) { $str .= " AND codigo like '%{$codigo}%'"; } if (!empty($_POST['asociado'])) { $str .= " AND(\r\n\t\t\ta.nombre like'%{$asociado}%'\r\n\t\t\tOR\r\n\t\t\ta.apellido_p like '%{$asociado}%'\r\n\t\t\tOR\r\n\t\t\ta.apellido_m like '%{$asociado}%'\r\n\t\t\t)"; } if (!empty($_POST['dias_valido'])) { //$str.=" AND dias_valido = '$dias_valido' OR ('$dias_valido' between (select f_inicio FROM evento e2 where e2.id = e.id) AND (select f_inicio FROM evento e3 where e3.id = e.id) )"; //$str.=" AND dias_valido = '$dias_valido' AND ('$dias_valido' between (select f_inicio FROM evento e2 where e2.id = e.id) AND (select f_inicio FROM evento e3 where e3.id = e.id) )"; } $objcodigo->setStr($str); $totalrowtrajo = 0; if (!empty($_GET['row_ini'])) { $row_ini = $_GET['row_ini']; $totalrowtrajo = $row_ini; } else { $row_ini = 0; }
$datos = CHtml::listData(Documentos::model()->findAll(array('order' => 'desdocu')), 'coddocu', 'desdocu'); echo $form->DropDownList($model, 'codocu', $datos, array('empty' => '--Seleccione un documento--')); ?> <?php echo $form->error($model, 'codocu'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'idevento'); ?> <?php $datos = CHtml::listData(Eventos::model()->findAll("codocu='101'"), 'id', 'descripcion'); echo $form->DropDownList($model, 'idevento', $datos, array('empty' => '--Seleccione un evento--')); ?> <?php echo $form->error($model, 'idevento'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'codigo_objeto'); ?>
<?php $tpl = new TemplatePower('template/codigos/formaCodigo.tpl'); $tpl->prepare(); $objestados = new Estado($conn); $objeventos = new Eventos($conn); $objcodigo = new Codigos($conn); $objasociado = new Asociados($conn); $id_codigo = ''; if (!empty($_GET['id_codigo'])) { $id_codigo = $_GET['id_codigo']; } if ($id_codigo != '') { //Editar $tpl->assign("discodigo", "disabled='disabled'"); $tpl->assign("id_codigo", $id_codigo); $objcodigo->setID($id_codigo); $codigo = $objcodigo->codigoByid(); /* echo "<pre>"; print_r($codigo); echo "</pre>"; */ $tpl->assign("pulsera", $codigo['codigo_pulsera']); $lista_eventos = $objeventos->listaEventos(); foreach ($lista_eventos as $evento) { $tpl->newBlock("eventos"); $tpl->assign("nombre", $evento['nombre']); $tpl->assign("id", $evento['id']); if ($evento['id'] == $codigo['id_evento']) { $tpl->assign("seleve", "selected='selected'");
<?php foreach ($_POST as $nombre_campo => $valor) { $asignacion = '$' . $nombre_campo . '=\'' . $valor . '\';'; //echo $nombre_campo.": ".$valor."<br>"; if (!is_numeric($nombre_campo)) { eval($asignacion); } } $eventos = new Eventos($conn); $eventos->setId($id); $eventos->setNombre(utf8_encode($name)); $eventos->setFecha_inicio($f_ini); $eventos->setFecha_fin($f_fin); $eventos->setDescripcion(utf8_encode($descripcion)); //$eventos->setlogotipo($logotipotipo); // comprobar que han seleccionado un archivo if ($_FILES['logotipo']['name'] != "") { // El campo foto contiene una imagen... // Primero, hay que validar que se trata de un JPG/GIF/PNG $allowedExts = array("jpg", "jpeg", "gif", "png", "JPG", "GIF", "PNG"); $extension = end(explode(".", $_FILES["logotipo"]["name"])); if (($_FILES["logotipo"]["type"] == "image/gif" || $_FILES["logotipo"]["type"] == "image/jpeg" || $_FILES["logotipo"]["type"] == "image/png" || $_FILES["logotipo"]["type"] == "image/pjpeg") && in_array($extension, $allowedExts)) { // el archivo es un JPG/GIF/PNG, entonces... $extension = end(explode('.', $_FILES['logotipo']['name'])); $foto = substr(md5(uniqid(rand())), 0, 10) . "." . $extension; $directorio = "eventos/imgs"; //dirname("empresas/logotipotipos"); // directorio de tu elección // almacenar imagen en el servidor move_uploaded_file($_FILES['logotipo']['tmp_name'], $directorio . '/' . $foto); $minFoto = 'min_' . $foto;
$result = $config->RestoreConfig(); $ev = new Eventos("RestoreConfig", 1, $am); $ev->reconfigure(); break; case "saveConfig": $am->access(PERMS_ADMIN); $config = Config::getInstance(); $result = $config->saveConfig(); $ev = new Eventos("SaveConfig", 1, $am); $ev->reconfigure(); break; case "defaultConfig": $am->access(PERMS_ADMIN); $config = Config::getInstance(); $result = $config->defaultConfig(); $ev = new Eventos("DefaultConfig", 1, $am); $ev->reconfigure(); break; case "printerCheck": $am->access(PERMS_OPERATOR); $config = Config::getInstance(); $pname = http_request("event_printer", "s", ""); $pwide = http_request("wide_printer", "i", -1); $printer = new RawPrinter($pname, $pwide); $printer->rawprinter_check(); break; default: throw new Exception("adminFunctions:: invalid operation: '{$operation}' provided"); } if ($result === null) { throw new Exception($adm->errormsg);
<?php $tpl = new TemplatePower('template/eventos/consultaEventos.tpl'); $tpl->prepare(); foreach ($_POST as $nombre_campo => $valor) { $asignacion = '$' . $nombre_campo . '=\'' . $valor . '\';'; if (!is_numeric($nombre_campo)) { eval($asignacion); } } $eventos = new Eventos($conn); $lista_eventos = $eventos->listaEventos(); foreach ($lista_eventos as $evento) { $tpl->newBlock("eventos"); $tpl->assign("nombre", $evento['nombre']); $tpl->assign("f_inicio", $evento['f_inicio']); $tpl->assign("f_fin", $evento['f_fin']); $tpl->assign("logotipo", $evento['logotipo']); $tpl->assign("descripcion", $evento['descripcion']); $tpl->assign("id", $evento['id']); $tpl->gotoBlock("_ROOT"); } //$tpl->assign('anterior', $anterior); //$tpl->assign('siguiente', $siguiente); $tpl->printToScreen(); ?>
<section class="content-header"> <h1>Eventos</h1> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-lg-12"> <!-- Horizontal Form --> <div class="box box-info"> <div class="box-header with-border"> <h3 class="box-title">Eventos</h3> </div><!-- /.box-header --> <?php $id = $_POST["id"]; if (isset($_POST["exibir"])) { $exib = new Eventos(); $comp = $exib->Editar($id); //print_r($comp); //var_dump($comp); if ($exib != null) { ?> <div class="box-body"> <div class="form-group"> <dl class="dl-horizontal"> <dt>Evento:</dt> <dd><?php echo $comp->evento; ?> </dd> <dt>Categoria:</dt> <dd><?php
public static function getEventoAtual() { $eventos = Eventos::getInstance()->getAcontecendoFuturos(true); if ($eventos) { return $eventos[0]; } return null; }
<?php //Ver. 1.1 Ago-13 $tpl = new TemplatePower('template/eventos/formaEventos.tpl'); $tpl->prepare(); $eventos = new Eventos($conn); if (!empty($_GET['id_evento'])) { $id_evento = $_GET['id_evento']; } else { $id_evento = ''; } if ($id_evento != '') { //Editar $tpl->assign("titulo", "Edita evento"); $eventos->setID($id_evento); $datos_evento = $eventos->eventoByid(); $tpl->assign("nombrevento", $datos_evento['nombre']); $tpl->assign("descripcion", $datos_evento['descripcion']); $tpl->assign("f_ini", $datos_evento['f_inicio']); $tpl->assign("f_fin", $datos_evento['f_fin']); $tpl->assign("id", $id_evento); } else { //Nuevo $tpl->assign("titulo", "Alta evento"); } $tpl->printToScreen();
/** * @param bool|true $ordenar * @param null $limit * @param null $where * @return array|null */ public function getAcontecendoFuturos($ordenar = true, $limit = null, $where = null) { $eventos = Eventos::getInstance()->getAll(); if ($eventos == null) { return null; } $return = array(); foreach ($eventos as $evento) { if ($evento->publicado && ($evento->acontecendo() || $evento->noFuturo())) { $return[] = $evento; } } // Ordenar $return = self::ordenar($return, $ordenar); return $return; }
<div class="wide form"> <?php $form = $this->beginWidget('CActiveForm', array('id' => 'coti-form', 'enableClientValidation' => false, 'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => true), 'enableAjaxValidation' => true)); ?> <?php echo $form->errorSummary($model); ?> <?php //construyendo el array de las opciones del menu en base al array de los eventos segun el estado actual del dccumento $acciones = Eventos::model()->findAll("codocu='" . $model->coddocu . "' AND estadoinicial= '" . $model->codestado . "' "); $botones = array(); $aux = array(); foreach ($acciones as $clave => $valor) { $aux = array('label' => $valor['descripcion'], 'icon-position' => 'left', 'icon' => 'check', 'url' => array('procesarguia', 'id' => $model->idguia, 'ev' => $valor['id'])); //pasando los parametros id guia e id evento para procesar array_push($botones, $aux); $aux = array(); } $this->widget('ext.JuiButtonSet.JuiButtonSet', array('items' => $botones, 'htmlOptions' => array('style' => 'clear: both;'))); ?> <?php $this->widget('zii.widgets.jui.CJuiTabs', array('tabs' => array('Inicio' => array('id' => 'tab_motorycaja', 'content' => $this->renderPartial('tab_uno', array('form' => $form, 'model' => $model), TRUE)), 'Comerciales' => array('id' => 'tab_motorycaja2', 'content' => $this->renderPartial('tab_dos', array('form' => $form, 'model' => $model), TRUE)), 'Adicionales' => array('id' => 'tab_motorycaja3', 'content' => $this->renderPartial('tab_tres', array('form' => $form, 'model' => $model), TRUE))), 'options' => array('collapsible' => false), 'id' => 'MyTabi')); ?>
/** * Save the meta when the post is saved. * * @param int $post_id The ID of the post being saved. */ public function save($post_id) { // If this is an autosave, our form has not been submitted, // so we don't want to do anything. if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return $post_id; } // Check the user's permissions. if ('page' == $_POST['post_type']) { if (!current_user_can('edit_page', $post_id)) { return $post_id; } } else { if (!current_user_can('edit_post', $post_id)) { return $post_id; } } if ($post_id != null) { $this->evento = Eventos::getInstance()->getById($post_id); } /* OK, its safe for us to save the data now. */ meta_update($post_id, 'id_evento_pai'); meta_update($post_id, 'descricao_1', false); // Descricao2 meta_update($post_id, 'descricao_2', false); // Descricao3 meta_update($post_id, 'descricao_3', false); // Publico Alvo meta_update($post_id, 'publico_alvo'); // Instrutor meta_update($post_id, 'id_instrutor', false); // Local meta_update($post_id, 'id_local', false); // Organizador if (get_option('singleOrganizer', true) && get_option('idSingleOrganizer', null) != null) { update_post_meta($post_id, 'id_organizador', get_option('idSingleOrganizer')); } else { meta_update($post_id, 'id_organizador', false); } // Topicos meta_update($post_id, 'topicos', false); // FAQ meta_update($post_id, 'faq', false); // Data meta_update($post_id, 'data'); // Hora meta_update($post_id, 'hora'); // Data meta_update($post_id, 'data_fim'); // Hora meta_update($post_id, 'hora_fim'); // dataInicioInscricoes meta_update($post_id, 'data_inicio_inscricoes'); // data_fimInscricoes meta_update($post_id, 'data_fim_inscricoes'); // vagas meta_update($post_id, 'vagas'); // pago meta_update($post_id, 'pago'); meta_update($post_id, 'pago_dinheiro'); meta_update($post_id, 'pago_pagseguro'); meta_update($post_id, 'pago_cielo'); meta_update($post_id, 'pago_deposito'); meta_update($post_id, 'fb_conversion_track'); // Integração de Pagamento meta_update($post_id, 'id_integracao_pagseguro', false); meta_update($post_id, 'id_integracao_cielo', false); // Local pagamento meta_update($post_id, 'id_local_pagamento', false); // Fila de espera meta_update($post_id, 'fila_espera'); // beta meta_update($post_id, 'beta'); // Campos extras meta_update($post_id, 'campos_extras', false); // Id Questionário meta_update($post_id, 'id_questionario', false); // Duração meta_update($post_id, 'duracao'); meta_update($post_id, 'horarios'); meta_update($post_id, 'requisitos'); // Valor meta_update($post_id, 'valor'); // Material Didático meta_update($post_id, 'material'); // Certificado meta_update($post_id, 'certificado'); // confirmacao meta_update($post_id, 'confirmacao'); // validacaoPessoa meta_update($post_id, 'validacao_pessoa', false, 'email'); //die(); // Release meta_update($post_id, 'release', false); // Campos extras meta_update($post_id, 'secoes_extras', false); // Cada seção if ($this->evento) { $secoes = $this->evento->getSecoesExtras(); if ($secoes != null) { foreach ($secoes as $secao => $titulo) { meta_update($post_id, 'secao_' . $secao, false); } } } // Mensagens if ($post_id) { Mensagens::getInstance()->savePost($_POST); } // echo "<br>FIM DE POSTANDO<br>"; }
<section class="content-header"> <h1> Eventos </h1> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-lg-12"> <!-- Horizontal Form --> <div class="box box-success"> <div class="box-header with-border"> <h3 class="box-title">Eventos</h3> </div><!-- /.box-header --> <?php $id = $_POST["id"]; if (isset($_POST["editar"])) { $edit = new Eventos(); $comp = $edit->editar($id); print_r($comp); if ($edit != null) { ?> <!-- form start --> <form class="form-horizontal" id="form" method="post" action="CrudEventos.php" enctype="multipart/form-data"> <div class="box-body"> <div class="form-group"> <label class="col-sm-2 control-label" for="evento"> Evento: </label> <div class="col-sm-10"> <input type="text" class="form-control" id="evento" name="evento" placeholder="Nome do Evento" value="<?php echo $comp->evento; ?> " required> </div>
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ require_once __DIR__ . "/../logging.php"; require_once __DIR__ . "/../tools.php"; require_once __DIR__ . "/../auth/AuthManager.php"; require_once __DIR__ . "/classes/Eventos.php"; try { $result = null; $am = new AuthManager("eventsFunctions"); $operation = http_request("Operation", "s", null); $data = array('ID' => http_request("ID", "i", 0), 'Session' => http_request("Session", "i", 0), 'TimeStamp' => http_request("TimeStamp", "i", 0), 'Type' => http_request("Type", "s", ""), 'Source' => http_request("Source", "s", ""), 'Pru' => http_request("Prueba", "i", 0), 'Jor' => http_request("Jornada", "i", 0), 'Mng' => http_request("Manga", "i", 0), 'Tnd' => http_request("Tanda", "i", 0), 'Dog' => http_request("Perro", "i", 0), 'Drs' => http_request("Dorsal", "i", 0), 'Hot' => http_request("Celo", "i", 0), 'Eqp' => http_request("Equipo", "i", 0), 'Flt' => http_request("Faltas", "i", -1), 'Toc' => http_request("Tocados", "i", -1), 'Reh' => http_request("Rehuses", "i", -1), 'NPr' => http_request("NoPresentado", "i", -1), 'Eli' => http_request("Eliminado", "i", -1), 'Tim' => http_request("Tiempo", "d", -1), 'Value' => http_request("Value", "i", -1), 'stop' => http_request("stop", "i", 0), 'start' => http_request("start", "i", 0)); if ($operation === null) { throw new Exception("Call to eventFunctions without 'Operation' requested"); } $eventmgr = new Eventos("eventFunctions", $data['Session'], $am); switch ($operation) { case "getEvents": $result = $eventmgr->getEvents($data); break; case "putEvent": $am->access(PERMS_ASSISTANT); $result = $eventmgr->putEvent($data); break; case "chronoEvent": $am->access(PERMS_CHRONO); $result = $eventmgr->putEvent($data); break; case "listEvents": $result = $eventmgr->listEvents($data); break;
function get_post_type_link($link, $post = 0) { if (get_post_type($post) == 'tgo_evento') { $link = Eventos::getInstance()->getUrl($post); } return $link; }
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer $id the ID of the model to be loaded * @return Eventos the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Eventos::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
public function verificaestado($id, $idevento) { //sacando el estado de la guia,si no necuentra datos genera error $modelosolpe = $this->loadmodel($id); $estado = $modelosolpe->estado; $evento = Eventos::model()->findByPk($idevento); if ($evento->estadoinicial == $estado) { //si el estado es el adecuado return $evento->estadofinal; //devolver el nuevo estado ya que es valido } else { return null; //en caso de no proceder devolver null } }
$tipobodega->editarbodega($miconexion, $_GET); $eventos = new Eventos(); $evento = "Editar Tipo Bodega "; $eventos->insertareventos($miconexion, $idusuario, $evento); break; case 3: $bodega = new Bodega(); $bodega->insertarbodega($miconexion, $_GET); $eventos = new Eventos(); $evento = "Insertar Bodega Nueva"; $eventos->insertareventos($miconexion, $idusuario, $evento); break; case 4: $bodega = new Bodega(); $bodega->editarbodega($miconexion, $_GET); $eventos = new Eventos(); $evento = "Editar Bodega"; $eventos->insertareventos($miconexion, $idusuario, $evento); break; case 5: $cliente = new Cliente(); $cliente->insertarcliente($miconexion, $_GET); break; case 6: $cliente = new Cliente(); $cliente->editarcliente($miconexion, $_GET); break; case 7: $proveedor = new Proveedor(); $proveedor->insertarproveedor($miconexion, $_GET); break;