Ejemplo n.º 1
0
 /**
  * Retorna una url mas comprensible para el visitante del sitio.
  * @param string $url url rara y poco comprensible por el visitante.
  * @return Nueva url recodificada y comprensible por el visitante.
  */
 public static function normalizarUrl($url)
 {
     $originales = 'ÀÁÈÉÌÍÑÒÓÙÚÜàáèéìíñòóùúü&.,¿?!¡-';
     $modificadas = 'aaeeiinoouuuaaeeiinoouuuy_______';
     $cadena = utf8_decode($url);
     $cadena = strtr($cadena, utf8_decode($originales), $modificadas);
     $cadena = strtolower($cadena);
     $cadena = str_replace(' ', '_', $cadena);
     $cadena = str_replace('__', '_', $cadena);
     $cadena = str_replace('___', '_', $cadena);
     return utf8_encode(MyMethods::clearSpecial($cadena));
 }
Ejemplo n.º 2
0
 /**
  * Displays a particular model.
  * @param integer $id the ID of the model to be displayed
  */
 public function actionEvent($id)
 {
     if (Yii::app()->request->isAjaxRequest) {
         $event = Events::model()->findByAttributes(array('id_event' => $id, 'status_event' => 1));
         if ($event != null) {
             $days = array('Monday' => 'Lunes', 'Tuesday' => 'Martes', 'Wednesday' => 'Miercoles', 'Thursday' => 'Jueves', 'Friday' => 'Viernes', 'Saturday' => 'Sabado', 'Sunday' => 'Domingo');
             $hour = new DateTime($event->hour_event);
             $date = new DateTime($event->datesIdDate->date_date);
             $event->hour_event = $hour->format('g:i A');
             $event->datesIdDate->date_date = $days[$date->format('l')] . ' ' . intval($date->format('d'));
             echo CJSON::encode(array("title" => MyMethods::myStrtoupper($event->title_event), "image" => Yii::app()->request->baseUrl . '/images/events/' . $event->image_event, "place" => MyMethods::myStrtoupper($event->placesIdPlace->name_place), "hour" => $event->datesIdDate->date_date . ' - ' . $event->hour_event, "description" => $event->description_event));
         } else {
             throw new CHttpException(404, 'The requested page does not exist.');
         }
     } else {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
 }
Ejemplo n.º 3
0
</a>
												<?php 
        } else {
            echo MyMethods::myStrtoupper($eventItem->title_event);
        }
        ?>
											</p>
										</td>
										<td>
											<p class="icon-line">
												<span><img src="<?php 
        echo Yii::app()->request->baseUrl;
        ?>
/images/icon-place.svg" alt="Lugar" class="to-svg"></span>
												<?php 
        echo MyMethods::myStrtoupper($eventItem->placesIdPlace->name_place);
        ?>
											</p>
										</td>
									</tr>
								<?php 
    }
    ?>
							</table>
						</div>
					<?php 
}
?>
				</div>
			</div>
		</section>
Ejemplo n.º 4
0
 /**
  * Index action is the default action in a controller.
  */
 public function actionSettings()
 {
     $this->subTitle = "Settings";
     $settingsArr = MyMethods::convertModelToArrayByGroups(Settings::model()->findAll("deleted=0 AND role <" . Yii::app()->user->role), 'section');
     $this->render('settings', array('model' => $settingsArr));
 }
Ejemplo n.º 5
0
		<header class="title-page title-page__orange">
			<h1>NOTICIAS</h1>
		</header>
		<div class="limiter-container">
			<section class="news line-box">
				<?php 
