Example #1
0
function checkTopicsCategoryAuthor($topics, $threads, $idCategory)
{
    $counter = 0;
    foreach ($topics as $top) {
        if ($top->category == $idCategory) {
            $countThreadsTopic = checkThreadsTopicAuthor($threads, $top->id);
            if ($countThreadsTopic > 0) {
                $counter += 1;
            }
        }
    }
    return $counter;
}
Example #2
0
                                        <div class="forum-heading">
                                            <h3><?php 
        if (isset($category)) {
            echo $category;
        } else {
            echo $cat->category_name;
        }
        ?>
</h3>
                                        </div>
                                        <div class="forum-main">
                                            <div class="forum-list">
                                                <?php 
        foreach ($topics as $top) {
            if ($top->category == $cat->id) {
                $countThreadsTopic = checkThreadsTopicAuthor($threads, $top->id);
                if ($countThreadsTopic > 0) {
                    ?>
                                                                <table class="table table-striped">
                                                                    <thead class="thead-inverse">
                                                                        <tr>
                                                                          <th colspan="2">Topic : <?php 
                    echo $top->topic;
                    ?>
</th>
                                                                        </tr>
                                                                    </thead>
                                                                    <tbody>
                                                                        <?php 
                    $isThread = false;
                    foreach ($threads as $thr) {