mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-02-24 23:45:38 +08:00
41 lines
No EOL
1 KiB
PHP
41 lines
No EOL
1 KiB
PHP
<?php
|
|
/**
|
|
* PHP Mikrotik Billing (https://ibnux.github.io/phpnuxbill/)
|
|
* used for ajax
|
|
**/
|
|
|
|
_admin();
|
|
$ui->assign('_title', $_L['Network']);
|
|
$ui->assign('_system_menu', 'network');
|
|
|
|
$action = $routes['1'];
|
|
$admin = Admin::_info();
|
|
$ui->assign('_admin', $admin);
|
|
|
|
switch ($action) {
|
|
case 'pool':
|
|
$routers = _get('routers');
|
|
$d = ORM::for_table('tbl_pool')->where('routers', $routers)->find_many();
|
|
$ui->assign('d',$d);
|
|
$ui->display('autoload-pool.tpl');
|
|
break;
|
|
|
|
case 'server':
|
|
$d = ORM::for_table('tbl_routers')->where('enabled', '1')->find_many();
|
|
$ui->assign('d',$d);
|
|
|
|
$ui->display('autoload-server.tpl');
|
|
break;
|
|
|
|
case 'plan':
|
|
$server = _post('server');
|
|
$jenis = _post('jenis');
|
|
$d = ORM::for_table('tbl_plans')->where('routers', $server)->where('type', $jenis)->where('enabled', '1')->find_many();
|
|
$ui->assign('d',$d);
|
|
|
|
$ui->display('autoload.tpl');
|
|
break;
|
|
|
|
default:
|
|
echo 'action not defined';
|
|
} |