<?php

require 'header.php';

$queues = Queue::getList();

$data = array();
foreach ( $queues as $queue ) {
   $newdata = array();
   $newdata['id'] = $queue->getID();
   $newdata['name'] = $queue->getName(HTMLSAFE);
   $newdata['type'] = $queue->getType();
   $newdata['active'] = $queue->getActive();
   $data['queues'][] = $newdata;
}
$data['queuetarget'] = $_SESSION['queuetarget'];

header('Content-Type: application/json');
echo json_encode($data);
exit();

?>
