MOON
Server: Apache
System: Linux 3-228-103-98.cprapid.com 3.10.0-1160.62.1.el7.x86_64 #1 SMP Tue Apr 5 16:57:59 UTC 2022 x86_64
User: api (1001)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /home/api/public_html/nashville/get-office-agents.php
<?php
$aOfficeIDs = false;
$iLimit = false;
foreach ( $_GET as $k => $v )
{
    switch( strtolower( $k ) )
    {
        case "officeid":
            if ( preg_match( "@^[[:alnum:],]+$@", $v ) === 1 )
            {
                $aOfficeIDs = explode( ",", $v );
            }
            break;
        case "limit":
            if ( is_numeric( $v ) )
                $iLimit = $v;
    }
}

require( "php/config.php" );

$oRes = new Result( "OfficeAgents" );
if ( ! $aOfficeIDs )
    $oRes->FatalError( "OfficeID is not valid" );

foreach ( $aOfficeIDs as &$sOI )
    $sOI = "RTC" . $sOI;
$oRes->addData( $oMLS->getOfficeAgents( $aOfficeIDs ) );

$oMLS->finish( "nashville", "office-agents", json_encode( $_GET ) );

print $oRes->getJSON();