payment Info

This commit is contained in:
Ibnu Maksum 2024-08-19 15:58:51 +07:00
parent d11cd83089
commit e908ade918
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 263 additions and 214 deletions

View File

@ -48,24 +48,71 @@ switch ($action) {
} }
if (!empty($_SESSION['nux-router'])) { if (!empty($_SESSION['nux-router'])) {
if ($_SESSION['nux-router'] == 'radius') { if ($_SESSION['nux-router'] == 'radius') {
$radius_pppoe = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->where('prepaid', 'yes')->find_many(); $radius_pppoe = ORM::for_table('tbl_plans')
$radius_hotspot = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->where('prepaid', 'yes')->find_many(); ->where('plan_type', $account_type)
->where('enabled', '1')
->where('is_radius', 1)
->where('type', 'PPPOE')
->where('prepaid', 'yes')->find_many();
$radius_hotspot = ORM::for_table('tbl_plans')
->where('plan_type', $account_type)
->where('enabled', '1')
->where('is_radius', 1)
->where('type', 'Hotspot')
->where('prepaid', 'yes')->find_many();
} else { } else {
$routers = ORM::for_table('tbl_routers')->where('id', $_SESSION['nux-router'])->find_many(); $routers = ORM::for_table('tbl_routers')->where('id', $_SESSION['nux-router'])->find_many();
$rs = []; $rs = [];
foreach ($routers as $r) { foreach ($routers as $r) {
$rs[] = $r['name']; $rs[] = $r['name'];
} }
$plans_pppoe = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'PPPOE')->where('prepaid', 'yes')->find_many(); $plans_pppoe = ORM::for_table('tbl_plans')
$plans_hotspot = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'Hotspot')->where('prepaid', 'yes')->find_many(); ->where('plan_type', $account_type)
->where('enabled', '1')
->where_in('routers', $rs)
->where('is_radius', 0)
->where('type', 'PPPOE')
->where('prepaid', 'yes')
->find_many();
$plans_hotspot = ORM::for_table('tbl_plans')
->where('plan_type', $account_type)
->where('enabled', '1')
->where_in('routers', $rs)
->where('is_radius', 0)
->where('type', 'Hotspot')
->where('prepaid', 'yes')
->find_many();
} }
} else { } else {
$radius_pppoe = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->where('prepaid', 'yes')->find_many(); $radius_pppoe = ORM::for_table('tbl_plans')
$radius_hotspot = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->where('prepaid', 'yes')->find_many(); ->where('plan_type', $account_type)
->where('enabled', '1')
->where('is_radius', 1)
->where('type', 'PPPOE')
->where('prepaid', 'yes')
->find_many();
$radius_hotspot = ORM::for_table('tbl_plans')
->where('plan_type', $account_type)
->where('enabled', '1')
->where('is_radius', 1)
->where('type', 'Hotspot')
->where('prepaid', 'yes')
->find_many();
$routers = ORM::for_table('tbl_routers')->find_many(); $routers = ORM::for_table('tbl_routers')->find_many();
$plans_pppoe = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 0)->where('type', 'PPPOE')->where('prepaid', 'yes')->find_many(); $plans_pppoe = ORM::for_table('tbl_plans')
$plans_hotspot = ORM::for_table('tbl_plans')->where('plan_type', $account_type)->where('enabled', '1')->where('is_radius', 0)->where('type', 'Hotspot')->where('prepaid', 'yes')->find_many(); ->where('plan_type', $account_type)
->where('enabled', '1')
->where('is_radius', 0)
->where('type', 'PPPOE')
->where('prepaid', 'yes')
->find_many();
$plans_hotspot = ORM::for_table('tbl_plans')
->where('plan_type', $account_type)
->where('enabled', '1')->where('is_radius', 0)
->where('type', 'Hotspot')
->where('prepaid', 'yes')
->find_many();
} }
$ui->assign('routers', $routers); $ui->assign('routers', $routers);
$ui->assign('radius_pppoe', $radius_pppoe); $ui->assign('radius_pppoe', $radius_pppoe);

View File

@ -473,6 +473,8 @@
</li> </li>
<li {if $_routes[1] eq 'Registration_Info' }class="active" {/if}><a <li {if $_routes[1] eq 'Registration_Info' }class="active" {/if}><a
href="{$_url}pages/Registration_Info">{Lang::T('Registration Info')}</a></li> href="{$_url}pages/Registration_Info">{Lang::T('Registration Info')}</a></li>
<li {if $_routes[1] eq 'Payment_Info' }class="active" {/if}><a
href="{$_url}pages/Payment_Info">{Lang::T('Payment Info')}</a></li>
<li {if $_routes[1] eq 'Privacy_Policy' }class="active" {/if}><a <li {if $_routes[1] eq 'Privacy_Policy' }class="active" {/if}><a
href="{$_url}pages/Privacy_Policy">{Lang::T('Privacy Policy')}</a></li> href="{$_url}pages/Privacy_Policy">{Lang::T('Privacy Policy')}</a></li>
<li {if $_routes[1] eq 'Terms_and_Conditions' }class="active" {/if}><a <li {if $_routes[1] eq 'Terms_and_Conditions' }class="active" {/if}><a