<div class='row'> <?php $channels = ChannelData::getAll(); $images = ImageData::getAll(); $resultados = ImageViewData::getSearch($_GET['q']); $im = null; $url = null; if (count($resultados) > 0) { $im = $resultados[0]->getImage(); $url = "storage/channel/{$im->channel_id}/" . $im->name; } ?> <div class="col-md-12"> <h1 class='roboto'>Buscar: <?php echo $_GET['q']; ?> </h1> <?php if ($url != null) { ?> <hr><?php foreach ($resultados as $resultado) { $image = $resultado->getImage(); $url = "storage/channel/{$image->channel_id}/" . $image->name; echo <<<AAA \t\t<ul class="row"> <li class="col-md-4"> <img data-src="holder.js/360x270" class='img-responsive' src='{$url}' alt=""> </li> <li class="col-md-8">
<div class='row'> <?php $channel_populars = FollowerData::getAllByPopular(); $image_populars = ImageViewData::getAllByPopular(); $channels = ChannelData::getAll(); $images = ImageData::getAll(); ?> <div class="col-md-12"> <h2 class='roboto'>Populares <small>Las mas vistas</small></h2> <?php if (count($image_populars) > 0) { Widget::renderPopularImages($image_populars); } else { ?> <div class='hero-unit'> <h2 class='roboto'>No hay imagenes</h2> <p class='roboto'>No se ha cargado imagenes al sistema</p> </div> <?php } ?> </div> <!-- <div class='col-md-2'> <br><h4 class='roboto'>Populares</h4> <?php php; ?> </div> --> </div><!-- /container -->
public function getViews() { return ImageViewData::getAllByImageId($this->id); }
<?php } ?> </div> <div class='col-md-2'> <?php if ($image != null) { ?> <br><h4 class='roboto'>Similares</h4> <div class='image-widget'> <?php $cnt = 0; $image_similars = ImageViewData::getSearch($image->title); foreach ($image_similars as $image_similar) { $image = $image_similar->getImage(); $url = "storage/channel/{$image->channel_id}/" . $image->name; ?> <div class='item'> <div class='title roboto'><a href='index.php?view=image&id=<?php echo $image->id; ?> '><?php echo $image->title; ?> </a></div> <img class="img-responsive" src='<?php echo $url; ?>