mirror of
https://github.com/claradex/nativegallery.git
synced 2024-12-22 16:41:04 +03:00
fix rating if not logged
This commit is contained in:
parent
656ec726f2
commit
b53820412f
1 changed files with 3 additions and 0 deletions
|
@ -157,10 +157,13 @@ if ($photo->i('id') !== null) {
|
|||
<img class="loader" pid="1361063" src="/img/loader.png">
|
||||
<div class="rtext">Рейтинг: <b id="rating"><?= Vote::count($id) ?></b></div>
|
||||
<div class="star" pid="1361063"></div>
|
||||
<?php
|
||||
if (Auth::userid() > 0) { ?>
|
||||
<div class="vote" pid="<?= $id ?>">
|
||||
<a href="#" vote="1" class="vote_btn <?php if (Vote::photo(Auth::userid(), $id) === 1) { echo 'voted'; } ?>"><span>Интересная фотография!</span></a>
|
||||
<a href="#" vote="0" class="vote_btn <?php if (Vote::photo(Auth::userid(), $id) === 0) { echo 'voted'; } ?>"><span>Мне не нравится</span></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div id="votes" class="votes">
|
||||
<table class="vblock pro">
|
||||
<?php
|
||||
|
|
Loading…
Reference in a new issue