forked from kevinowino869/mitrobill
show user active
This commit is contained in:
parent
eeae60d88e
commit
c57bbeace3
@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 2023.9.7
|
||||||
|
|
||||||
|
- Fix PPPOE Delete Customer
|
||||||
|
- Remove active Customer before deleting
|
||||||
|
- Show IP and Mac even if it not Hotspot
|
||||||
|
|
||||||
## 2023.9.6
|
## 2023.9.6
|
||||||
|
|
||||||
- Expired Pool
|
- Expired Pool
|
||||||
|
@ -36,6 +36,17 @@ switch ($action) {
|
|||||||
|
|
||||||
$ui->display('autoload.tpl');
|
$ui->display('autoload.tpl');
|
||||||
break;
|
break;
|
||||||
|
case 'customer_is_active':
|
||||||
|
$d = ORM::for_table('tbl_user_recharges')->where('customer_id', $routes['2'])->findOne();
|
||||||
|
if ($d) {
|
||||||
|
if ($d['status'] == 'on') {
|
||||||
|
die('<span class="label label-success" title="Expired ' . Lang::dateAndTimeFormat($d['expiration'], $d['time']) . '">on</span>');
|
||||||
|
} else {
|
||||||
|
die('<span class="label label-danger" title="Expired ' . Lang::dateAndTimeFormat($d['expiration'], $d['time']) . '">off</span>');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
die('<span class="label label-danger">off</span>');
|
||||||
|
}
|
||||||
case 'customer_select2':
|
case 'customer_select2':
|
||||||
|
|
||||||
$s = addslashes(_get('s'));
|
$s = addslashes(_get('s'));
|
||||||
|
@ -12,9 +12,6 @@ $action = $routes['1'];
|
|||||||
$admin = Admin::_info();
|
$admin = Admin::_info();
|
||||||
$ui->assign('_admin', $admin);
|
$ui->assign('_admin', $admin);
|
||||||
|
|
||||||
use PEAR2\Net\RouterOS;
|
|
||||||
|
|
||||||
require_once 'system/autoload/PEAR2/Autoload.php';
|
|
||||||
|
|
||||||
if ($admin['user_type'] != 'Admin' and $admin['user_type'] != 'Sales') {
|
if ($admin['user_type'] != 'Admin' and $admin['user_type'] != 'Sales') {
|
||||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||||
@ -34,7 +31,8 @@ switch ($action) {
|
|||||||
->order_by_desc('id')->find_many();
|
->order_by_desc('id')->find_many();
|
||||||
} else {
|
} else {
|
||||||
$paginator = Paginator::bootstrap('tbl_customers');
|
$paginator = Paginator::bootstrap('tbl_customers');
|
||||||
$d = ORM::for_table('tbl_customers')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
$d = ORM::for_table('tbl_customers')
|
||||||
|
->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||||
}
|
}
|
||||||
|
|
||||||
$ui->assign('search', htmlspecialchars($search));
|
$ui->assign('search', htmlspecialchars($search));
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||||
**/
|
**/
|
||||||
@ -40,6 +41,14 @@ if($u_all == ''){
|
|||||||
$u_all = '0';
|
$u_all = '0';
|
||||||
}
|
}
|
||||||
$ui->assign('u_all', $u_all);
|
$ui->assign('u_all', $u_all);
|
||||||
|
|
||||||
|
|
||||||
|
$c_all = ORM::for_table('tbl_customers')->count();
|
||||||
|
if ($u_all == '') {
|
||||||
|
$c_all = '0';
|
||||||
|
}
|
||||||
|
$ui->assign('c_all', $u_all);
|
||||||
|
|
||||||
//user expire
|
//user expire
|
||||||
$expire = ORM::for_table('tbl_user_recharges')->where('expiration', $mdate)->order_by_desc('id')->find_many();
|
$expire = ORM::for_table('tbl_user_recharges')->where('expiration', $mdate)->order_by_desc('id')->find_many();
|
||||||
$ui->assign('expire', $expire);
|
$ui->assign('expire', $expire);
|
||||||
|
@ -24,34 +24,37 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{$_L['Manage']}</th>
|
<th></th>
|
||||||
<th>{$_L['Username']}</th>
|
<th>{$_L['Username']}</th>
|
||||||
<th>{$_L['Full_Name']}</th>
|
<th>{$_L['Full_Name']}</th>
|
||||||
<th>{Lang::T('Balance')}</th>
|
<th>{Lang::T('Balance')}</th>
|
||||||
<th>{$_L['Phone_Number']}</th>
|
<th>{$_L['Phone_Number']}</th>
|
||||||
<th>{$_L['Email']}</th>
|
<th>{$_L['Email']}</th>
|
||||||
<th>{$_L['Created_On']}</th>
|
<th>{$_L['Created_On']}</th>
|
||||||
<th>{$_L['Recharge']}</th>
|
<th>{$_L['Manage']}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{foreach $d as $ds}
|
{foreach $d as $ds}
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center" api-get-text="{$_url}autoload/customer_is_active/{$ds['id']}">
|
||||||
<a href="{$_url}customers/view/{$ds['id']}" id="{$ds['id']}"
|
<span class="label label-default">-</span>
|
||||||
class="btn btn-success btn-sm">{Lang::T('View')}</a>
|
|
||||||
</td>
|
</td>
|
||||||
<td>{$ds['username']}</td>
|
<td onclick="window.location.href = '{$_url}customers/view/{$ds['id']}'" style="cursor:pointer;">{$ds['username']}</td>
|
||||||
<td>{$ds['fullname']}</td>
|
<td onclick="window.location.href = '{$_url}customers/view/{$ds['id']}'" style="cursor: pointer;">{$ds['fullname']}</td>
|
||||||
<td>{Lang::moneyFormat($ds['balance'])}</td>
|
<td>{Lang::moneyFormat($ds['balance'])}</td>
|
||||||
<td>{$ds['phonenumber']}</td>
|
<td>{$ds['phonenumber']}</td>
|
||||||
<td>{$ds['email']}</td>
|
<td>{$ds['email']}</td>
|
||||||
<td>{Lang::dateTimeFormat($ds['created_at'])}</td>
|
<td>{Lang::dateTimeFormat($ds['created_at'])}</td>
|
||||||
<td align="center"><a href="{$_url}prepaid/recharge-user/{$ds['id']}" id="{$ds['id']}"
|
<td align="center">
|
||||||
class="btn btn-primary btn-sm">{$_L['Recharge']}</a></td>
|
<a href="{$_url}customers/view/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
|
||||||
|
class="btn btn-success btn-xs"> {Lang::T('View')} </a>
|
||||||
|
<a href="{$_url}prepaid/recharge-user/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
|
||||||
|
class="btn btn-primary btn-xs">{$_L['Recharge']}</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<div class="col-lg-3 col-xs-6">
|
<div class="col-lg-3 col-xs-6">
|
||||||
<div class="small-box bg-yellow">
|
<div class="small-box bg-yellow">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h4>{$u_act}</h4>
|
<h4>{$u_act}/{$u_all}</h4>
|
||||||
|
|
||||||
<p>{$_L['Users_Active']}</p>
|
<p>{$_L['Users_Active']}</p>
|
||||||
</div>
|
</div>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<div class="col-lg-3 col-xs-6">
|
<div class="col-lg-3 col-xs-6">
|
||||||
<div class="small-box bg-red">
|
<div class="small-box bg-red">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h4>{$u_all}</h4>
|
<h4>{$c_all}</h4>
|
||||||
|
|
||||||
<p>{$_L['Total_Users']}</p>
|
<p>{$_L['Total_Users']}</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,6 +22,13 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('.select2').select2({theme: "bootstrap"});
|
$('.select2').select2({theme: "bootstrap"});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var listAtts = document.querySelectorAll(`[api-get-text]`);
|
||||||
|
listAtts.forEach(function(el) {
|
||||||
|
$.get(el.getAttribute('api-get-text'), function(data) {
|
||||||
|
el.innerHTML = data;
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
{/literal}
|
{/literal}
|
||||||
|
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
</footer>
|
</footer>
|
||||||
{else}
|
{else}
|
||||||
<footer class="main-footer">
|
<footer class="main-footer">
|
||||||
PHPNuxBill by <a href="https://github.com/hotspotbilling/phpnuxbill" rel="nofollow noreferrer noopener" target="_blank">iBNuX</a>, Theme by <a href="https://adminlte.io/" rel="nofollow noreferrer noopener" target="_blank">AdminLTE</a>
|
PHPNuxBill by <a href="https://github.com/hotspotbilling/phpnuxbill" rel="nofollow noreferrer noopener"
|
||||||
|
target="_blank">iBNuX</a>, Theme by <a href="https://adminlte.io/" rel="nofollow noreferrer noopener"
|
||||||
|
target="_blank">AdminLTE</a>
|
||||||
</footer>
|
</footer>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@ -40,6 +42,17 @@
|
|||||||
<!--End of Tawk.to Script-->
|
<!--End of Tawk.to Script-->
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{literal}
|
||||||
|
<script>
|
||||||
|
var listAtts = document.querySelectorAll(`[api-get-text]`);
|
||||||
|
listAtts.forEach(function(el) {
|
||||||
|
$.get(el.getAttribute('api-get-text'), function(data) {
|
||||||
|
el.innerHTML = data;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/literal}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "2023.9.6"
|
"version": "2023.9.7"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user