function getListEventoArtistaLugar($condicion = NULL, $parametros = array())
 {
     if ($condicion === null) {
         $condicion = "";
     } else {
         //  $condicion="where $condicion";
         $condicion = $condicion;
     }
     /**$sql ="SELECT e.*, l.*, a.*
        from evento e inner join lugar l
        on e.ID_lugar=l.ID_lugar
        inner join artista a
        on e.ID_artista=a.ID_artista
        $condicion ;";*/
     $sql = "SELECT *\nfrom evento e, artista a\nwhere e.ID_artista=a.ID_artista and {$condicion}";
     echo "<BR>COLSUTA: " . $sql . "<BR>";
     $this->bd->send($sql, $parametros);
     $r = array();
     $contador = 0;
     while ($fila = $this->bd->getRow()) {
         $evento = new Evento();
         $evento->set($fila);
         $lugar = new Lugar();
         $lugar->set($fila, 6);
         $artista = new Artista();
         $artista->set($fila, 9);
         $r[$contador]["evento"] = $evento;
         $r[$contador]["artista"] = $artista;
         $r[$contador]["lugar"] = $lugar;
         $contador++;
         return $r;
     }
 }
 public static function editar()
 {
     $agenda = new Agenda();
     $agenda->selecionarPorId($_GET['id']);
     $evento = new Evento();
     $evento->selecionarPorId($agenda->fkEvento);
     $sala = new Sala();
     $salas = $sala->listar();
     $arrListaDatas = Funcao::retornaDataIntervalo($evento->dataInicio, $evento->dataFim);
     $arrHoraInicial = Funcao::intervaloDeHoraPorMinutos('07:00', '23:30');
     $arrHoraFinal = Funcao::intervaloDeHoraPorMinutos('07:00', '23:30');
     if (!empty($_POST)) {
         $agenda = new Agenda();
         foreach ($_POST as $pKey => $p) {
             if ($pKey == 'dia') {
                 $agenda->{$pKey} = Funcao::dateFormatToDatabase($p);
             } else {
                 $agenda->{$pKey} = $p;
             }
         }
         $idAgenda = $agenda->salvar();
         $evento = new Evento();
         $evento->selecionarPorId($_POST['fkEvento']);
         self::redirecionar(Configuracao::$baseUrl . self::$viewController . '/listar/' . $evento->id . '-' . Funcao::prepararLink($evento->nome) . Configuracao::$extensaoPadrao);
     }
     self::$corpo = "editar";
     self::$variaveis = array('agenda' => $agenda, 'salas' => $salas, 'evento' => $evento, 'dias' => $arrListaDatas, 'horaInicial' => $arrHoraInicial, 'horaFinal' => $arrHoraFinal);
     self::renderizar(self::$viewController);
 }
Example #3
0
function grava($ID, $dia, $mes, $ano, $local, $descricao)
{
    $temerro = 0;
    $x = 0;
    if (empty($local)) {
        echo "<tr><td>Informe o local do evento </td></tr>" . "\n";
        $temerro = 1;
    }
    if (!checkdate($mes, $dia, $ano)) {
        echo "<tr><td>Data do evento inválida !</td></tr>" . "\n";
        $temerro = 1;
    }
    if (empty($descricao)) {
        echo "<tr><td>Descreva o evento </td></tr>" . "\n";
        $temerro = 1;
    }
    if ($temerro == 1) {
        include "volta.php";
    } else {
        $eve = new Evento($ID);
        $eve->setLocal($local);
        $eve->setDescricao($descricao);
        $eve->setData($ano . "/" . $mes . "/" . $dia);
        $eve->Grava();
        echo '<tr><td><br></td></tr>' . "\n";
        echo "<tr><td>Evento gravado com sucesso !</td></tr>\n";
        echo '<tr><td><br></td></tr>' . "\n";
        echo '<tr><td><br></td></tr>' . "\n";
        echo '<tr><td><a href="lst_cadeventos.php">OK</a></td></tr>' . "\n";
    }
}
Example #4
0
 public function handleCreate()
 {
     try {
         if (Request::ajax()) {
             $error = false;
             $idEvento = Input::get('idevento');
             $eventoUpdated = Evento::find($idEvento);
             if ($eventoUpdated) {
                 $eventoUpdated->idconfiguraciontrampa = Input::get('idctrampa');
                 $eventoUpdated->fechaevento = Input::get('fechaevento');
                 $eventoUpdated->idclasificaiontrampa = Input::get('idclasificacion');
                 $eventoUpdated->semana = Input::get('semana');
                 $eventoUpdated->observaciones = Input::get('observaciones');
                 $eventoUpdated->save();
             } else {
                 $evento = new Evento();
                 $evento->idconfiguraciontrampa = Input::get('idctrampa');
                 $evento->fechaevento = Input::get('fechaevento');
                 $evento->idclasificaiontrampa = Input::get('idclasificacion');
                 $evento->semana = Input::get('semana');
                 $evento->observaciones = Input::get('observaciones');
                 $evento->save();
             }
             $resultado = array('error' => false, 'msg' => 'created successfully');
             return Response::json($resultado);
         }
     } catch (Exception $ex) {
         $resultado = array('error' => true, 'msg' => 'Error saving data');
         return Response::json($resultado);
     }
 }
