Просмотр файла modules/admin/templates/ipban.phtml

Размер файла: 2.26Kb
<?php

/**
 * This file is part of JohnCMS Content Management System.
 *
 * @copyright JohnCMS Community
 * @license   https://opensource.org/licenses/GPL-3.0 GPL-3.0
 * @link      https://johncms.com JohnCMS Project
 */

/**
 * @var $title
 * @var $page_title
 * @var $data
 */

$this->layout(
    'system::layout/default',
    [
        'title'      => $title,
        'page_title' => $page_title,
    ]
);
$this->sectionReplace('sidebar-menu', $this->fetch('admin::sidebar-admin-menu', ['sec_menu' => ['ipban' => true]]));
?>

<?php if (! empty($data['message'])): ?>
    <?= $this->fetch(
        'system::app/alert',
        [
            'alert_type' => 'alert-info',
            'alert'      => $data['message'],
        ]
    ) ?>
<?php endif; ?>
<table class="table table-striped">
    <thead>
    <tr class="bg-secondary text-white">
        <th><?= __('IP address') ?></th>
        <th><?= __('Reason') ?></th>
    </tr>
    </thead>
    <tbody>
    <?php if (empty($data['items'])): ?>
        <tr>
            <td colspan="2" class="text-center">
                <?= __('The list is empty') ?>
            </td>
        </tr>
    <?php endif; ?>
    <?php foreach ($data['items'] as $item): ?>
        <tr>
            <td><a href="<?= $item['detail_url'] ?>"><?= $item['ips'] ?></a></td>
            <td><?= $item['reason'] ?></td>
        </tr>
    <?php endforeach; ?>
    </tbody>
</table>

<div class="mt-2">
    <?php if ($data['total'] > $user->config->kmess): ?>
        <div>
            <?= $data['pagination'] ?>
        </div>
    <?php endif; ?>

    <?php if ($data['total'] > 0): ?>
        <div><?= __('Total:') ?> <?= $data['total'] ?></div>
    <?php endif; ?>
</div>
<?php if (empty($data['no_buttons'])): ?>
    <div class="mt-2 mb-3">
        <form action="?act=ipban&amp;mod=new" method="post">
            <input class="btn btn-danger" type="submit" name="" value="<?= __('Add') ?>">
            <?php if ($data['total'] > 0): ?>
                <a href="?act=ipban&amp;mod=search" class="btn btn-primary"><?= __('Search') ?></a>
                <a href="?act=ipban&amp;mod=clear" class="btn btn-primary"><?= __('Unban all IP') ?></a>
            <?php endif; ?>
        </form>
    </div>
<?php endif; ?>
<div>
    <a href="<?= $data['back_url'] ?>"><?= __('Back') ?></a>
</div>