diff --git a/sip_settings.phtml b/sip_settings.phtml
index 3167a21..7820afe 100644
--- a/sip_settings.phtml
+++ b/sip_settings.phtml
@@ -1,119 +1,119 @@
"CDRTool_Session",
"auth" => "CDRTool_Auth",
"perm" => "CDRTool_Perm"
)
);
$account = $_REQUEST['account'];
$reseller = $_REQUEST['reseller'];
$customer = $_REQUEST['customer'];
$sip_engine = $_REQUEST['sip_engine'];
if ($reseller && !$customer) {
$customer = $reseller;
} else if ($customer && !$reseller) {
$reseller = $customer;
}
$perm->check("provisioning");
global $CDRTool;
if ($CDRTool['impersonate']) {
if (preg_match("/^([1-9][0-9]*)\.([1-9][0-9]*)$/", $CDRTool['impersonate'], $m)) {
$_customer = $m[1];
$_reseller = $m[2];
if ($_customer == $_reseller) {
$login_type = 'reseller';
} else {
$login_type = 'customer';
}
$login_credentials=array(
'customer' => $_customer,
'reseller' => $_reseller,
'login_type' => $login_type
);
} else if ($CDRTool['impersonate'] == '0' || $CDRTool['impersonate'] = '0.0') {
$login_credentials = array(
'customer' => $customer,
'reseller' => $reseller,
'login_type' => 'admin'
);
} else {
page_close();
printf("Error: Invalid impersonate value %s", $CDRTool['impersonate']);
exit;
}
} else {
page_close();
printf("Error: Missing impersonate setting");
exit;
}
} else {
page_open(
array(
"sess" => "SIP_Subscriber_Session",
"auth" => "SIP_Subscriber_Auth"
)
);
$account = $SIP['account'];
$reseller = $SIP['reseller'];
$customer = $SIP['customer'];
$sip_engine = $SIP['engine'];
$login_type = "subscriber";
$login_credentials=array(
'login_type' => $login_type,
'customer' => $customer,
'reseller' => $reseller,
'sip_engine' => $sip_engine
);
}
$_class = 'SipSettings';
$_reseller_class = $_class.$reseller;
if (class_exists($_reseller_class)) {
$SipSettings_class = $_reseller_class;
} else {
$SipSettings_class = $_class;
}
if ($resellerFilters[$login_credentials['reseller']]['sip_engine']) {
$login_credentials['sip_engine'] = $resellerFilters[$login_credentials['reseller']]['sip_engine'];
-} else if ($_REQUEST['sip_engine']) {
+} elseif ($_REQUEST['sip_engine']) {
$login_credentials['sip_engine'] = $_REQUEST['sip_engine'];
-} else if ($resellerFilters['default']['sip_engine']) {
+} elseif ($resellerFilters['default']['sip_engine']) {
$login_credentials['sip_engine'] = $resellerFilters['default']['sip_engine'];
}
renderUI($SipSettings_class, $account, $login_credentials, $soapEngines);
page_close();
?>