wikipoints/ground/views/point.php

111 lines
3.8 KiB
PHP
Raw 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.

<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>
Координаты:&nbsp;
<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>
&nbsp;&nbsp;/&nbsp;&nbsp;
<nobr>
<?= $point->lat > 0 ? 'N' : 'S' ?><?= Coord::dergeeToMinute($point->lat) ?>
<?= $point->lng > 0 ? 'E' : 'W' ?><?= Coord::dergeeToMinute($point->lng) ?>
</nobr>
&nbsp;&nbsp;/&nbsp;&nbsp;
<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>
<?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>