add fullname to log extend
This commit is contained in:
parent
17de653752
commit
803d04a91d
@ -196,8 +196,8 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
|||||||
$tur->save();
|
$tur->save();
|
||||||
App::setToken(_get('stoken'), $id);
|
App::setToken(_get('stoken'), $id);
|
||||||
file_put_contents($path, $m);
|
file_put_contents($path, $m);
|
||||||
_log("Customer $tur[customer_id] $tur[username] extend for $days days", "Customer", $user['id']);
|
_log("Customer $tur[customer_id] $user[fullname] ($tur[username]) extend for $days days", "Customer", $user['id']);
|
||||||
Message::sendTelegram("#u$user[username] #extend #" . $p['type'] . " \n" . $p['name_plan'] .
|
Message::sendTelegram("#u$user[username] ($user[fullname]) #id$tur[customer_id] #extend #" . $p['type'] . " \n" . $p['name_plan'] .
|
||||||
"\nLocation: " . $p['routers'] .
|
"\nLocation: " . $p['routers'] .
|
||||||
"\nCustomer: " . $user['fullname'] .
|
"\nCustomer: " . $user['fullname'] .
|
||||||
"\nNew Expired: " . Lang::dateAndTimeFormat($expiration, $tur['time']));
|
"\nNew Expired: " . Lang::dateAndTimeFormat($expiration, $tur['time']));
|
||||||
|
@ -1073,11 +1073,11 @@ switch ($action) {
|
|||||||
} else {
|
} else {
|
||||||
r2(getUrl('plan'), 's', "Customer not found");
|
r2(getUrl('plan'), 's', "Customer not found");
|
||||||
}
|
}
|
||||||
Message::sendTelegram("#u$tur[username] #extend #" . $p['type'] . " \n" . $p['name_plan'] .
|
Message::sendTelegram("#u$tur[username] #id$tur[customer_id] #extend by $admin[fullname] #" . $p['type'] . " \n" . $p['name_plan'] .
|
||||||
"\nLocation: " . $p['routers'] .
|
"\nLocation: " . $p['routers'] .
|
||||||
"\nCustomer: " . $c['fullname'] .
|
"\nCustomer: " . $c['fullname'] .
|
||||||
"\nNew Expired: " . Lang::dateAndTimeFormat($expiration, $tur['time']));
|
"\nNew Expired: " . Lang::dateAndTimeFormat($expiration, $tur['time']));
|
||||||
_log("$admin[fullname] extend Customer $tur[customer_id] $tur[username] for $days days", $admin['user_type'], $admin['id']);
|
_log("$admin[fullname] extend Customer $tur[customer_id] $tur[username] #$tur[customer_id] for $days days", $admin['user_type'], $admin['id']);
|
||||||
r2(getUrl('plan'), 's', "Extend until $expiration");
|
r2(getUrl('plan'), 's', "Extend until $expiration");
|
||||||
} else {
|
} else {
|
||||||
r2(getUrl('plan'), 's', "Customer is not expired yet");
|
r2(getUrl('plan'), 's', "Customer is not expired yet");
|
||||||
|
@ -11,6 +11,21 @@ class customer_expired
|
|||||||
|
|
||||||
//user expire
|
//user expire
|
||||||
$query = ORM::for_table('tbl_user_recharges')
|
$query = ORM::for_table('tbl_user_recharges')
|
||||||
|
->table_alias('tur')
|
||||||
|
->selects([
|
||||||
|
'tur.id',
|
||||||
|
'tur.username',
|
||||||
|
'c.fullname',
|
||||||
|
'c.phonenumber',
|
||||||
|
'c.email',
|
||||||
|
'tur.expiration',
|
||||||
|
'tur.time',
|
||||||
|
'tur.recharged_on',
|
||||||
|
'tur.recharged_time',
|
||||||
|
'tur.namebp',
|
||||||
|
'tur.routers'
|
||||||
|
])
|
||||||
|
->join('tbl_customers', ['tur.customer_id', '=', 'c.id'], 'c')
|
||||||
->where_lte('expiration', $current_date)
|
->where_lte('expiration', $current_date)
|
||||||
->order_by_desc('expiration');
|
->order_by_desc('expiration');
|
||||||
$expire = Paginator::findMany($query);
|
$expire = Paginator::findMany($query);
|
||||||
@ -25,6 +40,7 @@ class customer_expired
|
|||||||
|
|
||||||
// Assign the pagination HTML to the template variable
|
// Assign the pagination HTML to the template variable
|
||||||
$ui->assign('expire', $expire);
|
$ui->assign('expire', $expire);
|
||||||
|
$ui->assign('cookie', $_COOKIE);
|
||||||
return $ui->fetch('widget/customer_expired.tpl');
|
return $ui->fetch('widget/customer_expired.tpl');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,20 @@
|
|||||||
<table class="table table-condensed">
|
<table class="table table-condensed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{Lang::T('Username')}</th>
|
<th>
|
||||||
|
<select style="border: 0px; width: 100%; background-color: #f9f9f9;"
|
||||||
|
onchange="changeExpiredDefault(this)">
|
||||||
|
<option value="username" {if $cookie['expdef'] == 'username'}selected{/if}>
|
||||||
|
{Lang::T('Username')}
|
||||||
|
</option>
|
||||||
|
<option value="fullname" {if $cookie['expdef'] == 'fullname'}selected{/if}>
|
||||||
|
{Lang::T('Full Name')}</option>
|
||||||
|
<option value="phone" {if $cookie['expdef'] == 'phone'}selected{/if}>{Lang::T('Phone')}
|
||||||
|
</option>
|
||||||
|
<option value="email" {if $cookie['expdef'] == 'email'}selected{/if}>{Lang::T('Email')}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</th>
|
||||||
<th>{Lang::T('Created / Expired')}</th>
|
<th>{Lang::T('Created / Expired')}</th>
|
||||||
<th>{Lang::T('Internet Package')}</th>
|
<th>{Lang::T('Internet Package')}</th>
|
||||||
<th>{Lang::T('Location')}</th>
|
<th>{Lang::T('Location')}</th>
|
||||||
@ -15,7 +28,17 @@
|
|||||||
{assign var="rem_exp" value="{$expired['expiration']} {$expired['time']}"}
|
{assign var="rem_exp" value="{$expired['expiration']} {$expired['time']}"}
|
||||||
{assign var="rem_started" value="{$expired['recharged_on']} {$expired['recharged_time']}"}
|
{assign var="rem_started" value="{$expired['recharged_on']} {$expired['recharged_time']}"}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{Text::url('customers/viewu/',$expired['username'])}">{$expired['username']}</a></td>
|
<td><a href="{Text::url('customers/view/',$expired['id'])}">
|
||||||
|
{if $cookie['expdef'] == 'fullname'}
|
||||||
|
{$expired['fullname']}
|
||||||
|
{elseif $cookie['expdef'] == 'phone'}
|
||||||
|
{$expired['phonenumber']}
|
||||||
|
{elseif $cookie['expdef'] == 'email'}
|
||||||
|
{$expired['email']}
|
||||||
|
{else}
|
||||||
|
{$expired['username']}
|
||||||
|
{/if}
|
||||||
|
</a></td>
|
||||||
<td><small data-toggle="tooltip" data-placement="top"
|
<td><small data-toggle="tooltip" data-placement="top"
|
||||||
title="{Lang::dateAndTimeFormat($expired['recharged_on'],$expired['recharged_time'])}">{Lang::timeElapsed($rem_started)}</small>
|
title="{Lang::dateAndTimeFormat($expired['recharged_on'],$expired['recharged_time'])}">{Lang::timeElapsed($rem_started)}</small>
|
||||||
/
|
/
|
||||||
@ -30,4 +53,12 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{include file="pagination.tpl"}
|
{include file="pagination.tpl"}
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
function changeExpiredDefault(fl) {
|
||||||
|
setCookie('expdef', fl.value, 365);
|
||||||
|
setTimeout(() => {
|
||||||
|
location.reload();
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
x
Reference in New Issue
Block a user