Upload files to "ui/ui"
Signed-off-by: nestict <icttechnest@gmail.com>
This commit is contained in:
parent
c954394f5c
commit
ce6b63f3a3
78
ui/ui/onlinehotspot.tpl
Normal file
78
ui/ui/onlinehotspot.tpl
Normal file
@ -0,0 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Online Hotspot Users</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.11.5/datatables.min.css"/>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.11.5/datatables.min.js"></script>
|
||||
<style>
|
||||
table.dataTable thead th,
|
||||
table.dataTable thead td {
|
||||
padding: 10px 18px;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
}
|
||||
table.dataTable tbody td {
|
||||
padding: 10px 18px;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
}
|
||||
.disconnect-btn {
|
||||
padding: 5px 10px;
|
||||
background-color: #d53f8c;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-gray-100">
|
||||
<div class="container mx-auto px-4 py-8">
|
||||
<h1 class="text-2xl font-bold mb-4">Online Hotspot Users</h1>
|
||||
<table id="hotspotUsersTable" class="stripe hover" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Username</th>
|
||||
<th>Address</th>
|
||||
<th>Uptime</th>
|
||||
<th>Server</th>
|
||||
<th>MAC</th>
|
||||
<th>Session Time</th>
|
||||
<th>Rx Bytes</th>
|
||||
<th>Tx Bytes</th>
|
||||
<th>Total Bytes</th>
|
||||
<th>Action</th> <!-- Added column for action -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $onlineHotspotUsers as $user}
|
||||
<tr>
|
||||
<td>{$user.username}</td>
|
||||
<td>{$user.address}</td>
|
||||
<td>{$user.uptime}</td>
|
||||
<td>{$user.server}</td>
|
||||
<td>{$user.mac}</td>
|
||||
<td>{$user.session_time}</td>
|
||||
<td>{$user.rx_bytes}</td>
|
||||
<td>{$user.tx_bytes}</td>
|
||||
<td>{$user.total}</td>
|
||||
<td><button class="disconnect-btn" onclick="disconnectUser('{$user.username}')">Disconnect</button></td> <!-- Disconnect button -->
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#hotspotUsersTable').DataTable();
|
||||
});
|
||||
|
||||
function disconnectUser(username) {
|
||||
// You can perform disconnect action here, such as making an AJAX call to disconnect the user
|
||||
alert('Disconnecting user: ' + username);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
63
ui/ui/page-edit.tpl
Normal file
63
ui/ui/page-edit.tpl
Normal file
@ -0,0 +1,63 @@
|
||||
{include file="sections/header.tpl"}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card mb20 card-primary card-hovered">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">{$pageHeader}</h3>
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-danger btn-xs" title="Reset File" href="{$_url}pages/{$PageFile}-reset" onclick="return confirm('Reset File?')"><span
|
||||
class="fa fa-refresh" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="myNiccard" style="width: 100%;"></div>
|
||||
<div id="card-edit" class="card-body">{$htmls}</div>
|
||||
{if $writeable}
|
||||
<div class="card-footer">
|
||||
<a href="javascript:saveIt()" class="btn btn-primary btn-block">SAVE</a>
|
||||
<br>
|
||||
<p class="help-block">{Lang::T("Sometimes you need to refresh 3 times until content change")}</p>
|
||||
<input type="text" class="form-control" onclick="this.select()" readonly
|
||||
value="{$app_url}/pages/{$PageFile}.html">
|
||||
</div>
|
||||
{else}
|
||||
<div class="card-footer">
|
||||
{Lang::T("Failed to save page, make sure i can write to folder pages, <i>chmod 664 pages/*.html<i>")}
|
||||
</div>
|
||||
{/if}
|
||||
{if $PageFile=='Voucher'}
|
||||
<div class="card-footer">
|
||||
<p class="help-block">
|
||||
<b>[[company_name]]</b> Your Company Name at Settings.<br>
|
||||
<b>[[price]]</b> Plan Price.<br>
|
||||
<b>[[voucher_code]]</b> Voucher Code.<br>
|
||||
<b>[[plan]]</b> Voucher Plan.<br>
|
||||
<b>[[counter]]</b> Counter.<br>
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="formpages" class="hidden" method="post" role="form" action="{$_url}pages/{$PageFile}-post">
|
||||
<textarea name="html" id="html"></textarea>
|
||||
</form>
|
||||
<script src="ui/ui/scripts/nicEdit.js"></script>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
var myNicEditor
|
||||
bkLib.onDomLoaded(function() {
|
||||
myNicEditor = new nicEditor({fullcard : true});
|
||||
myNicEditor.setcard('myNiccard');
|
||||
myNicEditor.addInstance('card-edit');
|
||||
});
|
||||
|
||||
function saveIt() {
|
||||
//alert(document.getElementById('card-edit').innerHTML);
|
||||
document.getElementById('html').value = nicEditors.findEditor('card-edit').getContent()
|
||||
document.getElementById('formpages').submit();
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
</div>
|
||||
{include file="sections/footer.tpl"}
|
20
ui/ui/pagination.tpl
Normal file
20
ui/ui/pagination.tpl
Normal file
@ -0,0 +1,20 @@
|
||||
{if $paginator}
|
||||
<nav aria-label="Page navigation example" style="margin-top: 6px;">
|
||||
<ul class="pagination justify-content-end" style="border-radius: 6px;">
|
||||
<li style="background: #D7DAE3;" {if empty($paginator['prev'])}class="disabled page-item" {/if}>
|
||||
<a class="page-link" href="{$paginator['url']}{$paginator['prev']}" aria-label="Previous">
|
||||
<span aria-hidden="true">{Lang::T('Prev')}</span>
|
||||
</a>
|
||||
</li>
|
||||
{foreach $paginator['pages'] as $page}
|
||||
<li class="page-item {if $paginator['page'] == $page}active{elseif $page == '...'}disabled{/if}"><a class="page-link"
|
||||
href="{$paginator['url']}{$page}">{$page}</a></li>
|
||||
{/foreach}
|
||||
<li style="background: #D7DAE3;" {if $paginator['page']>=$paginator['count']}class="disabled page-item" {/if}>
|
||||
<a class="page-link" href="{$paginator['url']}{$paginator['next']}" aria-label="Next">
|
||||
<span aria-hidden="true">{Lang::T('Next')}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{/if}
|
35
ui/ui/paymentgateway.tpl
Normal file
35
ui/ui/paymentgateway.tpl
Normal file
@ -0,0 +1,35 @@
|
||||
{include file="sections/header.tpl"}
|
||||
<div class="container-fluid">
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-md-offset-3">
|
||||
<div class="card card-info card-hovered">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">{Lang::T('Payment Gateway')}</h3>
|
||||
</div>
|
||||
<div class="table-responsive card-body">
|
||||
<table class="table table-striped table-condensed">
|
||||
<tbody>
|
||||
{foreach $pgs as $pg}
|
||||
<tr>
|
||||
<td width="12" align="center" valign="center"><input type="checkbox" name="pgs[]"
|
||||
{if in_array($pg, $actives)}checked{/if} value="{$pg}"></td>
|
||||
<td><a href="{$_url}paymentgateway/{$pg}"
|
||||
class="btn btn-block btn-{if in_array($pg, $actives)}info{else}default{/if} text-left">{ucwords($pg)}</a>
|
||||
</td>
|
||||
<td width="12"><a href="{$_url}paymentgateway/delete/{$pg}"
|
||||
onclick="return confirm('{Lang::T('Delete')} {$pg}?')" class="btn btn-danger"><i
|
||||
class="fa fa-trash"></i></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer"><button type="submit" class="btn btn-primary btn-block" name="save"
|
||||
value="actives">{Lang::T('Save Changes')}</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{include file="sections/footer.tpl"}
|
91
ui/ui/plan.tpl
Normal file
91
ui/ui/plan.tpl
Normal file
@ -0,0 +1,91 @@
|
||||
{include file="sections/header.tpl"}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card card-hovered mb20 card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Plans</h3>
|
||||
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
|
||||
<div>
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary" title="save" href="{$_url}plan/sync"
|
||||
onclick="return confirm('This will sync/send Caustomer active plan to Mikrotik?')"><span
|
||||
class="fa fa-refresh" aria-hidden="true"></span> sync</a>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-info" title="save" href="{$_url}customers/csv"
|
||||
onclick="return confirm('This will export to CSV?')"><span class="fa fa-download"
|
||||
aria-hidden="true"></span> CSV</a>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center row">
|
||||
<div class="col-md-8 mb-3">
|
||||
<form id="site-search" method="post" action="{$_url}plan/list/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="search" class="form-control"
|
||||
placeholder="{Lang::T('Search by Username')}..." value="{$search}">
|
||||
<button class="btn btn-success input-group-btn" type="submit">{Lang::T('Search')}</button>
|
||||
<!-- <div class="input-group-btn">
|
||||
</div> -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="{$_url}plan/recharge" class="btn btn-primary btn-block"><i
|
||||
class="fa fa-add"> </i> {Lang::T('Recharge Account')}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="datatable" class="table table-bordered table-striped table-condensed table-hover border-primary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{Lang::T('Username')}</th>
|
||||
<th>{Lang::T('Plan Name')}</th>
|
||||
<th>{Lang::T('Plan Type')}</th>
|
||||
<th>{Lang::T('Type')}</th>
|
||||
<th>{Lang::T('Created On')}</th>
|
||||
<th>{Lang::T('Expires On')}</th>
|
||||
<th>{Lang::T('Method')}</th>
|
||||
<th>{Lang::T('Routers')}</th>
|
||||
<th>{Lang::T('Manage')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr {if $ds['status']=='off'}class="danger" {/if}>
|
||||
<td><a href="{$_url}customers/viewu/{$ds['username']}">{$ds['username']}</a></td>
|
||||
<td>{$ds['namebp']}</td>
|
||||
<td>{$ds['type']}</td>
|
||||
<td>{$ds['plan_type']}</td>
|
||||
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
|
||||
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
|
||||
<td>{$ds['method']}</td>
|
||||
<td>{$ds['routers']}</td>
|
||||
<td>
|
||||
<a href="{$_url}plan/edit/{$ds['id']}"
|
||||
class="btn btn-warning btn-xs mb-1">{Lang::T('Edit')}</a>
|
||||
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
|
||||
<a href="{$_url}plan/delete/{$ds['id']}" id="{$ds['id']}"
|
||||
onclick="return confirm('{Lang::T('Delete')}?')"
|
||||
class="btn btn-danger btn-xs"><i class="fa fa-trash"></i></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="pagination.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/footer.tpl"}
|
Loading…
x
Reference in New Issue
Block a user