예제 #1
0
function get_notices_xmlrpc($raw_params)
{
    global $g, $xmlrpc_g;
    $params = xmlrpc_params_to_php($raw_params);
    if (!xmlrpc_auth($params)) {
        xmlrpc_authfail();
        return $xmlrpc_g['return']['authfail'];
    }
    if (!function_exists("get_notices")) {
        require "notices.inc";
    }
    if (!$params) {
        $toreturn = get_notices();
    } else {
        $toreturn = get_notices($params);
    }
    $response = new XML_RPC_Response(XML_RPC_encode($toreturn));
    return $response;
}
예제 #2
0
function interfaces_carp_configure_xmlrpc($raw_params)
{
    global $xmlrpc_g;
    $params = xmlrpc_params_to_php($raw_params);
    if (!xmlrpc_auth($params)) {
        return $xmlrpc_g['return']['authfail'];
    }
    interfaces_carp_configure();
    interfaces_carp_bring_up_final();
    return $xmlrpc_g['return']['true'];
}