get($settings->get('domain', 'language', 'en-us'), dirname($widget_url)); //get the dashboard label $widget_label = $text['title-'.$widget_key] ?? $widget_name; //prepare variables $widget_target = ($widget_target == 'new') ? '_blank' : '_self'; $window_parameters = ''; if (!empty($widget_width) && !empty($widget_height)) { $window_parameters .= "width=".$widget_width.",height=".$widget_height; } //channel count $esl = event_socket::create(); //registration count $active_registrations = 0; if ($esl->is_connected() && file_exists(dirname(__DIR__, 4)."/app/registrations/")) { $registration = new registrations; if (permission_exists("registration_all")) { $active_registrations = $registration->show = 'all'; } $active_registrations = $registration->count(); } //get the total enabled extensions $sql = "select count(*) as count from v_extensions "; $sql .= "where enabled = 'true' "; $parameters = null; if (!permission_exists("registration_all")) { $sql .= "and domain_uuid = :domain_uuid "; $parameters['domain_uuid'] = $_SESSION['domain_uuid']; } $sql .= "and extension_type = 'default'; "; $row = $database->select($sql, $parameters, 'row'); $enabled_extensions = $row['count']; unset($sql, $row); //calculate the inactive extensions $inactive_registrations = $enabled_extensions - $active_registrations; //dashboard icon echo "