<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 = ChannelData::getAll(); $image_populars = ImageData::getAll(); $im = null; $url = null; if ($image_populars != null) { $im = $image_populars[0]; $url = "storage/channel/{$im->channel_id}/" . $im->name; } // RecentWidget::renderChannels($channel_populars); ?> <div class="col-md-12"> <h2 class='roboto'>Recientes <small>Las mas nuevas</small></h2> <?php if ($url != null) { ?> <?php RecentWidget::renderImages($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>