Ejemplo n.º 1
0
' />
                <div class="row">
                    <div class="small-4 columns">
                        <label><span data-tooltip aria-haspopup="true" class="has-tip" title="Can people post in this category">Locked ?</span>
                    </div>    
                        <?php 
if ($editcategory->is_locked == 1) {
    echo '<div class="small-2 columns">';
    echo intToImg(1);
    echo '</div>';
    echo '<div class="small-4 columns">';
    echo '<input class= "tiny button" type="submit" value="Unlock" name="unlock" />';
    echo '</div>';
} elseif ($editcategory->is_locked == 0) {
    echo '<div class="small-2 columns">';
    echo intToImg(0);
    echo '</div>';
    echo '<div class="small-4 columns">';
    echo '<input class= "tiny button" type="submit" value="Lock" name="lock" />';
    echo '</div>';
} else {
    echo 'Status unknown';
}
?>
                        </label>
                </div>
                </form>
            </fieldset>
            <a class="tiny button" href="<?php 
echo BASE_URL . 'index.php?c=user&a=viewallcategories';
?>
Ejemplo n.º 2
0
                    <tr>
                        <th>Username</th>
                        <th>Role</th>
                        <th>Status</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    <?php 
foreach ($data as $rows) {
    // Don't show disabled users
    if ($rows['disabled'] != 1) {
        echo '<tr>';
        echo '<td>' . h($rows['username']) . '</td>';
        echo '<td>' . showRole($rows['role']) . '</td>';
        echo '<td>' . intToImg($rows['is_active']) . '</td>';
        echo '<td>' . '<a href="' . BASE_URL . 'index.php?c=user&a=edituser&id=' . $rows['id'] . '"><img src="' . BASE_URL . 'img/edit.png' . '" width="20" height="20" alt="Edit"/></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">';
    if ($pagination->has_previous_page()) {
        // If there is a previous page show back arrow
        echo '<li class="arrow"><a href="' . BASE_URL . 'index.php?c=user&a=viewallusers&p=' . $pagination->previous_page() . '">&laquo;</a></li>';
Ejemplo n.º 3
0
                    <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">';
    if ($pagination->has_previous_page()) {
        // If there is a previous page show back arrow
        echo '<li class="arrow"><a href="' . BASE_URL . 'index.php?c=user&a=viewallcategories&p=' . $pagination->previous_page() . '">&laquo;</a></li>';