summaryrefslogtreecommitdiff
path: root/app/Template/user/sessions.php
blob: a7504a7a8492db3d34c1d4a46795a9e2482793ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<div class="page-header">
    <h2><?= t('Persistent connections') ?></h2>
</div>

<?php if (empty($sessions)): ?>
    <p class="alert"><?= t('No session.') ?></p>
<?php else: ?>
    <table class="table-small">
    <tr>
        <th><?= t('Creation date') ?></th>
        <th><?= t('Expiration date') ?></th>
        <th><?= t('IP address') ?></th>
        <th><?= t('User agent') ?></th>
        <th><?= t('Action') ?></th>
    </tr>
    <?php foreach($sessions as $session): ?>
    <tr>
        <td><?= dt('%B %e, %Y at %k:%M %p', $session['date_creation']) ?></td>
        <td><?= dt('%B %e, %Y at %k:%M %p', $session['expiration']) ?></td>
        <td><?= $this->e($session['ip']) ?></td>
        <td><?= $this->e($this->text->truncate($session['user_agent'])) ?></td>
        <td><?= $this->url->link(t('Remove'), 'user', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true) ?></td>
    </tr>
    <?php endforeach ?>
    </table>
<?php endif ?>