select('SELECT name, IF(timezone IN (8, 9, 10, 11, 12), "eu", "us") AS region FROM realmlist WHERE allowedSecurityLevel = 0'); foreach ($rows as $row) { if ($row['region'] == 'eu') { $set |= 0x1; $subEU[] = [Util::urlize($row['name']), $row['name']]; } else if ($row['region'] == 'us') { $set |= 0x2; $subUS[] = [Util::urlize($row['name']), $row['name']]; } } } else CLISetup::log(' - realmMenu: Auth-DB not set up .. menu will be empty', CLISetup::LOG_WARN); if (!($set & 0x1)) array_shift($menu); if (!($set & 0x2)) array_pop($menu); return Util::toJSON($menu); } ?>