rhymix/modules/member/skins/default/active_logins.html

83 lines
3.1 KiB
HTML

<include target="./common_header.html" />
<h1>{$member_title = $lang->cmd_view_active_logins }</h1>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>{$lang->no}</th>
<th class="title">{$lang->cmd_login_browser_info}</th>
<th>{$lang->cmd_initial_login}</th>
<th>{$lang->cmd_recent_visit}</th>
<th>{$lang->cmd_delete}</th>
</tr>
</thead>
<tbody>
<tr loop="$active_logins => $no, $autologin_info">
{@ $autologin_info->user_agent = @json_decode($autologin_info->user_agent) ?: new stdClass()}
<td>{$no}</td>
<td class="title">
{escape($autologin_info->user_agent->browser)} {escape($autologin_info->user_agent->version)}<br />
{escape($autologin_info->user_agent->os)} {$autologin_info->user_agent->is_tablet ? 'Tablet' : ($autologin_info->user_agent->is_mobile ? 'Mobile' : 'PC')}
</td>
<td>{zdate($autologin_info->regdate, 'Y-m-d H:i')}<br />{$autologin_info->ipaddress}</td>
<td>{zdate($autologin_info->last_visit, 'Y-m-d H:i')}<br />{$autologin_info->last_ipaddress}</td>
<td><button class="delete_autologin" data-autologin-id="{$autologin_info->id}" data-autologin-key="{$autologin_info->autologin_key}">{$lang->cmd_delete}</button></td>
</tr>
</tbody>
</table>
<div class="pagination pagination-centered">
<ul>
<li><a href="{getUrl('page','','module_srl','')}" class="direction">&laquo; {$lang->first_page}</a></li>
<!--@while($page_no = $page_navigation->getNextPage())-->
<li class="active"|cond="$page == $page_no"><a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a></li>
<!--@end-->
<li><a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{$lang->last_page} &raquo;</a></li>
</ul>
</div>
<h1>{$lang->cmd_view_registered_devices }</h1>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>{$lang->no}</th>
<th class="title">{$lang->cmd_login_device_info}</th>
<th>{$lang->cmd_initial_registration}</th>
<th>{$lang->cmd_recent_connection}</th>
<th>{$lang->cmd_delete}</th>
</tr>
</thead>
<tbody>
{@ $no = count($registered_devices)}
<tr loop="$registered_devices => $device_info">
<td>{$no--}</td>
<td class="title">
{$device_info->device_type} {$device_info->device_version}
({$device_info->device_model ?: 'no model'})
</td>
<td>{zdate($device_info->regdate, 'Y-m-d H:i')}</td>
<td>{zdate($device_info->last_active_date, 'Y-m-d H:i')}</td>
<td><button class="delete_device" data-device-srl="{$device_info->device_srl}">{$lang->cmd_delete}</button></td>
</tr>
</tbody>
</table>
<script>
jQuery(function($) {
$("button.delete_autologin").on("click", function(event) {
event.preventDefault();
exec_json('member.procMemberDeleteAutologin', { autologin_id: $(this).data("autologin-id"), autologin_key: $(this).data("autologin-key") }, function(data) {
window.location.reload();
});
});
$("button.delete_device").on("click", function(event) {
event.preventDefault();
exec_json('member.procMemberDeleteDevice', { device_srl: $(this).data("device-srl") }, function(data) {
window.location.reload();
});
});
});
</script>
<include target="./common_footer.html" />