diff --git a/includes/html/print-alert-transports.php b/includes/html/print-alert-transports.php index 9baa91020c..0b4adc98f3 100644 --- a/includes/html/print-alert-transports.php +++ b/includes/html/print-alert-transports.php @@ -13,31 +13,27 @@ $no_refresh = true; require_once 'includes/html/modal/edit_alert_transport.inc.php'; require_once 'includes/html/modal/edit_transport_group.inc.php'; +if (Auth::user()->hasGlobalAdmin()) { + echo ""; +} ?> - +
+
- - + - '; // Iterate through each alert transport -$query = 'SELECT `transport_id` AS `id`, `transport_name` AS `name`, `transport_type` AS `type`, `is_default`, `transport_config` AS `config` FROM `alert_transports`'; +$query = 'SELECT `transport_id` AS `id`, `transport_name` AS `name`, `transport_type` AS `type`, `is_default`, `transport_config` AS `config` FROM `alert_transports` order by `name`'; foreach (dbFetchRows($query) as $transport) { echo ""; - echo ''; echo ''; echo ''; if ($transport['is_default'] == true) { @@ -80,9 +76,9 @@ foreach (dbFetchRows($query) as $transport) { // Add action buttons for admin users only if (Auth::user()->hasGlobalAdmin()) { echo "
"; - echo " "; - echo ""; - echo " "; + echo " "; + echo ""; + echo " "; echo '
'; } echo ''; @@ -91,33 +87,33 @@ foreach (dbFetchRows($query) as $transport) { ?>
# Transport Name Transport Type Default DetailsActionAction
hasGlobalAdmin()) { - echo ""; -} - -echo '
#' . ((int) $transport['id']) . '' . $transport['name'] . '' . $transport['type'] . '
+
+hasGlobalAdmin()) { + echo ""; +} +?> + +
+
- - - + - '; //Iterate through alert groups -$query = 'SELECT `transport_group_id` AS `id`, `transport_group_name` AS `name` FROM `alert_transport_groups`'; +$query = 'SELECT `transport_group_id` AS `id`, `transport_group_name` AS `name` FROM `alert_transport_groups` order by `name`'; foreach (dbFetchRows($query) as $group) { echo ""; - echo ''; echo ''; //List out the members of each group - $query = 'SELECT `transport_type`, `transport_name` FROM `transport_group_transport` AS `a` LEFT JOIN `alert_transports` AS `b` ON `a`.`transport_id`=`b`.`transport_id` WHERE `transport_group_id`=?'; + $query = 'SELECT `transport_type`, `transport_name` FROM `transport_group_transport` AS `a` LEFT JOIN `alert_transports` AS `b` ON `a`.`transport_id`=`b`.`transport_id` WHERE `transport_group_id`=? order by `transport_name`'; $members = dbFetchRows($query, [$group['id']]); - echo ''; echo '';
# Transport GroupSize MembersActionAction
hasGlobalAdmin()) { - echo ""; -} -echo '
#' . ((int) $group['id']) . '' . $group['name'] . '' . sizeof($members) . ''; foreach ($members as $member) { echo '' . ucfirst($member['transport_type']) . ': ' . $member['transport_name'] . '
'; @@ -126,8 +122,8 @@ foreach (dbFetchRows($query) as $group) { echo '
'; if (Auth::user()->hasGlobalAdmin()) { echo "
"; - echo " "; - echo ""; + echo " "; + echo ""; echo '
'; } echo '