'; $table = new stdClass(); $table->width = '100%'; $table->class = 'databox filters'; $table->style[0] = 'font-weight: bolder;'; $table->data[0][0] = __('Name:'); $table->data[0][1] = html_print_input_text('name', $name, __('Name'), 20, 30, true); $table->data[1][0] = __('Description'); $table->data[1][1] = html_print_textarea('description', 5, 10, $description, '', true); $icons = get_list_os_icons_dir(); $table->data[2][0] = __('Icon'); $table->data[2][1] = html_print_select($icons, 'icon', $icon, 'show_icon_OS();', __('None'), 0, true); $table->data[2][1] .= ' ' . ui_print_os_icon($idOS, false, true) . ''; html_print_table($table); html_print_input_hidden('id_os', $idOS); html_print_input_hidden ('action', $actionHidden); echo '
'; html_print_submit_button ($textButton, 'update_button', false, $classButton); echo '
'; echo ''; function get_list_os_icons_dir() { global $config; $return = array(); $items = scandir($config['homedir'] . '/images/os_icons'); foreach ($items as $item) { if (strstr($item, '_small.png') || strstr($item, '_small.gif') || strstr($item, '_small.jpg')) { continue; } if (strstr($item, '.png') || strstr($item, '.gif') || strstr($item, '.jpg')) { $return[$item] = $item; } } return $return; } ?>