115 lines
3.8 KiB
PHP
115 lines
3.8 KiB
PHP
<div class="row">
|
||
<div class="col-md-2" style="width: 250px!important;">
|
||
<a href="/"><img src="/img/logo.png" style="width: 198px;"/></a>
|
||
<br/>
|
||
<h2>Автор точки</h2>
|
||
<img src="<?= $point->authorUser->photo ?>" style="max-width: 180px;" />
|
||
<p><span class="glyphicon glyphicon-user"></span> <?= $point->authorUser->nick ?></p>
|
||
<p><span class="glyphicon glyphicon-pencil"></span> <?= $point->authorUser->getPointsCount() ?> - создано точек</p>
|
||
<!-- <p><span class="glyphicon glyphicon-thumbs-up"></span> 10 - рейтинг</p>-->
|
||
<hr/>
|
||
<h3><?= $randomPoint->name ?></h3>
|
||
<p style="text-align: center;"><a href="/page/point/id/<?= $randomPoint->id ?>"><img src="<?= $randomPoint->getImg() ?>" style="width: 200px;"/></a></p>
|
||
<p>
|
||
<?= mb_substr($randomPoint->description, 0, 120, 'UTF-8') ?>...
|
||
<a class="" href="/page/point/id/<?= $randomPoint->id ?>" role="button"><nobr>далее »</nobr></a>
|
||
</p>
|
||
</div>
|
||
<div class="col-md-7">
|
||
<h1><?= $point->name ?></h1>
|
||
|
||
Координаты:
|
||
<nobr>
|
||
<?= $point->lat > 0 ? 'N' : 'S' ?><?= $point->lat > 0 ? $point->lat : (-1 * $point->lat) ?>°
|
||
<?= $point->lng > 0 ? 'E' : 'W' ?><?= $point->lng > 0 ? $point->lng : (-1 * $point->lng) ?>°
|
||
</nobr>
|
||
/
|
||
<nobr>
|
||
<?= $point->lat > 0 ? 'N' : 'S' ?><?= Coord::dergeeToMinute($point->lat) ?>
|
||
<?= $point->lng > 0 ? 'E' : 'W' ?><?= Coord::dergeeToMinute($point->lng) ?>
|
||
</nobr>
|
||
/
|
||
<a href="/?point=<?= $point->id ?>">На карте</a>
|
||
|
||
<br/><br/>
|
||
<?php
|
||
preg_match_all("/.*?[.?!](?:\s|$)/s", $point->descriptionHtml, $items);
|
||
$text = $items[0];
|
||
if (count($text) > 4)
|
||
{
|
||
for ($index = 0; $index < 4; $index++)
|
||
{
|
||
print $text[$index];
|
||
}
|
||
} else
|
||
{
|
||
print $point->descriptionHtml;
|
||
}
|
||
?>
|
||
|
||
<?php if ($photos || $point->img): ?>
|
||
<br/><br/>
|
||
<table border="0">
|
||
<tr>
|
||
<td width="33%"></td>
|
||
<td width="34%">
|
||
<div class="fotorama" data-maxwidth="555" data-loop="true">
|
||
<?php if ($point->img): ?>
|
||
<a href="<?= $point->img ?>">
|
||
<img src="<?= $point->img ?>" />
|
||
</a>
|
||
<?php endif; ?>
|
||
<?php if ($photos): ?>
|
||
<?php foreach ($photos as $photo): ?>
|
||
<a href="/photos/middle/<?= $photo->name ?>">
|
||
<img src="/photos/small/<?= $photo->name ?>">
|
||
</a>
|
||
<?php endforeach; ?>
|
||
<?php endif; ?>
|
||
</div>
|
||
</td>
|
||
<td width="33%"></td>
|
||
</tr>
|
||
</table>
|
||
<br/><br/>
|
||
<?php endif; ?>
|
||
|
||
<?php
|
||
if (count($text) > 3)
|
||
{
|
||
for ($index = $index; $index < count($text); $index++)
|
||
{
|
||
print $text[$index] . ' ';
|
||
}
|
||
}
|
||
?>
|
||
|
||
<hr/>
|
||
<p>
|
||
[ <span class="glyphicon glyphicon-star"></span> <?= $countInFavs ?> - в закладках ]
|
||
[ <span class="glyphicon glyphicon-thumbs-up"></span> <?= $countLikes ?> - нравится ]
|
||
|
||
<!-- [ <span class="glyphicon glyphicon-star"></span>
|
||
<span class="glyphicon glyphicon-star"></span>
|
||
<span class="glyphicon glyphicon-star"></span>
|
||
<span class="glyphicon glyphicon-star"></span>
|
||
<span class="glyphicon glyphicon-star-empty"></span> ] -->
|
||
</p>
|
||
</div>
|
||
<div class="col-md-2" style="width: 250px!important;">
|
||
<h2>Поблизости:</h2>
|
||
<?php if(empty($closestPoints)):?>
|
||
нет известных нам точек.
|
||
<?php else: ?>
|
||
<?php foreach ($closestPoints as $cPoint): ?>
|
||
<a href="/page/point/id/<?= $cPoint->id ?>"><img src="<?= $cPoint->getImg()?>" title="<?= $cPoint->name ?>" style="width: 105px;"/></a>
|
||
<?php endforeach;?>
|
||
<?php endif; ?>
|
||
<hr/>
|
||
<h2>Похожие:</h2>
|
||
<?php foreach ($similarPoints as $sPoint): ?>
|
||
<a href="/page/point/id/<?= $sPoint->id ?>"><img src="<?= $sPoint->getImg()?>" title="<?= $sPoint->name ?>" style="width: 105px;"/></a>
|
||
<?php endforeach;?>
|
||
</div>
|
||
</div>
|