Example #5
0
 public static function getListadoEventoss($usuario_id)
 {
     $obj = new Evento();
     $conditions = "usuario_id = {$usuario_id}";
     $columns = "id, start, end, color, author, notes, urlFile, idPosicion, hour1, day1, hour2, day2, fileUrl, networks, description";
     return $obj->find("columns: {$columns}", "conditions: {$conditions}");
 }
Example #6
0
 private function sendMail(Evento $evento, $use_swift = true)
 {
     if ($use_swift) {
         $this->sendWithSwift('*****@*****.**', "nuovo evento: " . $evento->getTitolo(), "Ciao, \n è stato pubblicato un nuovo evento", '*****@*****.**');
         return;
     }
     $this->sendMailDefault('*****@*****.**', "nuovo evento: " . $evento->getTitolo(), "Ciao, \n è stato pubblicato un nuovo evento", '*****@*****.**');
 }
Example #7
0
 public function testSave()
 {
     $data = array('titolo' => 'phpday2010!!!', 'descrizione' => 'questo è il talk per il phpday 2010!', 'data_inizio' => '2010-05-14', 'data_fine' => '2010-05-15');
     $evento = new Evento();
     $evento->fromArray($data);
     $evento->save($this->pdo);
     $xml_dataset = $this->createFlatXMLDataSet(dirname(__FILE__) . '/../fixtures/evento.xml');
     $this->assertDataSetsEqual($xml_dataset, $this->getConnection()->createDataSet(array('evento')));
 }
 public static function listar()
 {
     $evento = new Evento();
     $evento->selecionarPorId($_GET['id']);
     $certificado = new Certificado();
     $listaDeCertificados = $certificado->listarPorIdEvento($_GET['id']);
     self::$variaveis = array('listaDeCertificados' => $listaDeCertificados, 'evento' => $evento);
     self::$corpo = "listar";
     self::renderizar(self::$viewController);
 }
 function getList()
 {
     $this->bd->select($this->tabla, '*', "1=1", array(), "nombre_evento");
     $r = array();
     while ($fila = $this->bd->getRow()) {
         $evento = new Evento();
         $evento->set($fila);
         $r[] = $evento;
     }
     return $r;
 }
Example #10
0
 public function listar($ordem = "ASC", $campo = self::ID)
 {
     $info = parent::listar($ordem, $campo);
     if (!empty($info)) {
         $temp = new Evento($info[self::ID]);
         parent::resgatarObjetos($info);
         $temp->setData(new DataHora($info[self::DATA]));
         $temp->setURL($info[parent::URL]);
         $temp->setTexto($info[parent::TEXTO]);
         $temp->local = $info[self::LOCAL];
         return $temp;
     }
 }
