change menu, show history, show unpaid

This commit is contained in:
Ibnu Maksum 2022-09-11 11:02:10 +07:00
parent 9154c10c45
commit 4d84efcf83
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
4 changed files with 150 additions and 75 deletions

View File

@ -118,17 +118,6 @@
</ul> </ul>
</li> </li>
<li {if $_system_menu eq 'voucher'}class="open"{/if}>
<a href="#">
<i class="ion ion-card"></i>
<span class="text">{$_L['Voucher']}</span>
<i class="arrow ion-chevron-left"></i>
</a>
<ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'voucher'}class="active"{/if}><a href="{$_url}voucher/activation">{$_L['Voucher_Activation']}</a></li>
<li {if $_system_menu eq 'voucher'}class="active"{/if}><a href="{$_url}voucher/list-activated">{$_L['List_Activated_Voucher']}</a></li>
</ul>
</li>
<li {if $_system_menu eq 'order'}class="open"{/if}> <li {if $_system_menu eq 'order'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)"> <a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-ios-cart"></i> <i class="ion ion-ios-cart"></i>
@ -139,9 +128,16 @@
<li {if $_system_menu eq 'order'}class="active"{/if}><a href="{$_url}order/voucher">Voucher</a></li> <li {if $_system_menu eq 'order'}class="active"{/if}><a href="{$_url}order/voucher">Voucher</a></li>
{if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' } {if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' }
<li {if $_system_menu eq 'order'}class="active"{/if}><a href="{$_url}order/package">{Lang::T('Package')}</a></li> <li {if $_system_menu eq 'order'}class="active"{/if}><a href="{$_url}order/package">{Lang::T('Package')}</a></li>
<li {if $_system_menu eq 'order'}class="active"{/if}><a href="{$_url}order/history">{Lang::T('History')}</a></li>
{/if} {/if}
</ul> </ul>
</li> </li>
<li {if $_system_menu eq 'voucher'}class="active"{/if}>
<a href="{$_url}voucher/list-activated">
<i class="ion ion-card"></i>
<span class="text">{Lang::T('History')}</span>
</a>
</li>
<li {if $_system_menu eq 'accounts'}class="open"{/if}> <li {if $_system_menu eq 'accounts'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)"> <a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-gear-a"></i> <i class="ion ion-gear-a"></i>

View File

@ -23,7 +23,7 @@
<tr> <tr>
<td>{$ds['username']}</td> <td>{$ds['username']}</td>
<td>{$ds['plan_name']}</td> <td>{$ds['plan_name']}</td>
<td>{$ds['price']}</td> <td>{$_c['currency_code']} {number_format($ds['price'],2,$_c['dec_point'],$_c['thousands_sep'])}</td>
<td>{$ds['type']}</td> <td>{$ds['type']}</td>
<td class="text-success">{date($_c['date_format'], strtotime($ds['recharged_on']))} {$ds['time']}</td> <td class="text-success">{date($_c['date_format'], strtotime($ds['recharged_on']))} {$ds['time']}</td>
<td class="text-danger">{date($_c['date_format'], strtotime($ds['expiration']))} {$ds['time']}</td> <td class="text-danger">{date($_c['date_format'], strtotime($ds['expiration']))} {$ds['time']}</td>

View File

@ -1,6 +1,6 @@
{include file="sections/user-header.tpl"} {include file="sections/user-header.tpl"}
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="panel panel-default table-condensed"> <div class="panel panel-default table-condensed">
<div class="panel-heading">{$_L['Account_Information']}</div> <div class="panel-heading">{$_L['Account_Information']}</div>
@ -55,6 +55,34 @@
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
{if $unpaid }
<div class="panel panel-danger panel-hovered panel-stacked mb30">
<div class="panel-heading">{Lang::T('Unpaid Order')}</div>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('expired')}</td>
<td>{date({$_c['date_format']}, strtotime($unpaid['expired_date']))} {date('H:i', strtotime($unpaid['expired_date']))} </td>
</tr>
<tr>
<td>{$_L['Plan_Name']}</td>
<td>{$unpaid['plan_name']}</td>
</tr>
<tr>
<td>{$_L['Plan_Price']}</td>
<td>{$unpaid['price']}</td>
</tr>
<tr>
<td>{Lang::T('Routers')}</td>
<td>{$unpaid['routers']}</td>
</tr>
</tbody>
</table>
<div class="panel-footer">
<a class="btn btn-danger btn-block btn-sm waves-effect waves-light" href="{$_url}order/view/{$unpaid['id']}"><i class="ion ion-card"></i> {Lang::T('PAY NOW')}</a>
</div>
</div>
{/if}
<br class="visible-xs-inline visible-sm-inline"> <br class="visible-xs-inline visible-sm-inline">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">{$_L['Announcement']}</div> <div class="panel-heading">{$_L['Announcement']}</div>
@ -63,5 +91,5 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{include file="sections/user-footer.tpl"} {include file="sections/user-footer.tpl"}

View File

@ -0,0 +1,51 @@
{include file="sections/user-header.tpl"}
<div class="row">
<div class="col-sm-12">
<div class="panel mb20 panel-hovered panel-default">
<div class="panel-heading">{$_L['Order_History']}</div>
<div class="panel-body">
<div class="table-responsive">
<table id="datatable" class="table table-striped table-bordered">
<thead>
<tr>
<th>{$_L['Plan_Name']}</th>
<th>{Lang::T('Gateway')}</th>
<th>{Lang::T('Routers')}</th>
<th>{$_L['Type']}</th>
<th>{$_L['Plan_Price']}</th>
<th>{$_L['Created_On']}</th>
<th>{$_L['Expires_On']}</th>
<th>{Lang::T('Date Done')}</th>
<th>{$_L['Method']}</th>
</tr>
</thead>
<tbody>
{foreach $d as $ds}
<tr>
<td><a href="{$_url}order/view/{$ds['id']}">{$ds['plan_name']}</a></td>
<td>{$ds['gateway']}</td>
<td>{$ds['routers']}</td>
<td>{$ds['payment_channel']}</td>
<td>{number_format($ds['price'],2,$_c['dec_point'],$_c['thousands_sep'])}</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>{if $ds['status']==1}{$_L['UNPAID']}
{elseif $ds['status']==2}{$_L['PAID']}
{elseif $ds['status']==3}{$_L['FAILED']}
{elseif $ds['status']==4}{$_L['CANCELED']}
{elseif $ds['status']==5}{$_L['UNKNOWN']}{/if}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{$paginator['contents']}
</div>
</div>
</div>
</div>
{include file="sections/user-footer.tpl"}