getMessage(); include 'templates/message.php'; exit(); } // // Component events listings // // list of all component events (default) //if ($jitsi_component) { try { $component = new Component($db); // prepare the result $search = $component->jitsiComponents($jitsi_component, $component_id, $from_time, $until_time); if (!empty($search)) { $components = array(); $components['records'] = array(); foreach ($search as $item) { extract($item); $component_record = array( // assign title to the field in the array record 'component' => $jitsi_component, 'loglevel' => $loglevel, 'time' => $time, 'component ID' => $component_id, 'event' => $event_type, 'param' => $event_param, ); // populate the result array array_push($components['records'], $component_record); } } } catch (Exception $e) { $error = 'Error: ' . $e->getMessage(); include 'templates/message.php'; exit(); } // display the result // format the header message echo "
\n"; if (isset($_REQUEST['name']) && $_REQUEST['name'] != '') { echo "
Jitsi events for component " . $_REQUEST['name'] . ""; } elseif (isset($_REQUEST['id']) && $_REQUEST['id'] != '') { echo "
Jitsi events for component ID
" . $_REQUEST['id'] . ""; } else { echo "
Jitsi events for all components"; } if ($time_range_specified) { echo "
for the time period $from_time - $until_time"; } echo "
\n\n"; // filters - time selection and sorting dropdowns include 'templates/results-filter.php'; echo "
\n\n"; // results table echo "
\n"; if (!empty($components['records'])) { echo "\t\n"; echo "\t\t\n"; // table headers foreach (array_keys($components['records'][0]) as $header) { echo "\t\t\t\n"; } echo "\t\t\n"; //table rows foreach ($components['records'] as $row) { echo "\t\t\n"; // sometimes $column is empty, we make it '' then foreach ($row as $key => $column) { if ($key === 'component ID') { echo "\t\t\t\n"; } elseif ($key === 'component') { echo "\t\t\t\n"; } else { echo "\t\t\t\n"; } } echo "\t\t\n"; } echo "\t
" . htmlspecialchars($header) . "
" . htmlspecialchars($column ?? '') . "" . htmlspecialchars($column ?? '') . "" . htmlspecialchars($column ?? '') . "
\n"; } else { echo '

No matching Jitsi component events found.

'; } echo "\n
\n"; //} ?>