mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 10:15:03 +02:00
Show error, and fix IP Port custom
This commit is contained in:
parent
90a08cb731
commit
6eaede3c6e
11 changed files with 1020 additions and 936 deletions
|
@ -40,9 +40,10 @@ foreach ($d as $ds){
|
|||
$m = ORM::for_table('tbl_routers')->where('name',$ds['routers'])->find_one();
|
||||
|
||||
try {
|
||||
$client = new RouterOS\Client($m['ip_address'], $m['username'], $m['password']);
|
||||
$iport = explode(":",$m['ip_address']);
|
||||
$client = new RouterOS\Client($iport[0], $m['username'], $m['password'],($iport[1])?$iport[1]:null);
|
||||
} catch (Exception $e) {
|
||||
die('Unable to connect to the router.');
|
||||
die("Unable to connect to the router.<br>".$e->getMessage());
|
||||
}
|
||||
|
||||
$printRequest = new RouterOS\Request('/ip/hotspot/user/print');
|
||||
|
@ -81,9 +82,10 @@ foreach ($d as $ds){
|
|||
$m = ORM::for_table('tbl_routers')->where('name',$ds['routers'])->find_one();
|
||||
|
||||
try {
|
||||
$client = new RouterOS\Client($m['ip_address'], $m['username'], $m['password']);
|
||||
$iport = explode(":",$m['ip_address']);
|
||||
$client = new RouterOS\Client($iport[0], $m['username'], $m['password'],($iport[1])?$iport[1]:null);
|
||||
} catch (Exception $e) {
|
||||
die('Unable to connect to the router.');
|
||||
die("Unable to connect to the router.<br>".$e->getMessage());
|
||||
}
|
||||
$printRequest = new RouterOS\Request('/ppp/secret/print');
|
||||
$printRequest->setArgument('.proplist', '.id');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue