From 9c2d9c622eb855dced0b41b7914f8ff01c7e2f70 Mon Sep 17 00:00:00 2001 From: themohooks <81331307+themohooks@users.noreply.github.com> Date: Wed, 17 Jul 2024 03:15:53 +0300 Subject: [PATCH] edit counting and showing images if they moderated --- views/pages/Main.php | 4 ++-- views/pages/Photo.php | 9 +++++++++ views/pages/Profile/LK/Index.php | 2 +- views/pages/Search.php | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/views/pages/Main.php b/views/pages/Main.php index 746d110..eabef7d 100644 --- a/views/pages/Main.php +++ b/views/pages/Main.php @@ -98,7 +98,7 @@ foreach ($photos as $pd) {
- Количество ваших фотографий на сайте: =DB::query('SELECT COUNT(*) FROM photos WHERE user_id=:uid', array(':uid'=>Auth::userid()))[0]['COUNT(*)']?>
+ Количество ваших фотографий на сайте: =DB::query('SELECT COUNT(*) FROM photos WHERE user_id=:uid AND moderated=1', array(':uid'=>Auth::userid()))[0]['COUNT(*)']?>
Текущее значение индекса загрузки: =$user->i('uploadindex')?>
diff --git a/views/pages/Search.php b/views/pages/Search.php index dc6c743..1559f41 100644 --- a/views/pages/Search.php +++ b/views/pages/Search.php @@ -19,9 +19,9 @@ use App\Services\{Router, Auth, DB, Date};