Нужно добавить парсинг из вашей таблицы queue_log. Делается это так:
// Populates an array with the EVENTS ids
$query = "SELECT * FROM qevent ORDER BY event_id";
$res = consulta_db($query,0,0);
while($row = db_fetch_row($res)) {
$event_array["$row[1]"] = $row[0 ...

