3 # Display the form for one SQL command on a page
5 require './custom-lib.pl';
7 $cmd = &get_command($in{'id'}, $in{'idx'});
8 &can_run_command($cmd) || &error($text{'form_ecannot'});
10 # Display form for command parameters
11 &ui_print_header(undef, $text{'form_title'}, "");
12 @a = @{$cmd->{'args'}};
13 ($up) = grep { $_->{'type'} == 10 } @a;
15 print &ui_form_start("sql.cgi", "form-data");
18 print &ui_form_start("sql.cgi", "post");
21 print &ui_form_start("sql.cgi");
23 print &ui_hidden("id", $cmd->{'id'});
24 print &ui_table_start(&html_escape($cmd->{'desc'}), "width=100%", 4,
25 [ "width=20%", "width=30%", "width=20%", "width=30%" ]);
26 print &ui_table_row(undef, $cmd->{'html'}, 4);
28 foreach $a (@{$cmd->{'args'}}) {
29 print &ui_table_row(&html_escape($a->{'desc'}),
30 &show_parameter_input($a, 0));
33 print &ui_table_end();
34 print &ui_form_end([ [ undef, $text{'form_exec'} ] ]);
36 &ui_print_footer("", $text{'index_return'});