simplified Mikrotik Connection

This commit is contained in:
Ibnu Maksum
2022-09-18 00:52:39 +07:00
parent e6f8826490
commit ac813ca132
11 changed files with 489 additions and 1177 deletions

View File

@ -86,12 +86,7 @@ switch ($action) {
}
if(!$_c['radius_mode']){
try {
$iport = explode(":", $ip_address);
$client = new RouterOS\Client($iport[0], $username, $password, ($iport[1]) ? $iport[1] : null);
} catch (Exception $e) {
$msg .= "Unable to connect to the router.<br>".$e->getMessage().'<br>';
}
Mikrotik::getClient($ip_address,$username,$password);
}
if($msg == ''){
@ -152,12 +147,7 @@ switch ($action) {
if(!$_c['radius_mode']){
try {
$iport = explode(":", $ip_address);
$client = new RouterOS\Client($iport[0], $username, $password, ($iport[1]) ? $iport[1] : null);
} catch (Exception $e) {
$msg .= "Unable to connect to the router.<br>".$e->getMessage().'<br>';
}
Mikrotik::getClient($ip_address,$username,$password);
}