diff --git a/app/registrations/resources/dashboard/config.php b/app/registrations/resources/dashboard/config.php index d635b666f4..e104100096 100644 --- a/app/registrations/resources/dashboard/config.php +++ b/app/registrations/resources/dashboard/config.php @@ -3,7 +3,7 @@ //registrations icon $array['dashboard'][$x]['dashboard_uuid'] = 'ce343ebe-3b54-4aad-b7e0-66de02171e78'; $array['dashboard'][$x]['dashboard_name'] = 'Registrations'; -$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon.php'; +$array['dashboard'][$x]['dashboard_path'] = 'registrations/registrations.php'; $array['dashboard'][$x]['dashboard_icon'] = 'fa-list-check'; $array['dashboard'][$x]['dashboard_url'] = '/app/registrations/registrations.php'; $array['dashboard'][$x]['dashboard_target'] = 'self'; diff --git a/app/registrations/resources/dashboard/registrations.php b/app/registrations/resources/dashboard/registrations.php new file mode 100644 index 0000000000..7f0e7cbcd1 --- /dev/null +++ b/app/registrations/resources/dashboard/registrations.php @@ -0,0 +1,66 @@ +get($_SESSION['domain']['language']['code'], dirname($dashboard_url)); + +//get the dashboard label + $dashboard_label = $text['title-'.$dashboard_key]; + if (empty($dashboard_label)) { + $dashboard_label = $dashboard_name; + } + +//prepare variables + $dashboard_target = ($dashboard_target == 'new') ? '_blank' : '_self'; + $window_parameters = ''; + if (!empty($dashboard_width) && !empty($dashboard_height)) { + $window_parameters .= "width=".$dashboard_width.",height=".$dashboard_height; + } + +//channel count + if ($esl == null) { + $esl = event_socket::create(); + } + +//registration count + if ($esl->is_connected() && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/registrations/")) { + $registration = new registrations; + $active_registrations = $registration->count(); + } + +//get the total enabled extensions + $sql = "select count(*) as count from v_extensions "; + $sql .= "where domain_uuid = :domain_uuid "; + $sql .= "and enabled = 'true'; "; + $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + $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 "
\n"; + echo "
\n"; + echo " ".escape($dashboard_label).""; + echo " \n"; + echo "
\n"; + echo " Inactive: ".$inactive_registrations."\n"; + echo " Active: ".$active_registrations."\n"; + echo "
\n"; + echo "
\n"; + if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") { + echo "
".str_replace("\r", '
', escape($dashboard_content_details))."
\n"; + } + echo " "; + echo "
\n"; + +?>