Beispiel #1
0
        }
        if (isset($_GET['limit'])) {
            $limit = $_GET['limit'];
        } else {
            $limit = '';
        }
        $q = $_GET['q'];
        $q = str_replace(" ", "+", $q);
        $q = str_replace("&", "%", $q);
        $platform = new Platform();
        $orgArray = $platform->searchOrganizations($q);
        echo implode("\n", $orgArray);
        break;
        //used to verify organization name isn't already being used as it's added
    //used to verify organization name isn't already being used as it's added
    case 'getExistingOrganizationName':
        $shortName = $_GET['shortName'];
        $platform = new Platform();
        $orgArray = array();
        $exists = 0;
        foreach ($platform->getOrganizationList() as $orgArray) {
            if (strtoupper($orgArray['name']) == strtoupper($shortName)) {
                $exists = $orgArray['organizationID'];
            }
        }
        echo $exists;
        break;
    default:
        echo _("Function ") . $_REQUEST['function'] . _(" not set up!");
        break;
}