From f6aa6bcdad5a4276f33345897d8353c92d3405e7 Mon Sep 17 00:00:00 2001 From: themohooks <81331307+themohooks@users.noreply.github.com> Date: Fri, 5 Jul 2024 12:21:52 +0300 Subject: [PATCH] Photos history --- app/Controllers/ProfileController.php | 6 +- app/Core/Routes.php | 1 + views/pages/Profile/Index.php | 31 +++---- views/pages/Profile/LK/History.php | 88 ++++++++++++++++++++ views/pages/Profile/{LK.php => LK/Index.php} | 0 5 files changed, 104 insertions(+), 22 deletions(-) create mode 100644 views/pages/Profile/LK/History.php rename views/pages/Profile/{LK.php => LK/Index.php} (100%) diff --git a/app/Controllers/ProfileController.php b/app/Controllers/ProfileController.php index dfe1bea..e7f05af 100644 --- a/app/Controllers/ProfileController.php +++ b/app/Controllers/ProfileController.php @@ -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'); + } } \ No newline at end of file diff --git a/app/Core/Routes.php b/app/Core/Routes.php index d4774e5..8d64dc0 100644 --- a/app/Core/Routes.php +++ b/app/Core/Routes.php @@ -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'); diff --git a/views/pages/Profile/Index.php b/views/pages/Profile/Index.php index c0a6821..a96e480 100644 --- a/views/pages/Profile/Index.php +++ b/views/pages/Profile/Index.php @@ -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]); ?> @@ -21,9 +21,9 @@ $user = new User(explode('/', $_SERVER['REQUEST_URI'])[2]);
Откуда: | -= $user->content('location') ?> | += $userprofile->content('location') ?> |
Дата регистрации: | -= Date::zmdate($user->content('regdate')) ?> | -|
Рейтинг: | -фото 0, комментарии +1 | -|
Время у пользователя: | -06:22 | += Date::zmdate($userprofile->content('regdate')) ?> |
Был на сайте: | -= Date::zmdate($user->i('online')) ?> i('online')) { ?>(online) | += Date::zmdate($userprofile->i('online')) ?> i('online')) { ?>(online) |
Отправить личное сообщение пользователю
+Изображение | +Информация | ++ | Покинуло очередь | +
---|---|---|---|
+ + + + + | +
+ '.$p['place'].' +'.Date::zmdate($p['posted_at']).' |
+ + | +'.Date::zmdate($p['timeupload']).' Оценка
+
+ И+ К+ |
+