Exemple #1
0
                    <th>Description</th>
                    <th>Moderator</th>
                    <th>Created on</th>
                    <th>Public</th>
                    <th>Locked</th>
                    <th></th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <?php 
foreach ($data as $category) {
    echo '<tr>';
    echo '<td>' . displayTitle($category['title']) . '</td>';
    echo '<td>' . displayDescription($category['description']) . '</td>';
    echo '<td>' . displayModerator(ucfirst($this->_userIdToUsername($category['moderator_id']))) . '</td>';
    echo '<td>' . stampToText($category['date_created']) . '</td>';
    echo '<td>' . intToImg($category['view_public']) . '</td>';
    echo '<td>' . intToImg($category['is_locked']) . '</td>';
    echo '<td>' . '<a href="' . BASE_URL . 'index.php?c=user&a=editcategory&id=' . $category['id'] . '"><img src="' . BASE_URL . 'img/edit.png' . '" width="20" height="20" alt="Edit"/></a></td>';
    echo '<td>' . '<a href="' . BASE_URL . 'index.php?c=category&a=deletecategory&id=' . $category['id'] . '"><img src="' . BASE_URL . 'img/delete.png' . '" width="20" height="20" alt="Delete"/></a></td>';
    echo '</tr>';
}
?>
            </tbody>
        </table>
        <?php 
if ($pagination->total_pages() > 1) {
    // If there is more than 1 page, show pagination
    echo '<div class="pagination">';
    echo '<ul class="pagination">';
Exemple #2
0
    ?>
" width="20" height="20" alt="Post"/></div>
            <div class="medium-3 columns"><a href="<?php 
    echo BASE_URL . 'index.php?c=user&a=viewcategory&id=' . $category['id'];
    ?>
"><?php 
    echo displayTitle($category['title']);
    ?>
</a></div>
            <div class="medium-3 columns"><?php 
    echo displayDescription($category['description']);
    ?>
</div>
            <div class="medium-1 columns"><?php 
    echo $postmodel->countTopPostsByCategoryId($category['id']);
    ?>
</div>
            <div class="medium-1 columns"><?php 
    echo displayModerator($this->_userIdtoUsername($category['moderator_id']));
    ?>
</div>
            <div class="medium-1 columns"><?php 
    echo lockedToImg($category['is_locked']);
    ?>
</div>
            <div class="medium-1 columns" id="space">&nbsp;</div>
            <?php 
}
?>
    </div>