public function Current()
 {
     $row = $this->post_info->Current();
     $this->count++;
     $row['count'] = $this->count;
     $row['created'] = relative_time($row['created']);
     if ($row['poster_id'] != 0) {
         $user = $this->dba->GetRow("SELECT * FROM " . USERS . " WHERE id = " . $row['poster_id']);
         if ($user['seen'] >= time() - Lib::GetSetting('sess.gc_maxlifetime')) {
             $row['online_status'] = $this->lang['L_ONLINE'];
         } else {
             $row['online_status'] = $this->lang['L_OFFLINE'];
         }
         $row['user_num_posts'] = $user['posts'];
         $row['user_rank'] = $user['rank'] != '' ? $user['rank'] : '--';
         $row['avatar'] = $user['avatar'] != '' && $user['avatar'] != 0 ? '<img src="Uploads/Avatars/' . $user['id'] . '.gif" border="0" alt="" />' : ' ';
         $row['signature'] = $user['signature'] != '' && !is_null($user['signature']) && $row['allow_sigs'] == 1 ? '<br /><br />' . stripslashes($user['signature']) : ' ';
     } else {
         $row['poster_name'] = $this->lang['L_ADMINISTRATOR'];
         $row['online_status'] = '--';
         $row['user_num_posts'] = '--';
         $row['user_rank'] = '--';
     }
     $row['name'] = stripslashes($row['name']);
     $row['name'] = $row['member_has_read'] == 0 ? '<span class="text-decoration:italic;">' . $row['name'] . '</span>' : $row['name'];
     $row['display'] = $this->pm['num_children'] == $this->count - 1 || $row['member_has_read'] == 0 ? 'block' : 'none';
     $bbcode = new BBParser(stripslashes($row['body_text']), TRUE);
     //$row['quoted_text']			= str_replace("\r\n", '\n', addslashes($bbcode->Revert($row['body_text'])));
     $row['body_text'] = $bbcode->QuickExecute();
     return $row;
 }
 public function Current()
 {
     $row = $this->post_info->Current();
     $this->count++;
     $row['count'] = $this->count;
     $row['created'] = relative_time($row['created']);
     if ($row['poster_id'] != 0) {
         $user = $this->dba->GetRow("SELECT * FROM " . USERS . " WHERE id = " . $row['poster_id']);
         if ($user['seen'] >= time() - Lib::GetSetting('sess.gc_maxlifetime')) {
             $row['online_status'] = $this->lang['L_ONLINE'];
         } else {
             $row['online_status'] = $this->lang['L_OFFLINE'];
         }
         $row['user_num_posts'] = $user['posts'];
         $row['user_rank'] = $user['rank'] != '' ? $user['rank'] : '--';
         $row['avatar'] = $user['avatar'] != '' && $user['avatar'] != 0 && $row['allow_avatars'] == 1 ? '<img src="Uploads/Avatars/' . $user['id'] . '.gif" border="0" alt="" />' : ' ';
         $row['signature'] = $user['signature'] != '' && !is_null($user['signature']) && $row['allow_sigs'] == 1 ? '<br /><br />' . stripslashes($user['signature']) : ' ';
         /* Set the user ranks */
         $row['user_ranks'] = '';
         foreach ($this->dba->Query("SELECT * FROM " . RANKS . " WHERE group_id = (SELECT group_id FROM " . USER_IN_GROUP . " WHERE id = " . $user['id'] . ")") as $rank) {
             $row['user_ranks'] .= $rank['rank'] . ' <br />';
         }
         foreach ($this->dba->Query("SELECT * FROM " . RANKS . " WHERE user_id = " . $user['id']) as $rank) {
             $row['user_ranks'] .= $rank['rank'] . ' <br />';
         }
         if ($this->session['user']['perms'] & ADMIN) {
             $row['delete'] = '<a href="admin.php?act=delete_single&amp;type=1&amp;id=' . $row['id'] . '"><img src="Images/' . $this->settings['imageset'] . '/Buttons/delete.gif" alt="" border="0" /></a>';
         }
     } else {
         $row['online_status'] = '--';
         $row['user_num_posts'] = '--';
         $row['user_rank'] = '--';
         $row['user_ranks'] = '';
     }
     $row['name'] = stripslashes($row['name']);
     $bbcode = new BBParser(stripslashes($row['body_text']), TRUE);
     $row['body_text'] = $bbcode->QuickExecute();
     $row['edited'] = intval($row['edited']) != 0 ? '<br /><br /><span class="smalltext"><em>' . $this->lang['L_EDITEDON'] . '&nbsp;' . date("F j, Y, g:i a", $row['edited']) . '</em></span>' : ' ';
     return $row;
 }