mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-12-22 08:30:59 +03:00
fixes
This commit is contained in:
parent
73cdb233f3
commit
76b1aba5d6
2 changed files with 17 additions and 6 deletions
|
@ -1,6 +1,11 @@
|
|||
<?php
|
||||
|
||||
use \App\Core\Page;
|
||||
use \App\Services\DB;
|
||||
$nonreviewedimgs = DB::query('SELECT COUNT(*) FROM photos WHERE moderated=0')[0]['COUNT(*)'];
|
||||
if ($nonreviewedimgs > 0) {
|
||||
$nonr = '<span class="mm-notify notify-count">'.$nonreviewedimgs.'</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
<ul class="list-unstyled fw-normal pb-1 small">
|
||||
|
@ -27,7 +32,7 @@ use \App\Core\Page;
|
|||
|
||||
<svg style="margin-right: 10px; margin-left: -12px; margin-bottom: -5px;" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="<?php if ($_GET['type'] === 'Photo') { ?> #3862eb <?php } else { ?> #aca8a9 <?php } ?>"><path d="M0 0h24v24H0V0z" fill="none"/><circle cx="12" cy="12" r="3"/><path d="M20 4h-3.17l-1.24-1.35c-.37-.41-.91-.65-1.47-.65H9.88c-.56 0-1.1.24-1.48.65L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 13c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/></svg>
|
||||
Фотографии
|
||||
</a></li>
|
||||
</a><?=$nonr?></li>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -66,19 +66,25 @@ if (NGALLERY['root']['title'] != null && NGALLERY['root']['showtitle'] === true)
|
|||
</li>
|
||||
<?php
|
||||
if (Auth::userid() <= 0) { ?>
|
||||
|
||||
<li class="mm-pad-right"><a href="/login" class="mm-item"><span class="mm-icon"><i class="fas fa-xs fa-address-card"></i></span><span class="mm-label">Войти</span></a></li>
|
||||
<li><a href="/register" class="mm-item"><span class="mm-icon"><i class="fas fa-xs fa-user"></i></span><span class="mm-label">Регистрация</span></a></li>
|
||||
<?php } else { ?>
|
||||
<li class="mm-pad-right mm-wide"><a href="/author/<?=Auth::userid()?>/" class="mm-item"><span class="mm-icon"><i class="fas fa-xs fa-user"></i></span><span class="mm-label"><?=$user->i('username')?></span></a>
|
||||
<div>
|
||||
<ul class="mm-level-2">
|
||||
<li><a href="/lk/" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-info-circle"></i></span><span class="mm-label">Общая информация</span></a></li>
|
||||
<?php
|
||||
<?php
|
||||
if ($user->i('admin') > 0) {
|
||||
$nonreviewedimgs = DB::query('SELECT COUNT(*) FROM photos WHERE moderated=0')[0]['COUNT(*)'];
|
||||
if ($nonreviewedimgs > 0) {
|
||||
$nonr = '<span class="mm-notify notify-count">'.$nonreviewedimgs.'</span>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<li class="mm-pad-right mm-wide"><a href="/author/<?=Auth::userid()?>/" class="mm-item"><span class="mm-icon"><i class="fas fa-xs fa-user"></i></span><span class="mm-label"><?=$user->i('username')?></span><?=$nonr?></a>
|
||||
<div>
|
||||
<ul class="mm-level-2">
|
||||
<li><a href="/lk/" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-info-circle"></i></span><span class="mm-label">Общая информация</span></a></li>
|
||||
<?php
|
||||
if ($user->i('admin') > 0) {
|
||||
|
||||
?>
|
||||
|
||||
<li><a href="/admin" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-info-circle"></i></span><span class="mm-label">Admin</span><?=$nonr?></a></li>
|
||||
|
|
Loading…
Reference in a new issue