PHP Classes

File: aksara/Modules/Administrative/Views/account/logs.php

Recommend this page to a friend!
  Classes of Aby Dahana   Aksara   aksara/Modules/Administrative/Views/account/logs.php   Download  
File: aksara/Modules/Administrative/Views/account/logs.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: Refine master modules
Date: 1 month ago
Size: 3,062 bytes
 

Contents

Class file image Download
<div class="container-fluid py-3">
    <div class="alert alert-info callout">
        <h3><?= phrase('Information'); ?></h3>
        <i class="mdi mdi-information-outline"></i> <?= phrase('You are signed in on these devices or have been recently in.'); ?> <?= phrase('There might be multiple activity sessions from the same device.'); ?>
</div>
    <div class="row">
        <div class="col-md-7 col-xxl-6">
            <?php foreach($logs as $platform => $log): ?>
<div class="card mb-3">
                    <div class="card-body">
                        <div class="row">
                            <div class="col-sm-5">
                                <b><?= $platform; ?></b>
                            </div>
                            <div class="col-sm-7">
                                <?php foreach($log as $key => $session): ?>
<?php if ($key): ?>
<hr />
                                    <?php endif; ?>

                                    <div>
                                        <?php if ($session->ip_address != service('request')->getIPAddress()): ?>
<a href="<?= current_page('kick', ['session' => $session->session_id]); ?>" class="btn btn-sm btn-danger float-end rounded-pill --xhr">
                                                <i class="mdi mdi-logout"></i>
                                                <?= phrase('Kick'); ?>
</a>
                                        <?php endif; ?>
<b>
                                            <?= date('d F Y, H:i', strtotime($session->timestamp)); ?>
</b>
                                        <br />
                                        <?= $session->browser; ?>
<br />
                                        <a href="//ipinfo.io/<?= $session->ip_address; ?>" target="_blank">
                                            <b class="--fetch-ip-info" data-ip="<?= $session->ip_address; ?>">
                                                <?= $session->ip_address; ?> <i class="mdi mdi-launch"></i>
                                            </b>
                                        </a>
                                        <?php if ($session->ip_address == service('request')->getIPAddress()): ?>
<br />
                                            <i class="mdi mdi-check-circle text-primary"></i>
                                            <?= phrase('Your current session'); ?>
<?php endif; ?>
</div>
                                <?php endforeach; ?>
</div>
                        </div>
                    </div>
                </div>
            <?php endforeach; ?>
</div>
    </div>
</div>