//assign data to details[] array
$details['lock'] = $detail_query[0]['lock'];
$details['sticky'] = $detail_query[0]['sticky'];
$details['title'] = stripslashes(htmlentities($detail_query[0]['title']));
$details['username'] = $detail_query[0]['username'];
$details['status'] = $detail_query[0]['status'];
$details['content'] = $detail_query[0]['content'];
$details['date'] = $detail_query[0]['date'];
$details['lastedit'] = $detail_query[0]['lastedit'];
$details['qfc'] = $detail_query[0]['qfc'];
$details['moved'] = $detail_query[0]['moved'];
$details['hidden'] = $detail_query[0]['hidden'];
$details['autohiding'] = $detail_query[0]['autohiding'];
//apply word filter if it's a user thread
if ($user->getRank($details['username']) < 3) {
    $details['title'] = $forum->filter($details['title']);
}
$details['content'] = $forum->filter($details['content']);
//get any extra icons
if ($details['sticky'] == 1) {
    $extra .= '<img src="../img/forum/sticky.gif"> ';
}
if ($details['lock'] == 1) {
    $extra .= ' <img src="../img/forum/locked.gif">';
}
//check if the POST has been edited, then adjust the $date variable accordingly
if (empty($details['lastedit'])) {
    $date = $details['date'];
} else {
    //get USERNAME:DATE/TIME
    $edit_details = explode('@', $details['lastedit']);
                                                        <tr class="thdhid">
                                                        <td width="63%"><img src="../img/forum/locked.gif"> This thread has been hidden<br /></td>
                                                        <td class="num"></td>
                                                        <td class="righttd updated"></td>
                                                        </tr>
                                                        <tr height="20px"></tr>
                                                       
                                                       <?php 
    } else {
        //get # of replies the thread has
        $database->processQuery("SELECT * FROM `posts` WHERE `thread` = ?", array($moved ? $thread['moved'] : $id), false);
        $replies = $database->getRowCount();
        $title = stripslashes(htmlentities($thread['title']));
        //apply filter is it's a user's thread
        if ($user->getRank($thread['username']) < 3) {
            $title = $forum->filter($title);
        }
        //append "(moved)" to the title if the thread was moved
        if ($moved) {
            $title .= '&nbsp;(moved)';
        }
        ?>
                                        
                                                        <tr class="<?php 
        echo $type;
        ?>
">
                                                        <td width="63%" id="td-<?php 
        echo $id;
        ?>
" title="<?php