HomeAudio/ajax_getqueuelist.php

23 lines
467 B
PHP

<?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();
?>