Merge branch 'Development' into patch-2

This commit is contained in:
iBNu Maksum 2024-05-07 08:49:01 +07:00 committed by GitHub
commit 126212f4c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 27 additions and 9 deletions

View File

@ -115,7 +115,6 @@ class Message
$mail->Subject = $subject;
$mail->Body = $body;
$mail->send();
die();
}
}

View File

@ -84,7 +84,6 @@ switch ($action) {
}
echo json_encode(['results' => $json]);
die();
break;
default:
$ui->display('a404.tpl');
}

View File

@ -600,11 +600,20 @@ switch ($action) {
default:
run_hook('list_customers'); #HOOK
$query = ORM::for_table('tbl_customers')->order_by_asc('username');
$search = _post('search');
if ($search != '') {
$query = ORM::for_table('tbl_customers')
->whereRaw("username LIKE '%$search%' OR fullname LIKE '%$search%' OR address LIKE '%$search%' ".
"OR phonenumber LIKE '%$search%' OR email LIKE '%$search%' ")
->order_by_asc('username');
$d = $query->findMany();
} else {
$query = ORM::for_table('tbl_customers')->order_by_asc('username');
}
$d = $query->findMany();
$ui->assign('xheader', '<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">');
$ui->assign('d', $d);
$ui->assign('search', $search);
$ui->display('customers.tpl');
break;
}

View File

@ -801,7 +801,9 @@ switch ($action) {
$ui->assign('_title', Lang::T('Customer'));
$search = _post('search');
if ($search != '') {
$query = ORM::for_table('tbl_user_recharges')->where_like('username', '%' . $search . '%')->order_by_desc('id');
$query = ORM::for_table('tbl_user_recharges')
->whereRaw("username LIKE '%$search%' OR namebp LIKE '%$search%' OR method LIKE '%$search%' OR routers LIKE '%$search%' OR type LIKE '%$search%'")
->order_by_desc('id');
$d = Paginator::findMany($query, ['search' => $search]);
} else {
$query = ORM::for_table('tbl_user_recharges')->order_by_desc('id');

View File

@ -27,7 +27,18 @@
<div class="panel-body">
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
<div class="col-md-8">
<form id="site-search" method="post" action="{$_url}customers">
<div class="input-group">
<div class="input-group-addon">
<span class="fa fa-search"></span>
</div>
<input type="text" name="search" class="form-control"
placeholder="{Lang::T('Search')}..." value="{$search}">
<div class="input-group-btn">
<button class="btn btn-success" type="submit">{Lang::T('Search')}</button>
</div>
</div>
</form>
</div>
<div class="col-md-4">
<a href="{$_url}customers/add" class="btn btn-primary btn-block"><i class="ion ion-android-add">

View File

@ -45,7 +45,6 @@
<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>
@ -60,7 +59,6 @@
<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>

View File

@ -1,3 +1,3 @@
{
"version": "2024.4.30"
"version": "2024.5.1"
}