id = 'snmp'; $table->width = '100%'; $table->class = 'databox data'; $table->cellpadding = 0; $table->cellspacing = 0; $table->head = []; $table->head['description'] = __('Description'); $table->head['oid'] = __('OID'); $table->head['post_process'] = __('Post process'); $table->head['op'] = __('OP'); $table->headstyle = []; $table->headstyle['description'] = 'text-align: left;'; $table->headstyle['oid'] = 'text-align: left;'; $table->headstyle['post_process'] = 'text-align: right;'; $table->headstyle['op'] = 'text-align: center;'; $table->align = []; $table->align['description'] = 'left'; $table->align['oid'] = 'left'; $table->align['post_process'] = 'right'; $table->align['op'] = 'center'; $table->size = []; $table->size['description'] = '40%'; $table->size['oid'] = '25%'; $table->size['post_process'] = '25%'; $table->size['op'] = '10%'; $oid_translations = snmp_get_translation_wizard(); $table->data = []; foreach ($oid_translations as $oid => $data) { $row = []; $row['oid'] = $oid; $row['description'] = $data['description']; $row['post_process'] = $data['post_process']; if ($data['readonly']) { $row['op'] = ''; } else { $row['op'] = cell_op($oid); } $table->data[$oid] = $row; } $table->data['template'] = [ 'oid' => '', 'description' => '', 'post_process' => '', 'op' => cell_op(), ]; $table->rowstyle['template'] = 'display: none;'; // Form editor $table->data['editor'] = [ 'oid' => html_print_input_text('oid_editor', '', '', 40, 255, true), 'description' => html_print_input_text('description_editor', '', '', 40, 255, true), 'post_process' => html_print_input_text('post_process_editor', '', '', 20, 255, true), 'op' => ''.''.html_print_image('images/save_mc.png', true, ['title' => __('Save')]).''.''.'', ]; html_print_table($table); function cell_op($oid='') { return ''.''.html_print_image('images/cog.png', true, ['title' => __('Edit')]).''.''.html_print_image('images/cross.png', true, ['title' => __('Delete')]).''; } ?>