#!/usr/local/bin/perl # sqlform.cgi # Display the form for one SQL command on a page require './custom-lib.pl'; &ReadParse(); @cmds = &list_commands(); $cmd = $cmds[$in{'idx'}]; &can_run_command($cmd) || &error($text{'form_ecannot'}); # Display form for command parameters &ui_print_header(undef, $text{'form_title'}, ""); @a = @{$cmd->{'args'}}; ($up) = grep { $_->{'type'} == 10 } @a; if ($up) { print "
\n"; } elsif (@a) { print "\n"; } else { print "\n"; } print "\n"; print "\n"; print "\n"; print "
",&html_escape($cmd->{'desc'}),"
",$cmd->{'html'},"\n"; foreach $a (@{$cmd->{'args'}}) { print "\n" if (!$col); print "\n"; print "\n" if ($col); $col = !$col; } print "\n" if ($col); print "\n"; print "
",&html_escape($a->{'desc'}), " \n"; $n = $a->{'name'}; if ($a->{'type'} == 0) { print "\n"; } elsif ($a->{'type'} == 1 || $a->{'type'} == 2) { print " ", &user_chooser_button($n, 0); } elsif ($a->{'type'} == 3 || $a->{'type'} == 4) { print " ", &group_chooser_button($n, 0); } elsif ($a->{'type'} == 5 || $a->{'type'} == 6) { print " ", &file_chooser_button($n, $a->{'type'}-5); } elsif ($a->{'type'} == 7) { print " $text{'yes'}\n"; print " $text{'no'}\n"; } elsif ($a->{'type'} == 8) { print "\n"; } elsif ($a->{'type'} == 9) { print "\n"; } elsif ($a->{'type'} == 10) { print "\n"; } elsif ($a->{'type'} == 11) { print "\n"; } print "
", "
\n"; &ui_print_footer("", $text{'index_return'});