- #one
- unless ( $cgi->param('magic') ) {
-
- #oops, silly
- #my $fh = $cgi->upload('csvfile');
- ##warn $cgi;
- ##warn $fh;
- #
- #use Archive::Tar;
- #$tar = Archive::Tar->new();
- #$tar->create_archive($fh); #or die $tar->error;
-
- #haha for now
- my @files = qw(
-authserv credtype dunprev invoice pmtdet product taxplan
-ccdet customer genlog ledger pops pubvars
-cchist discplan glacct origco prodcat recur users
-credcode dundet invline payment prodclas repforms webserv
- );
+ #use DBIx::DBSchema;
+ my $schema = new_native DBIx::DBSchema
+ map { $cgi->param($_) } qw( data_source username password );
+ foreach my $field (qw( data_source username password )) { %>
+ <INPUT TYPE="hidden" NAME=<%= $field %> VALUE="<%= $cgi->param($field) %>">
+ <% }
+
+ my %schema = ();
+ if ( $cgi->param('schema') ) {
+ my $schema_string = $cgi->param('schema');
+ %> <INPUT TYPE="hidden" NAME="schema" VALUE="<%=$schema_string%>"> <%
+ %schema = map { /^\s*(\w+)\s*=>\s*(\w+)\s*$/
+ or die "guru meditation #420: $_";
+ ( $1 => $2 );
+ }
+ split( /\n/, $schema_string );
+ }
+
+ #first page
+ unless ( $cgi->param('magic') ) { %>