Example #11
0
 /**
  * 
  * @param AppController $class
  */
 protected function parametros(AppController $class)
 {
     $endereco = null;
     $modelEventos = new Evento();
     $meusEventos = $modelEventos->verificaEventosParaPromoter(Session::read('Usuario.pessoas_id'));
     if (Session::check('Empresa')) {
         $modelEndereco = new Endereco();
         $endereco = $modelEndereco->findEnderecosEmpresa(Session::read('Empresa.empresas_id'));
         $endereco = $endereco[0];
     }
     $class->set('title_layout', 'Painel Administrativo');
     $class->set('endereco', $endereco);
     $class->set('meusEventos', $meusEventos);
 }
 public function testPostEventoCorrecto()
 {
     $destino = Enhance::getCodeCoverageWrapper('EventosControllerClass');
     $destino->postEvento();
     $eventos = new Evento();
     $eventos->nombre = 'Concirto David Bisbal';
     $eventos->fecha = '2014-08-14';
     $eventos->hora = '23:00';
     $eventos->tipo = 'B';
     $eventos->aforo = '1000';
     $eventos->descripcion = 'Concierto del famoso almeriense David Bisbal en Vera (Almeria)';
     $eventos->save();
     $this->call('POST', 'eventos');
     $this->assertRedirectedToRoute('eventos');
 }
 public function testPostEventoCorrecto()
 {
     $destino = Enhance::getCodeCoverageWrapper('EventosControllerClass');
     $destino->postEvento();
     $eventos = new Evento();
     $eventos->nombre = 'Concierto Dani Martin';
     $eventos->fecha = '2014-08-01';
     $eventos->hora = '23:30';
     $eventos->tipo = 'musica';
     $eventos->aforo = '1000';
     $eventos->descripcion = 'concierto del ex-cantante de ECDL en Berja';
     $eventos->save();
     $this->call('POST', 'eventos');
     $this->assertRedirectedToRoute('eventos');
 }
Example #14
0
 public function getDashboard()
 {
     $users = User::where('padre_id', '=', Auth::user()->id)->orderBy('id', 'DESC')->take(5)->get();
     $eventos = Evento::where('user_id', '=', Auth::user()->id)->orderBy('id', 'DESC')->take(5)->get();
     $ventas = Venta::where('user_id', '=', Auth::user()->id)->orderBy('id', 'DESC')->take(5)->get();
     $this->layout->content = View::make('admin/dashboard')->with('users', $users)->with('eventos', $eventos)->with('ventas', $ventas);
 }
 public function run()
 {
     $faker = Faker::create();
     foreach (range(1, 10) as $index) {
         Evento::create([]);
     }
 }
Example #16
0
 public function eliminarevento()
 {
     include './view/vistaeventos.php';
     include "./model/agregarevento_model.php";
     if (isset($_SESSION['idusuario']) && $_SESSION['idusuario'] != NULL && $_SESSION['admin'] === '1') {
         $evento = new Evento();
         $reg = array('id' => $_REQUEST['id']);
         $vista = new Vistaeventos();
         $evento->eliminarevento($reg);
         header('Location: index.php?action=eventos');
     } else {
         include './view/vistaindex.php';
         $vista = new Vistaindex();
         $vista->mostrar();
     }
 }
 public function run()
 {
     $participants = DB::table('event_participant')->get();
     foreach ($participants as $participant) {
         $player = Player::find($participant->player_id);
         $user = User::find($participant->user_id);
         $event = Evento::find($participant->event_id);
         $payment = Payment::find($participant->payment_id);
         $uuid = Uuid::generate();
         $new = new Participant();
         $new->id = $uuid;
         $new->firstname = $player->firstname;
         $new->lastname = $player->lastname;
         $new->due = $event->getOriginal('fee');
         $new->early_due = $event->getOriginal('early_fee');
         $new->early_due_deadline = $event->early_deadline;
         $new->method = 'full';
         $new->plan_id = Null;
         $new->player_id = $player->id;
         $new->event_id = $participant->event_id;
         $new->accepted_on = $participant->created_at;
         $new->accepted_by = $user->profile->firstname . " " . $user->profile->lastname;
         $new->accepted_user = $participant->user_id;
         $new->status = 1;
         $new->created_at = $participant->created_at;
         $new->updated_at = $participant->updated_at;
         $new->save();
         $update = Item::where('payment_id', '=', $payment->id)->firstOrFail();
         $update->participant_id = $uuid;
         $update->save();
     }
 }
 public function indexAction()
 {
     $eventos = Evento::findEventosActive()->getData();
     $paginator = new Zend_Paginator(new Zend_Paginator_Adapter_Array($eventos));
     $paginator->setItemCountPerPage(20)->setPageRange(5)->setCurrentPageNumber($this->_request->getParam('page', 1));
     $this->view->eventos = $paginator;
 }
 public function register_visualization($document_id)
 {
     $documento = \Documento::find($document_id);
     if (!$documento) {
         return \Response::json(['error' => 'No existe ningun documento con id = ' . $document_id], 200);
     }
     $auth_token = \Request::header('authorization');
     $user = \User::where('auth_token', '=', $auth_token)->first();
     $idevento = \Input::get('session_id');
     if ($idevento) {
         $evento = \Evento::find($idevento);
         if (!$evento) {
             return \Response::json(['error' => 'No existe ninguna sesión con id = ' . $idevento], 200);
         }
         $v = new \Visualizacion();
         $v->idusers = $user->id;
         $v->ideventos = $evento->ideventos;
         $v->iddocumentos = $document_id;
         $v->save();
     } else {
         // obtener todos los eventos asociados al documento
         $eventos = \DocumentosEvento::where('iddocumentos', '=', $document_id)->get();
         foreach ($eventos as $evento) {
             $v = new \Visualizacion();
             $v->idusers = $user->id;
             $v->ideventos = $evento->ideventos;
             $v->iddocumentos = $document_id;
             $v->save();
         }
     }
     return \Response::json(['success' => 1], 200);
 }
