1
0
Fork 0
mirror of https://github.com/janickiy/yii2-nomer synced 2025-03-09 15:39:59 +00:00
yii2-nomer/views/search/instagram.php
2020-02-05 06:34:26 +03:00

22 lines
856 B
PHP

<?php
/* @var $this \yii\web\View */
/* @var $result array */
/* @var $searchRequest \app\models\SearchRequest */
use yii\helpers\Html;
use yii\helpers\Url;
?>
<?php if(count($result)): ?>
<?php foreach($result as $item): ?>
<div class="faceb">
<?php if(isset($item["link"])): ?>
<?=Html::a((isset($item["photo"])?Html::img("data:image/jpg;base64,".$item["photo"]):"").\yii\helpers\ArrayHelper::getValue($item, "name", "имя не известно"), isset($item["link"])?$item["link"]:"#", ["target" => "_blank"]);?>
<?php else: ?>
<?=(isset($item["photo"])?Html::img("data:image/jpg;base64,".$item["photo"]):"").$item["name"];?>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php else: ?>
<p class="no">Ничего не найдено</p>
<?php endif; ?>