mirror of
https://github.com/claradex/nativegallery.git
synced 2024-11-15 03:31:10 +03:00
Photos history
This commit is contained in:
parent
e61a04ab7c
commit
f6aa6bcdad
5 changed files with 104 additions and 22 deletions
|
@ -11,7 +11,7 @@ class ProfileController
|
|||
|
||||
public static function lk()
|
||||
{
|
||||
Page::set('Profile/LK');
|
||||
Page::set('Profile/LK/Index');
|
||||
}
|
||||
public static function i()
|
||||
{
|
||||
|
@ -21,6 +21,10 @@ class ProfileController
|
|||
{
|
||||
Page::set('Profile/UploadPhoto');
|
||||
}
|
||||
public static function lkhistory()
|
||||
{
|
||||
Page::set('Profile/LK/History');
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -28,6 +28,7 @@ class Routes
|
|||
if (Auth::userid() > 0) {
|
||||
Router::get('/lk', 'ProfileController@lk');
|
||||
Router::get('/lk/upload', 'ProfileController@upload');
|
||||
Router::get('/lk/history', 'ProfileController@lkhistory');
|
||||
Router::post('/api/upload', 'ApiController@upload');
|
||||
Router::post('/api/photo/comment', 'ApiController@photocomment');
|
||||
Router::post('/api/photo/getcomments/$id', 'ApiController@photocommentload');
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
use \App\Services\{Auth, DB, Date};
|
||||
use \App\Models\User;
|
||||
|
||||
$user = new User(explode('/', $_SERVER['REQUEST_URI'])[2]);
|
||||
$userprofile = new User(explode('/', $_SERVER['REQUEST_URI'])[2]);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
|
@ -21,9 +21,9 @@ $user = new User(explode('/', $_SERVER['REQUEST_URI'])[2]);
|
|||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
||||
<tr>
|
||||
<td class="main">
|
||||
<h1><?= $user->i('username') ?></h1>
|
||||
<h1><?= $userprofile->i('username') ?></h1>
|
||||
<?php
|
||||
if ($user->i('id') === Auth::userid()) { ?>
|
||||
if ($userprofile->i('id') === Auth::userid()) { ?>
|
||||
<p><b><a href="/lk/profile">Редактировать мой профиль</a></b></p>
|
||||
<?php } ?>
|
||||
<table width="100%">
|
||||
|
@ -33,35 +33,24 @@ $user = new User(explode('/', $_SERVER['REQUEST_URI'])[2]);
|
|||
<table>
|
||||
<col width="170px">
|
||||
<?php
|
||||
if ($user->content('location') !== null) { ?>
|
||||
if ($userprofile->content('location') !== null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Откуда:</td>
|
||||
<td><?= $user->content('location') ?></td>
|
||||
<td><?= $userprofile->content('location') ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Дата регистрации:</td>
|
||||
<td><span class="sm"><?= Date::zmdate($user->content('regdate')) ?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Рейтинг:</td>
|
||||
<td><span class="sm">фото <b>0</b>, комментарии <b>+1</b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Время у пользователя:</td>
|
||||
<td><span class="sm"><b>06:22</b></span></td>
|
||||
<td><span class="sm"><?= Date::zmdate($userprofile->content('regdate')) ?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Был на сайте:</td>
|
||||
<td><span class="sm"><?= Date::zmdate($user->i('online')) ?> <?php if (time() - 300 <= $user->i('online')) { ?>(<b>online</b>)<?php } ?></span></td>
|
||||
<td><span class="sm"><?= Date::zmdate($userprofile->i('online')) ?> <?php if (time() - 300 <= $userprofile->i('online')) { ?>(<b>online</b>)<?php } ?></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><br />
|
||||
<div class="sm" style="float:right"><a href="/lk/ticket.php?action=add&aid=140"></a></div>
|
||||
<div>Пользователей, подписанных на мои фотографии: <b>2</b></div><br>
|
||||
<div><b><a href="/comments.php?w-aid=140">Комментарии, написанные этим пользователем</a><br />
|
||||
<a href="/favorites/?aid=140&type=1">Избранное пользователя</a></b></div>
|
||||
<p><b><a href="/lk/pm.php?action=new&to=140">Отправить личное сообщение пользователю</a></b></p>
|
||||
|
||||
</td>
|
||||
<td valign="top" align="right">
|
||||
<script>
|
||||
|
@ -70,7 +59,7 @@ $user = new User(explode('/', $_SERVER['REQUEST_URI'])[2]);
|
|||
}
|
||||
|
||||
function showUserPhoto() {
|
||||
_getID('userphoto_big_img').src = '<?= $user->i('photourl') ?>';
|
||||
_getID('userphoto_big_img').src = '<?= $userprofile->i('photourl') ?>';
|
||||
_getID('userphoto_big_div').style.top = '' + (getBodyScrollTop() + 10) + 'px';
|
||||
_getID('userphoto_big_div').style.display = 'block';
|
||||
}
|
||||
|
@ -92,7 +81,7 @@ $user = new User(explode('/', $_SERVER['REQUEST_URI'])[2]);
|
|||
<div style="margin-top:8px"><a class="dot" href="#" onclick="hideUserPhoto(); return false">закрыть</a></div>
|
||||
</div>
|
||||
|
||||
<a href="<?= $user->i('photourl') ?>" onclick="showUserPhoto(); return false;"><img src="<?= $user->i('photourl') ?>" alt="" id="userphoto_img" class="f" style="width:auto; max-width:100px"></a>
|
||||
<a href="<?= $userprofile->i('photourl') ?>" onclick="showUserPhoto(); return false;"><img src="<?= $userprofile->i('photourl') ?>" alt="" id="userphoto_img" class="f" style="width:auto; max-width:100px"></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
88
views/pages/Profile/LK/History.php
Normal file
88
views/pages/Profile/LK/History.php
Normal file
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
|
||||
use \App\Services\{Auth, DB, Date};
|
||||
use \App\Models\User;
|
||||
|
||||
//$userprofile = new User(explode('/', $_SERVER['REQUEST_URI'])[2]);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
|
||||
<head>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div id="backgr"></div>
|
||||
<table class="tmain">
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
||||
<tr>
|
||||
<td class="main">
|
||||
<h1>Журнал</h1>
|
||||
<script src="/js/diff.js"></script>
|
||||
<script src="/js/pwrite-compare.js"></script>
|
||||
<div class="sm">
|
||||
<div class="p20 s1" style="float:left; padding:1px 5px 2px; margin-right:15px">В рассмотрении</div>
|
||||
<div class="p20 s2" style="float:left; padding:1px 5px 2px; margin-right:15px">Принято</div>
|
||||
<div class="p20 s7" style="float:left; padding:1px 5px 2px; margin-right:15px">Принято условно</div>
|
||||
<div class="p20 s9" style="float:left; padding:1px 5px 2px; margin-right:15px">Принято как временное</div>
|
||||
<div class="p20 s3" style="float:left; padding:1px 5px 2px; margin-right:15px">Задержано до исправления замечаний</div>
|
||||
<div class="p20 s5" style="float:left; padding:1px 5px 2px; margin-right:15px">Не подходит для сайта</div>
|
||||
<div class="p20 s8" style="float:left; padding:1px 5px 2px; margin-right:15px">Удалено</div>
|
||||
</div><br clear="all"><br>
|
||||
<div class="sm">Сортировка фотографий: <b>в порядке загрузки</b> · <a href="/set.php?lk_upl_sort=1">в порядке выхода из очереди</a> · <a href="/set.php?lk_upl_sort=2">сначала неопубликованные (в порядке загрузки)</a></div><br>
|
||||
<div class="p20w" style="display:block">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="100">Изображение</th>
|
||||
<th width="90%">Информация</th>
|
||||
<th></th>
|
||||
<th class="c nw">Покинуло очередь</th>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$photos = DB::query('SELECT * FROM photos WHERE user_id=:uid ORDER BY id DESC', array(':uid'=>Auth::userid()));
|
||||
foreach ($photos as $p) {
|
||||
$author = new User($p['user_id']);
|
||||
echo ' <tr class="s12">
|
||||
<td class="pb-photo pb_photo">
|
||||
<a href="/photo/'.$p['id'].'/" target="_blank" class="prw">
|
||||
<img src="'.$p['photourl'].'" class="f">
|
||||
|
||||
</a>
|
||||
</td>
|
||||
<td class="d">
|
||||
<p><span style="word-spacing:-1px"><b>'.$p['place'].'</b></span></p>
|
||||
<p class="sm"><b>'.Date::zmdate($p['posted_at']).'</b><br>Автор: <a href="/author/'.$p['user_id'].'/">'.$author->i('username').'</a></p>
|
||||
|
||||
</td>
|
||||
<td class="c" style="padding:10px">
|
||||
</td>
|
||||
<td class="cs">'.Date::zmdate($p['timeupload']).'<div style="margin-top:15px">Оценка<br><b>И+ К+</b></div>
|
||||
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div><br>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in a new issue