if ($_REQUEST["command"] == "checkconnectivity") { $config = Accounting::loadConfigParams(); $result = getCredits($config); if ($result == "-1") { echo $mod_strings['_LBL_FAX_SETTINGS_CONNECTIVITY_ERROR']; } else { $errCode = split(":", $result); if ($errCode[0] == "ERR") { echo $mod_strings['_LBL_FAX_SETTINGS_CONNECTIVITY_ERROR_LOGIN'] . " (" . $errCode[1] . ")"; } else { echo $mod_strings['_LBL_FAX_SETTINGS_CONNECTIVITY_OK']; } } } else { if ($_REQUEST["command"] == "addtemplate") { Accounting::addTemplate($_REQUEST["name"], $_REQUEST["body"]); } else { if ($_REQUEST["command"] == "savetemplate") { Accounting::updateTemplate($_REQUEST["id"], $_REQUEST["name"], $_REQUEST["body"]); } else { if ($_REQUEST["command"] == "deletetemplate") { Accounting::deleteTemplate($_REQUEST["id"]); } else { if ($_REQUEST["command"] == "deletesender") { Accounting::deleteSender($_REQUEST["sender"]); } else { if ($_REQUEST["command"] == "addsender") { Accounting::addSender($_REQUEST["sender"]); } else { if ($_REQUEST["command"] == "updateserviceinfo") { Accounting::updateServiceInfo($_REQUEST["domain"], $_REQUEST["toformat"], $_REQUEST["from"], $_REQUEST["extensions"], $_REQUEST["maxsize"], str_replace(" ", "", $_REQUEST["countrycode"]), str_replace(" ", "", $_REQUEST["internationalcode"]), str_replace(" ", "", $_REQUEST["trunkcode"]), $_REQUEST["subject"]);