-
-
- Posts from Verified Users
- Get the latest news here!
-
-
-
- ';
-
-$get_posts = $dbc->prepare('SELECT posts.* FROM posts, users WHERE posts.post_by_id = users.user_id AND users.user_level > 1 AND posts.deleted = 0 ORDER BY posts.date_time DESC LIMIT 25');
-$get_posts->execute();
-$posts_result = $get_posts->get_result();
-
-while($posts = $posts_result->fetch_array()){
- $get_title = $dbc->prepare('SELECT title_id, title_name, title_icon FROM titles WHERE title_id = ? LIMIT 1');
- $get_title->bind_param('i', $posts['post_title']);
- $get_title->execute();
- $title_result = $get_title->get_result();
- $title = $title_result->fetch_assoc();
-
- $get_user = $dbc->prepare('SELECT users.*, profiles.* FROM users INNER JOIN profiles ON profiles.user_id = ? WHERE users.user_id = ?');
- $get_user->bind_param('ii', $posts['post_by_id'], $posts['post_by_id']);
- $get_user->execute();
- $user_result = $get_user->get_result();
- $user = $user_result->fetch_assoc();
-
- echo '
-
-
';
-}
\ No newline at end of file
'. htmlspecialchars($user['nickname'], ENT_QUOTES) .'
-'. $user['bio'] .'
-';
-
- if (!empty($posts['post_image'])){
- echo '';
- }
-
-
- echo ' ';
-
- $yeah_count = $dbc->prepare('SELECT COUNT(yeah_by) FROM yeahs WHERE type = "post" AND yeahs.yeah_post = ?');
- $yeah_count->bind_param('i', $posts['id']);
- $yeah_count->execute();
- $result_count = $yeah_count->get_result();
- $yeah_amount = $result_count->fetch_assoc();
-
- echo '
'. (mb_strlen($posts['text']) > 199 ? htmlspecialchars(mb_substr($posts['text'],0,200), ENT_QUOTES) .'...' : htmlspecialchars($posts['text'], ENT_QUOTES)) . '
';
-
-
- echo '' . $yeah_amount['COUNT(yeah_by)'] . '
';
-
- $reply_count = $dbc->prepare('SELECT COUNT(reply_id) FROM replies WHERE reply_post = ? AND deleted = 0');
- $reply_count->bind_param('i', $posts['id']);
- $reply_count->execute();
- $result_count = $reply_count->get_result();
- $reply_amount = $result_count->fetch_assoc();
-
- echo '
-