Persiapan Radius Mode

This commit is contained in:
Ibnu Maksum
2022-09-07 16:11:35 +07:00
parent 19f79680ff
commit 464f41ef16
10 changed files with 919 additions and 832 deletions

View File

@ -83,11 +83,13 @@ switch ($action) {
$msg .= $_L['Router_already_exist']. '<br>';
}
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>';
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>';
}
}
if($msg == ''){
@ -145,11 +147,13 @@ switch ($action) {
}
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>';
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>';
}
}