111 lines
3.9 KiB
PHP
111 lines
3.9 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/41"><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">
|
||
<?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> 13 - в закладках ]
|
||
[ <span class="glyphicon glyphicon-thumbs-up"></span> 120 - нравится ]
|
||
|
||
[ <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>
|
||
<p><img src="/photos/small/_03bad.jpg" style="width: 105px;"/> <img src="/photos/small/1_0a464.jpg" style="width: 105px;"/></p>
|
||
<p><img src="/photos/small/15_165ea.jpg" style="width: 105px;"/> <img src="/photos/small/271_6506d.jpg" style="width: 105px;"/></p>
|
||
<p><img src="/photos/small/305_337c1.jpg" style="width: 105px;"/> <img src="/photos/small/300_81352.jpg" style="width: 105px;"/></p>
|
||
<hr/>
|
||
<h2>Похожие:</h2>
|
||
<p><img src="/photos/small/41_4cd05.jpg" style="width: 105px;"/> <img src="/photos/small/35_2f786.jpg" style="width: 105px;"/></p>
|
||
<p><img src="/photos/small/90_3e312.jpg" style="width: 105px;"/> <img src="/photos/small/271_3f479.jpg" style="width: 105px;"/></p>
|
||
<p><img src="/photos/small/303_85515.jpg" style="width: 105px;"/> <img src="/photos/small/298_206be.jpg" style="width: 105px;"/></p>
|
||
</div>
|
||
</div>
|