forked from kevinowino869/mitrobill
show Additional Billing in the customer
This commit is contained in:
@ -56,6 +56,22 @@ class User
|
||||
return [$bills, $addcost];
|
||||
}
|
||||
|
||||
public static function getBillNames($id = 0)
|
||||
{
|
||||
if (!$id) {
|
||||
$id = User::getID();
|
||||
if (!$id) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
$bills = [];
|
||||
$attrs = User::getAttributes('Bill', $id);
|
||||
foreach ($attrs as $k => $v) {
|
||||
$bills[] = str_replace(' Bill', '', $k);
|
||||
}
|
||||
return $bills;
|
||||
}
|
||||
|
||||
public static function billsPaid($bills, $id = 0)
|
||||
{
|
||||
if (!$id) {
|
||||
|
@ -29,7 +29,7 @@ switch ($action) {
|
||||
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
||||
die('<a href="' . U . 'home&mikrotik=login&id=' . $bill['id'] . '" onclick="return confirm(\'' . Lang::T('Connect to Internet?') . '\')" class="btn btn-danger btn-xs btn-block">' . Lang::T('Not Online, Login now?') . '</a>');
|
||||
} else {
|
||||
die(Lang::T('Your account not connected to internet'));
|
||||
die(Lang::T('-'));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -291,5 +291,9 @@ $ui->assign('unpaid', ORM::for_table('tbl_payment_gateway')
|
||||
->where('status', 1)
|
||||
->find_one());
|
||||
$ui->assign('code', alphanumeric(_get('code'), "-"));
|
||||
|
||||
$abills = User::getAttributes("Bill");
|
||||
$ui->assign('abills', $abills);
|
||||
|
||||
run_hook('view_customer_dashboard'); #HOOK
|
||||
$ui->display('user-dashboard.tpl');
|
||||
|
@ -658,6 +658,8 @@
|
||||
"Activate_Voucher": "Activate Voucher",
|
||||
"Voucher_invalid": "Voucher invalid",
|
||||
"Account_Not_Found": "Account Not Found",
|
||||
"Voucher_activation_success__now_you_can_login": "Voucher activation success, now you can login",
|
||||
"Internet_Voucher_Expired": "Internet Voucher Expired"
|
||||
"Internet_Voucher_Expired": "Internet Voucher Expired",
|
||||
"": "",
|
||||
"Additional_Billing": "Additional Billing",
|
||||
"_": "-"
|
||||
}
|
Reference in New Issue
Block a user