mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-03 01:34:53 +02:00
Allow delete Pool and plan when Router already deleted
This commit is contained in:
parent
1583068f57
commit
c69b43dbf6
3 changed files with 27 additions and 15 deletions
|
@ -16,15 +16,15 @@ class Mikrotik
|
|||
public static function getClient($ip, $user, $pass)
|
||||
{
|
||||
global $ui;
|
||||
try {
|
||||
//try {
|
||||
$iport = explode(":", $ip);
|
||||
return new RouterOS\Client($iport[0], $user, $pass, ($iport[1]) ? $iport[1] : null);
|
||||
} catch (Exception $e) {
|
||||
$ui->assign("error_title", "Mikrotik Connection Error");
|
||||
$ui->assign("error_message", "Unable to connect to the router : $ip<br>" . $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||
$ui->display('router-error.tpl');
|
||||
die();
|
||||
}
|
||||
// } catch (Exception $e) {
|
||||
// $ui->assign("error_title", "Mikrotik Connection Error");
|
||||
// $ui->assign("error_message", "Unable to connect to the router : $ip<br>" . $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||
// $ui->display('router-error.tpl');
|
||||
// die();
|
||||
// }
|
||||
}
|
||||
|
||||
public static function isUserLogin($client, $username)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue