id = 'snmp'; $table->width = '100%'; $table->class = 'databox data'; $table->cellpadding = 0; $table->cellspacing = 0; $table->head = array (); $table->head["description"] = __('Description'); $table->head["oid"] = __('OID'); $table->head["post_process"] = __('Post process'); $table->head["op"] = __('OP'); $table->headstyle = array (); $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 = array (); $table->align["description"] = 'left'; $table->align["oid"] = 'left'; $table->align["post_process"] = 'right'; $table->align["op"] = 'center'; $table->size = array(); $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 = array (); foreach ($oid_translations as $oid => $data) { $row = array(); $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'] = array( 'oid' => '', 'description' => '', 'post_process' => '', 'op' => cell_op() ); $table->rowstyle['template'] = 'display: none;'; // Form editor $table->data['editor'] = array( '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, array ("title" => __('Save'))) .'' . '' . ''); html_print_table($table); function cell_op($oid = "") { return '' . '' . html_print_image("images/cog.png", true, array ("title" => __('Edit'))) . '' . '' . html_print_image("images/cross.png", true, array ("title" => __('Delete'))) . ''; } ?>