Example #20
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     //Coger eventos del día siguiente
     $events = Evento::getNextDayEventos()->get();
     foreach ($events as $e) {
         //Coger los gcm_regids de los voluntarios asignados al evento que pueden recibir notificaciones
         $registration_ids = Asistencia::getUsersToNotificate($e->ideventos)->get()->lists('gcm_token');
         $title = 'AFI Perú - Evento';
         $message = 'Recordatorio de evento: ' . $e->nombre . ' - ' . $e->fecha_evento;
         $type = 1;
         $m = ['title' => $title, 'message' => $message, 'type' => $type];
         $response = Helpers::pushGCM($registration_ids, $m);
         //$this->info(var_dump($response));
     }
     ///Coger todos los padrinos
     $sponsors = Padrino::getActivePadrinosPushInfo()->get();
     foreach ($sponsors as $s) {
         //Si el padrino tiene activado el push de pagos y tiene registadro su gcm_token
         if ($s->push_pagos && $s->gcm_token) {
             //Buscar si hay una deuda pendiente para el día siguiente
             $fee = CalendarioPago::getCalendarioPagoPendienteNextDayByPadrino($s->idpadrinos)->first();
             if ($fee) {
                 //$this->info(var_dump($s->gcm_regid));
                 $title = 'AFI Perú - Padrino';
                 $message = 'Recordatorio de pago: ' . $fee->vencimiento;
                 $type = 2;
                 $m = ['title' => $title, 'message' => $message, 'type' => $type];
                 $response = Helpers::pushGCM(array($s->gcm_token), $m);
                 //$this->info(var_dump($response));
             }
         }
     }
 }
 public function actionIndex()
 {
         $username = Yii::app()->user->name;
         $modelU = Utilizador::model();
         $oid = $modelU->findByAttributes(array('username'=>$username))->oid;
         $eventosFavoritos = Evento::getEventosFavoritosUser($oid,5);
         $this->render('index',array('data'=>$eventosFavoritos));
 }
 public function run()
 {
     DB::table('pasaje')->delete();
     $pasaje = Pasaje::create(array('cubre_pasaje' => 'IFAI', 'tipo_pasaje' => 'Aéreo', 'numero_viaje' => '651CDC', 'fecha' => '2014-10-01', 'gasto' => '2200', 'tipo' => 'ida', 'compania_id' => '1', 'ciudad_origen_id' => '1', 'ciudad_destino_id' => '2'));
     $eventos = Evento::where('id', '=', '1')->get();
     foreach ($eventos as $evento) {
         $evento->pasajes()->attach($pasaje->id);
     }
     $pasaje = Pasaje::create(array('cubre_pasaje' => 'IFAI', 'tipo_pasaje' => 'Aéreo', 'numero_viaje' => '984DFG', 'fecha' => '2014-10-05', 'gasto' => '2200', 'tipo' => 'regreso', 'compania_id' => '1', 'ciudad_origen_id' => '2', 'ciudad_destino_id' => '1'));
     $eventos = Evento::where('id', '=', '1')->get();
     foreach ($eventos as $evento) {
         $evento->pasajes()->attach($pasaje->id);
     }
     /* Evento 2 */
     $pasaje = Pasaje::create(array('cubre_pasaje' => 'IFAI', 'tipo_pasaje' => 'Aéreo', 'numero_viaje' => '234JKB', 'fecha' => '2014-09-15', 'gasto' => '1500', 'tipo' => 'ida', 'compania_id' => '2', 'ciudad_origen_id' => '1', 'ciudad_destino_id' => '3'));
     $eventos = Evento::where('id', '=', '2')->get();
     foreach ($eventos as $evento) {
         $evento->pasajes()->attach($pasaje->id);
     }
     $pasaje = Pasaje::create(array('cubre_pasaje' => 'IFAI', 'tipo_pasaje' => 'Aéreo', 'numero_viaje' => '546DFG', 'fecha' => '2014-09-17', 'gasto' => '1500', 'tipo' => 'regreso', 'compania_id' => '2', 'ciudad_origen_id' => '3', 'ciudad_destino_id' => '1'));
     $eventos = Evento::where('id', '=', '2')->get();
     foreach ($eventos as $evento) {
         $evento->pasajes()->attach($pasaje->id);
     }
     /* Evento 3 */
     $pasaje = Pasaje::create(array('cubre_pasaje' => 'IFAI', 'tipo_pasaje' => 'Aéreo', 'numero_viaje' => '678DFG', 'fecha' => '2013-01-01', 'gasto' => '3200', 'tipo' => 'ida', 'compania_id' => '3', 'ciudad_origen_id' => '2', 'ciudad_destino_id' => '4'));
     $eventos = Evento::where('id', '=', '3')->get();
     foreach ($eventos as $evento) {
         $evento->pasajes()->attach($pasaje->id);
     }
     $pasaje = Pasaje::create(array('cubre_pasaje' => 'IFAI', 'tipo_pasaje' => 'Aéreo', 'numero_viaje' => '674GTH', 'fecha' => '2013-01-07', 'gasto' => '3600', 'tipo' => 'regreso', 'compania_id' => '3', 'ciudad_origen_id' => '4', 'ciudad_destino_id' => '2'));
     $eventos = Evento::where('id', '=', '3')->get();
     foreach ($eventos as $evento) {
         $evento->pasajes()->attach($pasaje->id);
     }
     /* Evento 4 */
     $pasaje = Pasaje::create(array('cubre_pasaje' => 'IFAI', 'tipo_pasaje' => 'Aéreo', 'numero_viaje' => '976XCV', 'fecha' => '2014-08-01', 'gasto' => '2700', 'tipo' => 'ida', 'compania_id' => '1', 'ciudad_origen_id' => '1', 'ciudad_destino_id' => '5'));
     $eventos = Evento::where('id', '=', '4')->get();
     foreach ($eventos as $evento) {
         $evento->pasajes()->attach($pasaje->id);
     }
     $pasaje = Pasaje::create(array('cubre_pasaje' => 'IFAI', 'tipo_pasaje' => 'Aéreo', 'numero_viaje' => '643TGH', 'fecha' => '2013-08-05', 'gasto' => '2500', 'tipo' => 'regreso', 'compania_id' => '1', 'ciudad_origen_id' => '5', 'ciudad_destino_id' => '1'));
     $eventos = Evento::where('id', '=', '4')->get();
     foreach ($eventos as $evento) {
         $evento->pasajes()->attach($pasaje->id);
     }
     /* Evento 5 */
     $pasaje = Pasaje::create(array('cubre_pasaje' => 'IFAI', 'tipo_pasaje' => 'Aéreo', 'numero_viaje' => '345WAS', 'fecha' => '2013-10-01', 'gasto' => '6000', 'tipo' => 'ida', 'compania_id' => '1', 'ciudad_origen_id' => '1', 'ciudad_destino_id' => '7'));
     $eventos = Evento::where('id', '=', '5')->get();
     foreach ($eventos as $evento) {
         $evento->pasajes()->attach($pasaje->id);
     }
     $pasaje = Pasaje::create(array('cubre_pasaje' => 'IFAI', 'tipo_pasaje' => 'Aéreo', 'numero_viaje' => '651WER', 'fecha' => '2013-10-05', 'gasto' => '6300', 'tipo' => 'regreso', 'compania_id' => '1', 'ciudad_origen_id' => '7', 'ciudad_destino_id' => '1'));
     $eventos = Evento::where('id', '=', '5')->get();
     foreach ($eventos as $evento) {
         $evento->pasajes()->attach($pasaje->id);
     }
 }
 public function run()
 {
     DB::table('evento')->delete();
     Evento::create(array('name' => 'Congreso X de Transparencia', 'url' => 'http://www.congresotransparencia.com', 'viatico_id' => '1', 'ciudad_id' => '1', 'tipo_viaje' => 'Nacional'));
     Evento::create(array('name' => 'Forum de gobierno abierto', 'url' => 'http://www.gobiernoabierto.com', 'viatico_id' => '2', 'ciudad_id' => '2', 'tipo_viaje' => 'Nacional'));
     Evento::create(array('name' => 'International open goverment congress', 'url' => 'http://www.internationalgvmtcongress.com', 'viatico_id' => '3', 'ciudad_id' => '3', 'tipo_viaje' => 'Internacional'));
     Evento::create(array('name' => 'Another conference', 'url' => 'http://www.conference.com', 'viatico_id' => '4', 'ciudad_id' => '4', 'tipo_viaje' => 'Internacional'));
     Evento::create(array('name' => 'Canadian transparence congress', 'url' => 'http://www.canadatransparence.com', 'viatico_id' => '5', 'ciudad_id' => '5', 'tipo_viaje' => 'Internacional'));
 }
