Example #1
0
/**
* Load the location information and extract just the end nodes
*
*/
function GetAllTesters()
{
    $locations = array();
    $loc = LoadLocationsIni();
    if (isset($_REQUEST['location'])) {
        $location = $_REQUEST['location'];
        $new = array('locations' => array('1' => 'group', 'default' => 'group'), 'group' => array('1' => $location, 'default' => $location, 'label' => 'placeholder'));
        if (isset($loc[$_REQUEST['location']])) {
            $new[$_REQUEST['location']] = $loc[$_REQUEST['location']];
        }
        $loc = $new;
    }
    BuildLocations($loc);
    $i = 1;
    while (isset($loc['locations'][$i])) {
        $group =& $loc[$loc['locations'][$i]];
        $j = 1;
        while (isset($group[$j])) {
            if (array_key_exists('relayServer', $loc[$group[$j]]) && strlen($loc[$group[$j]]['relayServer']) && array_key_exists('relayLocation', $loc[$group[$j]]) && strlen($loc[$group[$j]]['relayLocation'])) {
                $locations[$loc[$group[$j]]['location']] = GetRemoteTesters($loc[$group[$j]]['relayServer'], $loc[$group[$j]]['relayLocation']);
            } else {
                $locations[$loc[$group[$j]]['location']] = GetTesters($loc[$group[$j]]['location']);
            }
            $j++;
        }
        $i++;
    }
    return $locations;
}
Example #2
0
/**
* Load the location information and extract just the end nodes
*
*/
function GetAllTesters()
{
    $locations = array();
    $loc = LoadLocationsIni();
    BuildLocations($loc);
    $i = 1;
    while (isset($loc['locations'][$i])) {
        $group =& $loc[$loc['locations'][$i]];
        $j = 1;
        while (isset($group[$j])) {
            if (array_key_exists('relayServer', $loc[$group[$j]]) && strlen($loc[$group[$j]]['relayServer']) && array_key_exists('relayLocation', $loc[$group[$j]]) && strlen($loc[$group[$j]]['relayLocation'])) {
                $locations[$loc[$group[$j]]['location']] = GetRemoteTesters($loc[$group[$j]]['relayServer'], $loc[$group[$j]]['relayLocation']);
            } else {
                $locations[$loc[$group[$j]]['location']] = GetTesters($loc[$group[$j]]['location']);
            }
            $j++;
        }
        $i++;
    }
    return $locations;
}