diff --git a/app/Controllers/MainController.php b/app/Controllers/MainController.php index f7daa7c..3796fa0 100644 --- a/app/Controllers/MainController.php +++ b/app/Controllers/MainController.php @@ -36,6 +36,11 @@ class MainController { Page::set('Top30'); + } + public static function favauthors() + { + Page::set('FavAuthors'); + } public static function logout() diff --git a/app/Core/Routes.php b/app/Core/Routes.php index 7d49b49..5f662a3 100644 --- a/app/Core/Routes.php +++ b/app/Core/Routes.php @@ -33,6 +33,8 @@ class Routes Router::get('/lk/history', 'ProfileController@lkhistory'); Router::get('/lk/profile', 'ProfileController@lkprofile'); + Router::get('/fav_authors', 'MainController@favauthors'); + Router::get('/search', 'SearchController@i'); Router::post('/api/upload', 'ApiController@upload'); diff --git a/views/components/Navbar.php b/views/components/Navbar.php index 0a987b7..ea48585 100644 --- a/views/components/Navbar.php +++ b/views/components/Navbar.php @@ -40,6 +40,7 @@ if (NGALLERY['root']['title'] != null && NGALLERY['root']['showtitle'] === true) diff --git a/views/pages/FavAuthors.php b/views/pages/FavAuthors.php new file mode 100644 index 0000000..06b0ac2 --- /dev/null +++ b/views/pages/FavAuthors.php @@ -0,0 +1,62 @@ + + + + + + + + + + + + +
+ + + + + + + + +
+

Фотографии избранных авторов

+ Auth::userid())); + foreach ($followimgs as $f) { + $author = new User($p['user_id']); + $p = new Photo($f['photo_id']); + echo '
+ + + + + + +
620 КБ +
+
'.DB::query('SELECT COUNT(*) FROM photos_views WHERE photo_id=:id', array(':id'=>$p['id']))[0]['COUNT(*)'].'
+
+
+ +

'.htmlspecialchars($p['place']).'

+ '.htmlspecialchars($p['postbody']).' +

'.Date::zmdate($p['timeupload']).'
Автор: '.htmlspecialchars($author->i('username')).'

+
+
'; + } + ?> + + + + +
+ + + + \ No newline at end of file diff --git a/views/pages/Profile/Index.php b/views/pages/Profile/Index.php index 79599a5..656d669 100644 --- a/views/pages/Profile/Index.php +++ b/views/pages/Profile/Index.php @@ -251,10 +251,10 @@ if (DB::query('SELECT follower_id FROM followers WHERE user_id=:userid AND follo $class = 'on'; } ?> -
 
+
 
-
Пользователей, подписанных на мои фотографии: $userprofile->i('id')))[0]['COUNT(*)'];?>
+
Пользователей, подписанных на мои фотографии: $userprofile->i('id')))[0]['COUNT(*)'];?>

Пользователь не найден