Exemple #1
0
function interworx_GetResellers($params)
{
    $key = $params['serveraccesshash'];
    $api_controller = "/nodeworx/reseller";
    $action = "listIds";
    $input = array();
    $client = new soapclient("https://" . $params['serverip'] . ":2443/nodeworx/soap?wsdl");
    $result = $client->route($key, $api_controller, $action, $input);
    logModuleCall("interworx", $action, $input, $result);
    $resellers = array();
    foreach ($result['payload'] as $reseller) {
        $resellerid = $reseller[0];
        $reselleremail = $reseller[1];
        $reselleremail = explode("(", $reselleremail, 2);
        $reselleremail = $reselleremail[1];
        $reselleremail = substr($reselleremail, 0, 0 - 1);
        $resellers[$reselleremail] = $resellerid;
    }
    return $resellers;
}