foreach ($news as $key => $new) {
    ?>
					<article class="line new">
						<a href="<?php 
    echo $this->createUrl('noticia/' . $new->id_new . '_' . MyMethods::normalizarUrl($new->title_new));
    ?>
" class="post">
							<figure class="post-image js-resizing" data-resizing="9/12">
								<img src="<?php 
    echo Yii::app()->request->baseUrl;
    ?>
/images/news/<?php 
    echo $new->image_new;
    ?>
" alt="<?php 
    echo $new->title_new;
    ?>
">
							</figure>
							<header class="post-header">
								<h2 class="post-title"><?php 
    echo $new->title_new;
    ?>
</h2>
								<p class="post-content">
Ejemplo n.º 6
0
						<h2 class="events-category__title"><?php 
    echo MyMethods::myStrtoupper($category['category']->name_category);
    ?>
</h2>
						<ul>
							<?php 
    foreach ($category['events'] as $key => $event) {
        ?>
								<li><?php 
        echo MyMethods::myStrtoupper($event->title_event);
        ?>
</li>
							<?php 
    }
    ?>
						</ul>
						<div class="btn-right">
							<a href="<?php 
    echo $this->createUrl('eventos/' . $category['category']->id_category . '_' . MyMethods::normalizarUrl($category['category']->name_category));
    ?>
" class="btn btn-yellow">VER MÁS</a>
						</div>
					</article>
				<?php 
}
?>
			</section>
		</div>

		<?php 
$this->renderPartial('//layouts/__sponsors');
Ejemplo n.º 7
0
 line">
						<a href="<?php 
    echo $this->createUrl('artista/' . $artist->id_artist . '_' . MyMethods::normalizarUrl($artist->name_artist));
    ?>
">
							<figure class="artist-image js-resizing" data-resizing="1">
								<img src="<?php 
    echo Yii::app()->request->baseUrl;
    ?>
/images/artists/350x350/<?php 
    echo $artist->image_artist;
    ?>
" alt="<?php 
    echo $artist->name_artist;
    ?>
">
							</figure>
							<h2 class="artist-name"><?php 
    echo MyMethods::myStrtoupper($artist->name_artist);
    ?>
</h2>
						</a>
					</article>
				<?php 
}
?>
			</section>
		</div>

		<?php 
$this->renderPartial('//layouts/__sponsors');
Ejemplo n.º 8
0
?>
" class="item programing">PROGRAMACIÓN</a></li>
						<li>
							<a href="<?php 
echo $this->createUrl('eventos/');
?>
" class="item events">EVENTOS</a>
							<ul>
								<?php 
foreach ($categories as $key => $category) {
    ?>
									<li><a href="<?php 
    echo $this->createUrl('eventos/' . $category->id_category . '_' . MyMethods::normalizarUrl($category->name_category));
    ?>
"><?php 
    echo MyMethods::myStrtoupper($category->name_category);
    ?>
</a></li>
								<?php 
}
?>
							</ul>
						</li>
						<li><a href="<?php 
echo $this->createUrl('artistas/');
?>
" class="item artists">ARTISTAS</a></li>
						<li><a href="<?php 
echo $this->createUrl('noticias/');
?>
" class="item news">NOTICIAS</a></li>
Ejemplo n.º 9
0
echo MyMethods::myStrtoupper($artist->name_artist);
?>
</h2>
					<h3 class="artist-date">
						<?php 
echo MyMethods::myStrtoupper($artist->datesIdDate->date_date);
?>
						<?php 
echo $artist->day_special != '' ? ' / ' . MyMethods::myStrtoupper($artist->day_special) : '';
?>
</h3>
					<p class="artist-more"><?php 
echo $artist->hour_artist;
?>
 - <?php 
echo MyMethods::myStrtoupper($artist->placesIdPlace->name_place);
?>
</p>
				</header>
				<div class="limiter-container">
					<div class="artist-video">
						<iframe class="js-resizing" data-resizing="9/16" src="https://www.youtube.com/embed/<?php 
echo $artist->video_artist;
?>
" frameborder="0" allowfullscreen></iframe>
					</div>
					<section class="artist-description">
						<figure class="artist-image"><img src="<?php 
echo Yii::app()->request->baseUrl;
?>
/images/artists/350x350/<?php