Portions created by the Initial Developer are Copyright (C) 2008-2024 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane James Rose */ //includes files require_once dirname(__DIR__, 2) . "/resources/require.php"; require_once "resources/check_auth.php"; //check permissions if (!permission_exists('conference_active_view')) { echo "access denied"; exit; } //add multi-lingual support $language = new text; $text = $language->get(); //create token $token = (new token())->create($_SERVER['PHP_SELF']); //pass the token to the subscriber class so that when this subscriber makes a websocket //connection, the subscriber object can validate the information. subscriber::save_token($token, ['active.conferences']); //include the header $document['title'] = $text['title-active_conferences']; require_once "resources/header.php"; //break the caching $version = md5(file_get_contents(__DIR__ . '/resources/javascript/websocket_client.js')); //get websocket settings from default settings $ws_settings = [ 'reconnect_delay' => (int)$settings->get('active_conferences', 'reconnect_delay', 2000), 'ping_interval' => (int)$settings->get('active_conferences', 'ping_interval', 30000), 'auth_timeout' => (int)$settings->get('active_conferences', 'auth_timeout', 10000), 'pong_timeout' => (int)$settings->get('active_conferences', 'pong_timeout', 10000), 'refresh_interval' => (int)$settings->get('active_conferences', 'refresh_interval', 0), 'max_reconnect_delay' => (int)$settings->get('active_conferences', 'max_reconnect_delay', 30000), 'pong_timeout_max_retries' => (int)$settings->get('active_conferences', 'pong_timeout_max_retries', 3), ]; //get theme colors for status indicator $status_colors = [ 'connected' => $settings->get('theme', 'active_conference_status_connected', '#28a745'), 'warning' => $settings->get('theme', 'active_conference_status_warning', '#ffc107'), 'disconnected' => $settings->get('theme', 'active_conference_status_disconnected', '#dc3545'), 'connecting' => $settings->get('theme', 'active_conference_status_connecting', '#6c757d'), ]; //get status indicator mode and icons $status_indicator_mode = $settings->get('theme', 'active_conference_status_indicator_mode', 'color'); $status_icons = [ 'connected' => $settings->get('theme', 'active_conference_status_icon_connected', 'fa-solid fa-plug-circle-check'), 'warning' => $settings->get('theme', 'active_conference_status_icon_warning', 'fa-solid fa-plug-circle-exclamation'), 'disconnected' => $settings->get('theme', 'active_conference_status_icon_disconnected', 'fa-solid fa-plug-circle-xmark'), 'connecting' => $settings->get('theme', 'active_conference_status_icon_connecting', 'fa-solid fa-plug fa-fade'), ]; //get status tooltips from translations $status_tooltips = [ 'connected' => $text['status-connected'], 'warning' => $text['status-warning'], 'disconnected' => $text['status-disconnected'], 'connecting' => $text['status-connecting'], ]; ?> \n"; echo "
".$text['title-active_conferences'].""; if ($status_indicator_mode === 'icon') { echo ""; } else { echo "
0
"; } echo "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "\n"; echo $text['description-active']."\n"; echo "

\n"; //show the content echo "
"; // Replaced ajax_response echo "

"; //include the footer require_once "resources/footer.php"; ?>