Example #24
0
 public function postEvento()
 {
     $reglas = array('nombre' => array('required', 'min:8', 'unique:eventos'), 'fecha' => 'required', 'hora' => 'required', 'tipo' => 'required', 'aforo' => 'required', 'descripcion' => 'required');
     $validator = Validator::make(Input::all(), $reglas);
     if ($validator->fails()) {
         return Redirect::to('/eventos')->withErrors($validator)->withInput();
     } else {
         $eventos = new Evento();
         $eventos->nombre = Input::get('nombre');
         $eventos->fecha = Input::get('fecha');
         $eventos->hora = Input::get('hora');
         $eventos->tipo = Input::get('tipo');
         $eventos->aforo = Input::get('aforo');
         $eventos->descripcion = Input::get('descripcion');
         $eventos->save();
         return Redirect::to('eventos');
     }
 }
function menuEvento(Evento $evento, $menu, $subMenu = null, $subTitulo = null, $tituloAtual = null)
{
    if ($evento == null) {
        return;
    }
    echo "<h2>{$evento->titulo}" . ($evento->confirmacao == "preinscricao" ? " (pré-inscrição)" : "") . ($evento->id_evento_pai ? ' (evento filho)' : '') . "</h2>";
    echo "<a href='admin.php?page=Eventos&action=view&id={$evento->id}' class='add-new-h2'>Dashboard</a>";
    echo "<a href='admin.php?page=Eventos&action=inscricoes&id={$evento->id}' class='add-new-h2'>Inscrições</a>";
    echo "<a href='admin.php?page=Eventos&action=comunicacao&id={$evento->id}' class='add-new-h2'>Comunicação</a>";
    if ($evento->hasAvaliacao()) {
        echo "<a href='admin.php?page=Eventos&action=avaliacoes&id={$evento->id}' class='add-new-h2'>Avaliações</a>";
    }
    if ($evento->pago == 'pago') {
        echo "<a href='admin.php?page=Eventos&action=financeiro&id={$evento->id}' class='add-new-h2'>Financeiro</a>";
    }
    echo "<a href='admin.php?page=Eventos&action=configuracoes&id={$evento->id}' class='add-new-h2'>Configurações</a>";
    echo "<a href='{$evento->permalink}()' style='margin-left: 20px;' class='add-new-h2' target='_blank'>Visualizar</a>";
    echo "<h2>{$subTitulo}</h2>";
    if ($menu == "evento-configuracao") {
        echo "<a href='post.php?action=edit&post={$evento->id}' class='add-new-h2'>Editar Evento</a>";
        echo "<a href='admin.php?page=Precos&id_evento={$evento->id}' class='add-new-h2'>Preços</a>";
        echo "<a href='admin.php?page=Categorias&id_evento={$evento->id}' class='add-new-h2'>Categorias</a>";
        echo "<a href='admin.php?page=Descontos&id_evento={$evento->id}' class='add-new-h2'>Tickets de Desconto</a>";
    }
    if ($menu == "inscricao-list") {
        echo "<a href='admin.php?page=Inscricoes&id_evento={$evento->id}' class='add-new-h2'>Todos inscritos</a>";
        if ($evento->qtdPresentes() > 0) {
            echo "<a href='admin.php?page=Inscricoes&id_evento={$evento->id}&filter=presentes' class='add-new-h2'>Presentes</a>";
        }
        echo "<a href='admin.php?page=Inscricoes&id_evento={$evento->id}&filter=confirmados' class='add-new-h2'>Confirmados</a>";
        echo "<a href='admin.php?page=Inscricoes&id_evento={$evento->id}&filter=naoConfirmados' class='add-new-h2'>Pendentes</a>";
        if ($evento->qtdPreInscritos() > 0) {
            echo "<a href='admin.php?page=Inscricoes&id_evento={$evento->id}&filter=preInscritos' class='add-new-h2'>Pré-inscritos</a>";
        }
        echo "<a href='admin.php?page=Inscricoes&id_evento={$evento->id}&filter=filaEspera' class='add-new-h2'>Fila de espera</a>";
        echo "<a href='admin.php?page=Inscricoes&id_evento={$evento->id}&filter=rejeitados' class='add-new-h2'>Cancelados</a>";
        if ($evento->campos_extras) {
            echo "<a style='margin-left: 20px;' href='admin.php?page=Inscricoes&id_evento={$evento->id}&action=extras' class='add-new-h2'>Extras</a>";
        }
        echo "<a style='margin-left: 20px;' href='admin.php?page=Inscricoes&id_evento={$evento->id}&action=add' class='add-new-h2'>Inscrever Pessoa</a>";
        echo "<a style='margin-left: 20px;' href='admin.php?page=Inscricoes&id_evento={$evento->id}&action=importarCsv' class='add-new-h2'>Importar CSV</a>";
    }
    if ($menu == "precoevento-list") {
        echo "<a href='admin.php?page=AdminPrecosEventos&action=add-new&id_evento={$evento->id}' class='add-new-h2'>Novo preço</a>";
    }
    if ($menu == "desconto-list") {
        echo "<a href='admin.php?page=Desconto&action=add-new&id_evento={$evento->id}' class='add-new-h2'>Novo Ticket</a>";
    }
    if ($tituloAtual != null) {
        echo "<h2>{$tituloAtual}</h2>";
    }
    $erros = $evento->getErros();
    if (count($erros['erros']) > 0) {
        admin_notice($evento);
    }
}
 public function actionPesquisar($texto,$tipo)
 {
         $model = Evento::model();
         $model->titulo = $texto;
         $model->descricao = $texto;
         $model->tipo_idtipo = $tipo;
         if ( $tipo == '0' ) $data = $model->search();
         else $data = $model->searchSimples();
         $this->renderPartial('resultados_pesquisa',array('data'=>$data));
 }
