#!/usr/local/bin/perl # exec_form.cgi # Display a form for executing SQL in some database require './postgresql-lib.pl'; &ReadParse(); &can_edit_db($in{'db'}) || &error($text{'dbase_ecannot'}); &ui_print_header(undef, $text{'exec_title'}, "", "exec_form"); # Form for executing an SQL command print "

",&text('exec_header', "$in{'db'}"),"

\n"; print "

\n"; print "\n"; print "
\n"; print "
\n"; # Form for executing commands from a file print "
\n"; print "

",&text('exec_header2', "$in{'db'}"),"

\n"; print "

\n"; print " \n"; print "\n"; print " ", "\n"; print "
", "$text{'exec_file'} ", &file_chooser_button("file", 0, 1),"
", "$text{'exec_upload'}
\n"; # Form for loading a CSV or tab-separated file print "
\n"; print "

",&text('exec_header3', "$in{'db'}"),"
", $text{'exec_header4'},"

\n"; print "

\n"; print " \n"; print "\n"; print " ", "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
", "$text{'exec_file'} ", &file_chooser_button("file", 0, 2),"
", "$text{'exec_upload'}
$text{'exec_import'}
$text{'exec_delete'} $text{'yes'}\n"; print " $text{'no'}
$text{'exec_ignore'} $text{'yes'}\n"; print " $text{'no'}
$text{'exec_format'}",&ui_radio("format", 2, [ [ 0, $text{'csv_format0'} ], [ 1, $text{'csv_format1'} ], [ 2, $text{'csv_format2'} ] ]), "
\n"; &ui_print_footer("edit_dbase.cgi?db=$in{'db'}", $text{'dbase_return'}, "", $text{'index_return'});