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

47 lines
No EOL
2.2 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/* @var $this \yii\web\View */
/* @var $items [] */
/* @var $phone int */
/* @var $resultAntiparkon [] */
/* @var $gibddResult [] */
/* @var $searchRequest \app\models\SearchRequest */
use yii\helpers\Html;
use yii\helpers\Url;
use \yii\helpers\ArrayHelper;
if(!isset($items)) $items = [];
if(!isset($resultAntiparkon)) $resultAntiparkon = [];
if(!isset($gibddResult)) $gibddResult = [];
?>
<?php if(count($items) || count($resultAntiparkon) || count($gibddResult)): ?>
<ul class="cars">
<?php if(is_array($gibddResult)) foreach($gibddResult as $r): ?>
<li>
<b><?=ArrayHelper::getValue($searchRequest, ['user', 'is_admin'])?"Гибдд, Ездит на: ":"Ездит на: ";?></b><?=$r["number"];?>, <?=$r["model"];?>
</li>
<?php endforeach; ?>
<?php if(is_array($resultAntiparkon)) foreach($resultAntiparkon as $r): ?>
<li><b><?=ArrayHelper::getValue($searchRequest, ['user', 'is_admin'])?"Антипаркон: ":"Антипаркон: ";?></b><?=$r["number"];?>, <?=$r["marka"];?></li>
<?php endforeach; ?>
<?php if(is_array($items)) foreach($items as $i): ?>
<li>
<b><?=\yii\helpers\ArrayHelper::getValue($searchRequest, ["user", "is_admin"], false)?"Avinfo, Продавал(а): ":"Продавал(а): ";?></b><?=$i["credate"];?>, <?=$i["marka"];?> <?=$i["model"];?>, <?=$i["year"];?>г., <?=$i["city"];?><?=$i["price"]>0?", ".$i["price"]."р.":"";?>
<?php if(isset($i["images"])): ?>
<?php
$images = array_filter(preg_split('/,/', $i["images"]));
?>
<?php if(count($images)): ?>
<br>
<?php foreach ($images as $i => $img): if(preg_match("/http/", $img)){ continue; } $img = "https://qq.apinomer.com/cars/".$img; ?>
<a href="<?=$img;?>" class="swipebox"><img src="<?=$img;?>" width="100"></a>
<?php endforeach; ?>
<?php endif; ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php else: ?>
Ничего не найдено
<?php endif; ?>