예제 #1
0
function showThread($thr, $visitors, $comments, $categoryID, $categoryUser, $threadMembers, $threadID, $userID)
{
    $counter = 0;
    foreach ($threadMembers as $tm) {
        $author = $thr->author;
        if ($tm->thread_id == $threadID and $tm->user_id == $userID or $author == $userID) {
            $counter = $counter + 1;
        } else {
            foreach ($categoryUser as $catUS) {
                if ($catUS->category_id == $categoryID and $catUS->user_id == $userID) {
                    $counter = $counter + 1;
                }
            }
        }
    }
    if ($counter > 0) {
        echo "\n\t\t\t\t<tr>\n                    <td>\n                        <div class='thread-list-title'>\n                            <h4>" . anchor('thread/view/' . $thr->id, $thr->title) . "\n                                        <small class='label label-default'><i class='fa fa-lock'></i> Close Group</small>\n                    \t\t</h4>\n                        </div>\n                        <div class='thread-list-meta'>\n                            <ul>\n                                <li>\n                                    " . countViewer($visitors, $thr->id) . " Views\n                                </li>\n                                <li>\n                                    " . countComments($comments, $thr->id) . " Comments\n                                </li>\n                                <li>\n                                    Started by <a href='#'>" . user($thr->author)->full_name . "</a>\n                                </li>\n                                <li>\n                                    " . $thr->created_at . "\n                                </li>\n                                <li>\n                                    in <a href='#'>" . $thr->category_name . "</a>\n                                </li>\n                            </ul>\n                        </div>\n                    </td>\n                </tr>\n\t\t\t";
    } else {
    }
}
예제 #2
0
                                                                                                    <h4><?php 
                            echo anchor('author/view/' . $thr->id, $thr->title);
                            ?>
 
                                                                                                        <?php 
                            if ($thr->type == 'close') {
                                echo '<small class="label label-default"><i class="fa fa-lock"></i> Close Group</small>';
                            }
                            ?>
                                                                                                    </h4>
                                                                                                </div>
                                                                                                <div class="thread-list-meta">
                                                                                                    <ul>
                                                                                                        <li>
                                                                                                            <?php 
                            echo countViewer($visitors, $thr->id);
                            ?>
 Views
                                                                                                        </li>
                                                                                                        <li>
                                                                                                            <?php 
                            echo countComments($comments, $thr->id);
                            ?>
 Comments
                                                                                                        </li>
                                                                                                        <li>
                                                                                                            Started by <a href="#"><?php 
                            echo user($thr->author)->full_name;
                            ?>
</a>
                                                                                                        </li>