';
- // Description
- echo ''.''.__('Description').' | '.'';
- html_print_textarea('description', 3, 2, $description, 'class="w400px"');
- echo ' | '.'
';
+ // Description.
+ echo '';
+ echo ''.__('Description').' | ';
+ echo '';
+ html_print_textarea('description', 3, 2, $description, 'class="w400px"');
+ echo ' | ';
+ echo '
';
- // echo '' . __('Alert filters') . ui_print_help_icon("snmp_alert_filters", true) . ' |
';
- // OID
- echo ''.''.__('Enterprise String').ui_print_help_tip(__('Matches substrings. End the string with $ for exact matches.'), true).' | '.'';
+ // OID.
+ echo ' |
';
+ echo ''.__('Enterprise String').ui_print_help_tip(__('Matches substrings. End the string with $ for exact matches.'), true).' | ';
+ echo '';
html_print_input_text('oid', $oid, '', 50, 255);
- echo ' |
';
+ echo '';
+ echo '';
- // Custom
+ // Custom.
echo ''.__('Custom Value/OID');
echo ' | ';
html_print_textarea('custom_value', 2, 2, $custom_value, 'class="w400px"');
- echo ' |
';
+ echo '';
+ echo '';
- // SNMP Agent
+ // SNMP Agent.
echo ''.__('SNMP Agent').' (IP) | ';
html_print_input_text('source_ip', $source_ip, '', 20);
- echo ' |
';
+ echo '';
+ echo '';
$return_all_group = false;
@@ -750,7 +798,7 @@ if ($create_alert || $update_alert) {
$return_all_group = true;
}
- // Group
+ // Group.
echo ''.__('Group').' | ';
echo ' ';
html_print_select_groups(
@@ -774,183 +822,222 @@ if ($create_alert || $update_alert) {
false
);
echo ' ';
- echo ' |
';
+ echo '';
+ echo '';
- // Trap type
+ // Trap type.
echo ''.__('Trap type').' | ';
echo html_print_select($trap_types, 'trap_type', $trap_type, '', '', '', false, false, false);
- echo ' |
';
+ echo '';
+ echo '';
- // Single value
+ // Single value.
echo ''.__('Single value').' | ';
html_print_input_text('single_value', $single_value, '', 20);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #1
- echo ''.''.__('Variable bindings/Data').' | ';
+ // Variable bindings/Data #1.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_1', $order_1, '', 4);
html_print_input_text('custom_oid_data_1', $custom_oid_data_1, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #2
- echo ''.__('Variable bindings/Data');
- // echo ui_print_help_icon ("snmp_alert_custom", true);
- echo ' | ';
+ // Variable bindings/Data #2.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_2', $order_2, '', 4);
html_print_input_text('custom_oid_data_2', $custom_oid_data_2, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #3
- echo ''.__('Variable bindings/Data');
- // echo ui_print_help_icon ("snmp_alert_custom", true);
- echo ' | ';
+ // Variable bindings/Data #3.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_3', $order_3, '', 4);
html_print_input_text('custom_oid_data_3', $custom_oid_data_3, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #4
- echo ''.''.__('Variable bindings/Data');
- // echo ui_print_help_icon ("snmp_alert_custom", true);
- echo ' | ';
+ // Variable bindings/Data #4.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_4', $order_4, '', 4);
html_print_input_text('custom_oid_data_4', $custom_oid_data_4, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #5
- echo ''.''.__('Variable bindings/Data');
- // echo ui_print_help_icon ("snmp_alert_custom", true);
- echo ' | ';
+ // Variable bindings/Data #5.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_5', $order_5, '', 4);
html_print_input_text('custom_oid_data_5', $custom_oid_data_5, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #6
- echo ''.''.__('Variable bindings/Data');
- // echo ui_print_help_icon ("snmp_alert_custom", true);
- echo ' | ';
+ // Variable bindings/Data #6.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_6', $order_6, '', 4);
html_print_input_text('custom_oid_data_6', $custom_oid_data_6, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #7
- echo ''.''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #7.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_7', $order_7, '', 4);
html_print_input_text('custom_oid_data_7', $custom_oid_data_7, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #8
- echo ''.''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #8.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_8', $order_8, '', 4);
html_print_input_text('custom_oid_data_8', $custom_oid_data_8, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #9
- echo ''.''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #9.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_9', $order_9, '', 4);
html_print_input_text('custom_oid_data_9', $custom_oid_data_9, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #10
- echo ''.''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #10.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_10', $order_10, '', 4);
html_print_input_text('custom_oid_data_10', $custom_oid_data_10, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #11
- echo ''.''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #11.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_11', $order_11, '', 4);
html_print_input_text('custom_oid_data_11', $custom_oid_data_11, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #12
- echo ''.''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #12.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_12', $order_12, '', 4);
html_print_input_text('custom_oid_data_12', $custom_oid_data_12, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #13
- echo ''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #13.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_13', $order_13, '', 4);
html_print_input_text('custom_oid_data_13', $custom_oid_data_13, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #14
- echo ''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #14.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_14', $order_14, '', 4);
html_print_input_text('custom_oid_data_14', $custom_oid_data_14, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #15
- echo ''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #15.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_15', $order_15, '', 4);
html_print_input_text('custom_oid_data_15', $custom_oid_data_15, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #16
- echo ''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #16.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_16', $order_16, '', 4);
html_print_input_text('custom_oid_data_16', $custom_oid_data_16, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #17
- echo ''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #17.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_17', $order_17, '', 4);
html_print_input_text('custom_oid_data_17', $custom_oid_data_17, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #18
- echo ''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #18.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_18', $order_18, '', 4);
html_print_input_text('custom_oid_data_18', $custom_oid_data_18, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #19
- echo ''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #19.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_19', $order_19, '', 4);
html_print_input_text('custom_oid_data_19', $custom_oid_data_19, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Variable bindings/Data #20
- echo ''.__('Variable bindings/Data');
- echo ' | ';
+ // Variable bindings/Data #20.
+ echo ' |
';
+ echo ''.__('Variable bindings/Data').' | ';
+ echo '';
echo '#';
html_print_input_text('order_20', $order_20, '', 4);
html_print_input_text('custom_oid_data_20', $custom_oid_data_20, '', 60);
- echo ' |
';
+ echo '';
+ echo '';
- // Alert fields
+ // Alert fields.
$al = [
'al_field1' => $al_field1,
'al_field2' => $al_field2,
@@ -974,7 +1061,7 @@ if ($create_alert || $update_alert) {
'al_field20' => $al_field20,
];
- // Hidden div with help hint to fill with javascript
+ // Hidden div with help hint to fill with javascript.
html_print_div(['id' => 'help_snmp_alert_hint', 'content' => ui_print_help_icon('snmp_alert_field1', true), 'hidden' => true]);
for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
@@ -984,7 +1071,7 @@ if ($create_alert || $update_alert) {
echo '';
}
- // Max / Min alerts
+ // Max / Min alerts.
echo ''.__('Min. number of alerts').' | ';
html_print_input_text('min_alerts', $min_alerts, '', 3);
@@ -992,7 +1079,7 @@ if ($create_alert || $update_alert) {
html_print_input_text('max_alerts', $max_alerts, '', 3);
echo ' |
';
- // Time Threshold
+ // Time Threshold.
echo ''.__('Time threshold').' | ';
$fields = [];
@@ -1014,7 +1101,7 @@ if ($create_alert || $update_alert) {
html_print_input_text('time_other', 0, '', 6);
echo ' '.__('seconds').' |
';
- // Priority
+ // Priority.
echo ''.__('Priority').' | ';
echo html_print_select(get_priorities(), 'priority', $priority, '', '', '0', false, false, false);
echo ' |
';
@@ -1048,10 +1135,11 @@ if ($create_alert || $update_alert) {
echo "";
echo ' | ';
+ html_print_button(__('Back'), 'button_back', false, '', 'class="sub cancel margin-right-05"');
if ($id_as > 0) {
- html_print_submit_button(__('Update'), 'submit', false, 'class="sub upd"', false);
+ html_print_submit_button(__('Update'), 'submit', false, 'class="sub upd"');
} else {
- html_print_submit_button(__('Create'), 'submit', false, 'class="sub wand"', false);
+ html_print_submit_button(__('Create'), 'submit', false, 'class="sub wand"');
}
echo ' |
';
@@ -1089,119 +1177,68 @@ if ($create_alert || $update_alert) {
$form_filter .= '';
$form_filter .= '';
- // echo "
";
ui_toggle($form_filter, __('Alert SNMP control filter'), __('Toggle filter(s)'));
$filter = [];
$offset = (int) get_parameter('offset');
$limit = (int) $config['block_size'];
if ($filter_param) {
- // Move the first page
+ // Move the first page.
$offset = 0;
- $url_pagination = 'index.php?'.'sec=snmpconsole&'.'sec2=godmode/snmpconsole/snmp_alert&'.'free_search='.$free_search.'&'.'trap_type_filter='.$trap_type_filter.'&'.'priority_filter='.$priority_filter;
+ $url_pagination = 'index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&free_search='.$free_search.'&trap_type_filter='.$trap_type_filter.'&priority_filter='.$priority_filter;
} else {
- $url_pagination = 'index.php?'.'sec=snmpconsole&'.'sec2=godmode/snmpconsole/snmp_alert&'.'free_search='.$free_search.'&'.'trap_type_filter='.$trap_type_filter.'&'.'priority_filter='.$priority_filter.'&'.'offset='.$offset;
+ $url_pagination = 'index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&free_search='.$free_search.'&trap_type_filter='.$trap_type_filter.'&priority_filter='.$priority_filter.'&offset='.$offset;
}
$where_sql = '';
- if (!empty($free_search)) {
- switch ($config['dbtype']) {
- case 'mysql':
- case 'postgresql':
- // $where_sql = ' 1 = 1';
- if ($trap_type_filter != SNMP_TRAP_TYPE_NONE) {
- $where_sql .= ' AND `trap_type` = '.$trap_type_filter;
- }
-
- if ($priority_filter != -1) {
- $where_sql .= ' AND `priority` = '.$priority_filter;
- }
-
- $where_sql .= " AND (`single_value` LIKE '%".$free_search."%'
- OR `_snmp_f10_` LIKE '%".$free_search."%'
- OR `_snmp_f9_` LIKE '%".$free_search."%'
- OR `_snmp_f8_` LIKE '%".$free_search."%'
- OR `_snmp_f7_` LIKE '%".$free_search."%'
- OR `_snmp_f6_` LIKE '%".$free_search."%'
- OR `_snmp_f5_` LIKE '%".$free_search."%'
- OR `_snmp_f4_` LIKE '%".$free_search."%'
- OR `_snmp_f3_` LIKE '%".$free_search."%'
- OR `_snmp_f2_` LIKE '%".$free_search."%'
- OR `_snmp_f1_` LIKE '%".$free_search."%'
- OR `oid` LIKE '%".$free_search."%'
- OR `custom_oid` LIKE '%".$free_search."%'
- OR `agent` LIKE '%".$free_search."%'
- OR `description` LIKE '%".$free_search."%')";
- break;
-
- case 'oracle':
- // $where_sql = ' 1 = 1';
- if ($trap_type_filter != SNMP_TRAP_TYPE_NONE) {
- $where_sql .= ' AND trap_type = '.$trap_type_filter;
- }
-
- if ($priority_filter != -1) {
- $where_sql .= ' AND priority = '.$priority_filter;
- }
-
- $where_sql .= " AND (single_value LIKE '%".$free_search."%'
- OR \"_snmp_f10_\" LIKE '%".$free_search."%'
- OR \"_snmp_f9_\" LIKE '%".$free_search."%'
- OR \"_snmp_f8_\" LIKE '%".$free_search."%'
- OR \"_snmp_f7_\" LIKE '%".$free_search."%'
- OR \"_snmp_f6_\" LIKE '%".$free_search."%'
- OR \"_snmp_f5_\" LIKE '%".$free_search."%'
- OR \"_snmp_f4_\" LIKE '%".$free_search."%'
- OR \"_snmp_f3_\" LIKE '%".$free_search."%'
- OR \"_snmp_f2_\" LIKE '%".$free_search."%'
- OR \"_snmp_f1_\" LIKE '%".$free_search."%'
- OR oid LIKE '%".$free_search."%'
- OR custom_oid LIKE '%".$free_search."%'
- OR agent LIKE '%".$free_search."%'
- OR description LIKE '%".$free_search."%')";
- break;
+ if (empty($free_search) === false) {
+ if ($trap_type_filter != SNMP_TRAP_TYPE_NONE) {
+ $where_sql .= ' AND `trap_type` = '.$trap_type_filter;
}
+
+ if ($priority_filter != -1) {
+ $where_sql .= ' AND `priority` = '.$priority_filter;
+ }
+
+ $where_sql .= " AND (`single_value` LIKE '%".$free_search."%'
+ OR `_snmp_f10_` LIKE '%".$free_search."%'
+ OR `_snmp_f9_` LIKE '%".$free_search."%'
+ OR `_snmp_f8_` LIKE '%".$free_search."%'
+ OR `_snmp_f7_` LIKE '%".$free_search."%'
+ OR `_snmp_f6_` LIKE '%".$free_search."%'
+ OR `_snmp_f5_` LIKE '%".$free_search."%'
+ OR `_snmp_f4_` LIKE '%".$free_search."%'
+ OR `_snmp_f3_` LIKE '%".$free_search."%'
+ OR `_snmp_f2_` LIKE '%".$free_search."%'
+ OR `_snmp_f1_` LIKE '%".$free_search."%'
+ OR `oid` LIKE '%".$free_search."%'
+ OR `custom_oid` LIKE '%".$free_search."%'
+ OR `agent` LIKE '%".$free_search."%'
+ OR `description` LIKE '%".$free_search."%')";
}
- $count = db_get_value_sql(
- "SELECT COUNT(*)
- FROM talert_snmp WHERE id_group IN ($str_user_groups) ".$where_sql
+ $count = (int) db_get_value_sql(
+ 'SELECT COUNT(*)
+ FROM talert_snmp WHERE id_group IN ('.$str_user_groups.') '.$where_sql
);
$result = [];
- // Overview
- if ($count == 0) {
+ // Overview.
+ if ($count === 0) {
$result = [];
ui_print_info_message(['no_close' => true, 'message' => __('There are no SNMP alerts') ]);
} else {
ui_pagination($count, $url_pagination);
- switch ($config['dbtype']) {
- case 'mysql':
- case 'postgresql':
- $where_sql .= ' LIMIT '.$limit.' OFFSET '.$offset;
- $result = db_get_all_rows_sql(
- "SELECT *
- FROM talert_snmp
- WHERE id_group IN ($str_user_groups) ".$where_sql
- );
- break;
- case 'oracle':
- $sql = "SELECT *
- FROM talert_snmp
- WHERE id_group IN ($str_user_groups) ".$where_sql;
- $set = [];
- if (isset($offset) && isset($limit)) {
- $set['limit'] = $limit;
- $set['offset'] = $offset;
- }
-
- $result = oracle_recode_query($sql, $set, 'AND', false);
- break;
- }
+ $where_sql .= ' LIMIT '.$limit.' OFFSET '.$offset;
+ $result = db_get_all_rows_sql(
+ 'SELECT *
+ FROM talert_snmp
+ WHERE id_group IN ('.$str_user_groups.') '.$where_sql
+ );
}
$table = new stdClass();
@@ -1250,7 +1287,7 @@ if ($create_alert || $update_alert) {
$data = [];
$data[0] = $row['position'];
- $url = 'index.php?'.'sec=snmpconsole&'.'sec2=godmode/snmpconsole/snmp_alert&'.'id_alert_snmp='.$row['id_as'].'&'.'update_alert=1';
+ $url = 'index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&id_alert_snmp='.$row['id_as'].'&update_alert=1';
$data[1] = '';
$data[1] .= '';
@@ -1281,50 +1318,86 @@ if ($create_alert || $update_alert) {
}
$data[1] .= '
';
-
-
$data[2] = $row['agent'];
$data[3] = $row['oid'];
$data[4] = $row['custom_oid'];
$data[5] = $row['description'];
$data[6] = $row['times_fired'];
- if (($row['last_fired'] != '1970-01-01 00:00:00') and ($row['last_fired'] != '01-01-1970 00:00:00')) {
+ if (($row['last_fired'] !== '1970-01-01 00:00:00') && ($row['last_fired'] !== '01-01-1970 00:00:00')) {
$data[7] = ui_print_timestamp($row['last_fired'], true);
} else {
$data[7] = __('Never');
}
- if (check_acl_restricted_all($config['id_user'], $row['id_group'], 'LW')) {
- $data[8] = ''.html_print_image(
- 'images/copy.png',
- true,
- [
- 'alt' => __('Duplicate'),
- 'title' => __('Duplicate'),
- ]
- ).''.''.html_print_image(
- 'images/config.png',
- true,
- [
- 'border' => '0',
- 'alt' => __('Update'),
- ]
- ).''.''.html_print_image(
- 'images/add.png',
- true,
- [
- 'title' => __('Add action'),
- ]
- ).''.''.html_print_image(
- 'images/cross.png',
- true,
- [
- 'border' => '0',
- 'alt' => __('Delete'),
- ]
- ).'';
+ $data[8] = '';
+ $data[9] = '';
+ if ((bool) check_acl_restricted_all($config['id_user'], $row['id_group'], 'LW') === true) {
+ $data[8] = html_print_anchor(
+ [
+ 'href' => sprintf(
+ 'index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&duplicate_alert=1&id_alert_snmp=%s',
+ $row['id_as']
+ ),
+ 'content' => html_print_image(
+ 'images/copy.png',
+ true,
+ [
+ 'alt' => __('Duplicate'),
+ 'title' => __('Duplicate'),
+ ]
+ ),
+ ],
+ true
+ );
+ $data[8] .= html_print_anchor(
+ [
+ 'href' => sprintf(
+ 'index.php?sec=snmpconsole&sec2=godmode/snmpconsole/snmp_alert&update_alert=1&id_alert_snmp=%s',
+ $row['id_as']
+ ),
+ 'content' => html_print_image(
+ 'images/config.png',
+ true,
+ [
+ 'alt' => __('Update'),
+ 'border' => 0,
+ ]
+ ),
+ ],
+ true
+ );
+ $data[8] .= html_print_anchor(
+ [
+ 'href' => sprintf(
+ 'javascript:show_add_action_snmp(\'%s\');"',
+ $row['id_as']
+ ),
+ 'content' => html_print_image(
+ 'images/add.png',
+ true,
+ [
+ 'title' => __('Add action'),
+ ]
+ ),
+ ],
+ true
+ );
+ $data[8] .= html_print_anchor(
+ [
+ 'href' => 'javascript: ',
+ 'content' => html_print_image(
+ 'images/cross.png',
+ true,
+ [
+ 'title' => __('Delete action'),
+ ]
+ ),
+ 'onClick' => 'delete_snmp_alert('.$row['id_as'].')',
+ ],
+ true
+ );
$data[9] = html_print_checkbox_extended(
'delete_ids[]',
@@ -1335,71 +1408,47 @@ if ($create_alert || $update_alert) {
'class="chk_delete"',
true
);
- } else {
- $data[8] = '';
- $data[9] = '';
}
$idx = count($table->data);
- // The current index of the table is 1 less than the count of table data so we count before adding to table->data
+ // The current index of the table is 1 less than the count of table data so we count before adding to table->data.
array_push($table->data, $data);
$table->rowclass[$idx] = get_priority_class($row['priority']);
}
- // DIALOG ADD MORE ACTIONS
+ // DIALOG ADD MORE ACTIONS.
echo '