'.__('metaconsole').''; } else { $url = __('any node'); } ui_print_warning_message( __( 'This node is configured with centralized mode. All OS definitions are read only. Go to %s to manage them.', $url ) ); } $table = new stdClass(); // $table->width = '100%'; $table->styleTable = 'margin: 10px 10px 0'; $table->class = 'info_table'; $table->head[0] = ''; $table->head[1] = __('ID'); $table->head[2] = __('Name'); $table->head[3] = __('Description'); if ($is_management_allowed === true) { $table->head[4] = ''; } $table->align[0] = 'center'; if ($is_management_allowed === true) { $table->align[4] = 'center'; } $table->size[0] = '20px'; if ($is_management_allowed === true) { $table->size[4] = '20px'; } // Prepare pagination. $offset = (int) get_parameter('offset'); $limit = $config['block_size']; $count_osList = db_get_value('count(*)', 'tconfig_os'); $osList = db_get_all_rows_filter( 'tconfig_os', [ 'offset' => $offset, 'limit' => $limit, ] ); if ($osList === false) { $osList = []; } $table->data = []; foreach ($osList as $os) { $data = []; $data[] = html_print_div(['class' => 'main_menu_icon', 'content' => ui_print_os_icon($os['id_os'], false, true)], true); $data[] = $os['id_os']; if ($is_management_allowed === true) { if (is_metaconsole() === true) { $data[] = ''.io_safe_output($os['name']).''; } else { $data[] = ''.io_safe_output($os['name']).''; } } else { $data[] = io_safe_output($os['name']); } $data[] = ui_print_truncate_text(io_safe_output($os['description']), 'description', true, true); if ($is_management_allowed === true) { $table->cellclass[][4] = 'table_action_buttons'; if ($os['id_os'] > 16) { if (is_metaconsole() === true) { $hrefDelete = 'index.php?sec=advanced&sec2=advanced/component_management&tab=os_manage&action=delete&tab2=list&id_os='.$os['id_os']; } else { $hrefDelete = 'index.php?sec=gsetup&sec2=godmode/setup/os&action=delete&tab=list&id_os='.$os['id_os']; } $data[] = html_print_anchor( [ 'href' => $hrefDelete, 'class' => 'inverse_filter main_menu_icon', 'content' => html_print_image('images/delete.svg', true), ], true ); } else { // The original icons of pandora don't delete. $data[] = ''; } } $table->data[] = $data; } if (isset($data) === true) { html_print_table($table); ui_pagination($count_osList, ui_get_url_refresh(['message' => false]), $offset, 0, false, 'offset', true, 'pagination-bottom'); } else { ui_print_info_message(['no_close' => true, 'message' => __('There are no defined operating systems') ]); } if (is_metaconsole() === true) { echo '
'; echo "
"; html_print_submit_button(__('Create OS'), '', false, 'class="sub next"'); echo '
'; echo '
'; }