Example #27
0
 public function index()
 {
     $usuario_id = Session::get('id');
     $this->eventos = Evento::getListadoEventos($usuario_id);
     $reporte = new Reporte();
     $this->progress_report = $reporte->getListadoReportePorTipo($usuario_id, 'progress_report');
     $this->demographics_report = $reporte->getListadoReportePorTipo($usuario_id, 'demographics_report');
     $this->beehive_report = $reporte->getListadoReportePorTipo($usuario_id, 'beehive_report');
     $this->read_only = false;
 }
 public function traza($modelo, $id)
 {
     try {
         //$traza  = DB::table('eventos')->where('modelo_id','=',$id)->where('modelo','=',$modelo)->get();
         $traza = Evento::where('modelo_id', '=', $id)->where('modelo', '=', $modelo)->get();
         return Response::json(array('error' => false, 'listado' => $traza), 200);
     } catch (Exception $e) {
         return Response::json(array('error' => true, 'mensaje' => $e->getMessage()), 200);
     }
 }
Example #29
0
 public static function editar()
 {
     $sala = new Sala();
     $sala->selecionarPorId($_GET['id']);
     $evento = new Evento();
     $evento->selecionarPorId($sala->fkEvento);
     if (!empty($_POST)) {
         $sala = new Sala();
         foreach ($_POST as $pKey => $p) {
             $sala->{$pKey} = $p;
         }
         $idSala = $sala->salvar();
         $evento = new Evento();
         $evento->selecionarPorId($_POST['fkEvento']);
         self::redirecionar(Configuracao::$baseUrl . self::$viewController . '/listar/' . $evento->id . '-' . Funcao::prepararLink($evento->nome) . Configuracao::$extensaoPadrao);
     }
     self::$corpo = "editar";
     self::$variaveis = array('sala' => $sala);
     self::renderizar(self::$viewController);
 }
 public function verifyEvento()
 {
     $id = (int) $this->_request->getParam('evento');
     $evento = Evento::findEvento($id);
     if ($evento) {
         return $evento;
     } else {
         $this->_flashMessenger->addError('Evento No Existe');
         $this->_redirect('/backend/eventos');
     }
 }