From 8f78f5184eb34a94e02a1470a3498b2760b2b6af Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Thu, 10 Oct 2024 10:18:35 +0700 Subject: [PATCH] maybe fix buy plan for friend --- system/controllers/order.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/system/controllers/order.php b/system/controllers/order.php index 988db104..ddf9abaf 100644 --- a/system/controllers/order.php +++ b/system/controllers/order.php @@ -15,7 +15,7 @@ switch ($action) { $ui->assign('_system_menu', 'voucher'); $ui->assign('_title', Lang::T('Order Voucher')); run_hook('customer_view_order'); #HOOK - $ui->display('user-ui/order.tpl'); + $ui->display('customer/order.tpl'); break; case 'history': $ui->assign('_system_menu', 'history'); @@ -24,7 +24,7 @@ switch ($action) { $ui->assign('d', $d); $ui->assign('_title', Lang::T('Order History')); run_hook('customer_view_order_history'); #HOOK - $ui->display('user-ui/orderHistory.tpl'); + $ui->display('customer/orderHistory.tpl'); break; case 'balance': if (strpos($user['email'], '@') === false) { @@ -34,7 +34,7 @@ switch ($action) { $ui->assign('_system_menu', 'balance'); $plans_balance = ORM::for_table('tbl_plans')->where('enabled', '1')->where('type', 'Balance')->where('prepaid', 'yes')->find_many(); $ui->assign('plans_balance', $plans_balance); - $ui->display('user-ui/orderBalance.tpl'); + $ui->display('customer/orderBalance.tpl'); break; case 'package': if (strpos($user['email'], '@') === false) { @@ -127,7 +127,7 @@ switch ($action) { $ui->assign('plans_hotspot', $plans_hotspot); $ui->assign('plans_vpn', $plans_vpn); run_hook('customer_view_order_plan'); #HOOK - $ui->display('user-ui/orderPlan.tpl'); + $ui->display('customer/orderPlan.tpl'); break; case 'unpaid': $d = ORM::for_table('tbl_payment_gateway') @@ -192,7 +192,7 @@ switch ($action) { $ui->assign('plan', $plan); $ui->assign('bandw', $bandw); $ui->assign('_title', 'TRX #' . $trxid); - $ui->display('user-ui/orderView.tpl'); + $ui->display('customer/orderView.tpl'); break; case 'pay': if ($config['enable_balance'] != 'yes') { @@ -333,7 +333,7 @@ switch ($action) { $d->gateway = $target['username']; $d->plan_id = $plan['id']; $d->plan_name = $plan['name_plan']; - $d->routers_id = $routes['2']; + $d->routers_id = ($routes['2'] == 'radius') ? 0 : $routes['2']; $d->routers = $router_name; $d->price = $plan['price']; $d->payment_method = "Balance"; @@ -352,7 +352,7 @@ switch ($action) { $d->gateway = $user['username']; $d->plan_id = $plan['id']; $d->plan_name = $plan['name_plan']; - $d->routers_id = $routes['2']; + $d->routers_id = ($routes['2'] == 'radius') ? 0 : $routes['2']; $d->routers = $router_name; $d->price = $plan['price']; $d->payment_method = "Balance"; @@ -382,7 +382,7 @@ switch ($action) { $ui->assign('router', $router_name); $ui->assign('plan', $plan); $ui->assign('tax', $tax); - $ui->display('user-ui/sendPlan.tpl'); + $ui->display('customer/sendPlan.tpl'); break; case 'gateway': $ui->assign('_title', Lang::T('Select Payment Gateway')); @@ -420,7 +420,7 @@ switch ($action) { $ui->assign('add_cost', $add_cost); $ui->assign('bills', $bills); $ui->assign('plan', $plan); - $ui->display('user-ui/selectGateway.tpl'); + $ui->display('customer/selectGateway.tpl'); break; } else { sendTelegram("Payment Gateway not set, please set it in Settings"); @@ -443,7 +443,7 @@ switch ($action) { run_hook('customer_buy_plan'); #HOOK include $PAYMENTGATEWAY_PATH . DIRECTORY_SEPARATOR . $gateway . '.php'; call_user_func($gateway . '_validate_config'); - + $plan = ORM::for_table('tbl_plans')->where('enabled', '1')->find_one($routes['3']); if ($plan['is_radius'] == '1') { $router['id'] = 0;