Fix Recharge time

This commit is contained in:
Ibnu Maksum
2023-08-28 09:44:57 +07:00
parent 51ac162642
commit b4f5cf8954
17 changed files with 124 additions and 282 deletions

View File

@ -73,7 +73,8 @@
class="pull-right">{if $package['status']=='on'}yes{else}no{/if}</span>
</li>
<li class="list-group-item">
{$_L['Created_On']} <span class="pull-right">{Lang::dateFormat($package['recharged_on'])}</span>
{$_L['Created_On']} <span
class="pull-right">{Lang::dateAndTimeFormat($package['recharged_on'],$package['recharged_time'])}</span>
</li>
<li class="list-group-item">
{$_L['Expires_On']} <span
@ -116,9 +117,9 @@
<td>{$ds['plan_name']}</td>
<td>{Lang::moneyFormat($ds['price'])}</td>
<td>{$ds['type']}</td>
<td class="text-success">{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
<td class="text-danger">{date($_c['date_format'], strtotime($ds['expiration']))}
{$ds['time']}</td>
<td class="text-success">{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}
</td>
<td class="text-danger">{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
<td>{$ds['method']}</td>
</tr>
{/foreach}
@ -146,12 +147,9 @@
<td>{$ds['routers']}</td>
<td>{$ds['payment_channel']}</td>
<td>{Lang::moneyFormat($ds['price'])}</td>
<td class="text-primary">{date("{$_c['date_format']} H:i",
strtotime($ds['created_date']))}</td>
<td class="text-danger">{date("{$_c['date_format']} H:i",
strtotime($ds['expired_date']))}</td>
<td class="text-success">{if $ds['status']!=1}{date("{$_c['date_format']} H:i",
strtotime($ds['paid_date']))}{/if}</td>
<td class="text-primary">{Lang::dateTimeFormat($ds['created_date'])}</td>
<td class="text-danger">{Lang::dateTimeFormat($ds['expired_date'])}</td>
<td class="text-success">{if $ds['status']!=1}{Lang::dateTimeFormat($ds['paid_date'])}{/if}</td>
<td>{if $ds['status']==1}{$_L['UNPAID']}
{elseif $ds['status']==2}{$_L['PAID']}
{elseif $ds['status']==3}{$_L['FAILED']}

View File

@ -108,9 +108,9 @@
<tr>
<td>{$no++}</td>
<td><a href="{$_url}customers/viewu/{$expired['username']}">{$expired['username']}</a></td>
<td>{date($_c['date_format'], strtotime($expired['recharged_on']))}
<td>{Lang::dateAndTimeFormat($expired['recharged_on'],$expired['recharged_time'])}
</td>
<td>{date($_c['date_format'], strtotime($expired['expiration']))} {$expired['time']}
<td>{Lang::dateAndTimeFormat($expired['expiration'],$expired['time'])}
</td>
</tr>
</tbody>

View File

@ -39,9 +39,8 @@
{$_L['Password']} : **********<br>
{if $in['type'] != 'Balance'}
<br>
{$_L['Created_On']} : <b>{date($_c['date_format'], strtotime($d['recharged_on']))}</b><br>
{$_L['Expires_On']} : <b>{date($_c['date_format'], strtotime($d['expiration']))}
{$d['time']}</b><br>
{$_L['Created_On']} : <b>{Lang::dateAndTimeFormat($d['recharged_on'],$d['recharged_time'])}</b><br>
{$_L['Expires_On']} : <b>{Lang::dateAndTimeFormat($d['expiration'],$d['time'])}</b><br>
{/if}
============================================<br>
<center>{$_c['note']}</center>

View File

@ -24,9 +24,8 @@
{$_L['Password']} : **********<br>
{if $in['type'] != 'Balance'}
<br>
{$_L['Created_On']} : <b>{date($_c['date_format'], strtotime($in['recharged_on']))}</b><br>
{$_L['Expires_On']} : <b>{date($_c['date_format'], strtotime($in['expiration']))}
{$in['time']}</b><br>
{$_L['Created_On']} : <b>{Lang::dateAndTimeFormat($in['recharged_on'],$in['recharged_time'])}</b><br>
{$_L['Expires_On']} : <b>{Lang::dateAndTimeFormat($in['expiration'],$in['time'])}</b><br>
{/if}
=====================================================<br>
<center>{$_c['note']}</center>

View File

@ -32,8 +32,8 @@
<div class="form-group">
<label class="col-md-2 control-label">{$_L['Created_On']}</label>
<div class="col-md-6">
<input type="date" class="form-control" id="recharged_on" name="recharged_on"
value="{$d['recharged_on']}">
<input type="date" class="form-control" id="recharged_on" name="recharged_on" readonly
value="{$d['recharged_on']} {$d['recharged_time']}">
</div>
</div>
<div class="form-group">

View File

@ -1,66 +1,70 @@
{include file="sections/header.tpl"}
<div class="row">
<div class="col-sm-12">
<div class="panel panel-hovered mb20 panel-primary">
<div class="panel-heading">{$_L['Prepaid_User']}</div>
<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}prepaid/list/">
<div class="input-group">
<div class="input-group-addon">
<span class="fa fa-search"></span>
</div>
<input type="text" name="username" class="form-control" placeholder="{$_L['Search_by_Username']}..." value="{$cari}">
<div class="input-group-btn">
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
</div>
</div>
</form>
</div>
<div class="col-md-4">
<a href="{$_url}prepaid/recharge" class="btn btn-primary btn-block waves-effect"><i class="ion ion-android-add"> </i> {$_L['Recharge_Account']}</a>
</div>&nbsp;
</div>
<div class="table-responsive">
<table id="datatable" class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{$_L['Username']}</th>
<th>{$_L['Plan_Name']}</th>
<th>{$_L['Type']}</th>
<th>{$_L['Created_On']}</th>
<th>{$_L['Expires_On']}</th>
<th>{$_L['Method']}</th>
<th>{$_L['Routers']}</th>
<th>{$_L['Manage']}</th>
</tr>
</thead>
<tbody>
{foreach $d as $ds}
<tr>
<td>{$ds['username']}</td>
<td>{$ds['namebp']}</td>
<td>{$ds['type']}</td>
<td>{$ds['recharged_on']}</td>
<td>{$ds['expiration']} {$ds['time']}</td>
<td>{$ds['method']}</td>
<td>{$ds['routers']}</td>
<td>
<a href="{$_url}prepaid/edit/{$ds['id']}" class="btn btn-warning btn-xs">{$_L['Edit']}</a>
<a href="{$_url}prepaid/delete/{$ds['id']}" id="{$ds['id']}" class="btn btn-danger btn-xs">{$_L['Delete']}</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{$paginator['contents']}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="panel panel-hovered mb20 panel-primary">
<div class="panel-heading">{$_L['Prepaid_User']}</div>
<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}prepaid/list/">
<div class="input-group">
<div class="input-group-addon">
<span class="fa fa-search"></span>
</div>
<input type="text" name="username" class="form-control"
placeholder="{$_L['Search_by_Username']}..." value="{$cari}">
<div class="input-group-btn">
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
</div>
</div>
</form>
</div>
<div class="col-md-4">
<a href="{$_url}prepaid/recharge" class="btn btn-primary btn-block waves-effect"><i
class="ion ion-android-add"> </i> {$_L['Recharge_Account']}</a>
</div>&nbsp;
</div>
<div class="table-responsive">
<table id="datatable" class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{$_L['Username']}</th>
<th>{$_L['Plan_Name']}</th>
<th>{$_L['Type']}</th>
<th>{$_L['Created_On']}</th>
<th>{$_L['Expires_On']}</th>
<th>{$_L['Method']}</th>
<th>{$_L['Routers']}</th>
<th>{$_L['Manage']}</th>
</tr>
</thead>
<tbody>
{foreach $d as $ds}
<tr>
<td><a href="{$_url}customers/viewu/{$ds['username']}">{$ds['username']}</a></td>
<td>{$ds['namebp']}</td>
<td>{$ds['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}prepaid/edit/{$ds['id']}"
class="btn btn-warning btn-xs">{$_L['Edit']}</a>
<a href="{$_url}prepaid/delete/{$ds['id']}" id="{$ds['id']}"
class="btn btn-danger btn-xs">{$_L['Delete']}</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{$paginator['contents']}
</div>
</div>
</div>
</div>
{include file="sections/footer.tpl"}
{include file="sections/footer.tpl"}

View File

@ -39,8 +39,8 @@
<td class="text-center">{$ds['plan_name']}</td>
<td class="text-center">{$ds['type']}</td>
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
<td>{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
<td>{date($_c['date_format'], strtotime($ds['expiration']))} {$ds['time']}</td>
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
<td class="text-center">{$ds['method']}</td>
<td class="text-center">{$ds['routers']}</td>
</tr>

View File

@ -39,8 +39,8 @@
<td class="text-center">{$ds['plan_name']}</td>
<td class="text-center">{$ds['type']}</td>
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
<td>{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
<td>{date($_c['date_format'], strtotime($ds['expiration']))} {$ds['time']}</td>
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
<td class="text-center">{$ds['method']}</td>
<td class="text-center">{$ds['routers']}</td>
</tr>

View File

@ -42,8 +42,8 @@
<td>{$ds['type']}</td>
<td>{$ds['plan_name']}</td>
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
<td>{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
<td>{date($_c['date_format'], strtotime($ds['expiration']))} {$ds['time']}</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>
</tr>

View File

@ -53,8 +53,8 @@
<td>{$ds['type']}</td>
<td>{$ds['plan_name']}</td>
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
<td>{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
<td>{date($_c['date_format'], strtotime($ds['expiration']))} {$ds['time']}</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>
</tr>

View File

@ -26,9 +26,8 @@
<td>{$ds['plan_name']}</td>
<td>{Lang::moneyFormat($ds['price'])}</td>
<td>{$ds['type']}</td>
<td class="text-success">{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
<td class="text-danger">{date($_c['date_format'], strtotime($ds['expiration']))}
{$ds['time']}</td>
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
<td>{$ds['method']}</td>
</tr>
{/foreach}

View File

@ -84,14 +84,14 @@
<tr>
<td class="small text-info text-uppercase text-normal">{$_L['Created_On']}</td>
<td class="small mb15">
{if $_bill['time'] ne ''}{date($_c['date_format'], strtotime($_bill['recharged_on']))}
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['recharged_on'],$_bill['recharged_time'])}
{/if}&nbsp;</td>
</tr>
<tr>
<td class="small text-danger text-uppercase text-normal">{$_L['Expires_On']}</td>
<td class="small mb15">
{if $_bill['time'] ne ''}{date($_c['date_format'], strtotime($_bill['expiration']))}
{$_bill['time']}{/if}&nbsp;</td>
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if}&nbsp;
</td>
</tr>
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on'}
{if $nux_ip}
@ -151,23 +151,24 @@
placeholder="{$_L['Username']}">
</div>
<div class="col-sm-5">
<input type="number" id="balance" name="balance" autocomplete="off" class="form-control" required
placeholder="{$_L['Balance']}">
<input type="number" id="balance" name="balance" autocomplete="off" class="form-control"
required placeholder="{$_L['Balance']}">
</div>
<div class="form-group col-sm-2" align="center">
<button class="btn btn-success btn-block" id="sendBtn" type="submit" name="send" value="balance"><i class="glyphicon glyphicon-send"></i></button>
<button class="btn btn-success btn-block" id="sendBtn" type="submit" name="send"
value="balance"><i class="glyphicon glyphicon-send"></i></button>
</div>
</div>
</form>
<script>
function askConfirm(){
function askConfirm() {
if(confirm('{Lang::T('Send your balance?')}')){
setTimeout(() => {
document.getElementById('sendBtn').setAttribute('disabled', '');
}, 1000);
return true;
}
return false;
setTimeout(() => {
document.getElementById('sendBtn').setAttribute('disabled', '');
}, 1000);
return true;
}
return false;
}
</script>
</div>