public function loadModel($id)
 {
     $model = EventCategories::model()->findByAttributes(array('id_category' => $id));
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
 public function actionEventos()
 {
     $this->pageTitle = 'Eventos - ' . $this->pageTitle;
     $this->pageDescription = 'Los esperamos sin falta en nuestros eventos religiosos, teatro, danza, noches de música, cabalgata, carrozas y comparsas, deportes extremos y actividades para toda la familia.';
     $this->tagImage = '/images/facebook-eventos.png';
     $categories = array();
     $categoriesDb = EventCategories::model()->findAllByAttributes(array('status_category' => 1));
     foreach ($categoriesDb as $key => $category) {
         $events = Events::model()->findAllByAttributes(array('status_event' => 1, 'great_event' => 1, 'event_categories_id_category' => $category->id_category), array('order' => 't.id_event ASC', 'limit' => 3));
         if ($events != null) {
             $categories[] = array('events' => $events, 'category' => $category);
         }
     }
     $this->render('eventos', array('categories' => $categories));
 }
Example #3
0
function getEventCategories($inputs)
{
    include "EventCategories.php";
    $eventCategories = new EventCategories();
    $eventCategories->getEventCategories($inputs[0]);
}
Example #4
0
<?php

$ruta = explode("/", Yii::app()->request->pathInfo);
$page = strtolower($ruta[0]);
$categories = EventCategories::model()->findAllByAttributes(array('status_category' => 1));
?>

	<header class="bar-menu">
		<div class="limiter-container">
			<div class="line-box line-table">
				<div class="line logo">
					<a href="<?php 
echo Yii::app()->homeUrl;
?>
">Ferias de Duitama</a>
				</div>
				<nav class="line menu">
					<ul>
						<li>
							<span class="item information">INFORMACIÓN GENERAL</span>
							<ul>
								<li><a href="<?php 
echo $this->createUrl('invitacion/');
?>
">INVITACIÓN</a></li>
								<li><a href="<?php 
echo $this->createUrl('patrocinadores/');
?>
">PATROCINADORES</a></li>
								<li><a href="<?php 
echo $this->createUrl('contacto/');