diff --git a/system/controllers/message.php b/system/controllers/message.php index 46cf0902..e12eadff 100644 --- a/system/controllers/message.php +++ b/system/controllers/message.php @@ -40,8 +40,11 @@ document.addEventListener("DOMContentLoaded", function(event) { }); EOT; - $c = ORM::for_table('tbl_customers')->find_many(); - $ui->assign('c', $c); + if (isset($routes['2']) && !empty($routes['2'])) { + $ui->assign('cust', ORM::for_table('tbl_customers')->find_one($routes['2'])); + } + $id = $routes['2']; + $ui->assign('id', $id); $ui->assign('xfooter', $select2_customer); $ui->display('message.tpl'); break; diff --git a/ui/ui/customers-view.tpl b/ui/ui/customers-view.tpl index d39792ca..6aeda7d5 100644 --- a/ui/ui/customers-view.tpl +++ b/ui/ui/customers-view.tpl @@ -30,26 +30,26 @@ onclick="this.select()"> {if $d['pppoe_password'] != ''} -
{Lang::T('Invoice')} | -{Lang::T('Username')} | -{Lang::T('Plan Name')} | -{Lang::T('Plan Price')} | -{Lang::T('Type')} | -{Lang::T('Created On')} | -{Lang::T('Expires On')} | -{Lang::T('Method')} | -|
---|---|---|---|---|---|---|---|---|
{$ds['invoice']} | -{$ds['username']} | -{$ds['plan_name']} | -{Lang::moneyFormat($ds['price'])} | -{$ds['type']} | -{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])} - | -{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])} | -{$ds['method']} | -|
{Lang::T('Invoice')} | +{Lang::T('Username')} | +{Lang::T('Plan Name')} | +{Lang::T('Plan Price')} | +{Lang::T('Type')} | +{Lang::T('Created On')} | +{Lang::T('Expires On')} | +{Lang::T('Method')} | +|
{$ds['invoice']} | +{$ds['username']} | +{$ds['plan_name']} | +{Lang::moneyFormat($ds['price'])} | +{$ds['type']} | +{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])} + | +{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])} | +{$ds['method']} | +|
{Lang::T('Plan Name')} | -{Lang::T('Gateway')} | -{Lang::T('Routers')} | -{Lang::T('Type')} | -{Lang::T('Plan Price')} | -{Lang::T('Created On')} | -{Lang::T('Expires On')} | -{Lang::T('Date Done')} | -{Lang::T('Method')} | -
{$ds['plan_name']} | -{$ds['gateway']} | -{$ds['routers']} | -{$ds['payment_channel']} | -{Lang::moneyFormat($ds['price'])} | -{Lang::dateTimeFormat($ds['created_date'])} | -{Lang::dateTimeFormat($ds['expired_date'])} | -{if $ds['status']!=1}{Lang::dateTimeFormat($ds['paid_date'])}{/if} | -{if $ds['status']==1}{Lang::T('UNPAID')} - {elseif $ds['status']==2}{Lang::T('PAID')} - {elseif $ds['status']==3}{$_L['FAILED']} - {elseif $ds['status']==4}{Lang::T('CANCELED')} - {elseif $ds['status']==5}{Lang::T('UNKNOWN')} - {/if} | -
{Lang::T('Plan Name')} | +{Lang::T('Gateway')} | +{Lang::T('Routers')} | +{Lang::T('Type')} | +{Lang::T('Plan Price')} | +{Lang::T('Created On')} | +{Lang::T('Expires On')} | +{Lang::T('Date Done')} | +{Lang::T('Method')} | +
{$ds['plan_name']} | +{$ds['gateway']} | +{$ds['routers']} | +{$ds['payment_channel']} | +{Lang::moneyFormat($ds['price'])} | +{Lang::dateTimeFormat($ds['created_date'])} | +{Lang::dateTimeFormat($ds['expired_date'])} | +{if $ds['status']!=1}{Lang::dateTimeFormat($ds['paid_date'])}{/if} | +{if $ds['status']==1}{Lang::T('UNPAID')} + {elseif $ds['status']==2}{Lang::T('PAID')} + {elseif $ds['status']==3}{$_L['FAILED']} + {elseif $ds['status']==4}{Lang::T('CANCELED')} + {elseif $ds['status']==5}{Lang::T('UNKNOWN')} + {/if} | +
+ {Lang::T('Use placeholders:')}
+
+ {Lang::T('[[name]]')} - {Lang::T('Customer Name')}
+
+ {Lang::T('[[user_name]]')} - {Lang::T('Customer Username')}
+
+ {Lang::T('[[phone]]')} - {Lang::T('Customer Phone')}
+
+ {Lang::T('[[company_name]]')} - {Lang::T('Your Company Name')}
+