include_once $serverRoot . '/classes/RdfUtility.php'; include_once $serverRoot . '/classes/UuidFactory.php'; switch ($mode) { case "ping": echo "pong"; break; case "autobuild": // auto create agents from collector records $am = new AgentManager(); if ($am->isAgentEditor()) { echo "<html><head>" . str_repeat(" ", 1024) . "</head><body>\n"; echo "<h2>Creating agents from collector records.</h2>\n"; flush(); echo $am->createCollectorsByPattern(); flush(); echo $am->createTeamsFromCollectors(); flush(); echo "<h2>Done</h2>\n"; echo "</body></html>\n"; } else { echo "Not authorized."; } break; case "show": // Display record $agent = loadAgent(); echo showAgent($agent); break; case "edit": // Display record in an edit form switch ($table) {