diff --git a/controllers/UserController.php b/controllers/UserController.php index b484737..a2d390d 100644 --- a/controllers/UserController.php +++ b/controllers/UserController.php @@ -54,10 +54,19 @@ class UserController extends Controller // $photos = ArticlePhotos::model()->getByUser($id, 5); $photos = NULL; // Скрыл фотоленту, так как туда могут попадать фотки неопубликованных статей + $pointsIds = App::DB()->query('SELECT `id` FROM `points` WHERE `author` ='.$id.' AND `status` = \'published\' AND `moderate` =1 ORDER BY `ord` DESC LIMIT 0 , 5')->fetchAll(PDO::FETCH_ASSOC); + $points = array(); + if (!empty($pointsIds)) { + foreach ($pointsIds as $pointsId) { + $points[] = Point::model()->getByPK($pointsId['id']); + } + } + self::render('user/index.php', array( 'user' => $user, 'articles' => $articles, 'photos' => $photos, + 'points' => $points, 'imAuthor' => App::$user && App::$user->id == $id, 'randomPoint' => $randomPoint, )); diff --git a/public/img/morePoints.png b/public/img/morePoints.png new file mode 100644 index 0000000..bb757f5 Binary files /dev/null and b/public/img/morePoints.png differ diff --git a/views/user/index.php b/views/user/index.php index 20785ec..15fb055 100644 --- a/views/user/index.php +++ b/views/user/index.php @@ -57,6 +57,16 @@ $statuses = array( + +
+
+
+

Точки:

+ +
+
+ +